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

BLE NUS sending notification

I am trying to figure out how to use the TX part of the BLE NUS Service to send a notification. Currently I am receiving data via the nus_data_handler, however because i will be receiving multiple packets of 240 bytes I want to be able to notify the app to send the next packets rather the app just sending them one by one without checking if operations have completed.

I am not sure what function triggers the notification or a good place in documentation to understand how to do so.

Thank you

  • Hi,

    I am not sure what function triggers the notification or a good place in documentation to understand how to do so.

     It's the SoftDevice function sd_ble_gatts_hvx() that is used to send notifications. In the ble_app_uart example, the function ble_nus_data_send() is using the sd_ble_gatts_hvx() to send notification based on what it receives over UART.

    If I understand you correctly, then you can send a notification, and when you receive the notification on the central side, you send the next write command from the central.

Related