Available Extended Socket Frames; Extended Socket Example: Single Http Connection; Send A Socket Create Frame - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Extended Socket frames

Available Extended Socket frames

Note
For information about all frames, see
Socket Create - 0x40
Socket Option Request - 0x41
Socket Connect - 0x42
Socket Close - 0x43
Socket Send (Transmit) - 0x44
Socket SendTo (Transmit Explicit Data): IPv4 - 0x45
Socket Bind/Listen - 0x46
Socket Create Response - 0xC0
Socket Option Response - 0xC1
Socket Connect Response - 0xC2
Socket Close Response - 0xC3
Socket Listen Response - 0xC6
Socket New IPv4 Client - 0xCC
Socket Receive - 0xCD
Socket Receive From: IPv4 - 0xCE
Socket Status - 0xCF

Extended Socket example: Single HTTP Connection

This example demonstrates a complete request with an HTTP server. It fetches a random fact about a
number from a web services API offered by the website http://numbersapi.com.
Note
Digi is not affiliated with numbersapi.com and the example is for education only.

Send a Socket Create frame

Note
To adapt this example for an HTTPS server, change Protocol below to 0x04 (TLS) and optionally
use the
Socket Option
Field
Frame type
Frame ID
Protocol
Socket Create frame data:
7E 00 03 40 01 01 BD
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
API
frames.
frame to specify a TLS profile.
Value
0x40
(Socket Create)
0x01
0x01 (TCP)
Available Extended Socket frames
164

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents