Extended Socket frames Extended Socket example: Single HTTP Connection
Digi XBee® 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
168
Field Value
Frame type
0xC2 (Socket Connect Response)
Frame ID 0x01
Socket ID 0x00
Status 0x00 (Success)
Socket Connect Response received from XBee:
7E 00 04 C2 01 00 00 3C
Receive a Socket Status
The socket has been fully established when a Socket Status frame is received with the connected
status after the socket has connected.
Field Value
Frame type
0xCF (Socket Status)
Socket ID 0x00
Status 0x00 (Connected)
Socket Status received from XBee with connected status:
7E 00 03 CF 00 00 30
Send HTTP Request using Socket Send frame
The request uses the "Connection: close" header to have the server close the connection on request
completion. This allows the example to demonstrate the Socket Status reporting of a close by the
peer.
Field Value
Frame type
0x44 (Socket Status)
Frame ID 0x01
Socket ID 0x00
Transmit Options 0x00
Data
GET /random/trivia HTTP/1.1
Host: numbersapi.com
Connection: close
Socket Send frame data: