Skip to content

Jira 859. Support BLE descriptor processing. #448

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

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

SidLeung
Copy link
Contributor

Feature added:

For Central mode, added the support for processing
BLE descriptor from a connected Peripheral. Enable
the user sketch to access to descriptor value,
length info.

Code modifications:

  1. peripheral_explorer.ino:
    • Example sketch with added descriptor processing.
  2. BLECharacteristic.cpp:
    • Bug fixed in handling multi-descriptors.
  3. BLEDescriptor.cpp:
    • For constructors, added initialization of
      descriptor storage and info.
    • For copy constructor and assignment, take into
      the account of descripter value and info.
    • Added API's for readning and returning descriptor
      info, eg. value, size.
  4. BLEDescriptor.h:
    • Prototyping.
  5. BLEDevice.h:
    • Added descriptor storage declaration.
  6. BLECallbacks.cpp:
    • Added call back event for decriptor arrival.
  7. BLECallbacks.h:
    • Prototyping.
  8. BLECharacteristicImp.cpp:
    • The processing of the descriptor.
  9. BLECharacteristicImp.h:
    • Prototyping.
  10. BLEServiceImp.cpp:
  • Added descriptor info to constructor.
  • Made copy constructor to be aware of descriptor info.
  1. BLEServiceImp.h:
  • Prototyping.

@SidLeung SidLeung added this to the Deneb milestone Feb 22, 2017
@SidLeung SidLeung self-assigned this Feb 22, 2017
@SidLeung
Copy link
Contributor Author

@bigdinotech , @eriknyquist , please review the code.

@russmcinnis , @noelpaz , please check out this new feature. Example sketch included (modified an existing sketch). Please perform system testing.

@russmcinnis
Copy link
Contributor

There is a curly brace missing in peripheral_explorer.ino. I fixed that to test using a 101 with an LED sketch. the descriptor length was 0 so maybe I need to set something on the peripheral or run another device. Anyway we can't go with the pull request since the sketch doesn't compile.

Connecting ...
Connected
Discovering attributes ...
Attributes discovered

Device name:
Service 1800
Service 1801
Service 19b10000-e8f2-537e-4f6c-d104768a1214
Characteristic 19b10001-e8f2-537e-4f6c-d104768a1214, properties 0x10
Descriptor 2901, value 0x

Disconnecting ...
Disconnected

Copy link
Contributor

@russmcinnis russmcinnis left a comment

Choose a reason for hiding this comment

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

fix the missing curly brace in peripheral_explorer.ino example. look at line 135.

@russmcinnis
Copy link
Contributor

Passed system testing for unit testing we need to put a delay(1000) after descriptor.read() in the peripheral_explorer example as Liang noted for this to work so shouldn’t we update the peripheral explorer example to use the delay.
Bat Test Passed

@SidLeung
Copy link
Contributor Author

SidLeung commented Mar 1, 2017

@russmcinnis , agree and made the change in the sample sketch. Please check out the change in the sketch.

@SidLeung SidLeung assigned russmcinnis and unassigned SidLeung Mar 1, 2017
@russmcinnis
Copy link
Contributor

passed system and unit test
@SidLeung can resolve

@russmcinnis russmcinnis assigned SidLeung and unassigned russmcinnis Mar 2, 2017
Feature added:

For Central mode, added the support for processing
BLE descriptor from a connected Peripheral.  Enable
the user sketch to access to descriptor value,
length info.

Code modifications:

1. peripheral_explorer.ino:
   - Example sketch with added descriptor processing.
2. BLECharacteristic.cpp:
   - Bug fixed in handling multi-descriptors.
3. BLEDescriptor.cpp:
   - For constructors, added initialization of
     descriptor storage and info.
   - For copy constructor and assignment, take into
     the account of descripter value and info.
   - Added API's for readning and returning descriptor
     info, eg. value, size.
4. BLEDescriptor.h:
   - Prototyping.
5. BLEDevice.h:
   - Added descriptor storage declaration.
6. BLECallbacks.cpp:
   - Added call back event for decriptor arrival.
7. BLECallbacks.h:
   - Prototyping.
8. BLECharacteristicImp.cpp:
   - The processing of the descriptor.
9. BLECharacteristicImp.h:
   - Prototyping.
10. BLEServiceImp.cpp:
   - Added descriptor info to constructor.
   - Made copy constructor to be aware of descriptor info.
11. BLEServiceImp.h:
   - Prototyping.
@SidLeung
Copy link
Contributor Author

SidLeung commented Mar 3, 2017

@yashaswini-hanji , please merge this PR and close out the Jira.

@SidLeung SidLeung assigned yashaswini-hanji and unassigned SidLeung Mar 3, 2017
@ndgbuilder ndgbuilder merged commit 59d03ae into arduino:master Mar 3, 2017
@yashaswini-hanji
Copy link
Contributor

PR merged and Jira closed

@yashaswini-hanji yashaswini-hanji removed their assignment Mar 3, 2017
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