How do you alternate Advertising frames?

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

cross mob
DaPi_1514011
Level 3
Level 3
First like received

Hi

If I want to alternate advertising payloads, what is the best way to do that?

Can I just update cyBle_discoveryModeInfo.advData from a timer and the stack will send the new contents or is that unsafe and should I stop/start using functions like CyBle_GappStartAdvertisement?

We need to send some Manufacturing data in one advertisement and Name in another due to the space constraints of the packets.

Thanks

0 Likes
1 Solution
DaPi_1514011
Level 3
Level 3
First like received

I just found CyBle_GapUpdateAdvData.

This API function must be called when API function CyBle_GetBleSsState()

returns CYBLE_BLESS_STATE_EVENT_CLOSE state.

So I guess I'll try this from a timer.

View solution in original post

0 Likes
3 Replies
DaPi_1514011
Level 3
Level 3
First like received

I just found CyBle_GapUpdateAdvData.

This API function must be called when API function CyBle_GetBleSsState()

returns CYBLE_BLESS_STATE_EVENT_CLOSE state.

So I guess I'll try this from a timer.

0 Likes

Thank you Gyan,  I did get it working using the same pattern as that example which uses CyBle_GapUpdateAdvData.

0 Likes