Last modified by Xiaoling on 2023/07/18 10:12

From version 170.18
edited by Xiaoling
on 2022/06/22 10:31
Change comment: There is no comment for this version
To version 170.16
edited by Xiaoling
on 2022/06/22 10:07
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -46,9 +46,9 @@
46 46  * Datalog feature
47 47  
48 48  
49 +
49 49  == 1.3 Specification ==
50 50  
51 -
52 52  **Built-in Temperature Sensor:**
53 53  
54 54  * Resolution: 0.01 °C
... ... @@ -71,6 +71,7 @@
71 71  * Operating Range: -55 °C ~~ 125 °C
72 72  
73 73  
74 +
74 74  = 2. Connect LHT65N to IoT Server =
75 75  
76 76  == 2.1 How does LHT65N work? ==
... ... @@ -84,20 +84,26 @@
84 84  
85 85  The LHT65N has two working modes:
86 86  
88 +(% _mstvisible="1" %)
87 87  * (% style="color:blue" %)**Deep Sleep Mode**(%%): LHT65N doesn’t have any LoRaWAN activation. This mode is used for storage and shipping to save battery life.
88 88  * (% style="color:blue" %)**Working Mode**(%%):  In this mode, LHT65N works as LoRaWAN Sensor mode to Join LoRaWAN network and send out the sensor data to the server. Between each sampling/tx/rx periodically, LHT65N will be in STOP mode (IDLE mode), in STOP mode, LHT65N has the same power consumption as Deep Sleep mode. 
89 89  
92 +(% _mstvisible="1" %)
93 +(((
94 +(% _msthash="506062" _msttexthash="6036823" _mstvisible="2" %)
90 90  The LHT65N is set in deep sleep mode by default; The ACT button on the front is to switch to different modes:
96 +)))
91 91  
92 -
98 +(% _mstvisible="1" %)
93 93  [[image:image-20220515123819-1.png||_mstalt="430742" _mstvisible="3" height="379" width="317"]]
94 94  
101 +(% _mstvisible="1" %)
95 95  [[image:image-20220525110604-2.png||_mstalt="427531" _mstvisible="3"]]
96 96  
97 97  
105 +(% _mstvisible="1" %)
106 +== (% _msthash="882726" _msttexthash="838526" _mstvisible="3" %)2.3 Example to join LoRaWAN network(%%) ==
98 98  
99 -== 2.3 Example to join LoRaWAN network ==
100 -
101 101  (% _msthash="315240" _msttexthash="9205482" _mstvisible="1" class="wikigeneratedid" %)
102 102  This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Use with other LoRaWAN IoT servers is of a similar procedure.
103 103  
... ... @@ -104,73 +104,71 @@
104 104  (% _mstvisible="1" class="wikigeneratedid" %)
105 105  [[image:image-20220522232442-1.png||_mstalt="427830" _mstvisible="3" height="387" width="648"]]
106 106  
107 -
108 -(((
114 +(% _msthash="315241" _msttexthash="10802155" _mstvisible="1" %)
109 109  Assume the LPS8N is already set to connect to [[TTN V3 network>>url:https://eu1.cloud.thethings.network||_mstvisible="2"]], So it provides network coverage for LHT65N. Next we need to add the LHT65N device in TTN V3:
110 -)))
111 111  
112 112  
118 +(% _mstvisible="1" %)
119 +=== (% _msthash="670592" _msttexthash="634075" _mstvisible="3" %)2.3.1 Step 1: Create Device n TTN(%%) ===
113 113  
114 -=== 2.3.1 Step 1: Create Device n TTN ===
115 -
116 -(((
121 +(% _msthash="315242" _msttexthash="1601782" _mstvisible="1" %)
117 117  Create a device in TTN V3 with the OTAA keys from LHT65N.
118 -)))
119 119  
120 -(((
124 +(% _msthash="315243" _msttexthash="3694444" _mstvisible="1" %)
121 121  Each LHT65N is shipped with a sticker with its device EUI, APP Key and APP EUI as below:
122 -)))
123 123  
127 +(% _mstvisible="1" %)
124 124  [[image:image-20220617150003-1.jpeg]]
125 125  
130 +(% _msthash="315244" _msttexthash="3659149" _mstvisible="1" %)
126 126  User can enter these keys in the LoRaWAN Server portal. Below is TTN V3 screenshot:
127 127  
133 +(% _msthash="315245" _msttexthash="642889" _mstvisible="1" %)
128 128  Add APP EUI in the application.
129 129  
130 -
136 +(% _mstvisible="1" %)
131 131  [[image:image-20220522232916-3.png||_mstalt="430495" _mstvisible="3"]]
132 132  
133 -
139 +(% _mstvisible="1" %)
134 134  [[image:image-20220522232932-4.png||_mstalt="430157" _mstvisible="3"]]
135 135  
136 -
142 +(% _mstvisible="1" %)
137 137  [[image:image-20220522232954-5.png||_mstalt="431847" _mstvisible="3"]]
138 138  
139 -
145 +(% _msthash="315246" _msttexthash="878800" _mstvisible="1" %)
140 140  Note: LHT65N use same payload as LHT65.
141 141  
142 -
148 +(% _mstvisible="1" %)
143 143  [[image:image-20220522233026-6.png||_mstalt="429403" _mstvisible="3"]]
144 144  
145 145  
152 +(% _msthash="315247" _msttexthash="595543" _mstvisible="1" %)
146 146  Input APP EUI,  APP KEY and DEV EUI:
147 147  
148 -
155 +(% _mstvisible="1" %)
149 149  [[image:image-20220522233118-7.png||_mstalt="430430" _mstvisible="3"]]
150 150  
151 151  
152 152  
160 +(% _mstvisible="1" %)
161 +=== (% _msthash="3537456" _msttexthash="3448549" _mstvisible="3" %)2.3.2 Step 2: Activate LHT65N by pressing the ACT button for more than 5 seconds.(%%) ===
153 153  
154 -=== 2.3.2 Step 2: Activate LHT65N by pressing the ACT button for more than 5 seconds. ===
155 -
156 -(((
163 +(% _msthash="315248" _msttexthash="14452321" _mstvisible="1" %)
157 157  Use ACT button to activate LHT65N and it will auto-join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and user can see in the panel.
158 -)))
159 159  
166 +(% _mstvisible="1" %)
160 160  [[image:image-20220522233300-8.png||_mstalt="428389" _mstvisible="3" height="219" width="722"]]
161 161  
162 162  
163 163  
171 +(% _mstvisible="1" %)
172 +== (% _msthash="320879" _msttexthash="294970" _mstvisible="3" %)2.4 Uplink Payload(%%) ==
164 164  
165 -== 2.4 Uplink Payload ==
166 -
167 -(((
174 +(% _msthash="315249" _msttexthash="7722962" _mstvisible="1" %)
168 168  The uplink payload includes totally 11 bytes. Uplink packets use FPORT=2 and (% _mstvisible="3" style="color:#4f81bd" %)**every 20 minutes**(%%) send one uplink by default.
169 -)))
170 170  
171 -(((
177 +(% _msthash="315250" _msttexthash="1322711" _mstvisible="1" %)
172 172  After each uplink, the (% _mstvisible="3" style="color:blue" %)**BLUE LED**(%%) will blink once.
173 -)))
174 174  
175 175  (% _mstvisible="1" border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:426px" %)
176 176  (% _mstvisible="3" %)|=(% _mstvisible="4" style="width: 97px;" %)(% _mstvisible="5" %)
... ... @@ -236,108 +236,123 @@
236 236  [[Ext value>>||anchor="H2.4.6Extvalue" _msthash="1817487" _msttexthash="116545" _mstvisible="7"]]
237 237  )))
238 238  
244 +(% _mstvisible="1" %)
239 239  * The First 6 bytes: has fix meanings for every LHT65N.
240 240  * The 7th byte (EXT #): defines the external sensor model.
241 241  * The 8(% _msthash="734578" _msttexthash="21372" _mstvisible="4" %)^^th^^(%%) ~~ 11(% _msthash="734579" _msttexthash="21372" _mstvisible="4" %)^^th^^(%%) byte: the value for external sensor value. The definition is based on external sensor type. (If EXT=0, there won’t be these four bytes.)
242 242  
249 +(% _mstvisible="1" %)
250 +=== (% _msthash="360269" _msttexthash="333762" _mstvisible="3" %)2.4.1 Decoder in TTN V3(%%) ===
243 243  
244 -
245 -
246 -
247 -=== 2.4.1 Decoder in TTN V3 ===
248 -
252 +(% _msthash="315251" _msttexthash="9786491" _mstvisible="1" %)
249 249  When the uplink payload arrives TTNv3, it shows HEX format and not friendly to read. We can add LHT65N decoder in TTNv3 for friendly reading.
250 250  
255 +(% _msthash="315252" _msttexthash="3928483" _mstvisible="1" %)
251 251  Below is the position to put the decoder and LHT65N decoder can be download from here:
252 252  
253 -
258 +(% _mstvisible="1" %)
254 254  [[https:~~/~~/www.dropbox.com/sh/r2i3zlhsyrpavla/AAB1sZw3mdT0K7XjpHCITt13a?dl=0 >>https://www.dropbox.com/sh/r2i3zlhsyrpavla/AAB1sZw3mdT0K7XjpHCITt13a?dl=0||_msthash="315253" _msttexthash="3509064" _mstvisible="2"]]
255 255  
256 -
261 +(% _mstvisible="1" %)
257 257  [[image:image-20220522234118-10.png||_mstalt="451464" _mstvisible="3" height="353" width="729"]]
258 258  
259 259  
260 260  
266 +(% _mstvisible="1" %)
267 +=== (% _msthash="411411" _msttexthash="383656" _mstvisible="3" %)2.4.2 BAT-Battery Info(%%) ===
261 261  
262 -=== 2.4.2 BAT-Battery Info ===
263 -
269 +(% _msthash="315254" _msttexthash="3122912" _mstvisible="1" %)
264 264  These two bytes of BAT include the battery state and the actually voltage
265 265  
272 +(% _mstvisible="1" %)
266 266  [[image:image-20220523152839-18.png||_mstalt="457613" _mstvisible="3"]]
267 267  
268 -
275 +(% _mstvisible="1" %)
269 269  [[image:image-20220522235639-1.png||_mstalt="431392" _mstvisible="3" height="139" width="727"]]
270 270  
271 -
278 +(% _msthash="315255" _msttexthash="871611" _mstvisible="1" %)
272 272  Check the battery voltage for LHT65N.
273 273  
281 +(% _mstvisible="1" %)
274 274  * BAT status=(0Xcba4>>14)&0xFF=11(B),very good
275 275  * Battery Voltage =0xCBF6&0x3FFF=0x0BA4=2980mV
276 276  
285 +(% _mstvisible="1" %)
286 +=== (% _msthash="600769" _msttexthash="565838" _mstvisible="3" %)2.4.3 Built-in Temperature(%%) ===
277 277  
278 -
279 -
280 -=== 2.4.3 Built-in Temperature ===
281 -
288 +(% _mstvisible="1" %)
282 282  [[image:image-20220522235639-2.png||_mstalt="431756" _mstvisible="3" height="138" width="722"]]
283 283  
291 +(% _mstvisible="1" %)
284 284  * Temperature:  0x0ABB/100=27.47℃
285 285  
294 +(% _mstvisible="1" %)
286 286  [[image:image-20220522235639-3.png||_mstalt="432120" _mstvisible="3"]]
287 287  
297 +(% _mstvisible="1" %)
288 288  * Temperature:  (0xF5C6-65536)/100=-26.18℃
289 289  
300 +(% _mstvisible="1" %)
301 +=== (% _msthash="475891" _msttexthash="445120" _mstvisible="3" %)2.4.4 Built-in Humidity(%%) ===
290 290  
291 -
292 -=== 2.4.4 Built-in Humidity ===
293 -
303 +(% _mstvisible="1" %)
294 294  [[image:image-20220522235639-4.png||_mstalt="432484" _mstvisible="3" height="138" width="722"]]
295 295  
306 +(% _mstvisible="1" %)
296 296  * Humidity:    0x025C/10=60.4%
297 297  
309 +(% _mstvisible="1" %)
310 +=== (% _msthash="116532" _msttexthash="87958" _mstvisible="3" %)2.4.5 Ext #(%%) ===
298 298  
299 -
300 -=== 2.4.5 Ext # ===
301 -
312 +(% _msthash="315256" _msttexthash="552240" _mstvisible="1" %)
302 302  Bytes for External Sensor:
303 303  
315 +(% _mstvisible="1" %)
304 304  [[image:image-20220523152822-17.png||_mstalt="454545" _mstvisible="3"]]
305 305  
306 306  
319 +(% _mstvisible="1" %)
320 +=== (% _msthash="221429" _msttexthash="200655" _mstvisible="3" %)2.4.6 Ext value(%%) ===
307 307  
308 -=== 2.4.6 Ext value ===
322 +(% _mstvisible="1" %)
323 +==== (% _msthash="1005901" _msttexthash="877578" _mstvisible="3" %)2.4.6.1 Ext~=1, E3 Temperature Sensor(%%) ====
309 309  
310 -==== 2.4.6.1 Ext~=1, E3 Temperature Sensor ====
311 -
312 -
325 +(% _mstvisible="1" %)
313 313  [[image:image-20220522235639-5.png||_mstalt="432848" _mstvisible="3"]]
314 314  
315 315  
329 +(% _mstvisible="1" %)
316 316  * DS18B20 temp=0x0ADD/100=27.81℃
317 317  
332 +(% _msthash="315257" _msttexthash="1038479" _mstvisible="1" %)
318 318  The last 2 bytes of data are meaningless
319 319  
335 +(% _mstvisible="1" %)
320 320  [[image:image-20220522235639-6.png||_mstalt="433212" _mstvisible="3"]]
321 321  
322 322  
339 +(% _mstvisible="1" %)
323 323  * External temperature= (0xF54F-65536)/100=-27.37℃
324 324  
342 +(% _mstvisible="1" %)
343 +(((
344 +(% _msthash="506063" _msttexthash="1038479" _mstvisible="2" %)
325 325  The last 2 bytes of data are meaningless
346 +)))
326 326  
348 +(% _mstvisible="1" %)
349 +(((
350 +(% _msthash="506064" _msttexthash="21185632" _mstvisible="2" %)
327 327  If the external sensor is 0x01, and there is no external temperature connected. The temperature will be set to 7FFF which is 327.67℃
352 +)))
328 328  
329 329  
355 +(% _mstvisible="1" %)
356 +==== (% _msthash="1389752" _msttexthash="1234766" _mstvisible="3" %)2.4.6.2 Ext~=9, E3 sensor with Unix Timestamp(%%) ====
330 330  
331 -==== 2.4.6.2 Ext~=9, E3 sensor with Unix Timestamp ====
332 -
333 -(((
358 +(% _msthash="315258" _msttexthash="41539368" _mstvisible="1" %)
334 334  Timestamp mode is designed for LHT65N with E3 probe, it will send the uplink payload with Unix timestamp. With the limitation of 11 bytes (max distance of AU915/US915/AS923 band), the time stamp mode will be lack of BAT voltage field, instead, it shows the battery status. The payload is as below:
335 -)))
336 336  
337 -(((
338 -
339 -)))
340 -
341 341  (% _mstvisible="1" border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %)
342 342  (% _mstvisible="3" %)|=(% _mstvisible="4" style="width: 96px;" %)(% _mstvisible="5" %)
343 343  (((
... ... @@ -411,7 +411,6 @@
411 411  )))
412 412  )))
413 413  
414 -
415 415  (% _mstvisible="1" %)
416 416  * (% _msthash="2539669" _msttexthash="857922" _mstvisible="3" %)**Battery status & **(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)**Built-in Humidity**
417 417  
... ... @@ -442,20 +442,19 @@
442 442  
443 443  )))
444 444  
445 -
464 +(% _mstvisible="1" %)
446 446  * (% _msthash="504956" _msttexthash="245037" _mstvisible="4" %)**Status & Ext Byte**
447 447  
467 +(% _mstvisible="1" %)
448 448  [[image:image-20220523152434-16.png||_mstalt="453921" _mstvisible="3"]]
449 449  
450 -* Poll Message Flag:  1: This message is a poll message reply, 0: means this is a normal uplink.
451 -* Sync time OK:  1: Set time ok,0: N/A. After time SYNC request is sent, LHT65N will set this bit to 0 until got the time stamp from the application server.
452 -* Unix Time Request:  1: Request server downlink Unix time, 0 : N/A. In this mode, LHT65N will set this bit to 1 every 10 days to request a time SYNC. (AT+SYNCMOD to set this)
470 +(% _mstvisible="1" %)
471 +* Poll Message Flag: 1: This message is a poll message reply, 0: means this is a normal uplink.
472 +* Sync time OK: 1: Set time ok,0: N/A. After time SYNC request is sent, LHT65N will set this bit to 0 until got the time stamp from the application server.
473 +* Unix Time Request:1: Request server downlink Unix time, 0 : N/A. In this mode, LHT65N will set this bit to 1 every 10 days to request a time SYNC. (AT+SYNCMOD to set this)
453 453  
475 +==== (% _msthash="1389752" _msttexthash="1234766" _mstvisible="3" %)2.4.6.3 Ext~=6, ADC Sensor (use with E2 Cable)(%%) ====
454 454  
455 -
456 -
457 -==== 2.4.6.3 Ext~=6, ADC Sensor (use with E2 Cable) ====
458 -
459 459  In this mode, user can connect external ADC sensor to check ADC value. The 3V3_OUT can
460 460  
461 461  be used to power the external ADC sensor; user can control the power on time for this
... ... @@ -466,128 +466,188 @@
466 466  
467 467  
468 468  
469 -== 2.5 Show data on Datacake ==
487 +(% _mstvisible="1" %)
488 +== (% _msthash="487097" _msttexthash="454818" _mstvisible="3" %)2.5 Show data on Datacake(%%) ==
470 470  
471 -(((
490 +(% _msthash="315259" _msttexthash="20933341" _mstvisible="1" %)
472 472  Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
473 -)))
474 474  
493 +(% _mstvisible="1" %)
475 475  (((
476 -
495 +(% _msthash="506065" _msttexthash="4753983" _mstvisible="2" %)
496 +(% _mstvisible="3" %)**Step 1**(%%): Be sure that your device is programmed and properly connected to the LoRaWAN network.
477 477  )))
478 478  
499 +(% _mstvisible="1" %)
479 479  (((
480 -(% style="color:blue" %)**Step 1**(%%): Be sure that your device is programmed and properly connected to the LoRaWAN network.
501 +(% _msthash="506066" _msttexthash="14696682" _mstvisible="2" %)
502 +(% _mstvisible="3" %)**Step 2**(%%): Configure your Application to forward data to Datacake you will need to add integration. Go to TTN V3 Console ~-~-> Applications ~-~-> Integrations ~-~-> Add Integrations.
481 481  )))
482 482  
505 +(% _mstvisible="1" %)
483 483  (((
484 -(% style="color:blue" %)**Step 2**(%%): Configure your Application to forward data to Datacake you will need to add integration. Go to TTN V3 Console ~-~-> Applications ~-~-> Integrations ~-~-> Add Integrations.
485 -)))
486 -
487 -(((
488 -
489 -)))
490 -
491 -(((
507 +(% _msthash="506067" _msttexthash="180297" _mstvisible="2" %)
492 492  Add Datacake:
493 493  )))
494 494  
495 -
511 +(% _mstvisible="1" %)
496 496  [[image:image-20220523000825-7.png||_mstalt="429884" _mstvisible="3" height="262" width="583"]]
497 497  
498 498  
499 -
515 +(% _msthash="315260" _msttexthash="750178" _mstvisible="1" %)
500 500  Select default key as Access Key:
501 501  
502 -
518 +(% _mstvisible="1" %)
503 503  [[image:image-20220523000825-8.png||_mstalt="430248" _mstvisible="3" height="453" width="406"]]
504 504  
505 -
521 +(% _msthash="315261" _msttexthash="2134964" _mstvisible="1" %)
506 506  In Datacake console ([[https:~~/~~/datacake.co/>>url:https://datacake.co/||_mstvisible="2"]]) , add LHT65 device.
507 507  
508 -
524 +(% _mstvisible="1" %)
509 509  [[image:image-20220523000825-9.png||_mstalt="430612" _mstvisible="3" height="366" width="392"]]
510 510  
511 -
527 +(% _mstvisible="1" %)
512 512  [[image:image-20220523000825-10.png||_mstalt="450619" _mstvisible="3" height="413" width="728"]]
513 513  
514 514  
515 515  
516 -== 2.6 Datalog Feature ==
532 +(% _mstvisible="1" %)
533 +== (% _msthash="350454" _msttexthash="323544" _mstvisible="3" %)2.6 Datalog Feature(%%) ==
517 517  
518 -(((
535 +(% _msthash="315262" _msttexthash="32283004" _mstvisible="1" %)
519 519  Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, LHT65N will store the reading for future retrieving purposes. There are two ways for IoT servers to get datalog from LHT65N.
520 -)))
521 521  
522 522  
539 +(% _mstvisible="1" %)
540 +=== (% _msthash="886158" _msttexthash="842426" _mstvisible="3" %)2.6.1 Ways to get datalog via LoRaWAN(%%) ===
523 523  
524 -=== 2.6.1 Ways to get datalog via LoRaWAN ===
525 -
542 +(% _msthash="315263" _msttexthash="409604" _mstvisible="1" %)
526 526  There are two methods:
527 527  
545 +(% _mstvisible="1" %)
528 528  1. IoT Server sends a downlink LoRaWAN command to [[poll the value>>||anchor="H2.6.4Pollsensorvalue"]] for specify time range.
529 529  1. Set [[PNACKMD=1>>||anchor="H4.13AutoSendNone-ACKmessages"]], LHT65N will wait for ACK for every uplink, when there is no LoRaWAN network, LHT65N will store the sensor data, and it will send all messages after network recover.
530 530  
549 +(% _mstvisible="1" %)
550 +=== (% _msthash="369915" _msttexthash="342797" _mstvisible="3" %)2.6.2 Unix TimeStamp(%%) ===
531 531  
532 -=== 2.6.2 Unix TimeStamp ===
533 -
534 -
552 +(% _msthash="315264" _msttexthash="1182285" _mstvisible="1" %)
535 535  LHT65N uses Unix TimeStamp format based on
536 536  
537 -
555 +(% _mstvisible="1" %)
538 538  [[image:image-20220523001219-11.png||_mstalt="450450" _mstvisible="3" height="97" width="627"]]
539 539  
540 540  
541 -
559 +(% _mstvisible="1" %)
560 +(((
561 +(% _msthash="506068" _msttexthash="2717234" _mstvisible="2" %)
542 542  User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/||_mstvisible="3"]] :
563 +)))
543 543  
565 +(% _mstvisible="1" %)
566 +(((
567 +(% _msthash="506069" _msttexthash="709813" _mstvisible="2" %)
544 544  Below is the converter example
569 +)))
545 545  
571 +(% _mstvisible="1" %)
546 546  [[image:image-20220523001219-12.png||_mstalt="450827" _mstvisible="3" height="298" width="720"]]
547 547  
574 +(% _msthash="315265" _msttexthash="15137317" _mstvisible="1" %)
548 548  So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
549 549  
550 550  
578 +(% _mstvisible="1" %)
579 +=== (% _msthash="359294" _msttexthash="332748" _mstvisible="3" %)2.6.3 Set Device Time(%%) ===
551 551  
552 -=== 2.6.3 Set Device Time ===
581 +(% _mstvisible="1" %)
582 +(((
583 +(% _msthash="506070" _msttexthash="4521946" _mstvisible="2" %)
584 +There are two ways to set device’s time:
585 +)))
553 553  
554 -There are two ways to set device's time:
587 +(% _mstvisible="1" %)
588 +(((
589 +(% _mstvisible="2" %)
590 +(% _msthash="506071" _msttexthash="1498471" _mstvisible="4" %)**1. Through LoRaWAN MAC Command (Default settings)**
591 +)))
555 555  
556 -**~1. Through LoRaWAN MAC Command (Default settings)**
557 -
593 +(% _mstvisible="1" %)
594 +(((
595 +(% _msthash="506072" _msttexthash="2126267" _mstvisible="2" %)
558 558  User need to set SYNCMOD=1 to enable sync time via MAC command.
597 +)))
559 559  
599 +(% _mstvisible="1" %)
600 +(((
601 +(% _msthash="506073" _msttexthash="54430324" _mstvisible="2" %)
560 560  Once LHT65N Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LHT65N. If LHT65N fails to get the time from the server, LHT65N will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
603 +)))
561 561  
562 -(% style="color:red" %)Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn’t support. If server doesn’t support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.
605 +(% _mstvisible="1" %)
606 +(((
607 +(% _msthash="506074" _msttexthash="92531127" _mstvisible="2" %)
608 +Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn’t support. If server doesn’t support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.
609 +)))
563 563  
611 +(% _mstvisible="1" %)
612 +(((
613 +(% _mstvisible="2" %)
614 +
615 +)))
564 564  
617 +(% _mstvisible="1" %)
618 +(((
619 +(% _mstvisible="2" %)
620 +(% _msthash="506075" _msttexthash="329719" _mstvisible="4" %)**2. Manually Set Time**
621 +)))
565 565  
566 -**2. Manually Set Time**
567 -
623 +(% _mstvisible="1" %)
624 +(((
625 +(% _msthash="506076" _msttexthash="7889297" _mstvisible="2" %)
568 568  User needs to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.
569 569  
628 +(% _msthash="506076" _msttexthash="7889297" _mstvisible="2" %)
629 +
630 +)))
570 570  
632 +(% _mstvisible="1" %)
633 +=== (% _msthash="460759" _msttexthash="430001" _mstvisible="3" %)2.6.4 Poll sensor value(%%) ===
571 571  
572 -=== 2.6.4 Poll sensor value ===
573 -
635 +(% _msthash="315266" _msttexthash="4955821" _mstvisible="1" %)
574 574  User can poll sensor value based on timestamps from the server. Below is the downlink command.
575 575  
638 +(% _mstvisible="1" %)
576 576  [[image:image-20220523152302-15.png||_mstalt="451581" _mstvisible="3"]]
577 577  
578 -
641 +(% _mstvisible="1" %)
642 +(((
643 +(% _msthash="506077" _msttexthash="14670916" _mstvisible="2" %)
579 579  Timestamp start and Timestamp end use Unix TimeStamp format as mentioned above. Devices will reply with all data log during this time period, use the uplink interval.
645 +)))
580 580  
581 -For example, downlink command **31 5FC5F350 5FC6 0160 05**
647 +(% _mstvisible="1" %)
648 +(((
649 +(% _mstvisible="2" %)
650 +For example, downlink command (% _mstmutation="1" %)**31 5FC5F350 5FC6 0160 05**(% _mstvisible="3" style="display:none" %)
651 +)))
582 582  
653 +(% _mstvisible="1" %)
654 +(((
655 +(% _msthash="506078" _msttexthash="6907459" _mstvisible="2" %)
583 583  Is to check 2020/12/1 07:40:00 to 2020/12/1 08:40:00’s data
657 +)))
584 584  
659 +(% _mstvisible="1" %)
660 +(((
661 +(% _msthash="506079" _msttexthash="23531573" _mstvisible="2" %)
585 585  Uplink Internal =5s,means LHT65N will send one packet every 5s. range 5~~255s.
663 +)))
586 586  
587 587  
666 +(% _mstvisible="1" %)
667 +=== (% _msthash="650923" _msttexthash="614185" _mstvisible="3" %)2.6.5 Datalog Uplink payload(%%) ===
588 588  
589 -=== 2.6.5 Datalog Uplink payload ===
590 -
591 591  (% _msthash="315267" _msttexthash="2245087" _mstvisible="1" %)
592 592  The Datalog poll reply uplink will use below payload format.
593 593