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