Table of Contents:

1. Introduction

Dragino LoRaWAN End Node support two types of AT Commands and Downlink Commands:

  • Common Commands:  They should be available for each sensor, such as: change uplink interval, reset device.
  • Sensor Related Commands:  Only for special sensor, such as control relay, poll RS485 device.

This page shows the common commands since Dragino LoRaWAN stack DR-LWS-005. Make sure the end node support stack higher than DR-LWS-005 before checking this page.

2. How to use AT Commands or Downlink command

  • AT Command : See Devices User Manual for how to connect to device via USB TTL adapter and use. The user manual can be found in each product page of Dragino Products User Manual.
  • LoRaWAN Downlink Command: The gateway transfer downlink command in HEX format. This page shows the Downlink Command In HEX format. Please note some LoRaWAN servers use base64 as downlink code so user need to convert HEX to Base64 and use. Below are references for how to use downlink command:

  

3. Support End Node and firmware version

Dragino STM32 base hardware Firmware / LoRaWAN stack list

ModelDescriptionFirmware Version <--> Stack Version

Open Source Generic LoRaWAN Sensor Node

LSN50 v1.6.0 <--> DR-LWS-003;

LSN50 v1.7.0 <--> DR-LWS-005; --> Support since this version

LoRaWAN GPS Tracker

LGT92 v1.6.3 <--> DR-LWS-003;

LGT92 v1.6.4 <--> DR-LWS-005;--> Support since this version

LoRaWAN BLE Indoor Tracker

LBT1 v1.0 <--> DR-LWS-005;

LoRaWAN RS485 Modbus Converter

RS485-LN v1.3 <--> DR-LWS-005;

LoRaWAN Temperature & Humidity Sensor

LHT65 v1.7 <--> DR-LWS-003;

LHT65 v1.8.0 <--> DR-LWS-005;--> Support since this version

  

4. System Management Commands

4.1 Change Uplink Interval

Feature: Change LoRaWAN End Node Transmit Interval.

AT Command: AT+TDC

Command ExampleFunctionResponse
AT+TDC=?Show current transmit Interval30000

OK

the interval is 30000ms = 30s

AT+TDC=60000Set Transmit IntervalOK

Set transmit interval to 60000ms = 60 seconds

Downlink Command: 0x01

Format: Command Code (0x01) followed by 3 bytes time value.

If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.

  • Example 1: Downlink Payload: 0100001E               // Set Transmit Interval (TDC) = 30 seconds
  • Example 2: Downlink Payload: 0100003C               // Set Transmit Interval (TDC) = 60 seconds

  

4.2 Reboot End Node

Feature: Reboot End Node to perform a new OTAA or ABP Join.

AT Command: ATZ                    // Trig a reset of the MCU

Command ExampleFunctionResponse
ATZReset MCU

Device reset and show booting info

LSN50 Device/LoRa ST Module

Image Version: XX

Frequency Band: XX

DevEui= XX XX XX XX XX XX XX XX

<followed by the Tx and Rx information>

Downlink Command: 0x04

Format: Command Code (0x04) followed by FF.

If the downlink payload=04FF, the end node will reboot. 

4.3 Reset to factory Default

Feature: Reset the parameters to Factory Default, factory default value depends on the firmware settings, the OTAA and ABP keys will reserve after this command.

AT Command: AT+FDR          //  Reset to factory default

Command ExampleFunctionResponse
AT+FDRReset to factory default

Device reset to factory default parameters and show booting info

LSN50 Device/LoRa ST Module

Image Version: XX

Frequency Band: XX

DevEui= XX XX XX XX XX XX XX XX

Please set the parameters or reset Device to apply change

Downlink Command: 0x04

Format: Command Code (0x04) followed by FE.

If the downlink payload=04FE, Reset Parameters to Factory Default, Keys Reserve.

4.4 Show Firmware Version

Feature: Show firmware version. No downlink command yet.

AT Command: AT+VER      //   Image Version and Frequency Band

Command ExampleFunctionResponse
AT+VER=?Show Image version and Frequency Band

1.3 EU868

OK

Downlink Command: 0x26 (Valid in 006 stack)

Format: Command Code (0x26) followed by 1 byte.

If the downlink payload=2601, Device will reply with firmware version info, device info. frequency band info. detail please check device user manual. Total 5 bytes Example: If device is of firmware version 1.1.0 Upload: xx -- yy -- zz -- 110 total 5 bytes(  FPort= 5 usually).

 

xx: Software Type:

  • 0x00 01: LGT92 Version
  • 0x00 02: LBT1
  • 0x00 03: LSE01/LDDS75/LDDS20/LSPH01/LLMS01/LSNPK01

 

yy: Frequency Band:

  • 0x01: EU868
  • 0x02: US915
  • 0x03: IN865
  • 0x04: AU915
  • 0x05: KZ865
  • 0x06: RU864
  • 0x07: AS923
  • 0x08: AS923-1
  • 0x09: AS923-2
  • 0xa0: AS923-3

 

zz: Subband

firmware version: v1.1.0 --> 110

4.5 Show System Configure

Feature: Show All configure. No downlink command yet.

AT Command: AT+CFG       // Print all configurations

Command ExampleFunctionResponse
AT+CFGShow all configures

AT+DEUI = XX XX XX XX XX XX XX XX
AT+DADDR=XXXXXXXX
……….
AT+RX2WTO=X
AT+CHS=868100000
OK

  

5. Keys, IDs and EUIs management

5.1 Application EUI

Feature: Get or Set the Application EUI.

AT Command: AT+APPEUI

Command ExampleFunctionResponse
AT+APPEUI=?Get the Application EUI00 b3 d5 00 00 00 00 00

OK

AT+APPEUI=00 b3 d5 7e f0 00 4d 34Set the Application EUIOK

  

5.2 Application Key

Feature: Get or Set the Application Key.

AT Command: AT+APPKEY

Command ExampleFunctionResponse
AT+APPKEY=?Get the Application Key00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35

OK

AT+APPKEY=00 35 55 55 22 23 55 53 43 24 23 42 34 35 35 35Set the Application KeyOK

  

5.3 Application Session Key

Feature: Get or Set the Application Session Key.

AT Command: AT+APPSKEY

Command ExampleFunctionResponse
AT+APPSKEY=?Get the Application Session Key00 7d dc 73 33 d3 eb 9e 14 38 d5 a4 3e 62 5b e2

OK

AT+APPSKEY=00 7d dc 73 33 d3 eb 9e 14 38 d5 a4 3e 62 5b e2Set the Application Session Key(While Error in format, return AT_PARAM_ERROR)

OK

  

5.4 Device Address

Feature: Get or Set the Device Address.

AT Command: AT+DADDR

Command ExampleFunctionResponse
AT+DADDR=?Get the Application Session Key.(While Error in format, return AT_PARAM_ERROR)

A8 40 41 FF

OK

AT+DADDR=A8 40 41 FFSet the Application Session Key.OK

  

5.5 Device EUI

Feature: Get or Set the Device EUI.

AT Command: AT+DEUI

Command ExampleFunctionResponse
AT+DEUI=?Get the Device EUI.00 44 34 22 33 45 55 55

OK

AT+DEUI=A8 40 41 FF FF 12 34 56Set the Device EUI.(System will write new value to Device EUI,While Error in format, return AT_PARAM_ERROR)

OK

  

5.6 Network ID

Feature: Get or Set the Network ID.(You can enter this command change only after successful network connection)

AT Command: AT+NWKID

Command ExampleFunctionResponse
AT+NWKID=?Get the Network ID.a8 40 41 ff

OK

AT+NWKID=A8 40 41 FFSet the Network ID.OK

  

5.7 Network Session Key

Feature: Get or Set the Network Session Key

AT Command: AT+NWKSKEY

Command ExampleFunctionResponse
AT+NWKSKEY=?Get the Network Session Key.00 4f 19 25 52 ce 97 09 d7 fa 84 71 db 51 02 92

OK

AT+NWKSKEY=A8 40 41 FF FF 12 34 56 00 01 02 04 05 06 06 07Set the Network Session Key.OK

  

6. Joining and sending date on LoRaWAN network

6.1 Confirm Mode

6.1.1  AT+CFM command before DR-LWS007 software stack

Feature: Get or Set the confirmation mode (0-1).

AT Command: AT+CFM

Command ExampleFunctionResponse
AT+CFM=?Get the confirmation mode0

OK

AT+CFM=1Set the confirmation modeOK
AT+CFM=2Set the confirmation modeWhile Error in format, return AT_PARAM_ERROR

Downlink Command: 0x05

Format: Command Code (0x05) followed by 1 byte mode value.

If the downlink payload=0501, it means set end node to use confirm mode, while type code is 05.

  • Example 1: Downlink Payload: 0501            // Set AT+CFM=1
  • Example 2: Downlink Payload: 0500            // Set AT+CFM=0

  

6.1.2  AT+CFM command since DR-LWS007 software stack

AT Command: AT+CFM

Command ExampleFunctionResponse

AT+CFM=1,0,0

value1

confirmed uplink

1

OK

AT+CFM=0,?,0

value2

set max retry , range: 0 ~ 7

0~7

OK

AT+CFM=0,0,1

value3

uplink fcnt increase by 1 for each retry

1

OK

Downlink Command: 0x05

Format: Command Code (0x05) followed by 3 bytes mode value.

If the downlink payload=05010101, it means set end node to use confirm mode, while type code is 05.

  • Example 1: Downlink Payload: 05010101           // Set AT+CFM=1,1,1
  • Example 2: Downlink Payload: 05000700           // Set AT+CFM=0,7,0

  

6.2 Confirm Status

Feature: Get confirmation status of the last AT+SEND (0-1).

AT Command: AT+CFS

Command ExampleFunctionResponse
AT+CFS=?Get confirmation status0

OK

  

6.3 Join LoRa® Network

Feature: Join network.

AT Command: AT+JOIN

Command ExampleFunctionResponse
AT+JOIN ?Get imformation.AT+JOIN: Join network

OK
While Error in format, return AT_BUSY_ERROR

  

6.4 LoRa® Network Join Mode

Feature: Get or Set the Network Join Mode. (0: ABP, 1: OTAA).

AT Command: AT+NJM

Command ExampleFunctionResponse
AT+NJM=?Get the Network Join Mode1

OK

AT+NJM=0Set the Network Join ModeOK
AT+NJM=2Set the Network Join ModeWhile Error in format, return AT_PARAM_ERROR

Downlink Command: 0x20

Format: Command Code (0x20) followed by 1 bytes mode value.

If the downlink payload=2000, it means set the Network Join Mode, while type code is 20.

  • Example 1: Downlink Payload: 2000                   // Set AT+NJM=0
  • Example 2: Downlink Payload: 2001                   // Set AT+NJM=1

  

6.5 LoRa® Network Join Status

Feature: LoRa® Network Join Status.

AT Command: AT+NJS

Command ExampleFunctionResponse
AT+NJS=?Get the join status.0

OK

  

6.6 Print Last Received Data in Raw Format

Feature: Print Last Received Data in Raw Format<port:data>.

AT Command: AT+RECV

Command ExampleFunctionResponse
AT+RECV=?print last received data in raw format.0:

OK

  

6.7 Print Last Received Data in Binary Format

Feature: Print Last Received Data in Binary Format<port:data>.

AT Command: AT+RECVB

Command ExampleFunctionResponse
AT+RECVB=?print last received data in binary format (with hexadecimal values).2: 0010

OK

  

6.8 Send Text Data(Note: The format of this command of LA66 is subject to the manual)

Feature: Send Text Data<port:data>.

AT Command: AT+SEND

Command ExampleFunctionResponse
AT+SEND=12:hello worldSend text data along with the application port.OK

While Error in format, return
AT_BUSY_ERROR/AT_BUSY_ERROR/AT_NO_NETWORK_JOINED

  

6.9 Send Hexadecimal Data(Note: The format of this command of LA66 is subject to the manual)

Feature: Send hexadecimal data along with the application port.

AT Command: AT+SENDB

Command ExampleFunctionResponse
AT+SENDB=12:abcdef0123456789Send hexadecimal data along with the application port.OK
AT+SENDB=abcdef0123456789Send hexadecimal data along with the application port.While Error in format, return

AT_PARAM_ERROR AT_BUSY_ERROR/AT_NO_NETWORK_JOINED 

  

