Table of Contents:

1. Introduction

This chapter describes how to switch LoRaWAN server by rejoin feature.

2. What is the rejoin feature?

Rejoin feature is that if the ACK packet sent by the platform to the node is not received within the set time range, the offline detection will be started.

2.1 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.

2.2 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

  

3. Examples and Explanations

Switching platforms by rejoin function: Use device LHT65N to switch from TTN to ChirpStack as an example.

The following example shows the parameters of the LHT65N. Users need to check the Wiki instructions to confirm the parameters of the equipment they have purchased.
(User Manual for LoRaWAN End Nodes))

3.1 Configure appropriate operation times

Firstly, the user sent downlink commands through the original registration platform (TTN) to modify the required TDC time and offline detection time.  

Note: Users need to set the TDC time shorter than the offline detection ACK_Timeout_1, the best offline detection time is more than twice the TDC time.

  • Configuration via TTN downlink:

image-20231123170814-4.png

Note: When configuring the device using downlink commands, you need to wait for the original TDC time, and the platform plans downlink after the end node complete uplink.

TDC changed successfully:

image-20231124102601-1.png

Confirm that the TDC configuration is successful, and then configure the offline detection time:

image-20231123170339-2.png

  • Configure using the AT commands by Serial Port Utility:

image-20231124103318-2.png

3.2 Delete the device and add the device to the new platform

Delete device:

image-20231124104002-3.png

image-20231124104014-4.png

Register the device on the new platform and wait for the offline detection time for the device to automatically request to join the network.

image-20231124112845-8.png

image-20231124113011-9.png

image-20231124111630-6.png

3.3 Restore the default TDC time and the default offline detection time

  • It is recommended to restore the factory reset directly:

          Downlink payload: 0x04FE

 image-20231124114451-10.png

image-20231124115256-11.png

After the delivery is successful, the node is connected to the network again and factory Settings are restored.

image-20231124141041-1.png

image-20231124141141-2.png

  • If the device has other configurations to keep, users can also choose to configure the default TDC and default offline detection time separately.

image-20231124142829-4.png

image-20231124142645-3.png

Note: To set these two commands separately, users must restore the default offline detection time before configuring the default TDC time.

 

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