Skip to main content

RAK7431 AT Command Manual

Overview

This document applies to Modbus RS485 to LoRaWAN Bridge products. The supported product models include RAK7421/RAK7431/RAK7425.

AT Command Syntax

In general, the AT Command for the RAK7431 start with AT or at and ends with <CR> <LF>.

  • AT commands can be divided into:
    • Reading commands - read the configuration or status of the device, which is in the format of: AT+<x>
    • Write commands - write/modify the device configuration, which is in the format of: AT+<x>=<m>:<n> The command name and parameters are separated by "=". If there are multiple parameters, the parameters are separated by ":"
    • Test commands - is the test command executable, which is in the format of: AT+<x>=?
ConditionResponse
Normal response with information<Response><CR><LF>OK<CR><LF>
Normal responseOK<CR><LF>
Response when an error occursERROR <Error code>:<Error packet><CR><LF>
NOTE

AT commands are not case sensitive.

USB Configuration Interface

The devices are equipped with a standard USB interface for configuring the AT commands. The serial parameters are as follows:

ParameterValue
Baud rate115200
Data bit8
Stop bit1
VerificationNo

Common Errors

Error CodeDescription
ERROR 1Unsupported command
ERROR 2Syntax error
ERROR 3Storage failure
ERROR 4System busy
ERROR 5Parameter format / number error
ERROR 6Insufficient resources
ERROR 7Parameter out of valid range

LoRaWAN Commands

  1. AT+DEVEUI

This command reads or modifies the LoRaWAN Device EUI. The command takes effect after restart.

OperationAT CommandResponse
ReadAT+DEVEUI<dev_eui>
OK
WriteAT+DEVEUI=<device_eui>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+DEVEUI=?OK
ParameterInformation
dev_euiDevice EUI: Hexadecimal characters, 16 bytes in length
  1. AT+REGION

This command reads or modifies the Working Frequency Region/Band of the device. It will take effect after restart.

OperationAT CommandResponse
ReadAT+REGION<region>
OK
WriteAT+REGION=<region>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+REGION=?OK
ParameterInformation
regionSupports frequency bands: EU433, CN470, CN470ALI, RU864, IN865, EU868, US915, AU915, KR920, AS923
  1. AT+JOINMODE

This command reads or modifies the LoRaWAN Activation Mode of the device. It will take effect after restart.

OperationAT CommandResponse
ReadAT+JOINMODE<mode>
OK
WriteAT+JOINMODE=<mode>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+JOINMODE=?OK
ParameterInformation
modeSupported activation mode: ABP or OTAA
  1. AT+PUBLIC

This command reads or modifies the LoRaWAN Public Settings of the device. The working mode is set to Public by default (1 value of the parameter). The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+PUBLIC<x>
OK
WriteAT+PUBLIC=<x>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+PUBLIC=?OK
ParameterInformation
xIs the node working with public LoRaWAN network?
0Not working in Public mode
1Working in Public mode
  1. AT+CLASS

This command reads or modifies the LoRaWAN working Class of the device. Effective immediately after modification.

OperationAT CommandResponse
ReadAT+CLASS<class>
OK
WriteAT+CLASS=<class>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+CLASS=?OK
ParameterInformation
classSupported device Classes:
AClass A
BClass B
CClass C
  1. AT+APPEUI

The APPEUI parameter is valid when OTAA is activated. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+APPEUI<app_eui>
OK
WriteAT+APPEUI=<app_eui>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+APPEUI=?OK
ParameterInformation
app_euiApplication EUI: Hexadecimal character, 16 bytes in length
  1. AT+APPKEY

The APPKEY parameter is valid in OTAA Activation Mode. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+APPKEY<app_key>
OK
WriteAT+APPKEY=<app_key>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+APPKEY=?OK
ParameterInformation
app_keyApplication Key: Hexadecimal character, 32 bytes in length
  1. AT+DEVADDR

The DEVADDR parameter is valid in ABP Activation Mode. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+DEVADDR<dev_addr>
OK
WriteAT+DEVADDR=<dev_addr>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+DEVADDR=?OK
ParameterInformation
dev_addrDevice Address: Hexadecimal character, 8 bytes in length
  1. AT+APPSKEY

The APPSKEY parameter is valid in ABP Activation Mode. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+APPSKEY<apps_key>
OK
WriteAT+APPSKEY=<apps_key>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+APPSKEY=?OK
ParameterInformation
apps_keyApplication Session Key: Hexadecimal character, 32 bytes in length
  1. AT+NWKSKEY

The NWKSKEY parameter is valid in ABP Activation Mode. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+NWKSKEY<nwks_key>
OK
WriteAT+NWKSKEY=<nwkskey>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+NWKSKEY=?OK
ParameterInformation
nwks_keyNetwork Session Key: Hexadecimal character, 32 bytes in length
  1. AT+ADR

Turn on/off the LoRaWAN dynamic rate adjustment function of the device, which is “on” by default. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+ADR<n>
OK
WriteAT+ADR=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+ADR=?OK
ParameterInformation
nAdaptive Data Rate
0Disable ADR
1Enable ADR
  1. AT+DATARATE

Read/modify the LoRaWAN DataRate setting of the device, which is valid when the ADR function is turned off. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+DATARATE<n>
OK
WriteAT+DATARATE=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+DATARATE=?OK
ParameterInformation
nLoRaWAN DataRate
0 ~ 7DataRate from 0 to 7 s is possible.
NOTE

The DataRate value and the default value are related to LoRaWAN regional parameters. Refer to Appendix I: DataRate list of each region in this document.

  1. AT+CONFIRM

Turn on/off the LoRaWAN packet confirmation mechanic, which is set to be “on” by default. The modification will take effect immediately.

When the confirm function is enabled, the packets sent by the device will require the LoRa network server to send an ACK response. Unless a confirmation is received the device will resend the packet. For more information on the resending mechanic refer to “14. AT+RETRY”.

OperationAT CommandResponse
ReadAT+CONFIRM<n>
OK
WriteAT+CONFIRM=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+CONFIRM=?OK
ParameterInformation
nType of uplink packets
0Unconfirmed uplink packets
1Confirmed uplink packets
  1. AT+RETRY

Set the maximum number of retry attempts of the same LoRaWAN message, that will be valid when the confirm function is enabled. The default value is 3. The modification will take effect immediately.

When retry = n (n! = 1), if the device does not receive an ACK of a LoRaWAN message, it will resend the message until the ACK is received, or the retry counter expires.

OperationAT CommandResponse
ReadAT+RETRY<n>
OK
WriteAT+RETRY=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+RETRY=?OK
ParameterInformation
nMax resend times
1 ~ 8The number of retries can be between 1 and 8
  1. AT+CHANNEL

When the LoRaWAN channel plan of the device is CN470 / US915 / AU915, it can be read/modified through this instruction. After execution of this command, all channels from “start ID” to “end ID” in the instruction parameters are turned on, and the other channels are turned off. The modification will take effect after restart.

When the device is working in one of the following bands this command can only be used for reading the parameters: EU433 / RU864 / IN865 / EU868 / KR920 / AS923.

OperationAT CommandResponse
ReadAT+CHANNEL<id>:<freq>:<drmin>:<drmax>
...
OK
Write
(Only valid when Region
is CN470 / US915 / AU915)
AT+CHANNEL=<startid>:<endid>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+CHANNEL=?OK
ParameterInformation
idChannel ID
freqCenter frequency of channel, unit: Hz
drminDataRate (Min)
drmaxDataRate (Max)
startidStart channel ID
endidStop channel ID
  1. AT+ADDCHANNEL

Add a LoRaWAN channel.

This instruction is valid when the working frequency band of LoRaWAN is EU433 / RU864 / EU868 / KR920 / AS923. The modification will take effect after restart.

OperationAT CommandResponse
WriteAT+ADDCHANNEL=<freq>:<drmin>:<drmax>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+ADDCHANNEL=?OK
ParameterInformation
freqCenter frequency of channel, unit: Hz
drminDataRate (Min)
drmaxDataRate (Max)
  1. AT+RMCHANNEL

Delete a LoRaWAN channel.

This instruction is valid when the working frequency band is EU433 / RU864 / EU868 / KR920 / AS923. The modification takes effect after restart.

OperationAT CommandResponse
WriteAT+RMCHANNEL=<freq>:<drmin>:<drmax>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+RMCHANNEL=?OK
ParameterInformation
freqCenter frequency of channel, unit: Hz
drminDataRate (Min)
drmaxDataRate (Max)
  1. AT+CHANMASK

Read the currently configured LoRaWAN Channel Mask. It is determined by the currently open channels. This instruction is “read-only”.

OperationAT CommandResponse
ReadAT+CHANMASK<chanmsk>
OK
TestAT+CHANMASK=?OK
ParameterInformation
chanmaskChannel mask: Hexadecimal string, right to left corresponding channel ID from low to high
  1. AT+TXPOWER

The TXPOWER parameter is valid when the ADR function is turned off. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+TXPOWER<txpwr>
OK
WriteAT+TXPOWER=<txpwr>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+TXPOWER=?OK
ParameterInformation
txpwrTransmit power (dBm, floating-point)
The value range is 0 ~ maxeirp, and the effective step size is 2dbm, that is, txpwr = maxeirp – 2 * n, and n is an integer greater than or equal to 0
The maxeirp is the Maximum EIRP (Equivalent Isotropic Radiated Power) defined for the specific band you are using in the LoRa Alliance documentation.
  1. AT+PINGNB

Set the PingSlot Number in each Beacon Period for Class B mode. The number of ping slots determines the period of the downlink packet of the device. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+PINGNB<N>
OK
WriteAT+PINGNB=<N>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+PINGNB=?OK
ParameterInformation
NPingSlot Number in Beacon Period
1
2
4
8
16
32
64
128
  1. AT+LPTP

LoRa Private Transport Protocol (LPTP) is a RAK proprietary message splitting protocol, which can send data with a length exceeding the maximum permissible size, using multiple messages. As it is proprietary it only works with the RAK LoRa networks server built-into our commercial gateways. It is “Off” by default. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+LPTP<x>
OK
WriteAT+LPTP=<x>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
TestAT+LPTP=?OK
ParameterInformation
xLPTP status
0disabled
1enabled

Data Interface Commands

  1. AT+BAUDRATE

The command is used to read or modify the baud rate of the device's data serial port. The modification will take affect after restarting.

OperationAT CommandResponse
ReadAT+BAUDRATE<baudrate>
OK
WriteAT+BAUDRATE=<baudrate>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+BAUDRATE=?OK
ParameterInformation
baudrateBaud rate of serial port data:
2400
4800
9600
14400
19200
38400
57600
115200
  1. AT+DATABIT

Read or modify the data bit of the serial data. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+DATABIT<databit>
OK
WriteAT+DATABIT=<databit>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+DATABIT=?OK
ParameterInformation
databitData bit of serial port data:
77th bit
88th bit
  1. AT+STOPBIT

Read or modify the serial port data stop bit. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+STOPBIT<stopbit>
OK
WriteWrite AT+STOPBIT=<stopbit>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+STOPBIT=?OK
ParameterInformation
stopbitSerial stop bit:
11bit
1.51.5bits
22bits
  1. AT+PARITY

Read or modify the parity check bit of the data. The modification will take effect after restart.

OperationAT CommandResponse
ReadAT+PARITY<parity>
OK
WriteAT+PARITY=<parity>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+PARITY=?OK
ParameterInformation
parityParity check:
NONENo check
EVENEven parity check
ODDOdd parity check
  1. AT+DTUMODE

Read or modify the operating mode of the device’s data interface. The data interface supports two modes: P2P and MODBUS. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+DTUMODE<mode>
OK
WriteAT+DTUMODE=<mode>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+DTUMODE=?OK
ParameterInformation
modeOperating mode:
P2PPoint to point mode
MODBUSModbus mode
  1. AT+MODBUSTIMEOUT

Read or modify the Modbus instruction timeout of the device. It is valid when the data interface is in MODBUS Mode. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+MODBUSTIMEOUT<n>
OK
WriteAT+MODBUSTIMEOUT=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+MODBUSTIMEOUT=?OK
ParameterInformation
nModbus timeout in ms
  1. AT+TRANSPARENT

When the serial data port of the device works in MODBUS mode, the data encapsulation format can be divided into two types: transparent transmission mode and non-transparent transmission mode.

In transparent mode, the Modbus execution instruction response data (data, received by the node) will be directly forwarded through LoRaWAN network.

In the non-transparent mode, the Modbus execution instruction response data (data, received by the node) will be encapsulated in the message header according to the Modbus protocol, and then transmitted to the server through LoRaWAN. Please refer to Appendix II: MODBUS Data Encapsulation Protocol for details.

Non-transparent mode is the default one. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+TRANSPARENT<n>
OK
WriteAT+TRANSPARENT=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+TRANSPARENT=?OK
ParameterInformation
nOperating mode:
0non-transparent mode
1transparent mode
  1. AT+MODBUSRETRY

When the device works in MODBUS mode, with this command the number of retries, when a MODBUS instruction does not get response, is specified. By default, there is no retransmission value added. The modification will take effect immediately.

OperationAT CommandResponse
ReadAT+MODBUSRETRY<n>
OK
WriteAT+MODBUSRETRY=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+MODBUSRETRY=?OK
ParameterInformation
nNumber of retries:
0No retry
1 ~ 81 ~ 8 retries
  1. AT+ENABLEPOLL

When the device works in MODBUS mode, it supports the timed polling function.

This means that the device will perform a polling operation every given period (polling cycle). During polling, the device will send the pre-added MODBUS instructions in turn and forward the corresponding response data through the LoRaWAN network.

The device turns on timed polling by default. The modification shall take effect after restart.

OperationAT CommandResponse
ReadAT+ENABLEPOLL<n>
OK
WriteAT+ENABLEPOLL=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+ENABLEPOLL=?OK
ParameterInformation
nScheduled polling status:
0Disabled
1Enabled
  1. AT+POLLPERIOD

This command sets/reads the scheduled polling cycle. This command only works if scheduled polling is enabled. The modification takes effect after the next polling cycle or a restart.

OperationAT CommandResponse
ReadAT+POLLPERIOD<n>
OK
WriteAT+POLLPERIOD=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+POLLPERIOD=?OK
ParameterInformation
nPolling cycle in seconds
  1. AT+ADDPOLL

Add a polling instruction with this command. Up to 32 polling instructions are supported. The modification takes effect after the next polling cycle or a restart.

OperationAT CommandResponse
WriteAT+ADDPOLL=<n>:<xxxx>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+ADDPOLL=?OK
ParameterInformation
nPolling instruction ID, value range 1 ~ 127
xxxxPolling instruction content, hexadecimal string, maximum instruction length 128 bytes
  1. AT+RMPOLL

Delete a polling instruction. The modification takes effect after the next polling cycle or a restart

OperationAT CommandResponse
WriteAT+RMPOLL=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+RMPOLL=?OK
ParameterInformation
nPolling instruction ID, value range 1 ~ 127
  1. AT+POLLTASK

Query the list of scheduled polling instructions.

OperationAT CommandResponse
WriteAT+POLLTASKWhen it is successful:
<n>:<xxxx>
...
OK
When modification fails:
ERROR <code>:<message>
TestAT+POLLTASK=?OK
ParameterInformation
nPolling instruction ID, value range 1 ~ 127
xxxxInstruction content, hexadecimal string
  1. AT+ADDSCHEDULETASK

Schedule an instruction. The modification takes effect immediately after setting. The time in the command is local time.

OperationAT CommandResponse
WriteAT+ADDSCHEDULETASK=<id>:<type>:<w>:<h>:<m>:<s>:<data>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+ADDSCHEDULETASK =?OK
ParameterInformation
idTask ID,value is: 1 ~ 127
typethe type of schedule task:
WEEK - once a week
DAY - once a day
HOUR - once an hour*
wWEEK, only need add the value when the type = WEEK;
0 - For Sunday
1 ~ 6 For Monday ~ Saturday
hHour: 0 ~ 23
mMinute: 0 ~ 59
sSecond: 0 ~ 59
NOTE

*If selected type is HOUR, the parameter <h> is not used from the system.

  1. AT+RMSCHEDULETASK

A command to delete a scheduled instruction. The modification takes effect immediately after setting.

OperationAT CommandResponse
WriteAT+RMSCHEDULETASK=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+RMSCHEDULETASK=?OK
ParameterInformation
nTask ID,value is: 1 ~ 127

System Related Commands

  1. AT+TIMEZONE

With this command, the time zone of the device is set.

OperationAT CommandResponse
ReadAT+TIMEZONE<TZ>
OK
WriteAT+TIMEZONE=<TZ>When the modification is successful:
OK
When modification fails:
ERROR <code>:<message>
TestAT+TIMEZONE=?OK
ParameterInformation
TZUTC time zone: -12 ~ 12
  1. AT+VERSION

Read the firmware version of the device.

OperationAT CommandResponse
ReadAT+VERSIONWhen the modification is successful:
<br /><a>.<b>.<cccc>
OK
When modification fails:
ERROR <code>:<packet>
ParameterInformation
a.b.ccccFirmware Version, for example “1.1.0050”
  1. AT+SYSLOGLVL

Read or set the system log level. The module turns off the system log output by default. The user can modify the log output level through this command. The modification takes effect immediately after setting.

OperationAT CommandResponse
ReadAT+SYSLOGLVL<TZ>
OK
WriteAT+SYSLOGLVL=<level>OK
TestAT+SYSLOGLVL=?OK
ParameterInformation
levelOutput log level
0does not output any logs
1 ~ 6log with output level less than or equal to the value
  1. AT+ECHO

Turns local echo of the AT command-line interface on/off. Echo is turned off by default. It takes effect immediately after modification and is automatically turned off after a restart.

OperationAT CommandResponse
WriteAT+ECHO=<n>When the modification is successful:
OK
When modification fails:
ERROR <code>:<packet>
ParameterInformation
nLocal echo
0Disabled
1Enabled
  1. AT+BOOT

The device supports switching to boot mode. In boot mode, the dedicated upgrade software can be used for firmware update.

OperationAT CommandResponse
WriteAT+BOOT<BOOT MODE>
  1. AT+RESTART Reboot the device.
OperationAT CommandResponse
WriteAT+RESTARTNull
  1. AT+FACTORY

The command restores the device to the factory settings. This operation will last for about 60s. Do not cut off the power supply of the device before it automatically restarts.

OperationAT CommandResponse
WriteAT+FACTORYNull
  1. AT+SYSTIME

Show the real running time.

OperationAT CommandResponse
WriteAT+SYSTIME<time>
OK
ParameterInformation
timeTimestamp in UNIX format, in seconds
  1. AT+DATETIME

Show the synchronized with the LoRaWAN Network Server time. Needs LoRaWAN1.0.3 specification support from the server side.

OperationAT CommandResponse
ReadAT+DATETIME<datetime>
OK
ParameterInformation
datetimeDate / Time in YYYY/MM/DD hh:mm:ss
  1. AT+SYSINFO

This command gives the system information of the device.

OperationAT CommandResponse
ReadAT+SYSINFO<model>
<sn>
<version>
<vendor>
<copyright>
OK
ParameterInformation
modelModel info
snProduct SN info
versionFirmware version
vendorManufacturer info
copyrightCopyright info
  1. AT+WAKEUPBYTE

This command allows you to check or change the wake up byte.

OperationAT CommandResponse
ReadAT+WAKEUPBYTE<XX>
<OK>
WriteAT+WAKEUPBYTE=<XX><OK>
ParameterInformation
XXWake up byte
NOTE

Default value is 0xAA.

Event Notification

When the working state of the module changes, an event notification will be output through the AT command-line interface. The event notification format is:

EVENT:[EVENT_ID]:[EVENT_MSG]:<ADDITIONAL_INFO>
EventDescription
EVENT_IDEvent ID
EVENT_MSGEvent name
ADDITIONAL_INFOAdditional information - Optional
Some events need to output additional information. Multiple additional information sets are separated by ":"

The module supports the following event notifications:

IDEVENT_MSGDescription
0STARTUPSystem startup complete
1JOIN_NETWORKSuccessful join to the LoRaWAN network
2LEAVE_NETWORKUnsuccessful join to the LoRaWAN network
5SYSTEM_WAKEUPSystem wakeup
6RESTARTSystem restart
  1. STARTUP Event - Appears after system initialization.
    • Message format:
EVENT:0:STARTUP
No additional information.
  1. JOIN_NETWORK Event - LoRaWAN network activation successful. It appears after OTAA join successful.
    • Message format:
EVENT:1:JOIN_NETWORK
No additional information.
  1. LORA_LEAVE_NETWORK Event - In OTAA activation mode, if eight consecutive uplink confirmed packets do not receive a response, the LORA_LEAVE_NETWORK event will be triggered. After the LORA_LEAVE_NETWORK event is triggered, the module will stop sending LoRaWAN message and start OTAA activation again.
    • Message format:
EVENT:2:LEAVE_NETWORK
No additional information.
  1. SYSTEM_WAKEUP Event - A module in a low-power state can be awaken by receiving input from the AT command line interface. After wakeup, the module will no longer enter low-power mode. If you want the module to enter low power mode again, use the command: AT+SLEEP\r\n
    • Message format:
EVENT:5:SYSTEM_WAKEUP
  1. RESTART Event - Triggered before the module restarts.
    • Message format:
EVENT:6:RESTART
  1. Low Power Operation and Wakeup -The module supports low power mode. When the device is working in Class A, it automatically enters into low power operation mode. The module can be woken up at any time, when one of the following events occurs:
    • Wakeup on system interrupt - When module needs to perform tasks such as sending/receiving, it will wake up automatically. Automatically returns to low power mode after the task is completed.
    • Wakeup via the AT command-line interface - Any instruction sent through the AT command line interface can wake up the module. After wakeup, the SYSTEM_WAKEUP event is triggered, and the low power mode is no longer entered so that the user can use the AT command line to modify the module configuration info. If you want the module to enter low power mode again, use the command: AT+SLEEP\r\n

LoRaWAN FPort Definition

Uplink Message FPort Definition

FPortMessage TypeNote
1 ~ 128RS485/232 Scheduled task/poll uplink messageFport is consistent scheduled task/poll ID
129Non-transparent mode, reply of remote instruction message
130In transparent transmission mode, RS485/232 data upload message
131 ~ 223Reservednot used

Downlink Message FPort Definition

FPortMessage TypeNote
1 ~ 128Reservednot used
129Non-transparent mode, remote instruction
130RS485/232 downlink data sent remotely in transparent transmission mode
131 ~ 119Reservednot used
200Remote restart command
201Remote on/off ADR command
202Remote set working rate commandValid when ADR is closed
203Remote set transmit power commandValid when ADR is closed
204Remote on/off message acknowledgment
205Remote settings retransmission at this timeValid when the confirmed message mechanism is on

Appendix I: Data Rate of Each Region

EU433/RU864/EU868/AS923

Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6LoRa: SF7 / 250 kHz11000
7FSK: 50 kbps50000
8 ~ 15RFU

CN470/KR920

Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6 ~ 15RFU

US915

Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF10 / 125 kHz980
1LoRa: SF9 / 125 kHz1760
2LoRa: SF8 / 125 kHz3125
3LoRa: SF7 / 125 kHz5470
4LoRa: SF8 / 500 kHz12500
5 ~ 7RFU
8LoRa: SF12 / 500 kHz980
9LoRa: SF11 / 500 kHz1760
10LoRa: SF10 / 500 kHz3900
11LoRa: SF9 / 500 kHz7000
12LoRa: SF8 / 500 kHz12500
13LoRa: SF7 / 500 kHz21900
14 ~ 15RFU

AU915

Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6LoRa: SF8 / 500 kHz12500
7RFURFU
8LoRa: SF12 / 500 kHz980
9LoRa: SF11 / 500 kHz1760
10LoRa: SF10 / 500 kHz3900
11LoRa: SF9 / 500 kHz7000
12LoRa: SF8 / 500 kHz12500

IN865

Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6RFURFU
7FSK: 50 kbps50000
8 ~ 15RFURFU

Appendix II: Modbus Data Encapsulation Protocol

This section describes the definition of the Modbus message encapsulation format.

Message CommandMessage Sequence NumberData LengthData
DTU_CMDMSERMDATA_LENMDATA
1Byte2Byte2BytenByte
  • DTU_CMD: Message Command (Chapter 9.1)
  • MSER: Message Sequence Number
  • DTU report message actively - DTU incremental cycle count.
  • Platform query message - consistent with the sequence number of the message issued by the platform.

Message Command DTU_CMD Definition

Data BitsBIT7BIT6BIT5BIT4BIT3BIT2BIT1BIT0
DefinitionDIRSTATUSRESERVEDMessage TYPE
Description0: Downlink
1: Uplink
0: Success
1: Fail
0: Reserved0x00: Reserved
0x01: Scheduled polling task data
0x02: Transparent instruction / data
0x03: Add scheduled polling task list
0x04: Remove scheduled polling task list
0x05: Read scheduled polling task list
0x06: Read LoRa configuration
0x07: Set LoRa configuration
0x08: Read DTU configuration
0x09: Set DTU configuration
0x1D: Initialize LoRa configuration
0x1E: Initialize DTU configuration
0x1F: System restart
NOTE
  • Bit7 direction: The message sent by the platform to DTU is a downlink message. This is 0. The message sent by DTU to the platform is an uplink message. This is 1.
  • Bit6 status: The result of DTU executing instruction/task - 0 for success and 1 for failure.

Message Type Definition

  1. Data for Scheduled Polling Task

The scheduled polling task list is responsible for sending the read data when the scheduled task list is executed by the platform. This message needs to be sent whether the execution is successful or not. When the execution fails, the status flag position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the status flag position is 0 in the DTU_CMD command.

  • Execution success message format:
DTU_CMDMSERMDATA_LENMDATA
0x812Byte2ByteTASK_IDDATA
1BytenByte
  • Execution failure message format:
DTU_CMDMSERMDATA_LENMDATA
0xC12Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID: Task list ID.
  • DATA: Data. When the scheduled task list fails to execute, the data length is 0.
  1. Transparent Instruction / Data Message

The transparent transmission instructions and the execution results of the instructions issued by the platform are transmitted through this message.

This message needs to be sent whether or not the instruction is executed successfully. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x022Byte2ByteDATA
nByte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x822Byte2ByteDATA
nByte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC22Byte2ByteERROR_CODE
1Byte
NOTE
  • DATA: Instruction content / data
  • ERROR_CODE: Error code
  1. Add Scheduled Polling Task List message

DTU timing task list and execution result are added to the platform and transmitted through this message

