EasyManuals Logo

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 #175 background imageLoading...
Page #175 background image
Extended Socket frames Extended Socket example: TCPListener
Digi XBe 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
175
Extended Socket example: TCPListener
The following example demonstrates setting up a TCP listener on the XBee Cellular and interacting
with incoming connections. It will open up a listener socket on a given port and then receive data from
a client.
Note The module must either have a public IP or a be on a private network in order to be accessible
as a server (listener).
Send a Socket Create frame
Note The XBee Cellular does not support incoming TLS sockets.
Field Value
Frame type
0x40 (Socket Create)
Frame ID 0x01
Protocol 0x01 (TCP)
Socket Create frame data:
7E 00 03 40 01 01 BD
Receive a Socket Create response
The response contains the socket ID assigned. This example assumes zero.
Field Value
Frame type
0xC0 (Socket Create Response)
Frame ID 0x01
Socket ID 0x00
Status 0x00 (Success)
Socket Create Response received from XBee:
7E 00 04 C0 01 00 00 3E
Designate the socket as a listener
The Socket Bind/Listen Frame takes the socket ID from the socket create response and a source port
that the socket will then listen on. In this example port 10001 is used.

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