Receive A Socket Create Response; Send Socket Connect; Receive A Socket Connect Response - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Extended Socket frames

Receive a Socket Create response

The XBee responds to the Socket Create request with a response. The response contains the socket
ID assigned. In this example, the socket ID is 0.
Field
Frame type
Frame ID
Socket ID
Status
Socket Create Response received from XBee:
7E 00 04 C0 01 00 00 3E

Send Socket Connect

This examples uses the "string" destination address type to have the XBee perform DNS look-up
during the connection process.
Note
To adapt this example for TLS, use destination port 0x01 0xbb (decimal 443). Be aware that
many HTTPS servers use SNI (Server Name Identification) which is not currently supported.
Field
Frame type
Frame ID
Socket ID
Destination Port
Destination Address Type
Destination Address
Socket Connect frame data:
7E 00 14 42 01 00 00 50 01 6E 75 6D 62 65 72 73 61 70 69 2E 63 6F 6D C8

Receive a Socket Connect Response

The request to connect is immediately acknowledged with a response. However, it is not permitted to
proceed transmitting data until the next stage, after a Socket Status frame has been received
indicating success.
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
Extended Socket example: Single HTTP Connection
Value
0xC0
(Socket Create Response)
0x01
0x00
0x00 (Success)
Value
0x42
(Socket Create Response)
0x01
0x00
0x00 0x50 (80 decimal, HTTP)
0x01 (String)
numbersapi.com
165

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents