Extended Socket frames Extended Socket example: Single HTTP Connection
Digi XBee® 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
167
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 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
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 Value
Frame type
0x42 (Socket Create Response)
Frame ID 0x01
Socket ID 0x00
Destination Port 0x00 0x50 (80 decimal, HTTP)
Destination Address Type 0x01 (String)
Destination Address
numbersapi.com
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.