Socket leaks
This applies to devices with the u-blox SARA-R410 cellular component used in the XBee 3 Cellular LTE-M Global Smart Modem.
Condition
There are instances where a socket leaks when closing a connection while there is pending RX data. This state is reported whenever the number of leaked sockets causes an inability to create a new connection.
For Transparent and API modes the XBee 3 Cellular LTE-M/NB-IoT returns specific status responses to describe that you need to perform a hard reset to recover the leaked sockets. These statuses are:
Mode | Response |
---|---|
Transparent mode |
CI (Protocol/Connection Indication) reports 0x13 Socket leak |
API mode |
Transmit (TX) Status - 0x89 status 0x32 Resource error (retry operation later) |
MicroPython |
When attempting to make a connection to a server you receive errno.ENFILE (7023) |
Solution
To recover the leaked sockets and make them available again in all modes, you should perform a reset of the cellular component (hard or soft).