MCU: nrf52840
SDK: V 15.2.0 porting with nRF-IEEE-802.15.4-radio-driver
problem:
MCU: nrf52840
SDK: V 15.2.0 porting with nRF-IEEE-802.15.4-radio-driver
problem:
Q1: The BLE_GATTS_EVT_WRITE event is generated by the SoftDevice when a Ble Central has written to one of the characteristics on the Ble peripheral. Hence, it is called twice because characteristics are written to.
Q2: Are you calling ble_nus_data_send() before you have called ble_stack_init? If that is the case then you might get, BLE_ERROR_GATTS_SYS_ATTR_MISSING return code.
Q3: Provide us with a sniffer trace of the on air packets using a Ble protocol analyzer or the nRF Sniffer.
Best regards
Bjørn
thanks for the answer.
Q1. does your mention mean that BLE_GATTS_EVT_WRITE event is always dependent on Central Device (My case SmartPhone)?
Q2, No, I always call ble_stack_init at the cold boot. but sometimes ble_nus_data_send returns BLE_ERROR_GATTS_SYS_ATTR_MISSING.
Q3. Ok. I will do this.
Q1: Yes, the BLE_GATTS_EVT_WRITE is only generated when a BLE central is writting to the characteristics /descriptors on the ble peripheral.
Q2: Are you bonding with the smartphone you are trying to notify?
Q3. OK
Best regards
Bjørn
It's been a long time. I know second of BLE_GATTS_EVT_WRITE event after a while. so I wait to receive twice BLE_GATTS_EVT_WRITE, it works, nus_put function doesn't occur BLE_ERROR_GATTS_SYS_ATTR_MISSING error.
Is it timing issue? Why I wait BLE_GATTS_EVT_WRITE event received twice? What is role of BLE_GATTS_EVT_WRITE event?
It's been a long time. I know second of BLE_GATTS_EVT_WRITE event after a while. so I wait to receive twice BLE_GATTS_EVT_WRITE, it works, nus_put function doesn't occur BLE_ERROR_GATTS_SYS_ATTR_MISSING error.
Is it timing issue? Why I wait BLE_GATTS_EVT_WRITE event received twice? What is role of BLE_GATTS_EVT_WRITE event?
_maibi: As previously stated you will get the BLE_GATTS_EVT_WRITE event when a BLE Central has written to a characteristic present on the BLE peripheral.
When you're referring to nus_put , do you mean ble_nus_data_send()?
In order to help you we need to see a sniffer trace of the on air data.