Home/Support/Support Forum/XBee TCP Detect Remote Server Closed

XBee TCP Detect Remote Server Closed

0 votes
I have a XBee SB6 in API mode successfully sending TCP packets to a Qt5 App running on a Raspberry Pi. The Pi is acting as a Wireless Hotspot and so the XBee associates with the Pi and sends TCP data to it. This all works great.

What I am noticing is that if I kill the Qt5 Process ( which is running a QTCPServer ) that is accepting the TCP data on the Raspberry Pi from the XBee, then the XBee gets 'jammed up' and does not send anymore data ( because there is no listening socket to connect to on the Pi ), but also the app that controls the UART for the XBee on the Sending machine becomes unresponsive. Furthermore, restarting the kill receiving TCP Server app on the receiving Pi does not allow the XBee to re-establish connections. The XBee has to be restart and reconfigured to restart successful communication. My questions are below:

How can I detect that the remote TCP Server on the Listening Pi from the XBee perspective is down ( so I can stop sending API frames at that point )?

The status ATAI is still 0 because the XBee is associated but no sent TCP packet is being ACK'd so I believe that is why it is getting jammed up. How can I gracefully recover the XBee from this state?
asked Feb 12, 2015 in IEEE 802.11 (Wi-Fi) by PhilBee New to the Community (2 points)

Please log in or register to answer this question.

1 Answer

0 votes
I would suggest using API mode and the API frame type 20 for your transmit packets. This way the status frame can tell you if there is an issue or not with the socket.
answered Feb 12, 2015 by mvut Veteran of the Digi Community (11,302 points)
...