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

The proper function to call to "pull" the received data from s120 softdevice stack?

I have been working on the multilink example lately (version: 8.0), I have identified the function to send data on the peripheral part, it is sd_ble_gatts_hvx(), but I'm having a real hard time locating the function to receive data from the s120 softdevice stack on the central part.

Can someone please help me?

Don't mind a little elaboration.

Thank you in advance.

  • I think you should have a look at the BLE central tutorial, found here.

    Whenever the SoftDevice receives a notification, sent with sd_ble_gatts_hvx() from the server (here the peripheral), it will send a BLE_GATTC_EVT_HVX event to the application. With the event you will get a ble_gattc_evt_hvx_t struct, and in this you can find the data.

    In the ble_app_multilink_central example you can see that this is handled in client_handling_ble_evt_handler() in the BLE_GATTC_EVT_HVX case. This is turn calls on_evt_hvx() where the data is used to toggle the LEDs.

Related