I have been testing the XBee3 LTE-M/NB-IoT with incoming TCP connections and I have been seeing some strange behaviour when using extended socket frames.
I create a socket using the Socket Create frame and then set it to listen on a certain port using the Socket Bind/Listen frame. Usually this works fine and connections can be made to the listening port. However, sometimes after sending the Socket Bind/Listen frame and getting a success response I get a Socket State frame about 4s - 4.5s later saying that the listener closed.
This happens regardless of whether or not a connection attempt was made to the listener socket in that time. Once this starts happening it happens every time I try to create a listener socket until the XBee is reset. At this point I'm not sure what causes this behaviour to start. The only information that I have for replicating it is that it seems to happen after the device has disassociated and re-associated a couple of times. (Possibly due to poor RSSI.)
In order to recover from this state a Force Reset is required. I have also tried a Network Reset but the issue persisted.
Any thoughts on why this might be happening? It would be nice not to have to be able to detect this failure mode and take corrective action.