EasyManuals Logo
Home>Digi>Modem>XBee 3

Digi XBee 3 User Manual

Digi XBee 3
293 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #160 background imageLoading...
Page #160 background image
Socket behavior Supported sockets
Digi XBe 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
160
Supported sockets
The XBee Smart Modem supports the following number of sockets:
n 10 maximum: some combination of 6 TCP, 6 UDP, 6 TLS.
1
Best practices when using sockets
Sockets and Remote Manager
If you use Remote Manager to remotely communicate with and configure your XBee Cellular device,
you must leave at least two sockets available in the system: one UDP socket (for periodic low-data-
usage check-ins), and one TCP/TLS socket (to be used when a full connection is needed).
If your application allocates so many sockets that Remote Manager functionality in the firmware
cannot get the sockets that it requires, Remote Manager functionality will be prevented from working
until sockets become available.
For example, each call to socket.socket() in MicroPython will allocate a socket, and this socket
will remain allocated to MicroPython until the socket's close method is called, or the MicroPython
REPL is restarted using Ctrl-D.
See Supported sockets for more information on the total number of sockets supported by the device.
Sockets and API mode
When using API mode to transmit TCP/TLS data to a remote destination (using the 0x20 or 0x23 API
frames), sending a large amount of data as a single API frame is preferable to multiple smaller API
frames. Using a single large API frame allows the XBee to transmit the data using fewer operations
than transmitting multiple pieces of data in sequence, which improves overall throughput.
Additionally, one API frame consumes less dynamic memory in the system than multiple smaller API
frames, which means there will be more memory available to process incoming IP data as well as
subsequent API frames sent into the XBee Cellular device.
Socket timeouts
The XBee Smart Modem implicitly opens the socket any time there is data to be sent, and closes it
according to the timeout settings. The TM (IP Client Connection Timeout) command controls the
timeout settings.
Socket limits in API mode
In API mode there are a fixed number of sockets available; see Supported sockets. When a Transmit
(TX) Request: IPv4 - 0x20 frame is sent to the XBee Smart Modem for a new destination, it creates a
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 C0 (Source Port). If no more sockets are
available, the device sends back a Transmit (TX) Status - 0x89 frame with a Resource Error. The
Resource Error resolves when an existing socket is closed. An existing socket may be closed when the
socket times out (see TM (IP Client Connection Timeout) and TS (IP Server Connection Timeout)) or
when the socket is closed via a TX request with the CLOSE flag set.
1
1 UDPsocket is always reserved for DNS, so subtract 1 socket from the values above.

Table of Contents

Other manuals for Digi XBee 3

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi XBee 3 and is the answer not in the manual?

Digi XBee 3 Specifications

General IconGeneral
BrandDigi
ModelXBee 3
CategoryModem
LanguageEnglish

Related product manuals