This message needs to be sent to the platform whether or not the scheduled task list is added successfully. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x032Byte2ByteTASK_IDDATA
1BytenByte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x832Byte2ByteTASK_ID
1Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC32Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID: Task list id
  • DATA: Task list content
  • ERROR_CODE: Error code
  1. Remove Polling Task List

The platform removes the DTU timing task list and the execution results are transmitted through this message.

The message needs to be sent to the platform whether or not the scheduled task list is successfully removed. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

NOTE

If the specified task list ID is not found in the DTU, it will be regarded as successful execution.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x042Byte2ByteTASK_ID
1Byte
  • Message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x842Byte2ByteTASK_ID
1Byte
  • Message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC42Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID: Task list id
  • ERROR_CODE: Error code
  1. Read the Polling Task List

The platform reads the DTU timing task list and transmits the execution result through this message.

The message needs to be sent to the platform whether or not the scheduled task list is read successfully. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x052Byte2ByteTASK_ID
1Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x852Byte2ByteTASK_IDDATA
1BytenByte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC52Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID: Task list id
  • DATA: Task list content
  • ERROR_CODE: Error code
  1. Add Scheduled Task Message

The platform adds DTU scheduled task message and transmits the result through this message.

This message needs to be sent to the platform no matter whether the scheduled task is added successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • The format of the downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x0A2Byte2ByteTASK_IDSCH_TYPEWHMSDATA
1BytenByte1Byte1Byte1Byte1BytenByte
  • Uplink data message when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x8A2Byte2ByteTASK_ID
1Byte
  • Uplink data message when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xCA2Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID:Task ID
  • SCH_TYPE: Type of scheduled task
    • 0x00 execute once per hour
    • 0x01 execute once per day
    • 0x02 execute once per week
  • W: Which day of this week; 0 For Sunday, 1 ~ 6 For Monday ~ Saturday
  • H: Hour
  • M: Minute
  • S: Second
  • DATA:The data of the task
  • ERROR_CODE: error code
  1. Remove Scheduled Task Message

The platform removes DTU scheduled task message and transmits the result through this message.

This message needs to be sent to the platform no matter whether the scheduled task is removed successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

NOTE

When the specified task list ID is not found in DTU, it is considered that the execution is successful.

  • The format of the downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x0B2Byte2ByteTASK_ID
1Byte
  • Uplink data message when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x8B2Byte2ByteTASK_ID
1Byte
  • Uplink data message when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xCB2Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID:Task ID
  • ERROR_CODE: error code
  1. Read Scheduled Task Message

The platform reads DTU scheduled task message and transmits the result through this message.

This message needs to be sent to the platform no matter whether the scheduled task is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • The format of the downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x0C2Byte2ByteTASK_ID
1Byte
  • Uplink data message when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x8C2Byte2ByteTASK_IDSCH_TYPEWHMSDATA
1Byte1Byte1Byte1Byte1Byte1BytenByte
  • Uplink data message when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xCC2Byte2ByteTASK_IDERROR_CODE
1Byte1Byte
NOTE
  • TASK_ID:task ID
  • SCH_TYPE: type of scheduled task
    • 0x00 execute once per hour
    • 0x01 execute once per day
    • 0x02 execute once per week
  • W: which day of this week; 0 For Sunday, 1 ~ 6 For Monday ~ Saturday
  • H: Hour
  • M: Minute
  • S: Second
  • DATA:The data of the task
  1. Read LoRa Configuration

The platform reads the LoRa configuration and transmits the result through this message. Platform read message fdata is empty.

This message needs to be sent to the platform whether the LoRa configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x062Byte2Byte0Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x862Byte2ByteDATARATETXPWRCONFIRMRETRYADRDUTY CYCLE
1Byte1Byte1Byte1Byte1Byte1Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC62Byte2ByteERROR_CODE
1Byte
NOTE
  • DATARATE: Rate (0 – 5)
  • TXPOWER: Transmit power (0 - 20)
  • CONFIRM: Whether to turn on ack. 0 - off, 1 - on
  • RETRY: Maximum retransmission times when ACK is on (0 ~ 15)
  • ADR: Whether to turn on dynamic rate adjustment (ADR) 0 - off, 1 - on
  • DUTYCYCLE: Is the duty cycle limit on 0 - off, 1 – on
  1. Set LoRa Configuration

The platform reads the configuration and transmits the result through this message. Platform read message fdata is empty.