7. LoRaWAN network management

7.1 Adaptive Data Rate

Feature: Get or Set the Adaptive Data Rate setting. (0: off, 1: on).

AT Command: AT+ADR

Command ExampleFunctionResponse
AT+ADR=?Get the Adaptive Data Rate setting.1

OK

AT+ADR=0Set the Adaptive Data Rate setting.OK
AT+ADR=2Set the Adaptive Data Rate setting.While Error in format, return

AT_PARAM_ERROR

Downlink Command: 0x22

If the downlink payload=2201, it means setting the adaptive data rate to 1, while type code is 22.

  • Example 1: Downlink Payload: 2201                       // Set AT+ADR=1.
  • Example 2: Downlink Payload: 2200FFFF               // Set AT+ADR=0.

  

7.2 LoRa® Class

Feature: Get or Set the Device Class(Currently only support class A, class C).

AT Command:  AT+CLASS

Command ExampleFunctionResponse
AT+CLASS=?Get the Device Class.A

OK

AT+CLASS=CSet the Device Class.OK

 

 

Notice:

  • Run AT+FDR before running AT+CLASS=C
  • After change to Class=C, Before OTAA Join Successfule, the end node will still shows to use CLASS=A for OTAA Joined. It will use CLASS=C after OTAA Join Succeccful.

7.3 Duty Cycle Setting

Feature: Get or Set the ETSI Duty Cycle setting : 0=disable, 1=enable - Only for testing.

AT Command:  AT+DCS

Command ExampleFunctionResponse
AT+DCS=?Get the ETSI Duty Cycle setting.1

OK

AT+DCS=1Set the ETSI Duty Cycle setting.OK

 

  

7.4 Data Rate

Feature: Get or Set the Data Rate. (0-7 corresponding to DR_X) .

Notice:

  • User need to set Adaptive Data Rate(ADR)=0 first. otherwise device will respond to server's ADR command and change the DR according to server auto-adjustment.

AT Command: AT+DR

Command ExampleFunctionResponse
AT+DR=?Get the Data Rate.5

OK

AT+DR=2Set the Data Rate.OK

 

Downlink Command: 0x2200aaFF

If the downlink payload=220001FF, it means setting the data rate to 1, while type code is 22 00 aa FF.

  • Example 1: Downlink Payload: 220001FF                     // Set AT+DR=1.
  • Example 2: Downlink Payload: 220000FF                     // Set AT+DR=0.

  

Feature: Get or Set the Frame Counter Downlink.

AT Command:  AT+FCD

Command ExampleFunctionResponse
AT+FCD=?Get the Frame Counter Downlink.0

OK

AT+FCD=10Set the Frame Counter Downlink.(System will write new value to FCD)

OK

  

Feature: Get or Set the Frame Counter Uplink.

AT Command:  AT+FCU

Command ExampleFunctionResponse
AT+FCU=?Get the Frame Counter Uplink.0

OK

AT+FCU=10Set the Frame Counter Uplink.OK

 

  

7.7 Join Accept Delay1

Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms.

AT Command:  AT+JN1DL

Command ExampleFunctionResponse
AT+JN1DL=?Get the Join Accept Delay.5000

OK

AT+JN1DL=10000Set the Join Accept Delay.OK

 

  

7.8 Join Accept Delay2

Feature: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms.

AT Command:  AT+JN2DL

Command ExampleFunctionResponse
AT+JN2DL=?Get the Join Accept Delay.6000

OK

AT+JN2DL=20000Set the Join Accept Delay.OK

 

  

7.9 Public Network Mode

Feature: Get or Set the public network mode. (0: off, 1: on). A Public LoRaWAN network use 0x34 as syncword. Default Settings; PNM=1

Notice: If user build their own LoRaWAN server but still use syncword=0x34, this is still considered a public LoRaWAN network.

AT Command:  AT+PNM

Command ExampleFunctionResponse
AT+PNM=?Get the public network mode.1

OK

AT+PNM=1

Set the public network mode.

Set syncword=0x34

(System will write new value to PNM)

OK

 

AT+PNM=0Set to use private network autoset syncword=0x12 

  

7.10 Receive Delay1

Feature: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms

AT Command: AT+RX1DL

