Example Sequence To Perform At Command Xbee Api Frames Over Ble - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

API frames
Phase 4 (Server presents M2)
Frame data field
M2
TX nonce
RX nonce
Upon completion of M2 verification, the session key has been determined to be correct and the API
service is unlocked and will allow additional API frames to be used. Content from this point will be
encrypted using AES-256-CTR with the following parameters:
Key: The entire 32-byte session key.
n
Counter: 128 bits total, prefixed with the appropriate nonce shared during authentication.
n
Initial remaining counter value is 1.
The counter for data sent into the XBee API Service is prefixed with the TX nonce value (see the
Phase 4 table, above), and the counter for data sent by the XBee to the client is prefixed with
the RX nonce value.
Example sequence to perform AT Command XBee API frames over
BLE
1. Discover the XBee 3 device through scanning for advertisements.
2. Create a connection to the GATT Server.
3. Optional, but recommended, request a larger MTU for the GATT connection.
4. Turn on indications for the API Response characteristic.
5. Perform unlock procedure using unlock frames. See
6. Once unlocked, AT Command (0x8) frames may be sent and AT Command Response frames
received.
a. For each frame to send, form the API Frame, and encrypt through the stream cipher as
described in the unlock procedure. See
b. Write the frame using one or more Write operations.
c. When successful, the response arrives in one or more indications. If your stack does not do
it for you, remember to acknowledge each indication as it is received. Note that you are
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
Offset in frame
5
37
49
BLE Unlock API -
BLE Unlock API -
BLE Unlock API - 0x2C
Length
Hash algorithm digest length
(32 bytes for SHA256)
12-byte (96-bit) random nonce,
used as the constant prefix of
the counter block for
encryption/decryption of data
transmitted to the API service
by the client
12-byte (96-bit) random nonce,
used as the constant prefix of
the counter block for
encryption/decryption of data
received by the client from the
API service
0x2C.
0x2C.
270

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents