XBee3 LTE-M/NB-IoT Unable to make incoming TCP connections after waking from cyclic sleep

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

No, I would not consider that a bug. For CAT M/NBiOT, you need to use bit 3 of the DO command for what you are doing to work.

See https://www.digi.com/resources/documentation/Digidocs/90002258/#concepts/c_mode_psm.htm%3FTocPath%3DPower%2520saving%2520features%2520and%2520design%2520recommendations|_____2

Even without PSM active shouldn’t it be possible to make an incoming connection while the XBee is awake and associated to the network in cyclic sleep mode? It appears that listener sockets are not being handled properly when entering and leaving sleep.

I’ve tested turning on PSM and cyclic sleep using the default timer setting for both however I believe that the default PSM sleep timer is too long to be useful as every time the XBee would wake up it would not re-associate to the network.
I changed the PSM timers to match the default cyclic sleep timer (60s awake, 300s asleep) and the behaviour was the same as in my original post. Perhaps PSM isn’t working properly for me? The IP address is changing every time the XBee wakes and I thought it was meant to be retained in PSM.

Yes it is possible but you have to be on the inside of the VPN or have a public static IP SIM.

Yes the SIM is set up to be externally accessible. I can create an incoming connection successfully when the XBee is always awake. It is when it is in cyclic sleep mode that I cannot connect to it once it has woken up from sleep.

Try using the PSM mode function.

As I said earlier I have tried turning on PSM as well as cyclic sleep but I am still observing the same behaviour with the sockets as I did with PSM turned off.

Are you able to make an incoming socket to this module without using any sleep modes? If not, it could be an issue on the account where you are not accepting incoming sockets.

Yes. I am able to make incoming connections in normal (always awake) sleep mode.

I would suggest submitting a email to tech.support@digi.com to open a case.

Just note that it is a possibility that the carrier does not allow incoming sockets with PSM mode or they may have a timers that is too long for your current socket timeout values are.
https://www.digi.com/resources/documentation/Digidocs/90002258/#containers/cont_extended_sockets.htm%3FTocPath%3DExtended%2520Socket%2520frames|_____0

Ok well I’ll try contacting tech support then. Thanks for your help.