Extended Socket frames Extended Socket example: TCPListener
Digi XBee® 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
176
Field Value
Frame type
0x46 (Socket Listen)
Frame ID 0x01
Socket ID 0x00
Source Port 0x2711 (10001)
Socket Bind/Listen frame data:
7E 00 05 46 01 00 27 11 80
Receive a Socket Bind/Listen Response
The Socket Bind/Listen Response contains a Status. A Status of zero is a success and any other value
is an error.
Field Value
Frame type
0xC6 (Socket Listen)
Frame ID 0x01
Socket ID 0x00
Status 0x00 (Success)
Socket Bind/Listen frame received from XBee:
7E 00 04 C6 01 00 00 38
Making a connection to the listener socket
The IP of the XBee can be acquired through the MY at command.
ATMY
172.20.1.235
Using an external tool like netcat, a connection can be made to the given address.
nc -p 10001 172.20.1.235 10001
Hello XBee!
After the connection has been made, the XBee outputs a Socket New IPv4 Client frame indicating the
presence of a new client connection. It contains the listener's socket ID and the new Client Socket ID
along with the connection's remote address information.
Field Value
Frame type
0xCC (Socket New IPv4 Client)