arduino-BLEPeripheral icon indicating copy to clipboard operation
arduino-BLEPeripheral copied to clipboard

Indicate Deadlocks on nRF5

Open dsanders11 opened this issue 6 years ago • 0 comments

Indications will deadlock on nRF5 after N indications without any other activity. This is because the current code incorrectly considers indications to use one of the TX buffers, and they never get replenished because there is no BLE_EVT_TX_COMPLETE.

Per documentation for the SoftDevices (S110, S130, S132) indications do not consume an application buffer, so they shouldn't be involved in the TX buffer tracking.

I have a fix in my repo (e6117755e841db643211a1836d16565eacbee4a1) but I didn't open a PR because nRF8 needs to be checked for the same issue, and I think more changes should be made to updateCharacteristicValue, like checking the return value of sd_ble_gatts_hvx for the possible error conditions.

dsanders11 avatar Sep 10 '17 13:09 dsanders11