Open
Description
I noticed several problems when disconnecting on Arduino Nano 33 BLE board. Code execution remained locked in the writeValue()
function, specifically in the HCIClass::sendAclPkt()
function. The code remained locked in the while
loop, because the device is disconnected.
This is the original code:
while (_pendingPkt> = _maxPkt) {
poll ();
}
I solved this way:
int k = 0;
while (_pendingPkt> = _maxPkt) {
k ++;
if (k> _maxPkt) break;
poll ();
}
Everything seems to work well, when it freezes in the cycle if the counter k
exceeds _maxPkt
exits the cycle.
Is this the right way to correct? Has anyone found similar problems?