Command ExampleFunctionResponse
AT+RX1DL=?Get the delay.1000

OK

AT+RX1DL=1500Set the delay.OK

 

  

7.11 Receive Delay2

Feature: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms

AT Command: AT+RX2DL

Command ExampleFunctionResponse
AT+RX2DL=?Get the delay.2000

OK

AT+RX2DL=2500Set the delay.OK

 

  

7.12 Rx2 Window Data Rate

Feature: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)

AT Command:  AT+RX2DR

Command ExampleFunctionResponse
AT+RX2DR=?Get the Rx2 window data rate.2

OK

AT+RX2DR=6Set the Rx2 window data rate.OK

 

  

7.13 Rx2 Window Frequency

Feature: Get or Set the Rx2 window frequency

AT Command:  AT+RX2FQ

Command ExampleFunctionResponse
AT+RX2FQ=?Get the Rx2 window frequency.434665000

OK

AT+RX2FQ=434665000Set the Rx2 window frequency.OK

 

  

7.14 Transmit Power

Feature: Get or Set the Transmit Power(0-5, MAX:0, MIN:5, according to LoRaWAN Spec, or 40=10dBm, 41 = 11dBm, …, 50 = 20dBm which is out of LoRaWAN spec. )

Notice: Transmit Power might be changed by ADR from LoRaWAN server. So manually change TXP also remember to set AT+ADR=0 in sensor

AT Command:  AT+TXP

Command ExampleFunctionResponse
AT+TXP=?Get the Transmit Power.0

OK

AT+TXP=1Set the Transmit Power.OK

 

Downlink Payload. The 4th byte of 0x22 downlink.

If the downlink payload=22000100, it means setting the TXP to 0.

  • Example 1: Downlink Payload: 22000102         // Set AT+TXP=2.
  • Example 2: Downlink Payload: 22000000        // Set AT+TXP=0.

  

7.15 RSSI of the Last Received Packet

Feature: Get or Set the Rx2 window frequency

AT Command:AT+RSSI

Command ExampleFunctionResponse
AT+RSSI=?Get the RSSI of the last received packet.0

OK

  

7.16 SNR of the Last Received Packet

Feature: Get the SNR of the last received packet

AT Command:  AT+SNR

Command ExampleFunctionResponse
AT+SNR=?Get the RSSI of the last received packet.0

OK

  

7.17 Application Port

Feature: Get or set the application port.

AT Command: AT+PORT

Command ExampleFunctionResponse
AT+PORT=?Get the application port21

OK

AT+PORT=21Set the application portOK

Downlink Command: 0x23

Format: Command Code (0x23) followed by 1 bytes port value.

If the downlink payload=2301, it means set the application port to 1, while type code is 23.

  • Example 1: Downlink Payload: 2301          // set the application port to 1
  • Example 2: Downlink Payload: 2305          // set the application port to 5

  

7.18 Single Channel Mode

Feature:Get or Set Frequency (Unit: Hz) for Single Channel Mode.

AT Command: AT+CHS

Command ExampleFunctionResponse
AT+CHS=?Get Frequency for Single Channel Mode0

OK

AT+CHS=868100000Set Frequency for Single Channel ModeOK

  

7.19 Eight Channel Mode

Feature: Get or Set eight channels mode,Only for US915,AU915,CN470.

AT Command: AT+CHE

Command ExampleFunctionResponse
AT+CHE=?Get eight channels mode1

902.3 902.5 902.7 902.9 903.1 903.3 903.5 903.7

OK

AT+CHE=1Set eight channels modeOK

Downlink Command: 0x24 (LHT65,LHT65N Downlink Command:0x07)

Format: Command Code (0x24) followed by 1 bytes channel value.

If the downlink payload=2401, it means set channel mode to 1, while type code is 24.

  • Example 1: Downlink Payload: 2401           // set channel mode to 1
  • Example 2: Downlink Payload: 2405           // set channel mode to 5

  

7.20 Get or Set RXwindows1 timeout

Feature: Get or Set the number of symbols to detect and timeout from RXwindow1(0 to 255).

AT Command: AT+RX1WTO

Command ExampleFunctionResponse
AT+RX1WTO=?Get RXwindows1 timeout14

