Secure access
Secure Session API frames
Digi XBee® 3 802.15.4 RF Module User Guide
57
1. Send a
Secure Session Control frame - 0x2E
to the server node with:
n
The client's 64-bit address.
n
The options field set to
0x02
for server side session termination.
n
Set the timeout to
0x0000
.
2. Wait for the
Secure Session Response frame - 0xAE
to determine if the termination was
successful.
n
The client will emit a modem status
0x3C
(Session Ended).
n
The server will also emit a modem status (or an extended modem status depending on
AZ
) of
0x3C
(Session Ended).
Note
The 64-bit address can be set to the broadcast address to end all incoming sessions.
Note
This functionality can be used to end orphaned client-side sessions—in case the server
unexpectedly reset for some reason.
Secure Session API frames
Secure Session can only be established from a node that is operating in API mode (MicroPython
support is forthcoming). The server-side can be in Transparent mode, but the client must be in API
mode. Once a session has been established between a client and server node, the client can be
transitioned to Transparent mode; and if bit 4 of
TO
is set, the client will encrypt data sent in
Transparent mode for the duration of session.
There are four frames that are used for controlling and observing a secure session.
n
Secure Session Control frame - 0x2E
: This frame is passed to the client that wishes to log into
or out of a server. Any attempt to use the Control frame will generate a response frame.
n
Secure Session Response frame - 0xAE
: This frame returns the status of the previously sent
0x2E frame indicating whether it was successful or not.
n
: The server will also emit a modem status whenever an attempt
succeeds, fails, or was terminated. The client will also emit modem statuses if the session
times out.
n
Extended Modem Status frame - 0x98
: If bit 3 of
AZ
is set then modem statuses will be
replaced with extended modem statuses. These frames will contain the status that caused
them to be emitted as well as the address of the node that initiated the session, the session
options, and the timeout value.
Frame exchanges: