We would like to stream data through an l2cap channel from a nRF52840 module to a smartphone.
The l2cap connection is initiated by the smartphone, I configured an l2cap tx queue size 12 with the sd_ble_cfg_set call.
The application crashes with softdevice assertion failed error during the closing of the l2cap channel. It happens sporadically, sometimes I have to open and close an l2cap channel ~30 times in order to reproduce the error, sometimes it happens after the first few tries.The error happens usually when the devices are further apart and several buffers are needed to be released before closing the channel. Before all the sdu buffers could be released and before the l2cap channel release event would come the application crashes.
I tried it with several softdevices and with smaller queue (6) and buffer sizes (500 bytes) and the error is still reproducible.
I got the following information from the error handler:
- softdevice 6.0.0:
- id: 1 pc: 68142 info: 0
- softdevice 6.1.0
- id: 1 pc: 75598 info: 0
- softdevice 6.1.1 (currently used in production):
- id: 1 pc: 75706 info: 0
- softdevice 7.2
- id: 1 pc: 77130 info: 0
Is this a known issue? How can we fix it?