Hello,
I'm using the nRF52 DK with SDK 15 and SD132 6.1.0. I have a custom service running that requires periodic characteristic writes. Occasionally when writing to this characteristic, sd_ble_gattc_write returns 0x11 (NRF_ERROR_BUSY). When this happens the application attempts to rewrite the characteristic, but after that all future writes return NRF_ERROR_BUSY. While debugging, I noticed that the device did not receive a write response which is preventing any other writes from happening.
It appears that the reason I'm missing the write response has to do with scanning. If I do not re-enable scanning after establishing a connection the device works as expected, but I need to re-enable scanning to connect to other peripheral devices.
I have a few questions relating to the above behavior:
- If the scanning window is sufficiently large is it possible to miss the write response? (Current scan window 80 * 0.625 ms)
- Is there a way to get scanning and characteristic writes to co-exist without issue?
- Is there a way to abort the write so that the application can recover if this does happen?
Thanks in advance,
Eric