Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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?