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

Advertising timeout event handling in S130@SDK12

Hi Nordic, It's hard to find an example to talk about the event of advertising. I checked the advertising chart and know I will get the event BLE_GAP_EVT_TIMEOUT. Where can I reg a handler function to get this event? The error handler in ble_advertising_init() or some place else?

  • In ble_stack_init() register handler by softdevice_ble_evt_handler_set(ble_evt_dispatch) Inside ble_evt_dispatch list event handler functions depending on your needs. on_ble_evt(p_ble_evt) includes BLE_GAP_EVT_TIMEOUT in examples. This is for S110, I beleive S130 has the same structure. Just checked, BLE_GAP_EVT_TIMEOUT is in ble_advertising_on_ble_evt(p_ble_evt) in S130

Related