This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why it returns NRF_ERROR_INVALID_STATE when calling sd_ble_gap_adv_start()?

Hi,

The err_code shows NRF_ERROR_INVALID_STATE when called sd_ble_gap_adv_start(). I want to know why it happen, and how to handle it. This happened upon the ble disconnected.

Thanks a lot.

Parents
  • When you're disconnecting a link, are you waiting for the appropriate event (BLE_GAP_EVT_DISCONNECTED) back from the softdevice before starting the advertisement again? This is because sd_ble_gap_disconnect() will send a disconnect command over air before you're actually disconnected.

Reply
  • When you're disconnecting a link, are you waiting for the appropriate event (BLE_GAP_EVT_DISCONNECTED) back from the softdevice before starting the advertisement again? This is because sd_ble_gap_disconnect() will send a disconnect command over air before you're actually disconnected.

Children
No Data
Related