OK

AT+RX1WTO=60Set RXwindows1 timeoutOK

  

AT+RX1WTO is theRxSingle timeout value of receive window 1. If it is not set, then the queriedvalue is the default value. If it is set, then the queried value is the setvalue. AT+RX2TWO is thesame as above. The definitionof RxSingle timeout is as described in the following paragraph.

image-20220526162535-1.png

Increasing thisvalue is equal to extending the time that the receiving window is opened, butthe corresponding power consumption will also increase. Properly increasingthis value can increase the success rate of the downlink.

Example:
1. Set AT+RX1WTO=0, AT+RX1DL=5000, the window opening time is: 53.699ms

image-20240906095336-1.png

2. Set AT+RX1WTO=128, AT+RX1DL=5000, the window opening time is: 149.644ms

image-20240906095433-2.png

3. Set AT+RX1WTO=128, AT+RX1DL=5000, the window opening time is: 298.221ms

image-20240906095527-3.png

7.21 Get or Set RXwindows2 timeout

Feature: Get or Set the number of symbols to detect and timeout from RXwindow2(0 to 255).

AT Command: AT+RX2WTO

Command ExampleFunctionResponse
AT+RX2WTO=?Get RXwindows2 timeout7

OK

AT+RX2WTO=20Set RXwindows2 timeoutOK

Example:
1. Set AT+RX2WTO=0, AT+RX2DL=6000, the window opening time is: 48.435ms

  image-20240906095619-4.png

2. Set AT+RX2WTO=128, AT+RX2DL=6000, the window opening time is: 3011ms

image-20240906095726-5.png

3. Set AT+RX2WTO=255, AT+RX2DL=6000, the window opening time is: 3009ms

image-20240906095811-6.png

7.22 Setting up uplinkdwelltime (as923, au915)

Feature: Get or Set uplinkdwelltime

AT Command: AT+DWELLT

Command ExampleFunctionResponse
AT+DWELLT=?Get uplinkdwelltime1

OK

AT+DWELLT=0Set uplinkdwelltimeOK

Downlink Command: 0x25

Format: Command Code (0x25) followed by 1 bytes state value.

If the downlink payload=2501, it means set uplinkdwelltime to 1, while type code is 25.

  • Example 1: Downlink Payload: 2501                    // set uplinkdwelltime to 1
  • Example 2: Downlink Payload: 2500                    // set uplinkdwelltime to 0

  

7.23 Set Packet Receiving Response Level

Feature: Get or Set packet receiving response level. This feature is used to set compatible with different LoRaWAN servers. If RPL doesn;t match , user will see strange message in the server portal.

RPL value:

  • AT+RPL=0: Device won't immediately reply any downlink commands from platform.
  • AT+RPL=1: Device will immediately reply message to Unconfirmed Data Down. Payload is 0x00.
  • AT+RPL=2: Device will immediately reply message to Confirmed Data Down. Payload is 0x00 and requied response header for this command.
  • AT+RPL=3: Device will immediately reply message to MAC Command. Payload is 0x00 and requied response header for this command.
  • AT+RPL=4: Device will immediately reply message to Confirmed Data Down & MAC Command. Payload is 0x00 and requied response header for these two commands.

Case Analyes:

  • For Class A devices, AT+RPL=0 is ok. that is defaut settings in software.
  • For Class C devices used in ChirpStack, need to set AT+RPL=4 because Chirpstack require immedietely reply message to MAC Command.
  • For Class C devices used in TTI, need to set AT+RPL=4 because TTI require immediately reply message to Confirmed Data Down & MAC Command.

AT Command: AT+RPL

Command ExampleFunctionResponse
AT+RPL=?Get packet receiving response level1

OK

AT+RPL=0Set packet receiving response levelOK

Downlink Command: 0x21

Format: Command Code (0x21) followed by 1 bytes level value.

If the downlink payload=2101, it means set packet receiving response level to 1, while type code is 21.

  • Example 1: Downlink Payload: 2101                // set packet receiving response level to 1
  • Example 2: Downlink Payload: 2102                // set packet receiving response level to 2

  

7.24 Controls NBTrans in unconfirmed uplink mode(LWS007 NBTrans:Set retransmission packets)

