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

Reading Bluetooth beacon data with Mesh SDK?

I want to read data, advertised by a bluetooth beacon. I have made this work before with SDK v14 using NRF_SDH_BLE_OBSERVER() to register a handler function to handle BLE_GAP_EVT_ADV_REPORTmessages.

But now I am working with Mesh SDK v0.10. and i can't seem to find anything similar. I am using S132 v5, is it not included in this softdevice?

I also include some files from SDK v12.1, can I find this functionality here instead?

  • I figured it out.

    NRF_SDH_BLE_OBSERVER() not available in Mesh SDK or SKD v12.1. So that is not an option.

    softdevice_ble_evt_handler_set() is available in SDK v12.1 but the API is not implemented in the Mesh SDK and I would like to only use the Mesh SDK as much as possible.

    Luckily the Mesh SDK implements nrf_mesh_rx_cb_set() in the mesh stack. By registering a bluetooth event handler using this function it is possible to detect any bluetooth advertising from nearby devices and then sort out the ones not needed.

Related