I am currently evaluating the XBee3 Cellular LTE-M/NB-IoT for use in one of our products.
I have been experimenting with cyclic sleep mode and incoming TCP connections and I believe that I have found a bug.
Here is what I have done to create the issue:
For normal sockets:
- Set Source Port (C0) to 256
- Connect to port 256 using a remote TCP client
- Data can be transferred both ways as expected
- Put the XBee into cyclic sleep mode
- After the wake time has elapsed the XBee will go to sleep and the active TCP connection will be dropped
- When the XBee wakes up and re-associates to the network I am unable to make a new TCP connection to port 256. Using the Socket Info (SI) command I can confirm that there is still a socket listening on port 256.
- I then performed a Network Reset (NR) but after the XBee re-associated to the network I was still unable to connect to port 256. Socket Info (SI) still shows that socket as listening on port 256.
- I then performed a Force Reset (FR) and was subsequently able to connect to port 256 as expected
For extended sockets:
- Create socket and set it to listen to port 512
- Connect to port 512 using a remote TCP client
- Data can be transferred both ways as expected
- Put the XBee into cyclic sleep mode
- After the wake time has elapsed the XBee will go to sleep and the active TCP connection will be dropped
- When the XBee wakes up and re-associates to the network I an unable to make a new TCP connection on port 512. Using the Socket Info (SI) command I can confirm that the original socket that I made is still present and listening on port 512.
- I then created a new socket and set it to listen on port 1024
- I was able to make connections to port 1024 using a remote TCP client and transfer data both ways.
- At this point I was still unable to connect to port 512
- I then performed a Network Reset (NR) which discarded all of the TCP sockets that I had created
- Upon creating a new socket and setting it to listen to the original port 512 I was able to connect to port 512 as normal
Each time I attempt to create a TCP connection to the XBee I am first checking that the IP address is correct and hasn’t changed.
I have tried waiting at least 5 minutes after the XBee wakes and after the network reset but incoming connections are still not able to be made on listeners that were created prior to going to sleep.
Is this a known bug? I can’t seem to find anything about this in the user guide or firmware release notes.
I currently don’t have plans to use cyclic sleep mode so this isn’t a pressing concern, but it would be nice if it were able to be fixed for potential future use.
Regards,
Donald