SI (Socket Info)
This command applies to the XBee Smart Modem.
Lists either information about a given socket or lists the socket IDs of all active (open) sockets on the modem in a human-readable format.
When the SI command is issued without a parameter, the XBee outputs a list of socket IDS in hex, separated by carriage returns (<CR>). After the last socket ID has been printed the list is terminated with an additional carriage return.
In both API and command mode the payload (output) will have the following format:
ID<CR>
ID<CR>
. . .
ID<CR>
<CR>
In the list of socket IDs, an asterisk (*) displays after the socket ID for non-Extended API Sockets (which are sockets created implicitly when using IPv4 TX API frames). In the example below, the 0x00 socket is an IPv4 TX/RX socket, and the 0x01 and 0x02 sockets are both Extended API sockets. The socket IDs are displayed in ascending order, from smallest socket value to the largest.
0x00* 0x01 0x02
Note When sending AT commands for API frames it is standard to send the command as ASCII text and the parameters for that command as binary.
When the SI command is issued with a socket ID, specified in hex, the response is a list of information about the socket. The list is separated by carriage returns (<CR>) and terminated with an additional carriage return.
In both API and command mode the payload/output will have the following format:
ID<CR>
STATE<CR>
PROTOCOL<CR>
LOCAL_PORT<CR>
REMOTE_PORT<CR>
REMOTE_ADDRESS<CR>
<CR>
Field | Description |
---|---|
ID | The socket ID. |
STATE |
The state of the socket:
|
PROTOCOL |
The protocol of the socket:
|
LOCAL_PORT | The local port of the socket. This is 0 unless the socket is explicitly bound to a port. |
REMOTE_PORT | The remote port of the socket. |
REMOTE_ADDRESS | The remote IPv4 address for the given socket. This is 0.0.0.0 for an unconnected socket. |
Parameter range
0x00 - 0xFE
Default
-