- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone!
I'm able to dynamically update manufacturer specific data in the advertisement packet by waiting for CYBLE_BLESS_STATE_EVENT_CLOSE state, updating the data and calling CyBle_GapUpdateAdvData(). I do this only while the stack is in the CYBLE_STATE_ADVERTISING state.
However, what is the recommended method to update manufacturer specific data when the module is in the other states (BLE_APP_STATE_STOPPED, CYBLE_STATE_INITIALIZING, CYBLE_STATE_CONNECTED, CYBLE_STATE_DISCONNECTED)?
I want to update the manufacturer specific data in advance, so that the very first packet that is advertised will contain the correct content.
Thanks in advance,
Pieter
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The advertising data is stored in a buffer, and thus you should be able to modify/update it pretty easily when not advertising it (using the buffer that is). It should be something similar to just changing the data stored in the advertise data buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please have a look at this project:Project #009: Dynamic Broadcaster - Changing Advertising Packets | Cypress Semiconductor
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The advertising data is stored in a buffer, and thus you should be able to modify/update it pretty easily when not advertising it (using the buffer that is). It should be something similar to just changing the data stored in the advertise data buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi e.pratt,
Thanks for the answer! A representative of Cypress has confirmed it as well.
If the BLE module is not advertising, then I can modify the advertisement buffer directly (cyBle_discoveryModeInfo.advData->advData[]).
If the BLE module is advertising, then I need to wait for CYBLE_BLESS_STATE_EVENT_CLOSE state, modify the advertisement buffer (cyBle_discoveryModeInfo.advData->advData[]) and call CyBle_GapUpdateAdvData().
Best regards,
Pieter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exactly! Glad you got the answers you were looking for