Non connectable advertisement completion callback

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
wisilica
Offline
Last seen:9 months 2 weeks ago
加入:2015-03-17 08:16
Non connectable advertisement completion callback

Hi,
I am working on the ble_app_peripheral project. I have modifed the user_app_callbacks structure in user_callback_config.h file as follows :

.app_on_adv_nonconn_complete = user_adv_stopped
Could you please suggest the possible scenarios wherein this callback would be triggered. I am aware of the fact that 2 of the scenarios are, explicit cancellation of the non connectable advertisement(using api app_easy_gap_advertise_stop) and during a connection triggered from a central device. Please explain about all the possible scenarios.

Thanks in advance,
Wisilica

Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi wisilica,

Hi wisilica,

Since the device is advertising in non-connectable mode, there is no receiver activity during the advertising therefore it cannot receive any connection request, the only way, as far as i am aware, to stop the advertising (non-connectable) and get the callback to be invoked is by cancelling the command, that means that if while advertising and you issue a GAPM_CANCEL_CMD the advertising will be cancelled, so if you are experiencing something like this perhaps the code doesn't go through an app_easy_advertise_stop() but you send a GAPM_CANCEL_CMD.

Thanks MT_dialog