You can use the following function to stop adverstisements...
// Stop advertising bleprofile_Discoverable(NO_DISCOVERABLE, NULL);
At least this is how you would do so with the WICED Smart SDK...being that it looks like this got moved to the WIFI section maybe you are using a different SDK...
Thanks for the reply
I am using WICED-SDK-3.5.2.
In this I could not find the bleprofile_Discoverable API. Please give more details so that I can use this api.
Thanks in advance.
1 of 1 people found this helpful
I found that the below API was successfully stopping advertisement.
result = wiced_bt_start_advertisements( BTM_BLE_ADVERT_OFF, 0, NULL );
It can be validated using below API
Earlier the problem was once the wiced_bt_start_advertisements( BTM_BLE_ADVERT_OFF, 0, NULL) is called, we get the ble link callback (event BTM_BLE_ADVERT_STATE_CHANGED_EVT) and it was enabling advertisement again. Disabling the hello_sensor_advertisement_stopped() function call in the callback solved this issue.