L2 AT Commands
The content of Acklio FullSDK can be described in its simplistic view as an adaptation layer with the SCHC mechanisms, and a set of interfaces: the Management API, the Datagram API, the Network API and the L2A interface.
Refer to the diagram of layers and interfaces for a better understanding.
The "UDP Client" and "DLMS using Gurux" Demo examples both use the following AT commands in their communication sequences.
Set or Get the Device EUI
The expected format of the device EUI is 8 pairs of hexadecimal numbers separated by a colon.
For example: hh:hh:hh:hh:hh:hh:hh:hh.
Possible hexadecimal numbers (h) are 0 to 9, a to f or A to F.
| What | Set | Get |
|---|---|---|
| Command | AT+DEUI=<dev_eui> | AT+DEUI=? |
| Parameter | <dev_eui> - See format expectations above | — |
| Result codes | OK | Device EUI value and then OK |
AT_PARAM_ERROR | — |
Set or Get the Application EUI
The expected format of the application EUI is 8 pairs of hexadecimal numbers separated by a colon.
For example: hh:hh:hh:hh:hh:hh:hh:hh.
Possible hexadecimal numbers (h) are 0 to 9, a to f or A to F.
| What | Set | Get |
|---|---|---|
| Command | AT+APPEUI=<app_eui> | AT+APPEUI=? |
| Parameter | <app_eui> - See format expectations above | — |
| Result codes | OK | Application EUI value and then OK |
AT_PARAM_ERROR | — |
Set or Get the Application Key
The expected format of the application key is 16 pairs of hexadecimal numbers separated by a colon.
For example: hh:hh:hh:hh:hh:hh:hh:hh.
Possible hexadecimal numbers (h) are 0 to 9, a to f or A to F.
| What | Set | Get |
|---|---|---|
| Command | AT+APPKEY=<app_key> | AT+APPKEY=? |
| Parameter | <app_key> - See format expectations above | — |
| Result codes | OK | Application key value and then OK |
AT_PARAM_ERROR | — |
Join the Network
| What | Detail |
|---|---|
| Command | AT+JOIN=<class> |
| Parameter | <class> - A or C |
| Result codes | OK |
AT_PARAM_ERROR | |
AT_ERROR,1,<error> | |
+JOINED |
Transmissions
When the class is correct, the OK result code is returned immediately. If the join request succeeds, the +JOINED result code is returned a few seconds later. If it does not succeed, no additional result code is returned.
Error Messages
AT_ERROR,1,<status> reports a management layer error. with the following possible values:
| Numeric value | Error code | Comment |
|---|---|---|
| 5 | MGT_L2A_ERR | Not joined yet |
| 6 | MGT_FRM_ERR | Error returned by the FRM layer |
| 7 | MGT_MUX_ERR | Error returned by the Mux layer |
| 8 | MGT_SYNC_ERR | Error returned by the Sync layer |
| 9 | MGT_CD_ERR | Error returned by the C/D layer |
Set or Get the Data Rate
| What | Set | Get |
|---|---|---|
| Command | AT+DR=<data_rate> | AT+DR=? |
| Parameter | <data_rate> - Value from 0 to 6 | — |
| Result codes | OK | Data rate value, from 0 to 6, and then OK |
AT_PARAM_ERROR | — |
Set or Get the Adaptive Data Rate
Set
| What | Set | Get |
|---|---|---|
| Command | AT+ADR=<adr> | AT+ADR=? |
| Parameter | <adr> - 0: off, 1: on | — |
| Result codes | OK | Adaptive data rate value, 0 or 1, and then OK |
AT_PARAM_ERROR | — |
Set or Get the Active Region
| What | Set | Get |
|---|---|---|
| Command | AT+REGION=<region> | AT+REGION=? |
| Parameter | <region> - See below | — |
| Result codes | OK | Active region string (see above) and then OK |
AT_PARAM_ERROR | — |
Recommendations
The region (frequency plans) must comply with the LoRaWAN regional parameters and therefore, be one of the following strings:
AS923AU915CN470CN779EU433EU868KR920IN865US915RU864
Get detailed information on the Regional Parameters by downloading this document from the LoRa Alliance.
The selected region must be supported by the radio module in use.
This command is not accepted once the device has joined the network.