This message needs to be sent to the platform whether the LoRa configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x072Byte2ByteDATARATETXPWRCONFIRMRETRYADRDUTY CYCLE
1Byte1Byte1Byte1Byte1Byte1Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x872Byte2Byte0Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC72Byte2ByteERROR_CODE
1Byte
NOTE
  • DATARATE: Rate (0 – 5)
  • TXPOWER: Transmit power (0 - 20)
  • CONFIRM: Whether to turn on ACK, 0 - off, 1 - on
  • RETRY: Maximum retransmission times when ACK is on (0 ~ 15)
  • ADR_ENABLE: Whether to turn on dynamic rate adjustment (ADR) 0 - off, 1 - on
  • DUTYCYCLE_ENABLE: Is the duty cycle limit on 0-off, 1-on
  1. Read DTU Configuration

The DTU configuration and results read by the platform are transmitted through this message. Platform read message fdata is empty.

This message needs to be sent to the platform whether the DTU configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x082Byte2Byte0Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x882Byte2BytePOLL ENABLEPOLL PERIODBUS TIMEOUTRETRYRS485
1Byte1Byte1Byte1Byte1Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC82Byte2ByteERROR_CODE
1Byte
NOTE
  • POLL ENABLE: Enables scheduled polling, 0 - off, 1 - on
  • POLL PERIOD: Polling period, in seconds
  • BUS TIMEOUT: Bus timeout. The unit is seconds.
  • RETRY: Number of retries after bus timeout. 0 - turn off retry function
  • RS485: 485 bus parameters
DefinitionBIT7BIT6BIT5BIT4BIT3BIT2BIT1BIT0
Baud rateData BitStop BitCheck Code
Details0: 2400
1: 4800
2: 9600
3: 14400
4: 19200
5: 38400
6: 57600
7: 115200
0: 8bit
1: 9bit
0: 1bit
1: 1.5bit
2: 2bit
0: NONE
1: EVEN
2: ODD
  1. Set DTU Configuration

DTU configuration and results of platform settings are transmitted through this message. Set the result message fdata to null.

This message needs to be sent to the platform whether the DTU configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x092Byte2BytePOLL ENABLEPOLL PERIODBUS TIMEOUTRETRYRS485
1Byte1Byte1Byte1Byte1Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x892Byte2Byte0Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xC92Byte2ByteERROR_CODE
1Byte
NOTE
  • POLL ENABLE: Enables scheduled polling, 0 - off, 1 - on
  • POLL PERIOD: Polling period, in seconds
  • BUS TIMEOUT: Bus timeout. The unit is seconds.
  • RETRY: Number of retries after bus timeout. 0 - turn off retry function
  • RS485: 485 bus parameters
DefinitionBIT7BIT6BIT5BIT4BIT3BIT2BIT1BIT0
Baud rateData BitStop BitCheck Code
Details0: 2400
1: 4800
2: 9600
3: 14400
4: 19200
5: 38400
6: 57600
7: 115200
0: 7bit
1: 8bit
0: 1bit
1: 1.5bit
2: 2bit
0: NONE
1: EVEN
2: ODD
  1. Initialize LoRa Configuration

LoRa configuration and results of platform initial call are transmitted through this message. The message fdata is empty.

It needs to be sent to the platform whether the DTU configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x1D2Byte2Byte0Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x9D2Byte2Byte0Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xDD2Byte2ByteERROR_CODE
1Byte
  • The initial value of LoRa configuration:
DATARATE0 – DR_0
TXPOWER19 – 19dBm
CONFIRM1 – open
RETRY3 – retransmission 3 times
ADR_ENABLE1 – open
DUTYCYCLE_ENABLE0 – close
  1. Initialize DTU Configuration

LoRa configuration and results of platform initial call are transmitted through this message. The message data is empty.

It needs to be sent to the platform whether the DTU configuration is read successfully or not. When the execution fails, the STATUS bit position in the DTU_CMD command is 1, and the data length is 0. When the execution is successful, the STATUS flag position in the DTU_CMD command is 0.

  • Format of downlink instruction message:
DTU_CMDMSERMDATA_LENMDATA
0x1E2Byte2Byte0Byte
  • Uplink data message format when execution successful:
DTU_CMDMSERMDATA_LENMDATA
0x9E2Byte2Byte0Byte
  • Uplink data message format when execution failed:
DTU_CMDMSERMDATA_LENMDATA
0xDE2Byte2ByteERROR_CODE
1Byte
  • The initial value of DTU:
POLL_ENABLE1 (opened)
POLL_PERIOD3600(seconds)
BUS TIMEOUT1000(milliseconds)
RS4850xE0Baud rate: 115200
Data bits: 8
Stop bit: 1
Check code: NONE