CyBle 212019 - Unable to start advertisement after disconnecting an existing connection

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

cross mob
DhDa_2432241
Level 5
Level 5
5 likes given First like received First like given

Hello,

I have a simple application which does a connectable advertisement. I am using NRF connect app from app store to connect to CYBLE. Here are the steps I do:

1. Scan for the connectable advertisement using NRF connect

2. Connect to CyBle using NRF connect app

3. Press disconnect in the app

4. Scan to see the connectable advertisement again

Steps 1 to 4 works fine when I do twice. The second time, when I press disconnect I see that advertisement is not starting when I do CyBle_GappStartAdvertisement(). The return value of CyBle_GetState() is 2, which is still DISCONNECTED_STATE.

I decided to restart stack after I disconnect, based on the inputs from other posts on this forum. When I do a BLE stack restart, which is calling CyBle_Stop() and CyBle_Start(stackEventHandler), I see that CyBle_GetState() is 4, which is ADVERTISING_STATE. But the Case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP, is not getting called.

In short, CyBle_State() is getting changed but the associated callback is not getting triggered. How do I fix this?

Thanks

Dheeraj

0 Likes
1 Reply