Dialog Semiconductor customer support - stop advertising https://support.dialog-semiconductor.com/resource-keywords/stop-advertising en Stop or Cancel Advertising https://support.dialog-semiconductor.com/stop-or-cancel-advertising

Hi,
I'm having trouble stopping advertising after starting. I started with the ble_app_peripheral example and modified it so that it would only advertise after pressing a button for 5 seconds. When the timer stops after 5 seconds and the callback function is called I then try to stop advertising. I've tried many different methods and have been unsuccessful...

In order to only start advertising I have commented out anywhere with a call to user_app_adv_start( ), and modified the struct below, then call user_app_adv_start( ) in my 5 sec button press function.

// Default Handler Operations
static const struct default_app_operations user_default_app_operations = {
//.default_operation_adv = user_app_adv_start,
.default_operation_adv = NULL,

To stop advertising I have tried calling any of the below function but advertising continues and I can still connect even after calling:
- app_easy_gap_advertise_stop( )
- app_easy_timer_cancel(app_adv_data_update_timer_used)
- app_advertise_stop_op( )

I've even tried using the app_easy_gap_undirected_advertise_with_timeout_start( ), but still advertising never stops.

Please advise, thanks.

Device: 
Sun, 14 Aug 2016 23:34:06 +0000 justinturley 4424 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/stop-or-cancel-advertising#comments