This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to reset NUS RX Characteristic?

Dear developers,

Currently, I'm developing a new application that uses Nordic Uart Service (NUS) over BLE.

Everything is working fine. However, I would like reset (delete) contents in NUS Rx Characteristic (UUID: 0x6E400002-B....) on every disconnect event, so that this charac. shows Value:0x00 on every new connection.

Do you know anyway to achieve this ?

Thank you.

Parents
  • Hi Carlos,

    You can simply set the value of the characteristic to zero when you receive the DISCONNECTED event (BLE_GAP_EVT_DISCONNECTED) or when you connected, both are fine.

    To set the value of a characteristic, use sd_ble_gatts_value_set()

Reply
  • Hi Carlos,

    You can simply set the value of the characteristic to zero when you receive the DISCONNECTED event (BLE_GAP_EVT_DISCONNECTED) or when you connected, both are fine.

    To set the value of a characteristic, use sd_ble_gatts_value_set()

Children
Related