Hi,
I've got Mkr WiFi 1010 board which is operating as BLE peripheral. I'm facing an issue where the MKR board disconnects from central (be it mobile phone or another MKR WiFi 1010) but the board does not seem to realise that the connection has been lost. The disconnection event handler doesn't get called but messages from the central don't go through and disconnecting from the central doesn't lead to a situation where the peripheral could be connected to again, unless I reset the MKR board. The central sees that the connection is lost.
The disconnection isn't signal strength related and it doesn't seem to have any pattern to it in terms of what the board is doing or timewise either.
I had the same issue in another project which is when it seemed the code never ended up in the disconnect HCIClass::disconnect(uint16_t handle)
in HCI.cpp or ATT.cpp, if that helps at all. I don't really know where to go from there in order to investigate it further.
In that project, a "NULL" message was sent periodically (every 255ms) from peripheral to central to try and keep the connection alive but that didn't solve it. So, I don't think it is to do with the link supervision timeout.
If I turn off the central or disconnect the central, the peripheral does notice the disconnection and it can be reconnected as it starts advertising again.
I'm using Arduino IDE 2.3.2 and Arduino BLE v.1.3.7 and MKR WiFi firmware 1.5.0.
Has anyone else had similar issues with the BLE connection and/or managed to resolve them?