Hello,
I am trying to send out a notification and getting this error code 13313 (in decimal, 0x3401 in hex). Which eventually leads to BLE_ERROR_GATTS_SYS_ATTR_MISSING. What system attribute am I missing here?
Thank you.
Hello,
I am trying to send out a notification and getting this error code 13313 (in decimal, 0x3401 in hex). Which eventually leads to BLE_ERROR_GATTS_SYS_ATTR_MISSING. What system attribute am I missing here?
Thank you.
You will get this error when the CCCD of the characteristic hasn't been set. You can set it with:
err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
APP_ERROR_CHECK(err_code);
Hello Petter,
it's not clear for me why the CCCD is not set. Isn't the sd_ble_gatts_characteristic_add() function expected to set a characteristic and its CCCD in the stack?
When does the BLE_ERROR_GATTS_SYS_ATR_MISSING error come? Does it come when the GATT client wants to write in the CCCD the first time (register to notification for instance)?
@bloobird0 I think this is well explained here. If anything is still unclear, please let me know.
Is it possible that the client has not bonded yet? This is really weird because I have another service which is BAS and I am able to read and receive notifications on the same client. I also made sure that I am calling BLE_GAP_CONN_SEC_MODE_SET_OPEN(cccd).
I don't know if you have bonded or not. What is weird about that? I'm guessing that the client has written 0x0001 to the CCCD of BAS, but not the CCCD of the characteristic that returns the error?