Socket Limits In Api Mode; Enable Incoming Tcp Sockets In Api Mode; Api Mode Behavior For Outgoing Tcp And Tls Connections - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Socket behavior

Socket limits in API mode

Note
For NB-IoT, TCP support is dependent on the network. Contact your network provider for
details.
In API mode there are a fixed number of sockets available; see
(TX) Request: IPv4 - 0x20
new socket. The exception to this is when using the UDP protocol with the C0 source port, which
allows unlimited destinations on the socket created by
available, the device sends back a
Resource Error resolves when an existing socket is closed. An existing socket may be closed when the
socket times out (see
when the socket is closed via a TX request with the CLOSE flag set.
In API mode each socket has a maximum number of pending Transmit (TX) Requests allowed. When a
Transmit (TX) Request: IPv4 - 0x20
it sends that request using the socket for that destination. If the number of pending Transmit (TX)
Requests would be exceeded for the socket, the device sends back a
frame with a Resource Error indicating that the device is not able to send the request and should retry
again later. The Resource Error resolves when a Transmit (TX) Request that is pending on the socket
is transmitted; this is indicated by the Transmit (TX) Status frame for the request.

Enable incoming TCP sockets in API mode

In API mode, you can enable incoming connections to the XBee Smart Modem.
Note
For NB-IoT, TCP support is dependent on the network. Contact your network provider for
details.
1. To enable listening, set
2. To use TCP for client and server socket connections, set
The listener allows multiple clients (incoming connections), up to the limit of the maximum number of
sockets on the system.
When the XBee Smart Modem receives RF data on the port defined by C0, you get a
Packet: IPv4 - 0xB0
If you want to communicate back to the incoming connection, use the
0x20
and enter the received address and port as the destination address and port, along with the
listening (C0) local source port.

API mode behavior for outgoing TCP and TLS connections

To initiate an outgoing TCP or TLS connection to a remote host, send a
0x20
frame to the XBee Smart Modem's serial port specifying the destination address and destination
port for the remote host; the data is optional and the source port is 0.
Note
For NB-IoT, TCP support is dependent on the network. Contact your network provider for
details.
If the connection is disconnected at any time, send a Transmit TX Request frame to trigger a new
connection attempt.
To send data over this connection use the
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
frame is sent to the XBee Smart Modem for a new destination, it creates a
Transmit (TX) Status - 0x89
TM (IP Client Connection Timeout)
frame is sent to the XBee Smart Modem for an existing destination,
C0 (Source Port)
with the incoming address and port.
Transmit (TX) Request: IPv4 -
Supported
C0 (Source
Port). If no more sockets are
frame with a Resource Error. The
and
TS (IP Server Connection
Transmit (TX) Status - 0x89
to the value of the listening port.
IP (IP Protocol)
Transmit (TX) Request: IPv4 -
Transmit (TX) Request: IPv4 -
0x20.
Socket limits in API mode
sockets. When a
Transmit
Timeout)) or
to 0x01.
Receive (RX)
159

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents