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

sd_ble_gatts_hvx() returns 13313 if notifications are not enabled

Hello,

I can see, that sd_ble_gatts_hvx() returns 13313, if the notification is not enabled for that characteristic from the connected central. --> S120 Softdevice runs as peripheral. Is that right? Do I have to handle that error in any case?

Regards, BTprogrammer

Parents
  • Hi BT,

    It's the BLE_ERROR_GATTS_SYS_ATTR_MISSING and should not be ignored. You should initialize the system attribute (the CCCD value) by calling sd_ble_gatts_sys_attr_set() (either with NULL or with the value was set before if it's a bonded device).

    If the case was that the central hasn't enabled the CCCD, you should receive NRF_ERROR_INVALID_STATE instead.

    Please refer to the documentation of sd_ble_gatts_hvx()

Reply
  • Hi BT,

    It's the BLE_ERROR_GATTS_SYS_ATTR_MISSING and should not be ignored. You should initialize the system attribute (the CCCD value) by calling sd_ble_gatts_sys_attr_set() (either with NULL or with the value was set before if it's a bonded device).

    If the case was that the central hasn't enabled the CCCD, you should receive NRF_ERROR_INVALID_STATE instead.

    Please refer to the documentation of sd_ble_gatts_hvx()

Children
No Data
Related