AT Command Manual
Overview
AT command is the initial setting in the default serial port used on RUI3 devices. The default baud rate is 115200.
When communicating through AT commands with the WisDuo modules, it is important to always wait for the response from the WisDuo module before sending the next command. Some AT commands respond not only immediately, but also with a second asynchronous event response that must be handled before the next command can be processed.
For users that write the firmware for the host MCU with Arduino or PlatformIO, it is recommended to use a communication library. The RUI3-Arduino-Library is a helper for the AT command communication between a RUI3 based RAKwireless WisDuo module and an Arduino based host MCU. This library can be installed using the Arduino IDE library manager. Library documentation. Library examples
RUI3-Supported RAK Modules
- RAK4630
- RAK4631-R
- RAK3172 or RAK3172-T
- RAK3272S
- RAK3372 / RAK3172 Evaluation Board
- RAK3172-SiP
- RAK3272-SiP
- RAK11720
- RAK11721
- RAK11722
RUI3 AT Command Format
The AT commands have the standard format AT+XXX
, with XXX
denoting the command.
There are four available command behaviors:
AT+XXX?
provides a short description of the given command, for example,AT+DEVEUI?
.AT+XXX
is used to run a command, such asAT+JOIN
.AT+XXX=?
is used to get the value of a given command, for example,AT+CFS=?
.AT+XXX=<value>
is used to provide a value to a command, for example,AT+CFM=1
.
The output format is as below:
AT+XXX=<value><CR><LF>
<CR><LF><Status<CR><LF>
<CR>
stands for “carriage return” and<LF>
stands for “line feed”.- The
<value><CR><LF>
output is returned whenever the “helpAT+XXX?
” or the “getAT+XXX=?
” commands are run.
When no value is returned, the <value><CR><LF>
output is not returned at all. Every command (except for ATZ
used for MCU reset) returns a status string, which is preceded and followed by <CR><LF>
in a <CR><LF><Status<CR><LF>
format.
The possible status codes are:
OK
: command runs correctly without error.AT_ERROR
: generic error.AT_PARAM_ERROR
: a parameter of the command is wrong.AT_BUSY_ERROR
: the LoRa network is busy, so the command has not been completed.AT_TEST_PARAM_OVERFLOW
: the parameter is too long.AT_NO_CLASSB_ENABLE
: End-node has not yet switched in Class B.AT_NO_NETWORK_JOINED
: the LoRa network has not been joined yet.AT_RX_ERROR
: error detection during the reception of the command.
More details on each command description and examples are given in the remainder of this section.
Content
- AT Command Manual
- Overview
- Content
- General Commands
- Low Power
- Serial AT Command
- Bootloader Commands
- LoRaWAN Keys and IDs
- LoRaWAN Joining and Sending
- LoRaWAN Network Management
- Class B Mode
- Asynchronous Events
- LoRaWAN Information
- LoRaWAN Regional Commands
- LoRaWAN Multicast Group
- P2P Instructions
- AT+NWM
- AT+PFREQ
- AT+PSF
- AT+PBW
- AT+PCR
- AT+PPL
- AT+PTP
- AT+PBR
- AT+PFDEV
- AT+PSEND
- AT+CAD
- AT+PRECV
- AT+ENCRY
- AT+ENCKEY
- AT+PCRYPT
- AT+PKEY
- AT+CRYPIV
- AT+P2P
- AT+IQINVER
- AT+SYNCWORD
- AT+RFFREQUENCY
- AT+TXOUTPUTPOWER
- AT+BANDWIDTH
- AT+SPREADINGFACTOR
- AT+CODINGRATE
- AT+PREAMBLELENGTH
- AT+SYMBOLTIMEOUT
- AT+FIXLENGTHPAYLOAD
- RF Test
General Commands
This section describes the generic commands related to the device.
AT
Description: Attention
This command is used to check that the communication is working properly.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT | - | - | OK |
AT?
Description: Short help
This command provides short help for all the supported commands.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT? | - | - AT+<CMD>? : help on <CMD> - AT+<CMD> : run <CMD> - AT+<CMD>=<value> : set the value - AT+<CMD>=? : get the value - followed by the details of all commands | OK |
ATE
Description: AT Command Echo
This command is used to see the AT command input on the Serial Terminal.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT | - | - | OK |
AT? | - | ATE : toggle the AT Command echo | OK |
Example:
ATE
OK
ATZ
Description: MCU Reset
This command is used to trigger a reset on the module.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
ATZ? | - | ATZ : triggers a reset on the MCU. | OK |
ATZ | - | No return value and return code. The module resets. | Shows device information |
Example:
ATZ
RAKwireless RAK3172
------------------------------------------------------
Version: RUI_4.0.4_RAK3172-E
Current Work Mode: LoRa P2P.
ATR
Description: Restore default parameters
This command is used to restore all parameters to the initial default values.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
ATR? | - | ATR : restore default parameters | OK |
ATR | - | No return value. | OK |
AT+SN
Description: Serial number
This command can read the device serial number.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+SN? | - | AT+SN : get the serial number of the device (max 18 char) | OK |
AT+SN=? | - | <1-18char> | OK |
Example:
AT+SN=?
9181004E20900057
OK
AT+BAT
Description: Battery level
This command is used to access the battery level.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BAT? | - | AT+BAT : get the battery level (volt) | OK |
AT+BAT=? | - | AT+BAT = <float> | OK |
Example:
AT+BAT=?
AT+BAT=2.971191
OK
AT+BUILDTIME
Description: Build time of the firmware
This command is used to access the build date and time of the firmware.
Command | Input Parameter | Return value | Return code |
---|---|---|---|
AT+BUILDTIME? | - | AT+BUILDTIME : get the build time of the firmware | OK |
AT+BUILDTIME=? | - | AT+BUILDTIME =date - time of build | OK AT_BUSY_ERROR |
Example:
AT+BUILDTIME=?
AT+BUILDTIME=20220324-153044
OK
AT+REPOINFO
Description: Repo information
This command is used to access the Repo Information of the firmware.
Command | Input Parameter | Return value | Return code |
---|---|---|---|
AT+REPOINFO? | - | AT+REPOINFO : get the commit ID of the firmware | OK |
AT+REPOINFO=? | - | AT+REPOINFO =firmware repo information | OK |
Example:
AT+REPOINFO=?
AT+REPOINFO=713fbcca:6ecbb45f:e198f620:b43f5395:4a6defb9:c9438443:5ccb8eec:70e5bb3f
OK
AT+VER
Description: Version of the firmware
This command is used to access the version of the firmware.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+VER? | - | AT+VER : get the version of the firmware | OK |
AT+VER=? | - | AT+VER =firmware version | OK |
Example:
AT+VER=?
AT+VER=RUI_4.1.0_RAK4631
OK
AT+CLIVER
Description: Version of the AT Command
This command is used to access the version of the AT command.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+CLIVER? | - | AT+CLIVER : get the version of the AT command | OK |
AT+CLIVER=? | - | AT+CLIVER =x.y.z | OK |
Example:
AT+CLIVER=?
AT+CLIVER=1.5.2
OK
AT+APIVER
Description: Version of the API
This command is used to access the version of the RUI API.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+APIVER? | - | AT+APIVER : get the version of the RUI API | OK |
AT+APIVER=? | - | AT+APIVER =x.y.z | OK |
Example:
AT+APIVER=?
AT+APIVER=3.0.0
OK
AT+HWMODEL
Description: The string of the hardware model
This command is used to access the string of the hardware model.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+HWMODEL? | - | AT+HWMODEL : get the string of the hardware model | OK |
AT+HWMODEL=? | - | AT+HWMODEL =module model | OK |
Example:
AT+HWMODEL=?
AT+HWMODEL=rak4631
OK
AT+HWID
Description: The string of the hardware ID
This command is used to access the string of the hardware mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+HWID? | - | AT+HWID : get the string of the hardware ID | OK |
AT+HWID=? | - | AT+HWID =module hw ID | OK |
Example:
AT+HWID=?
AT+HWID=nrf52840
OK
AT+ALIAS
Description: Alias name of the device
This command allows the user to set an alias name for the device.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+ALIAS? | - | AT+ALIAS : add an alias name to the device | OK |
AT+ALIAS=? | - | <string, 16char> | OK |
AT+ALIAS=<Input> | <string, 16char> | - | OK AT_PARAM_ERROR |
Example:
AT+ALIAS=RAK
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.<string, 16char>
: set of 16-character string.
AT+SYSV
Description: System voltage of the device
This command allows the user to get the System Voltage.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+SYSV? | - | AT+SYSV : get the System Voltage | OK |
AT+SYSV=? | - | <float> | OK |
Example:
AT+SYSV=?
AT+SYSV=3.318750
OK
AT+BLEMAC
This command is ONLY available on the RAK4630 and RAK11720 modules.
Description: BLE Mac Address of the device
This command allows the user to get or set the BLE Mac address.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BLEMAC? | - | AT+BLEMAC : get or set the BLE Mac address | OK |
AT+BLEMAC=? | - | <string>:<string>:<string>:<string>:<string>:<string> | OK |
AT+BLEMAC=<Input> | <string, 12 char> | <string> | OK |
Example:
AT+BLEMAC=?
AT+BLEMAC=d1:e0:f2:4d:58:1a
OK
AT+BOOTVER
Description: RUI bootloader version of the device
This command allows the user to get the version of RUI bootloader.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BOOTVER? | - | AT+BOOTVER : get the version of RUI bootloader | OK |
AT+BOOTVER=? | - | <string> | OK |
AT+BOOTVER=<Input> | - | RUI Bootloader Version | OK |
Example:
AT+BOOTVER=?
AT+BOOTVER=************
OK
Low Power
AT+SLEEP
Description: Sleep mode
This command enables sleep mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+SLEEP | - | - | OK |
AT+SLEEP? | - | AT+SLEEP : enter sleep mode for a period of time (ms) | OK |
AT+SLEEP=<Input> | <integer> | - | OK AT_PARAM_ERROR |
Example:
AT+SLEEP=1000
OK
AT+SLEEP
command with no parameter will enable sleep mode continuously without timeout period.AT_PARAM_ERROR
is returned when setting wrong or malformed value.<Input>
: 1 decimal integer and the range of values is 1~(232 -1).
AT+LPM
Description: Low power mode of the device
This command provides a way to enable/disable low power mode. LPM makes the device sleep automatically after sending AT commands. This eliminates the need to send AT+SLEEP
.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LPM? | - | AT+LPM : get or set the low power mode (0=OFF; 1=ON) | OK |
AT+LPM=? | - | <string> | OK |
AT+LPM=<Input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+LPM=?
AT+LPM=0
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.<string>
: either "0" or "1"
AT+LPMLVL
The two sleep modes can ONLY be selected with RAK3172. This AT command has NO EFFECT on other modules.
Description: Sleep level for low power mode
This command sets the low power mode level of the RAK3172 module in LPM. Stop2 Mode is more optimized for low current consumption compared to Stop1 Mode but it will not allow you to wake up using UART1. On Stop1 Mode, both UART1 and UART2 can wake up the device from LPM.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LPMLVL? | - | AT+LPMLVL : get or set the low power mode level (1 = STOP1 Mode; 2 = STOP2 Mode) | OK |
AT+LPMLVL=? | - | 1 or 2 | OK |
AT+LPMLVL=<Input> | 1 or 2 | - | OK AT_PARAM_ERROR |
Example:
AT+LPMLVL=?
AT+LPMLVL=1
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- This command is only applicable to RAK3172 devices.
Serial AT Command
These commands are related to device serial configurations.
AT+LOCK
Description: Lock the AT Command serial port
This command locks the AT command serial port.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LOCK? | - | AT+LOCK : lock the serial port | OK |
AT+LOCK or AT+LOCK= | - | - | - |
- If you input the
AT+LOCK
orAT+LOCK=
command, it will lock the serial port. - The default password is '00000000' and can be changed via the
AT+PWORD
command.
Example:
AT
OK
AT+LOCK
AT+VER=?
COMMAND_LOCKED
00000000
AT+VER=?
3.1.0-p1_21q4_rc2.50
OK
AT+PWORD
Description: Set the AT Command serial port password
This command sets the password for locking the AT command serial port.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+PWORD? | - | AT+PWORD : set the serial port locking password | OK |
AT+PWORD=<input> | <1-8 character> | - | OK |
Example:
AT+PWORD=~!@pword
OK
- Any printable characters.
<Input>
: 1-8 characters.
AT+BAUD
Description: Set the serial port baud rate
This command sets the serial port baud rate.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BAUD? | - | AT+BAUD : get or set the serial port baud rate | OK |
AT+BAUD=<Input> | <integer> | - | OK AT_PARAM_ERROR |
Example:
AT+BAUD=?
AT+BAUD=115200
OK
AT+BAUD=921600
AT_PARAM_ERROR
- The last configured baudrate will be retained to the module even with reset or power recycle.
AT_PARAM_ERROR
is returned when setting wrong or malformed value.<Input>
: 1 decimal integer and the range of values is 1~232.
AT+ATM
Description: AT Command mode
This command provides a way to switch to AT command mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+ATM? | - | AT+ATM : switch to AT command mode | OK |
AT+ATM | - | - | OK |
AT Command mode is the default serial port setting of RUI3 devices.
Bootloader Commands
This section describes the bootloader commands related to the device.
AT+BOOT
Description: Bootloader mode
This command causes the device to enter Bootloader mode to upgrade firmware.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BOOT? | - | AT+BOOT : enter bootloader mode for firmware upgrade | OK |
AT+BOOT or AT+BOOT= | - | <BOOT MODE> |
Example:
AT+BOOT
<BOOT MODE>
To escape BOOT MODE, execute at+run
command. This is will end the BOOT MODE then restart the RUI3 device.
AT_BUSY_ERROR
is returned when the bootloader process is already running.
AT+VER
Description: Version of the Bootloader (Bootloader only).
This command is used to access the version of the bootloader (Bootloader only).
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+VER=? | - | RUI_BOOT_0.6_STM32WLE5CC | - |
Example:
AT+VER=?
RUI_BOOT_0.6_STM32WLE5CC
AT+VERSION
Description: Version of the Bootloader (Bootloader only).
This command is used to access the version of the bootloader (Bootloader only).
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+VERSION | - | RUI_BOOT_0.6_STM32WLE5CC | - |
Example:
AT+VERSION
RUI_BOOT_0.6_STM32WLE5CC
AT+BOOTSTATUS
Description: Bootloader Status (Bootloader only).
This command is used to get the status of the bootloader (Bootloader only).
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+BOOTSTATUS | - | Boot Mode | - |
Example:
AT+BOOTSTATUS
Boot Mode
AT+RUN
Description: Leaving Boot Mode (Bootloader only).
This command is used to leave and boot into application (Bootloader only).
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RUN | - | Stop Boot Mode | - |
Example:
AT+RUN
Stop Boot Mode
RAKwireless Arduino Digital Example
------------------------------------------------------
Current Work Mode: LoRa P2P.
AT+RESET
Description: Device Reset (Bootloader only).
This command is used to reset the device (Bootloader only).
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RESET | - | - | - |
Example:
AT+RESET
RAKwireless Arduino Digital Example
------------------------------------------------------
Current Work Mode: LoRa P2P.
LoRaWAN Keys and IDs
This section describes the commands related to the activation of the end device. EUI's and Keys are MSB first.
AT+DEVEUI
Description: Device EUI
This command is used to access the unique end-device ID. Used in OTAA mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+DEVEUI? | - | AT+DEVEUI : get or set the device EUI (8 bytes in hex) | OK |
AT+DEVEUI=? | - | < 8 hex > | OK |
AT+DEVEUI=<Input> | < 8 hex > | - | OK AT_PARAM_ERROR |
Example:
AT+DEVEUI=?
AT+DEVEUI=1122334455667788
OK
AT+DEVEUI=1122334455667788
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 16 digit length, character 0-9, a-f, A-F only, representing eight (8) hexadecimal numbers.
AT+APPEUI
Description: Application identifier
This command is used to access the unique application identifier in OTAA mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+APPEUI? | - | AT+APPEUI : get or set the application EUI (8 bytes in hex) | OK |
AT+APPEUI=? | - | < 8 hex > | OK |
AT+APPEUI=<Input> | < 8 hex > | - | OK AT_PARAM_ERROR |
Example:
AT+APPEUI=0102030405060708
OK
AT+APPEUI=010203040506070809
AT_PARAM_ERROR
AT+APPEUI=?
AT+APPEUI=0102030405060708
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 16 digit length, character 0-9, a-f, A-F only, representing eight (8) hexadecimal numbers.
AT+APPKEY
Description: Application Key
This command is used to access the application key in OTAA mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+APPKEY? | - | AT+APPKEY : get or set the application key (16 bytes in hex) | OK |
AT+APPKEY=? | - | < 16 hex > | OK |
AT+APPKEY=<Input> | < 16 hex > | - | OK AT_PARAM_ERROR |
Example:
AT+APPKEY=01020AFBA1CD4D20010230405A6B7F88
OK
AT+APPKEY=01020AFBA1CD4D20010230405A6B7F
AT_PARAM_ERROR
AT+APPKEY=?
AT+APPKEY=01020AFBA1CD4D20010230405A6B7F88
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 32 digit length, character 0-9, a-f, A-F only, representing 16 hexadecimal numbers.
AT+DEVADDR
Description: Device Address
This command is used to access the device address in ABP mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+DEVADDR? | - | AT+DEVADDR : get or set the device address (4 bytes in hex) | OK |
AT+DEVADDR=? | - | < 4 hex > | OK |
AT+DEVADDR=<Input> | < 4 hex > | - | OK AT_PARAM_ERROR |
Example:
AT+DEVADDR=01020A0B
OK
AT+DEVADDR=?
AT+DEVADDR=01020A0B
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 8 digit length, character 0-9, a-f, A-F only, representing four (4) hexadecimal numbers.
AT+APPSKEY
Description: Application Session Key
This command is used to set the application session key in ABP mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+APPSKEY? | - | AT+APPSKEY : get or set the application session key. | OK |
AT+APPSKEY=<Input> | < 16 hex > | OK AT_PARAM_ERROR |
Example:
AT+APPSKEY=01020AFBA1CD4D20010230405A6B7F88
OK
AT+APPSKEY=01020AFBA1CD4D20010230405A6B7F
AT_PARAM_ ERROR
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 32 digit length, character 0-9, a-f, A-F only, representing 16 hexadecimal numbers.
AT+NWKSKEY
Description: Network Session Key
This command is used to get or set the network session key in ABP mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+NWKSKEY? | - | AT+NWKSKEY : get or set the network session key (16 bytes in hex) | OK |
AT+NWKSKEY=? | - | AT+NWKSKEY =< 16 hex > | OK |
AT+NWKSKEY=<Input> | < 16 hex > | - | OK AT_PARAM_ERROR |
Example:
AT+NWKSKEY=01020AFBA1CD4D20010230405A6B7F88
OK
AT+NWKSKEY=?
AT+NWKSKEY=01020AFBA1CD4D20010230405A6B7F88
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first.
<Input>
: 32 digit length, character 0-9, a-f, A-F only, representing 16 hexadecimal numbers.
AT+NETID
Description: Network ID (NetID)
This command is used to access the network identifier (NetID) of 3 octets.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+NETID? | - | AT+NETID : get or set the network ID (NetID) (3 bytes in hex) | OK |
AT+NETID=? | - | AT+NETID =< 3 hex > | OK |
Example:
AT+NETID=?
AT+NETID=000001
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- Keys are MSB first. Return Value: 6-digit length, character 0-9, a-f, A-F only, representing three (3) hexadecimal numbers.
AT+MCROOTKEY
Description: Multicast Root Key
This command is used to get the multicast root key of the device.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+MCROOTKEY? | - | AT+MCROOTKEY : get the multicast root key (32 bytes in hex) | OK |
AT+MCROOTKEY=? | - | <32 hex> | OK |
Example:
AT+MCROOTKEY=?
AT+MCROOTKEY=46B1A450DDDE349310F0EFDEEDFBB44B
OK
LoRaWAN Joining and Sending
This section describes the commands related to the join procedure and data payload.
AT+CFM
Description: Confirm Mode
This command is used to configure the uplink payload to be confirmed or unconfirmed type.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+CFM? | - | AT+CFM : get or set the confirmation mode (0 = OFF, 1 = ON) | OK |
AT+CFM=? | - | AT+CFM = (0 or 1) | OK |
AT+CFM=<Input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+CFM=1
OK
AT+CFM=?
AT+CFM=1
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 0.
AT+CFS=?
is used to know whether the last sent message has been confirmed or not. When the confirmation mode is 1, each sent message must be confirmed FAILED or OK.
e.g.
?>at+send=12:123456
?>+EVT: SEND CONFIRMED FAILED
?>at+send=12:123456
?>+EVT: SEND CONFIRMED OK
AT+CFS
Description: Confirm Status
This command is used to access the status of the last SEND command.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+CFS? | - | AT+CFS : get the confirmation status of the last AT+SEND (0 = failure, 1 = success) | OK |
AT+CFS=? | - | 0 or 1 | OK |
Example:
AT+CFS=?
AT+CFS=0
OK
This command works together with AT+CFM=1
, which is the confirm mode configuration. If the return of this command is 1
, the last confirmed uplink is successful. If it is 0
, then the last confirmed uplink attempt failed. This command is read only, and the default value on device startup is 0
.
AT+JOIN
Description: Join LoRaWAN Network
This command is used to join a LoRaWAN network.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+JOIN? | - | AT+JOIN : join network | OK |
AT+JOIN=? | - | AT+JOIN =Param1: Param2: Param3: Param4 | OK or AT_BUSY_ERROR |
AT+JOIN=<Input Parameter> | Param1:Param2:Param3:Param4 | - | OK |
Param1 = Join command: 1 for joining the network, 0 for stop joining. | |||
Param2 = Auto-Join config: 1 for Auto-join on power up, 0 for no auto-join. (Optional parameter 0 is default) | |||
Param3 = Reattempt interval: 7 - 255 seconds (Optional parameter 8 seconds is default). | |||
Param4 = No. of join attempts: 0 - 255 (Optional parameter 0 times is default). |
This is an asynchronous command. OK
means that the device is joining. The completion of the JOIN can be verified with the AT+NJS=?
command.
Parameters of AT+JOIN
command are optional. You can use AT+JOIN
directly to join the LoRaWAN network. If no parameters are configured, the device will use the default values.
The device will as well respond with an asynchronous message whether the join process was successful or failed.
Examples:
Successful join attempt
AT+JOIN=1:0:10:8
OK
+EVT:JOINED
Failed join attempt
AT+JOIN=1:0:10:8
OK
+EVT:JOIN FAILED
If joining fails, make sure your device is within the coverage of the gateway. Also, ensure that the RUI3 LoRaWAN device is in LoRaWAN mode via AT+NWM=1
. The region is correct via AT+BAND
, and the EUIs and keys are correct.
AT+NJM
Description: Network Join Mode
This command is used to access the network join mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+NJM? | - | AT+NJM : get or set the network join mode (0 = ABP, 1 = OTAA) | OK |
AT+NJM | - | 0 | OK |
AT+NJM=<Input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+NJM=?
0
OK
AT+NJM=1
OK
AT+NJM=2
OK
AT_PARAM_ERROR
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 1.
AT+NJS
Description: LoRa Network Join status
This command is used to access the current activation status of the device. It shows if the device joined or not in a LoRaWAN network.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+NJS? | - | AT+NJS : get the join status (0 = not joined, 1 = joined) | OK |
AT+NJS=? | - | AT+NJS = (0 or 1) | OK |
Example:
AT+NJS=?
AT+NJS=0
OK
AT+NJS=?
AT+NJS=1
OK
The command will return 1
if the device has successfully joined the network and 0
if the device hasn't joined the network yet.
AT+RECV
Description: Last received data
This command is used to access the last received data in hex format.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RECV? | - | AT+RECV : print the last received data in hex format | OK |
AT+RECV=? | - | AT+RECV =<port>:<payload> | OK |
Where:
<port>
: 1 decimal integer and the range of values is 1~233.<payload>
: 2500 digit length, must be an even number of digits and character 0-9, a-f, A-F only, representing 1256 hexadecimal numbers.
Example:
AT+RECV=?
AT+RECV=45:112233
OK
This command returns the last received data in a form, along with the port on which it was received. The format of the output is as follows:
<port>:<payload><CR><LF>
<CR><LF>OK<CR><LF>
When called twice, without new data received between the calls, the second AT+RECV=?
returns an empty value as shown below:
0:
OK
AT+SEND
Description: Send data
This command provides the way to send data on a dedicated port number.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+SEND? | - | AT+SEND : send data along with the application port | OK |
AT+SEND=<input> | <port>:<payload> | - | OK AT_PARAM_ERROR AT_BUSY_ERROR AT_NO_NETWORK_JOINED |
Where:
<port>
: 1 decimal integer and the range of values is 1~233.<payload>
: 2~500-digit length, must be an even number of digits and character 0-9, a-f, A-F only, representing 1~256 hexadecimal numbers.
Example:
AT+SEND=12:112233
OK
AT_PARAM_ERROR
R is returned when setting wrong or malformed value.AT_BUSY_ERROR
is returned when the previous send is not complete (send waiting for duty cycle, rx window not consumed).AT_NO_NETWORK_JOINED
is returned when the network is not yet joined.
This is an asynchronous command. OK
means that the device has started to send.
The device will as respond with an asynchronous message whether the send process was successful or failed.
AT+LPSEND
Description: Long packet data
This command provides the way to send long packet text data.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LPSEND? | - | AT+LPSEND : send long packet data (Maximum is 1000 bytes) | OK |
AT+LPSEND=<Input> | - | <port>:<ack>:<payload> | OK AT_PARAM_ERROR |
Where:
<port>
: application port to be transmitted
<ack>
;
– 0: indicates this is an unconfirmed message;
– 1: indicates this is a confirmed message;
<payload>
: payload in hexadecimal format strings (maximum length is 1000 bytes).
Example:
AT+LPSEND=2:1:123456
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- This command is only supported by WisGate Edge gateways and their internal LoRaWAN server.
This is an asynchronous command. OK
means that the device has started to send.
The device will as respond with an asynchronous message whether the send process was successful or failed.
Long packet data mode is only supported for uplink packets. Downlink packets cannot have the long packet data format.
AT+RETY
Description: Confirm packet retransmission
This command sets the number of retransmissions of confirmed packet data.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RETY? | - | AT+RETY : set the number of retransmissions of Confirm packet data | OK |
AT+RETY=? | - | AT+RETY = [0,1,2,3,4,5,6,7] | OK |
AT+RETY=<input> | [0,1,2,3,4,5,6,7] | - | OK AT_PARAM_ERROR |
Example:
AT+RETY=?
AT+RETY=3
OK
AT+RETY=2
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 0, and the retry cycle range of values is 0~7.
LoRaWAN Network Management
This section provides a set of commands for network management.
AT+ADR
Description: Adaptive Rate
This command is used to access the adaptive data rate.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+ADR? | - | AT+ADR : get or set the adaptive data rate setting (0 = OFF, 1 = ON) | OK |
AT+ADR=? | - | AT+ADR =(0 or 1) | OK |
AT+ADR=<Input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+ADR=?
AT+ADR=1
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 1.
AT+CLASS
Description: LoRa Class
This command is used to access the LoRaWAN class.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+CLASS? | - | AT+CLASS : get or set the device class (A = class A, B = class B, C = class C) | OK |
AT+CLASS=? | - | AT+CLASS =(A, B, or C) | OK |
AT+CLASS=<Input Parameter> | A, B, or C | - | OK or AT_PARAM_ERROR |
Examples:
AT+CLASS=A
OK
AT+CLASS=?
AT+CLASS=A
OK
When operating in CLASS B, more return value is shown, that shows the current state of Class B operation:
Class B Status | Description |
---|---|
B:S0 | DeviceTimeReq |
B:S1 | Beacon Searching |
B:S2 | Beacon Locked |
B:S3 | Beacon Failed |
Example:
AT+CLASS=B
OK
AT+CLASS=?
AT+CLASS=B:S0
OK
AT+DCS
Description: Duty cycle settings
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+DCS? | - | AT+DCS : get or set the ETSI duty cycle setting (0 = disabled, 1 = enabled) | OK |
AT+DCS=? | - | AT+DCS =(0 or 1) | OK |
AT+DCS=<Input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+DCS=?
AT+DCS=1
OK
AT+DCS=1
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the EU868 default value is 1. It depends on the region to disable or enable, and it can only be read.
AT+DR
Description: Data rate
This command is used to access and configure data rate settings.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+DR? | - | AT+DR : get or set the data rate | OK |
AT+DR=? | - | AT+DR =(0,1,2,3,4,5,6,7) | OK |
AT+DR=<Input> | 0,1,2,3,4,5,6,7 | - | OK AT_PARAM_ERROR |
Example:
AT+DR=?
AT+DR=3
OK
AT+DR=2
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the EU868 default value is 0.
- EU433 / RU864 / IN865 / EU868 / CN470 / KR920: The data rate range of values is 0-5 (DR0-DR5).
- AS923: The data rate range of values is 2-5 (DR2-DR5).
- US915: The data rate range of values is 0-4 (DR0-DR4).
- AU915 / LA915: The data rate range of values is 0-6 (DR0-DR6).
- Complete information about DR parameter on each region can be found on RUI3 Appendix - LoRaWAN Regional Parameter (Data Rate).
AT+JN1DL
Description: Join delay on RX window 1
This command is used to configure the join delay on RX window 1. The range of acceptable values is 1 to 14 seconds.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+JN1DL? | - | AT+JN1DL : get or set the join accept delay between the end of TX and the join RX window 1 in second | OK |
AT+JN1DL=? | - | 5 | OK AT_BUSY_ERROR |
AT+JN1DL=<input> | <integer> | - | OK AT_PARAM_ERROR AT_BUSY_ERROR |
Example:
AT+JN1DL=?
AT+JN1DL=5
OK
AT+JN1DL=10
OK
AT_BUSY_ERROR
is returned when a join or a send is being processed.AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 5.
<Input>
: 1-decimal integer and the range of values is 1~14.
AT+JN2DL
Description: Join delay on RX window 2
This command is used to configure the join delay on RX window 2. The range of acceptable values is 2 to 15 seconds.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+JN2DL? | - | AT+JN2DL : get the join accept delay between the end of TX and the join RX window 2 in second | OK |
AT+JN2DL=? | - | 6 | OK AT_BUSY_ERROR |
AT+JN2DL=<input> | <integer> | - | OK AT_PARAM_ERROR AT_BUSY_ERROR |
Example:
AT+JN2DL=?
AT+JN2DL=6
OK
- Take note that
AT+JN2DL
must be larger than AT+JN1DL or it will not work.AT_BUSY_ERROR
is returned when wrong setting is applied. - Also,
AT_BUSY_ERROR
is returned when a join or a send is being processed. AT_PARAM_ERROR
is returned when setting wrong or malformed value.
AT+PNM
Description: Public network mode
This command is used to access the public network mode.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+PNM? | - | AT+PNM : get or set the public network mode (0 = off, 1 = on) | OK |
AT+PNM=? | - | 0 or 1 | OK |
AT+PNM=<input> | 0 or 1 | - | OK AT_PARAM_ERROR |
Example:
AT+PNM=?
AT+PNM=0
OK
AT+PNM=1
OK
AT+PNM=2
AT_PARAM_ERROR
AT_PARAM_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 1.
AT+RX1DL
Description: Delay of the received window 1
This command is used to access the delay of the received window 1. The range of acceptable values is 1 to 15 seconds. Whenever AT+RX1DL
is updated, AT+RX2DL
is also updated automatically.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RX1DL? | - | AT+RX1DL : get or set the delay between the end of TX and the RX window 1 (in 1~15 seconds) | OK |
AT+RX1DL=? | - | <integer> | OK |
AT+RX1DL=<input> | <integer> | - | OK AT_PARAM_ERROR AT_BUSY_ERROR |
Example:
AT+RX1DL=?
AT+RX1DL=1
OK
AT+RX1DL=10
OK
AT_PARAM_ERROR
is returned when a join or a send is being processed.AT_BUSY_ERROR
is returned when setting wrong or malformed value.- In this case, the default value is 1.
<Input>
: 1-decimal integer and the range of values is 1~15.
AT+RX2DL
Description: Delay of the received window 2
This command is used to access the delay of the received window 2. The range of acceptable values is 2 to 15 seconds. Whenever AT+RX2DL
is updated, AT+RX1DL
is also updated automatically.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RX2DL? | - | AT+RX2DL : get the delay between the end of TX and the RX window 2 (in 2~15 seconds) | OK |
AT+RX2DL=? | - | <integer> | OK AT_BUSY_ERROR |
Example:
AT+RX2DL=?
AT+RX2DL=2
OK
AT_BUSY_ERROR
is returned when setting wrong or malformed value.
AT+RX2DR
Description: Data rate of the received window 2
This command is used to access the data rate of received window 2.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RX2DR? | - | AT+RX2DR : get or set the RX2 window data rate | OK |
AT+RX2DR=? | - | [0,1,2,3,4,5,6,7] or [8,9,10,11,12,13] | OK AT_BUSY_ERROR |
AT+RX2DR=<input> | [0,1,2,3,4,5,6,7] or [8,9,10,11,12,13] | - | OK AT_PARAM_ERROR AT_BUSY_ERROR |
Example:
AT+RX2DR=?
AT+RX2DR=6
OK
AT+RX2DR=5
OK
AT_PARAM_ERROR
is returned when a join or a send is being processed.AT_BUSY_ERROR
is returned when setting wrong or malformed value.- In this case, the EU868 default value is 0 and the US915 default value is 8.
EU433 / RU864 / IN865 / EU868 / CN470 / KR920 and the data rate range of values is 0-5 (DR0-DR5).
AS923 and the data rate range of values is 2-5 (DR2-DR5).
US915 / AU915 / LA915 and the data rate range of values is 8-13 (DR8-DR13).
AT+RX2FQ
Description: Frequency of the received window 2
This command is used to access the frequency of the received window 2.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+RX2FQ? | - | AT+RX2FQ : get the Rx2 window frequency (Hz) | OK |
AT+RX2FQ=? | - | Frequency in Hz | OK AT_BUSY_ERROR |
Example:
AT+RX2FQ=?
AT+RX2FQ=869535000
OK
AT_BUSY_ERROR
is returned when setting wrong or malformed value.- In this case, the EU868 default value is 869525000. It depends on the region frequency, and it can only be read.
AT+TXP
Description: Transmit power
This command is used to access the transmit power.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+TXP? | - | AT+TXP : get or set the transmitting power (0 = highest TX power, 10 = lowest TX power) | OK |
AT+TXP=? | - | <value> | OK AT_PARAM_ERROR |
AT+TXP=<input> | <value> | - | OK AT_PARAM_ERROR |
Example:
AT+TXP=?
AT+TXP=1
OK
AT+TXP=4
OK
AT_PARAM_ERROR
is returned when a join or a send is being processed.- In this case, the TX Power default value is 0.
EU868 / RU864 / KR920 / AS923 / CN470 and Transmit power range of values is 0-7.
US915 / AU915 and Transmit power range of values is 0-14.
EU433 and Transmit power range of values is 0-5.
IN865 and Transmit power range of values is 0-10. - Highest power start from 0. Complete information about TXP parameter on each region can be found on RUI3 Appendix - LoRaWAN Regional Parameter (TX Power).
AT+LINKCHECK
Description: Verify network link status
This command is used to access and configure the device network link status.
Command | Input Parameter | Return value | Return code |
---|---|---|---|
AT+LINKCHECK? | - | AT+LINKCHECK : get or set the link check setting (0 = disabled, 1 = once, 2 = everytime) | OK |
AT+LINKCHECK=? | - | [0,1,2] | OK |
AT+LINKCHECK=<Input> | [0,1,2] | - | OK AT_PARAM_ERROR |
Input parameter details:
- 0 - Disable Link Check
- 1 - Execute Link Check just once on the next payload uplink.
- 2 - Module will automatically execute one-time Link Check after every payload uplink.
Example:
AT+LINKCHECK=?
AT+LINKCHECK=0
OK
AT+LINKCHECK=1
OK
AT+SEND=3:12341234
OK
+EVT:LINKCHECK:0,21,1,-60,11
LINKCHECK
is a dedicated LoRaWAN MAC command that checks the connectivity status of the end-device to the network. You will have the LINKCHECK
status reply once the AT+SEND
command is executed. In case of a failed uplink (regardless if confirmed or unconfirmed), the LINKCHECK
reply will be +EVT:LINKCHECK:1,0,0,0,0
.
Reply format: +EVT:LINKCHECK:Y0,Y1,Y2,Y3,Y4
- Y0 represents the result of Link Check
- 0 – represents the Link Check execute success (+EVT:LINKCHECK:0,0,1,-107,4)
- Non-0 – represents the Link Check execute fail (+EVT:LINKCHECK:1,0,0,0,0)
- Y1 represents the DemodMargin
- Y2 represents the NbGateways
- Y3 represents the RSSI
- Y4 represents the SNR
AT+LBT
Description: LoRaWAN "Listen Before Talk" (LBT)
This command is used to enable or disable LoRaWAN LBT.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LBT? | - | AT+LBT : get or set the LoRaWAN LBT (support Korea Japan) (0=Disabled; 1=Enabled) | OK |
AT+LBT=? | - | <0-1> | OK |
AT+LBT=<Input> | <0-1> | - | OK AT_PARAM_ERROR |
Example:
AT+LBT=?
AT+LBT=0
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.
AT+LBTRSSI
Description: LoRaWAN "Listen Before Talk" RSSI (LBTRSSI)
This command is used to set or get LoRaWAN LBT RSSI.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LBTRSSI? | - | AT+LBTRSSI : get or set the LoRaWAN LBT RSSI (support Korea Japan) | OK |
AT+LBTRSSI=? | - | <RSSI> | OK |
AT+LBTRSSI=<Input> | <RSSI> | - | OK AT_PARAM_ERROR |
Example:
AT+LBTRSSI=?
AT+LBTRSSI=-80
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.
AT+LBTSCANTIME
Description: LoRaWAN "Listen Before Talk" Scantime (LBTSCANTIME)
This command is used to set or get LoRaWAN LBT Scantime.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+LBTSCANTIME? | - | AT+LBTSCANTIME : get or set the LoRaWAN LBT scantime (support Korea Japan) | OK |
AT+LBTSCANTIME=? | - | <time> | OK |
AT+LBTSCANTIME=<Input> | <time> | - | OK AT_PARAM_ERROR |
Example:
AT+LBTSCANTIME=?
AT+LBTSCANTIME=5
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value.
AT+TIMEREQ
Description: Time Request
This command is used to request the current date and time.
Command | Input Parameter | Return Value | Return Code |
---|---|---|---|
AT+TIMEREQ? | - | AT+TIMEREQ : request the current date and time (0=Disabled, 1=Enabled) | OK |
AT+TIMEREQ=? | - | <0-1> | OK |
AT+TIMEREQ=<Input> | <0-1> | - | OK AT_PARAM_ERROR |
Example:
AT+TIMEREQ=?
AT+TIMEREQ=0
OK
AT_PARAM_ERROR
is returned when setting wrong or malformed value. The time can be acquired withat+ltime=?
and is returned in UTC+0 timezone as04h36m00s on 11/27/2023