Secured remote AT commands

Secure a node against unauthorized remote configuration

Secured Access is enabled by setting bits of SA (Secure Access). Additionally, an SRP Salt (*S) and verifier (*V, *W, *X, *Y) must be set. You can use XCTU to generate the salt and verifier based on a password.

Configure a node with a salt and verifier

In this example, the password is pickle.

  1. The salt is randomly generated and the verifier is derived from the salt and password as follows:

*S = 0x1938438E

*V = 0x0771F57C397AE4019347D36FD1B9D91FA05B2E5D7365A161318E46F72942A45D

*W = 0xD4E44C664B5609C6D2BE3258211A7A20374FA65FC7C82895C6FD0B3399E73770

*X = 0x63018D3FEA59439A9EFAE3CD658873F475EAC94ADF7DC6C2C005b930042A0B74

*Y = 0xAEE84E7A00B74DD2E19E257192EDE6B1D4ED993947DF2996CAE0D644C28E8307

Note The salt and verifier will not always be the same even if the same password is used to generate them.

  1. Enforce secure access for Remote AT Commands by setting Bit 1 of the SA command:

SA = 0x02

  1. Write the configuration to flash using WR (Write).

WARNING! Make sure that this step is completed. If your device resets for any reason and *S, *V, *W, *X, *Y and SA are not written to flash they will revert to defaults, rendering the node open to insecure access.

  1. From now on, any attempt to issue a Remote AT Command Request - 0x17 to this device will be rejected with a 0x0B status unless a secure session is established first.

Remotely configure a node that has been secured

In the example above a node is secured against unauthorized remote configuration. In this instance, the secured node acts as a Secure Session Server (remote). The sequence below describes how a Secure Session Client (local) can authenticate and securely configure the server remotely.

Establish a secure session using the password that was set on the server node

  1. Generate a Secure Session Control - 0x2E.
  1. Pass the type 0x2E Control frame into the serial interface of the local client:
  1. Wait for a Secure Session Response - 0xAE to indicate the session establishment succeeded or failed with the reason.
  1. Send remote AT Commands to the remote server using the Remote AT Command Request - 0x17 with bit 4 of the Command Options field set. Bit 4 indicates the AT command should be sent securely.

Note If you are using 802.15.4 firmware you must send secured packets using the device's 64 bit address. To do so, set MY (16-bit Source Address) to 0xFFFF.