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

ble_nus_data_send error occurs sometimes.

MCU: nrf52840

SDK: V 15.2.0 porting with nRF-IEEE-802.15.4-radio-driver

problem:

ble_nus_data_send function sometimes returns BLE_ERROR_GATTS_SYS_ATTR_MISSING error. and also even if returns NRF_SUCCESS, Sometimes not properly works. - ONLY PHONE BLE TURNED ON FIRST CONNECTION (I PHONE 6S+) 
after first failure, next try. it works good. -> back to the first, my i phone turn off bluetooth, turn on and retry, also this issue is repeated.
analyzation: 
when communication failed, ble evt id : 0x50 (i guesses BLE_GATTS_EVT_WRITE) is called ONLY ONCE at the moment of connection.
But, when succeed, this event id is called always TWICE.
background: 
We has already nRF51822 production. but this issue isn't occurred. evt id : 0x50 is always called twice.
Questions:
1) What is role of ble evt id : 0x50 (BLE_GATTS_EVT_WRITE) and Why it is called always twice ?
2) what is relationship between BLE_ERROR_GATTS_SYS_ATTR_MISSING error and phenomenon called only once ( 0x50).
3) how can I handle this issue? 
I'm not sure this assumption. only phenomenon. I would appreciate your advice. thanks.
Parents Reply Children
Related