When I use sd_ble_gap_adv_start( ), sometimes get return value NRF_ERROR_BUSY . What's the meaning of this error No. ?
When I use sd_ble_gap_adv_start( ), sometimes get return value NRF_ERROR_BUSY . What's the meaning of this error No. ?
In what case are you getting NRF_ERROR_BUSY? Completely at random or when button is pressed around 1s advertising timeout? My only assumption is that when you pressing on button in that moment previous advertising is timed out and stopped (or stopping) and softdevice generate BLE_GAP_EVT_TIMEOUT event (BLE_GAP_TIMEOUT_SRC_ADVERTISEMENT), but it's pending and this pending event block your sd_ble_gap_adv_start() call. If you are using scheduler, then try to do this:
if (sd_ble_gap_adv_start() == NRF_ERROR_BUSY)
{
app_sched_execute();
sd_ble_gap_adv_start();
}