Skip to content

Jira 824, BLE Peripheral to create Scan Response Data #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

SidLeung
Copy link
Contributor

@SidLeung SidLeung commented Feb 24, 2017

Feature added:

  • Arduino request that the BLE library, in Peripheral mode,
    to support Scan Response Data request from a Central.
  • Arduino expects the reply similar to an Apple device.
    They have provide a policy for the construction of the
    Scan Response data message.

Code mods:

  1. BLEDeviceManager.cpp:
    • Added setAdvertiseData() for the creation of the Scan
      Response Data message.
    • In advDataInit(), follows the policy (defined by
      Arduino) to add Adv data to the Scan Response
      Data message using setAdvertiseData().
  2. BLEDeviceManager.h:
    • prototypeing.

@SidLeung
Copy link
Contributor Author

@bigdinotech @eriknyquist , please review the code change.

@russmcinnis @noelpaz , please perform system testing.

Copy link
Contributor

@noelpaz noelpaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is only on the internal src. There is setAdvertiseData on the external sources possibly BLEPEripheral or BLEDevice. This cannot be tested in Arduino sketch if such an API is exposed

Copy link
Contributor

@noelpaz noelpaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sidney explained why this is so. The first comment led me to believe that the data being set is to be done by the application.

@SidLeung
Copy link
Contributor Author

@noelpaz @russmcinnis , you can use the Elisys analyzer to capture the Request and Respond traffic between a Central (eg. iPhone) and the 101. You can set a longer LocalName now. The name should show up on the Central and the captured traffic should the name in the Scan Response Data reply message.

{
//UINT16_TO_LESTREAM(adv_tmp, uuid.uuid16);
data = (uint8_t *)&(((bt_uuid_16_t *)&_service_uuid)->val);
data = (uint8_t *)&(((bt_uuid_16_t *)&_service_solicit_uuid)->val);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going here? Can't you just do this instead;

data = (uint8_t *) &_service_solicit_uuid.val;

@SidLeung SidLeung force-pushed the Jira824 branch 2 times, most recently from edd4e91 to 2b6a0f9 Compare February 28, 2017 01:14
@russmcinnis
Copy link
Contributor

passed system testing, working on unit testing.

@SidLeung
Copy link
Contributor Author

Code change approved, PR passed system testing, proceed with merging to main trunk.

@yashaswini-hanji , please merge this PR to main trunk. Please be aware that PR #412 has to merge first.

@SidLeung
Copy link
Contributor Author

@yashaswini-hanji , 000efea is the correct PR.

@SidLeung
Copy link
Contributor Author

SidLeung commented Mar 1, 2017

Merger problem at parent PR #412, issue addressed and new PR pushed.

@russmcinnis , please check out the newly generated JSON.

@russmcinnis
Copy link
Contributor

@SidLeung did you review the traces or is there something else to do. The json passed system test.

@SidLeung SidLeung force-pushed the Jira824 branch 2 times, most recently from c26a529 to 0ce1e4d Compare March 3, 2017 01:04
@SidLeung SidLeung assigned russmcinnis and unassigned SidLeung Mar 3, 2017
Feature added:
  - Arduino request that the BLE library, in Peripheral mode,
    to support Scan Response Data request from a Central.
  - Arduino expects the reply similar to an Apple device.
    They have provide a policy for the construction of the
    Scan Response data message.

Code mods:
  1. BLEDeviceManager.cpp:
     - Added setAdvertiseData() for the creation of the Scan
       Response Data message.
     - In advDataInit(), follows the policy (defined by
       Arduino) to add Adv data to the Scan Response
       Data message using setAdvertiseData().
  2. BLEDeviceManager.h:
     - prototypeing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants