Recommended method to update manufacturer data when NOT advertising

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution
Anonymous
Not applicable

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.

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

Anonymous
Not applicable

Exactly! Glad you got the answers you were looking for

0 Likes