AT Command: AT+SETMAXNBTRANS 

Command ExampleFunctionResponse
AT+SETMAXNBTRANS=1,0Value1: set the maximum NBTrans.1

OK

AT+SETMAXNBTRANS=?,1

value2:  0: uplink fcnt doesn't change for each NBTrans;

1: uplink fcnt increase by 1 for each NBTrans.

1

OK

Downlink Command: 0x33

Format: Command Code (0x33) followed by 2 bytes mode value.

If the downlink payload=330100, it means set end node to use confirm mode, while type code is 33.

  • Example 1: Downlink Payload: 330100                 // Set AT+SETMAXNBTRANS=1,0
  • Example 2: Downlink Payload: 330201                 // Set AT+SETMAXNBTRANS=2,1

  

7.25 Device offline rejoining (LWS007)

AT Command: AT+DDETECT

AT+DDETECT=<Flag>,<ACK_Timout_1>,<ACK_Timout_2> (Default Value: AT+DDETECT=1,1440,2880)

  • ACK_Timout_1: Unit: min
  • ACK_Timout_2: Unit: min
Command ExampleFunctionResponse

AT+DDETECT=1,1440,2880

value1

Enable online detect

1

OK

AT+DDETECT=1,?,2880

value2

Online detection packet sending time

 

OK

AT+DDETECT=1,1440,?

value3

Process rejoin

 

OK

Downlink Command: 0x32

Format: Command Code (0x32) followed by 2 bytes mode value.

If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32.

  • Example 1: Downlink Payload: 320105A00B40                     // Set AT+DDETECT=1,1440,2880
    • 0x01 : Flag

         0x05A0 : ACK_Timout_1 : 1440minutes (24 hours)

         0x0B40 : ACK_Timout_2 : 2880minutes (48 hours)

  • Explain: Enable Online Detect, if end node doesn't receive any downlink within ACK_Timout_1( 1440 minutes or 24 hours). End node will use confirmed uplink to send packets during ACK_Timout_1 (the 24th hour) to ACK_Timout_2 ( the 48th hour). If from the 24th to 48th hour, end node got an downlink from server, it will switch back to unconfirmed uplink. end node will restart ACK_Timout_1. If from the 24th to 48th hour, end node still not got any downlink, means device doesn't get ACK from server within last 48 hours. Device will process rejoin, rejoin request interval is AT+RJTDC period. For AU915/ US915, device will use the sub-band used for last join.

  

7.26 Request the server to send an ACK

Feature: Mode for sending data for which acknowledgment was not received. LoraWAN Network Server(eg. The Things NetWork/ChirpStack/AWS/...).

AT Command: AT+PNACKMD

Command ExampleFunctionResponse
AT+PNACKMD=1If the node uploads the ACK as confirm, it will request the  LoraWAN Network Server to send an ACK. If the  LoraWAN Network Server ack is not received, the node will upload the packets that have not received the ACK the next time it receives the ACK1

OK

AT+PNACKMD=0off request the  LoraWAN Network Server to send an ACK

0
OK

  Downlink Command: 0x34

0X34 01    //Same As AT+PNACKMD=1

0x34 00    //Same As AT+PNACKMD=0

7.27 Adjust network rejoining interval

AT Command: AT+RJTDC

Command ExampleFunctionResponse
AT+RJTDC=?Show the ReJoin data transmission interval in min30

OK

the interval is 30 min

AT+RJTDC=60Set the ReJoin data transmission interval in minOK

Set the ReJoin data transmission interval to 60 min

Downlink Command: 0x26

Format: Command Code (0x26) followed by 2 bytes mode value.

If the downlink payload=26000A, it means set end node to use confirm mode, while type code is 26.

  • Example 1: Downlink Payload: 26000A                 //  Set AT+RJTDC=10
  • Example 2: Downlink Payload: 260002                 //  Set AT+RJTDC=2

  

8. AT Commands Combination

8.1 Set a fix RX2DR for downlink window

  • AT+ADR=0              //  Disable ADR first
  • AT+RX2DR=xxxx    //  Set xxxx to your wanted DataRate

  

8.2 Use Downlink Command to set a fix uplink DR

Downlink Command: 0x22000500

Same as:

 

Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0