Version 28.2 by Mengting Qiu on 2023/11/24 14:37

Hide last authors
Mengting Qiu 1.3 1 **Table of Contents:**
Mengting Qiu 1.2 2
Mengting Qiu 1.1 3 {{toc/}}
4
5
6
7
8
9
Mengting Qiu 2.2 10 = 1. introduction =
Mengting Qiu 3.2 11
Mengting Qiu 27.2 12 This chapter describes how to switch LoRaWAN server by rejoin feature.
Mengting Qiu 3.2 13
14
15 = 2. What is the rejoin feature? =
16
Mengting Qiu 28.2 17 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.
Mengting Qiu 3.2 18
Mengting Qiu 5.1 19 == 2.1offline rejoining (LWS007) ==
Mengting Qiu 3.2 20
21 (% style="color:blue" %)**AT Command: AT+DDETECT**
22
23 AT+DDETECT=<Flag>,<ACK_Timout_1>,<ACK_Timout_2> (Default Value: AT+DDETECT=1,1440,2880)
24
25 * ACK_Timout_1: Unit: min
26
27 * ACK_Timout_2: Unit: min
28
29 (% border="1" style="background-color:#f2f2f2; width:562px" %)
30 |(% style="background-color:#4f81bd; color:white; width:160px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:272px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:89px" %)**Response**
31 |(% style="width:160px" %)(((
32 AT+DDETECT=1,1440,2880
33
34 value1
35 )))|(% style="width:272px" %)Enable online detect|(% style="width:89px" %)(((
36 1
37
38 OK
39 )))
40 |(% style="width:160px" %)(((
41 AT+DDETECT=1,?,2880
42
43 value2
44 )))|(% style="width:272px" %)Online detection packet sending time|(% style="width:89px" %)(((
45
46
47 OK
48 )))
49 |(% style="width:160px" %)(((
50 AT+DDETECT=1,1440,?
51
52 value3
53 )))|(% style="width:272px" %)Process rejoin|(% style="width:89px" %)(((
54
55
56 OK
57 )))
58
59 (% style="color:blue" %)**Downlink Command: 0x32**
60
61 Format: Command Code (0x32) followed by 2 bytes mode value.
62
63 If the downlink payload=320105A00B40, it means set end node to use confirm mode, while type code is 32.
64
65 * **Example 1:** Downlink Payload: 320105A00B40  ~/~/ Set AT+DDETECT=1,1440,2880
66
Mengting Qiu 28.2 67 *
Mengting Qiu 3.2 68 ** 0x01** : Flag**
69
70 **0x05A0 **: ACK_Timout_1 : 1440minutes (24 hours)
71
72 **0x0B40 **: ACK_Timout_2 : 2880minutes (48 hours)
73
74 * **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.
75
Mengting Qiu 5.1 76 == 2.2 Change Uplink Interval ==
77
78 Feature: Change LoRaWAN End Node Transmit Interval.
79
80 (% style="color:blue" %)**AT Command: AT+TDC**
81
82 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:727.222px" %)
83 |(% style="background-color:#4f81bd; color:white; width:165px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:227px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:329px" %)**Response**
84 |(% style="width:165px" %)AT+TDC=?|(% style="width:227px" %)Show current transmit Interval|(% style="width:329px" %)30000(((
85 OK
86
87 the interval is 30000ms = 30s
88 )))
89 |(% style="width:165px" %)AT+TDC=60000|(% style="width:227px" %)Set Transmit Interval|(% style="width:329px" %)OK(((
90 Set transmit interval to 60000ms = 60 seconds
91 )))
92
93 (((
94 (% style="color:blue" %)**Downlink Command: 0x01**
95
96 Format: Command Code (0x01) followed by 3 bytes time value.
97 )))
98
99 (((
100 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
101 )))
102
103 * **Example 1**: Downlink Payload:** 0100001E**  ~/~/ Set Transmit Interval (TDC) = 30 seconds
104
105 * **Example 2**: Downlink Payload:** 0100003C**  ~/~/ Set Transmit Interval (TDC) = 60 seconds
106
Mengting Qiu 3.2 107 (% style="display:none" %) (%%)
108
Mengting Qiu 5.1 109
Mengting Qiu 3.6 110 = 3. Examples and Explanations =
Mengting Qiu 3.2 111
Mengting Qiu 3.6 112 (% style="color:blue" %)**Switching platforms by rejoin function: Use device LHT65N to switch from TTN to ChirpStack as an example.**
Mengting Qiu 3.2 113
Mengting Qiu 3.6 114 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.
115 ([[User Manual for LoRaWAN End Nodes)>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes]])
Mengting Qiu 3.2 116
Mengting Qiu 5.1 117
Mengting Qiu 3.6 118 == 3.1 Configure appropriate operation times ==
Mengting Qiu 3.2 119
Mengting Qiu 5.1 120 (% style="color:blue" %)**Firstly, the user sent downlink commands through the original registration platform (TTN) to modify the required TDC time and offline detection time.**(%%) 
Mengting Qiu 3.2 121
Mengting Qiu 5.1 122 (% style="color:red" %)**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.**
Mengting Qiu 3.2 123
124
Mengting Qiu 10.2 125 * Configuration via TTN downlink:
Mengting Qiu 3.2 126
Mengting Qiu 11.1 127 [[image:image-20231123170814-4.png||height="631" width="696"]]
Mengting Qiu 3.2 128
Mengting Qiu 11.1 129 (% style="color:red" %)**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.**
Mengting Qiu 3.2 130
Mengting Qiu 13.2 131 TDC changed successfully:
132
133 [[image:image-20231124102601-1.png||height="543" width="617"]]
134
135
Mengting Qiu 11.1 136 Confirm that the TDC configuration is successful, and then configure the offline detection time:
137
138
139 [[image:image-20231123170339-2.png||height="566" width="715"]]
140
141
Mengting Qiu 10.2 142 * Configure using the AT commands by Serial Port Utility:
Mengting Qiu 3.2 143
Mengting Qiu 13.2 144 [[image:image-20231124103318-2.png||height="538" width="738"]]
Mengting Qiu 3.2 145
Mengting Qiu 3.4 146
Mengting Qiu 13.2 147 == 3.2 Delete the device and add the device to the new platform ==
Mengting Qiu 3.6 148
149
Mengting Qiu 22.2 150 Delete device:
Mengting Qiu 3.6 151
Mengting Qiu 22.2 152 [[image:image-20231124104002-3.png||height="302" width="653"]]
Mengting Qiu 3.6 153
Mengting Qiu 22.2 154 [[image:image-20231124104014-4.png||height="210" width="654"]]
Mengting Qiu 3.6 155
156
Mengting Qiu 22.2 157 Register the device on the new platform and wait for the offline detection time for the device to automatically request to join the network.
Mengting Qiu 3.6 158
Mengting Qiu 22.2 159 [[image:image-20231124112845-8.png||height="449" width="935"]]
Mengting Qiu 3.6 160
Mengting Qiu 22.2 161 [[image:image-20231124113011-9.png||height="450" width="935"]]
Mengting Qiu 3.6 162
Mengting Qiu 22.2 163 [[image:image-20231124111630-6.png||height="537" width="813"]]
Mengting Qiu 3.6 164
165
166
Mengting Qiu 22.2 167 == 3.3 Restore the default TDC time and the default offline detection time ==
Mengting Qiu 3.6 168
Mengting Qiu 22.2 169 * (% style="color:blue" %)**It is recommended to restore the factory reset directly:**
Mengting Qiu 3.6 170
Mengting Qiu 22.2 171 (% style="color:red" %)** downlink payload: 0x04FE**
Mengting Qiu 3.6 172
Mengting Qiu 22.2 173 [[image:image-20231124114451-10.png||height="377" width="826"]]
Mengting Qiu 3.6 174
Mengting Qiu 22.2 175 [[image:image-20231124115256-11.png||height="409" width="767"]]
Mengting Qiu 3.6 176
Mengting Qiu 27.2 177 After the delivery is successful, the node is connected to the network again and factory Settings are restored.
Mengting Qiu 3.6 178
Mengting Qiu 27.2 179 [[image:image-20231124141041-1.png||height="395" width="801"]]
180
181 [[image:image-20231124141141-2.png||height="460" width="802"]]
182
183
Mengting Qiu 22.2 184 * (% style="color:blue" %)**If the device has other configurations to keep, users can also choose to configure the default TDC and default offline detection time separately.**
Mengting Qiu 3.6 185
Mengting Qiu 27.2 186 [[image:image-20231124142829-4.png||height="451" width="626"]]
Mengting Qiu 3.6 187
188
Mengting Qiu 27.2 189 [[image:image-20231124142645-3.png||height="452" width="622"]]
Mengting Qiu 3.6 190
191
Mengting Qiu 27.2 192 (% style="color:red" %)**Note: To set these two commands separately, users must restore the default offline detection time before configuring the default TDC time.**
Mengting Qiu 3.6 193
194
Mengting Qiu 10.2 195
196
197
198
199
Mengting Qiu 27.2 200
Mengting Qiu 3.2 201