This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to debug advertising stopped issue

nRF52832 with softdevice 3.0. Modified ble_app_multirole_lesc project and doing test. Sometimes it doesn't start advertising (can not be found by nRFconnect app). Sometimes doesn't start advertising again after disconnect.

Is there any clue to debug it?

Parents
  • My suggestion is to output to UART for instance the 'p_ble_evt->header.evt_id' from the BLE event handler. Then when it fails to advertise as you expect you can check if there is an BLE event that you are not handling (typically you may find an event id that differ to normal operation).

    An overview of BLE GAP events are for instance found in ble_gap.h, however you may also need to look at ble_ranges.h to find the event id.

    You should also check if you may have an assert, if you have enabled DEBUG define the code may be stuck in the assert handler.

    Best regards,
    Kenneth

Reply
  • My suggestion is to output to UART for instance the 'p_ble_evt->header.evt_id' from the BLE event handler. Then when it fails to advertise as you expect you can check if there is an BLE event that you are not handling (typically you may find an event id that differ to normal operation).

    An overview of BLE GAP events are for instance found in ble_gap.h, however you may also need to look at ble_ranges.h to find the event id.

    You should also check if you may have an assert, if you have enabled DEBUG define the code may be stuck in the assert handler.

    Best regards,
    Kenneth

Children
Related