Changes for page wiki_test

Last modified by Mengting Qiu on 2024/09/05 17:35

From version 152.2
edited by Xiaoling
on 2024/06/12 17:59
Change comment: There is no comment for this version
To version 132.1
edited by Mengting Qiu
on 2023/11/15 16:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Xiaoling
1 +XWiki.ting
Content
... ... @@ -153,7 +153,7 @@
153 153  If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
154 154  
155 155  
156 -== 1.8 Pin Definitions , Switch & SIM Direction ==
156 +== 1.8 Pin Definitions & Switch ==
157 157  
158 158  
159 159  [[image:image-20230819104805-5.png]]
... ... @@ -181,12 +181,6 @@
181 181  (% style="display:none" %)
182 182  
183 183  
184 -=== 1.8.4 SIM Card Direction ===
185 -
186 -
187 -See this link. [[How to insert SIM Card>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
188 -
189 -
190 190  == 1.9 Mechanical ==
191 191  
192 192  [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual/WebHome/1675143884058-338.png?rev=1.1||alt="1675143884058-338.png"]]
... ... @@ -203,6 +203,7 @@
203 203  [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS03A%20-%20Outdoor%20LoRaWAN%20OpenClose%20Door%20Sensor%20Manual/WebHome/1654741444887-479.png?width=513&height=399&rev=1.1||alt="1654741444887-479.png"]]
204 204  
205 205  
200 +
206 206  == 1.10 Magnet Distance ==
207 207  
208 208  
... ... @@ -291,16 +291,16 @@
291 291  
292 292  **The General Json format payload for the single-channel mode is as follows:**
293 293  
294 -(% style="color:#4472c4" %)**{"IMEI":"863663062798914","Model":"DS03A-NB","level status":1,"alarm status":0,"door open num":0,"last open time":0,"level status2":1,"alarm status2":0,"door open num2":0,"last open time2":0,"battery":3.34,"signal":17,"1":[1,0,0,"2024/06/11 03:09:07"],"2":[1,0,0,"2024/06/11 02:51:00"],"3":[1,0,0,"2024/06/11 02:36:00"],"4":[8,100,100,"2024/05/30 10:19:53"],"5":[8,100,100,"2024/05/30 10:19:18"],"6":[8,100,100,"2024/05/30 10:17:53"],"7":[8,100,100,"2024/05/30 10:16:53"],"8":[8,100,100,"2024/05/30 10:16:28"]}**
289 +(% style="color:#4472c4" %)**{"IMEI":"866207052559857","Model":"DS03A-NB","level status":1,"alarm status":0,"door open num":0,"last open time":0,"level status2":1,"alarm status2":0,"door open num2":0,"last open time2":0,"battery":3.48,"signal":24,"1":{1,0,0,2023/11/13 09:59:01},"2":{0,0,261,2023/11/13 03:20:00},"3":{237,9896971,263,2023/11/13 03:05:00},"4":{0,29,263,2023/11/13 02:20:12},"5":{215,9897015,268,2023/11/13 01:58:16},"6":{0,79,261,2023/11/13 01:43:16},"7":{227,9896991,5368540,2023/11/13 01:18:46},"8":{0,19,5367640,2023/11/11 08:53:57}}**
295 295  
296 -[[image:image-20240611150437-1.png||height="733" width="958"]]
291 +[[image:image-20231115162221-7.png]]
297 297  
298 298  
299 -**The General Json format payload for the double-channel mode is as follows:**
294 +**The General Json format payload for the single-channel mode is as follows:**
300 300  
301 -(% style="color:#4472c4" %)**{"IMEI":"863663062798914","Model":"DS03A-NB","level status":1,"alarm status":0,"door open num":0,"last open time":0,"level status2":1,"alarm status2":0,"door open num2":0,"last open time2":0,"battery":3.34,"signal":15,"1":[1,0,0,1,0,0,"2024/06/11 05:49:07"],"2":[0,200,300,1,0,0,"2024/06/11 05:34:07"],"3":[0,200,300,1,0,0,"2024/06/11 05:19:07"],"4":[0,200,300,1,0,0,"2024/06/11 05:04:07"],"5":[0,200,300,1,0,0,"2024/06/11 04:49:07"],"6":[0,200,300,1,0,0,"2024/06/11 04:34:07"],"7":[0,200,300,1,0,0,"2024/06/11 04:19:07"],"8":[0,200,300,1,0,0,"2024/06/11 04:04:07"]}**
296 +(% style="color:#4472c4" %)**{"IMEI":"866207058378443","Model":"DS03A-NB","level status":1,"alarm status":0,"door open num":2,"last open time":0,"level status2":1,"alarm status2":0,"door open num2":3,"last open time2":0,"battery":3.39,"signal":25,"1":{1,4,0,1,3,0,2023/11/15 07:54:30},"2":{1,3,0,1,6,1,2023/11/15 07:10:04},"3":{0,0,0,1,1,0,2023/11/15 06:55:04},"4":{0,0,0,1,0,0,2023/11/15 06:40:04},"5":{0,0,0,1,0,0,2023/11/15 03:50:36},"6":{0,0,0,1,4,11,2023/11/15 03:28:16},"7":{0,0,0,1,4,11,2023/11/15 03:13:16},"8":{0,0,0,1,3,11,2023/11/15 02:58:25}}**
302 302  
303 -[[image:image-20240611150520-2.png||height="733" width="945"]]
298 +[[image:image-20231115161803-6.png]]
304 304  
305 305  
306 306  (% style="color:red" %)**Notice, from above payload:**
... ... @@ -307,7 +307,7 @@
307 307  
308 308  * level status, alarm status, door open num, last open time, level status2, alarm status2, door open sum2, last open time2, Battery & Signal are the value at uplink time.
309 309  
310 -* Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+CLOCKLOG=1,65535,15,8 ** (%%)Command. Each entry includes (from left to right):
305 +* Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+NOUD=8 ** (%%)Command. Each entry includes (from left to right):
311 311  
312 312   Single-channel mode: level status, door open num, last open time, Sampling time.
313 313  
... ... @@ -323,26 +323,27 @@
323 323  
324 324  **The HEX format payload for the single-channel mode is as follows:**
325 325  
326 -(% style="color:#4472c4" %)**062798914127b0d00120101000000000000006667e2e0010000000000006667e1cf010000000000006667de4b010000000000006667dac7010000000000006667d743010000000000006667d3bf010000000000006667d03b010000000000006667ccb7010000000000006667c7c7**
321 +(% style="color:#4472c4" %)**f86620705255985712640d9c180101000000000000006551f424010000000000006551f36500000000000105655195e0ed97040b0001076551925c0000001d000107655187dcd797043700010c655182b80000004f00010565517f34e397041f51eadc655179760000001351e758654f4125**
327 327  
323 +[[image:image-20231114091247-2.png||height="186" width="1363"]]
328 328  
329 -[[image:image-20240611151016-5.png]]
330 330  
331 331  If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
332 332  
333 -[[image:image-20240611151101-6.png||height="753" width="980"]]
328 +[[image:image-20231114094432-3.png]]
334 334  
335 335  
331 +
336 336  **The HEX format payload for the double-channel mode is as follows:**
337 337  
338 -(% style="color:#4472c4" %)**062798914127b0cea0e01010000000000000001000000000000006667e66a01000000000000010000000000006667e55301000000000000000000c800012c6667e1cf01000000000000000000c800012c6667de4b01000000000000000000c800012c6667dac701000000000000000000c800012c6667d74301000000000000000000c800012c6667d3bf01000000000000000000c800012c6667d03b01000000000000000000c800012c6667ccb7**
334 +(% style="color:#4472c4" %)**f86620705255985712640db71701010000000000000001000000000000006552d13401000000000000000000000000006551f365000000000001050000005f00005f655195e0ed97040b0001070000005c00005c6551925c0000001d00010700000033000033655187dcd797043700010c00000033000033655182b80000004f0001050000003300003365517f34e397041f51eadc00000000000000655179760000001351e75800000000000000654f4125**
339 339  
336 +[[image:image-20231114091229-1.png||height="180" width="1584"]]
340 340  
341 -[[image:image-20240611151148-7.png]]
342 342  
343 343  If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data.
344 344  
345 -[[image:image-20240611151206-8.png||height="741" width="961"]]
341 +[[image:image-20231114094838-5.png]]
346 346  
347 347  
348 348  (% style="color:blue" %)**Version:**
... ... @@ -351,7 +351,7 @@
351 351  
352 352  (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x12 for DS03A-NB
353 353  
354 -(% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x7b=123, means firmware version 1.2.3
350 +(% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x64=100, means firmware version 1.0.0
355 355  
356 356  
357 357  (% style="color:blue" %)**BAT (Battery Info):**
... ... @@ -388,66 +388,24 @@
388 388  
389 389  Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
390 390  
391 -**The type3 format payload for the single-channel mode is as follows:**
392 -
393 393  (% style="color:#4472c4" %)**{
394 - "topic": "2276492",
395 - "payload": {
396 - "IMEI": "863663062798914",
388 + "IMEI": "866207058378443",
397 397   "Model": "DS03A-NB",
398 398   "level status": 1,
399 399   "alarm status": 0,
400 - "door open num": 0,
401 - "last open time": 0,
392 + "door open num": 6,
393 + "last open time": 1,
402 402   "level status2": 1,
403 403   "alarm status2": 0,
404 - "door open num2": 0,
396 + "door open num2": 2,
405 405   "last open time2": 0,
406 - "battery": 3.33,
407 - "signal": 22,
408 - "1": [1, 0, 0, "2024/06/11 06:08:46"],
409 - "2": [1, 0, 0, "2024/06/11 05:49:07"],
410 - "3": [1, 0, 0, "2024/06/11 05:34:07"],
411 - "4": [1, 0, 0, "2024/06/11 05:19:07"],
412 - "5": [1, 0, 0, "2024/06/11 05:04:07"],
413 - "6": [1, 0, 0, "2024/06/11 04:49:07"],
414 - "7": [1, 0, 0, "2024/06/11 04:34:07"],
415 - "8": [1, 0, 0, "2024/06/11 04:19:07"]
416 - }
417 -}**(%%)
418 -[[image:image-20240611151445-9.png||height="663" width="1398"]]
398 + "battery": 3.4,
399 + "signal": 24
400 + }**
419 419  
420 -**The type3 format payload for the double-channel mode is as follows:**
402 +[[image:image-20231115150948-1.png||height="625" width="1188"]]
421 421  
422 -(% style="color:#4472c4" %)**{
423 - "topic": "2276492",
424 - "payload": {
425 - "IMEI": "863663062798914",
426 - "Model": "DS03A-NB",
427 - "level status": 1,
428 - "alarm status": 0,
429 - "door open num": 0,
430 - "last open time": 0,
431 - "level status2": 1,
432 - "alarm status2": 0,
433 - "door open num2": 0,
434 - "last open time2": 0,
435 - "battery": 3.34,
436 - "signal": 20,
437 - "1": [1, 0, 0, 1, 0, 0, "2024/06/11 06:08:46"],
438 - "2": [1, 0, 0, 1, 0, 0, "2024/06/11 05:49:07"],
439 - "3": [0, 200, 300, 1, 0, 0, "2024/06/11 05:34:07"],
440 - "4": [0, 200, 300, 1, 0, 0, "2024/06/11 05:19:07"],
441 - "5": [0, 200, 300, 1, 0, 0, "2024/06/11 05:04:07"],
442 - "6": [0, 200, 300, 1, 0, 0, "2024/06/11 04:49:07"],
443 - "7": [0, 200, 300, 1, 0, 0, "2024/06/11 04:34:07"],
444 - "8": [0, 200, 300, 1, 0, 0, "2024/06/11 04:19:07"]
445 - }
446 -}**
447 447  
448 -[[image:image-20240611151543-10.png||height="672" width="1417"]]
449 -
450 -
451 451  === 2.2.4 ThingSpeak Payload(Type~=1) ===
452 452  
453 453  
... ... @@ -464,9 +464,330 @@
464 464  [[image:image-20231115154821-3.png||height="695" width="1119"]]
465 465  
466 466  
467 -== 2.3 Test Uplink and Change Update Interval ==
421 +== 2.3  Uplink Payload ==
468 468  
423 +=== 2.3.1  Sensor Configuration, FPORT~=4 ===
469 469  
425 +
426 +DS03A-NB will only send this command after getting the downlink command **(0x26 02)** from the server.
427 +
428 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:515px" %)
429 +|(% colspan="8" style="background-color:#4f81bd; color:white; width:515px" %)**Sensor Configuration FPORT=4**
430 +|**Size(bytes)**|(% style="width:75px" %)**3**|(% style="width:50px" %)**1**|(% style="width:100px" %)**1**|(% style="width:90px" %)**2**|(% style="width:100px" %)**1**|(% style="width:100px" %)**2**|(% style="width:98px" %)**1**
431 +|**Value**|(% style="width:75px" %)TDC (unit:sec)|(% style="width:77px" %)Disalarm|(% style="width:96px" %)(((
432 +Keep status1
433 +)))|(% style="width:99px" %)(((
434 +Keep time1(unit: sec)
435 +)))|(% style="width:87px" %)Keep status2|(% style="width:97px" %)(((
436 +Keep time2(unit: sec)
437 +)))|(% style="width:98px" %)(((
438 +Alarm interval(unit: min)
439 +)))
440 +
441 +Example parse in TTNv3
442 +
443 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230630155527-3.png?width=902&height=146&rev=1.1||alt="image-20230630155527-3.png"]]
444 +
445 +
446 +* (((
447 +(% style="color:blue" %)**TDC: (default: 0x001C20)**
448 +)))
449 +
450 +Uplink interval for the Open/Close Event, default value is 0x001C20 which is 7200 seconds = 2 hours.
451 +
452 +
453 +* (((
454 +(% style="color:blue" %)**Disalarm: (default: 0)**
455 +)))
456 +
457 + **If Disalarm = 1**, DS03A-NB will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many open/close event, and platform only care about the total number of pulse.
458 +
459 + **If Disalarm = 0**, DS03A-NB will send uplink at every TDC periodically and send data on each open/close event. This is useful for the application user need to monitor the open/close event in real-time.
460 +
461 +(% style="color:red" %)** Note: When Disalarm=0, a high frequently open/close event will cause lots of uplink and drain battery very fast. **
462 +
463 +
464 +* (((
465 +(% style="color:blue" %)**Keep Status1 & Keep Time1 & Keep Status2 & Keep Time2**
466 +)))
467 +
468 +Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H2.9AlarmBaseonTimeout"]]
469 +
470 +
471 +* (((
472 +(% style="color:blue" %)**Alarm interval(default: 0)**
473 +)))
474 +
475 +When the state of the door sensor has not been changed after the timeout alarm, the device will send a uplink every alarm interval. It will stop the alarm until the state of the door sensor is changed after the timeout alarm.
476 +
477 +
478 +=== 2.3.2  Real-Time Open/Close Status, Uplink FPORT~=2 ===
479 +
480 +
481 +DS03A-NB will send this uplink **after** Device Status once join the LoRaWAN network successfully. And DS03A-NB will send uplinks when:
482 +
483 +* Every 2 hours, this interval [[can be changed>>||anchor="H2.7SetTransmitIntervalTime"]].
484 +* There is an Open/Close event.  (This info can be disabled by AT+DISALARM=1)
485 +
486 +**1) When (% style="color:blue" %)AT+TTRCHANNEL=1(%%), Uplink Payload totals (% style="color:blue" %)11 bytes. (Default mode)(%%)**
487 +
488 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:515px" %)
489 +|=(% colspan="5" style="background-color:#4F81BD;color:white;width:515px" %)**Real-Time Open/Close Status, FPORT=2**
490 +|(% style="width:94px" %)**Size(bytes)**|(% style="width:97px" %)**1**|(% style="width:95px" %)**3**|(% style="width:119px" %)**3**|(% style="width:107px" %)**4**
491 +|(% style="width:95px" %)**Value**|(% style="width:97px" %)(((
492 +Status & [[Alarm>>||anchor="H2.10TTRIG126TTRIG2timeoutstatusalarm"]]
493 +)))|(% style="width:95px" %)Total open door events|(% style="width:119px" %)(((
494 +The last door open duration (unit: sec)
495 +)))|(% style="width:108px" %)Unix TimeStamp
496 +
497 +**Status & Alarm:**
498 +
499 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:515px" %)
500 +|(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:60px" %)**[bit7:bit4]**|(% style="background-color:#4f81bd; color:white; width:80px" %)**bit3**|(% style="background-color:#4f81bd; color:white; width:100px" %)**bit2**|(% style="background-color:#4f81bd; color:white; width:120px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:105px" %)**bit0**
501 +|(% style="width:76px" %)**Value**|(% style="width:96px" %)Reserve|(% style="width:110px" %)(((
502 +Count mod
503 +)))|(% style="width:106px" %)TDC flag 0:No;1:Yes|(% style="width:148px" %)(((
504 +Alarm 0: No Alarm; 1: Alarm
505 +)))|(% style="width:131px" %)(((
506 +Status 0: Close; 1: Open
507 +)))
508 +
509 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230630155451-2.png?width=928&height=246&rev=1.1||alt="image-20230630155451-2.png"]]
510 +
511 +
512 +* (((
513 +(% style="color:blue" %)**Count mod:Default=0**
514 +)))
515 +
516 +0: Uplink total open door times since factory
517 +
518 +1: Uplink total open door times since last FPORT=2 uplink.
519 +
520 +
521 +* (% style="color:blue" %)**TDC flag**
522 +
523 +When the flag is 1, it means sending packets at normal time intervals.
524 +
525 +Otherwise, it is a packet sent at non-TDC time.
526 +
527 +
528 +* (((
529 +(% style="color:#0000ff" %)**Alarm**
530 +)))
531 +
532 +See [[Alarm Base on Timeout>>||anchor="H2.9AlarmBaseonTimeout"]]
533 +
534 +
535 +* (((
536 +(% style="color:blue" %)**Status**
537 +)))
538 +
539 +This bit is 1 when the door sensor is open and 0 when it is close.
540 +
541 +
542 +* (((
543 +(% style="color:blue" %)**Total open door events**
544 +)))
545 +
546 +Total pulse/counting base on open door.
547 +
548 +Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
549 +
550 +
551 +* (((
552 +(% style="color:blue" %)**The last door open duration**
553 +)))
554 +
555 +Door sensor last open duration.
556 +
557 +Unit: sec.
558 +
559 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230701094042-1.png?width=763&height=154&rev=1.1||alt="image-20230701094042-1.png"]]
560 +
561 +
562 +**2) When (% style="color:blue" %)AT+TTRCHANNEL=2(%%), Uplink Payload totals (% style="color:blue" %)18 bytes(%%)**(% style="color:blue" %).
563 +
564 +(When the maximum DR of some frequencies is 11 bytes, it will cause the server to receive empty packets)
565 +
566 +(% style="color:red" %)**Note:When using the AT+TTRCHANNEL=2 command, the Datalog function cannot be used.**
567 +
568 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:515px" %)
569 +|=(% colspan="8" style="background-color:#4F81BD;color:white; width: 515px;" %)**Real-Time Open/Close Status, FPORT=2**
570 +|(% style="width:50px" %)**Size(bytes)**|(% style="width:97px" %)**1**|(% style="width:95px" %)**3**|(% style="width:125px" %)**3**|(% style="width:100px" %)**4**|(% style="width:86px" %)**1**|(% style="width:96px" %)**3**|(% style="width:126px" %)**3**
571 +|(% style="width:95px" %)**Value**|(% style="width:97px" %)(((
572 +Status1 & Alarm1
573 +)))|(% style="width:95px" %)Total open door events1|(% style="width:125px" %)(((
574 +The last door open duration1 (unit: sec)
575 +)))|(% style="width:100px" %)Unix TimeStamp|(% style="width:86px" %)(((
576 +Status2 & Alarm2
577 +)))|(% style="width:96px" %)Total open door events2|(% style="width:126px" %)The last door open duration2 (unit: sec)
578 +
579 +**Status1 & Alarm1:**
580 +
581 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:514px" %)
582 +|(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:60px" %)**[bit7:bit4]**|(% style="background-color:#4f81bd; color:white; width:70px" %)**bit3**|(% style="background-color:#4f81bd; color:white; width:100px" %)**bit2**|(% style="background-color:#4f81bd; color:white; width:117px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:117px" %)**bit0**
583 +|(% style="width:76px" %)**Value**|(% style="width:96px" %)Reserve|(% style="width:99px" %)(((
584 +Count mod
585 +)))|(% style="width:103px" %)TDC flag 0:No;1:Yes|(% style="width:216px" %)(((
586 +Alarm1 0: No Alarm; 1: Alarm (PA8 of pin)
587 +)))|(% style="width:181px" %)(((
588 +Status1 0: Close; 1: Open (PA8 of pin)
589 +)))
590 +
591 +**Status2 & Alarm2:**
592 +
593 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
594 +|(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:60px" %)**[bit7:bit2]**|(% style="background-color:#4f81bd; color:white; width:200px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:200px" %)**bit0**
595 +|(% style="width:76px" %)**Value**|(% style="width:113px" %)Reserve|(% style="width:219px" %)(((
596 +Alarm2 0: No Alarm; 1: Alarm (PA4 of pin)
597 +)))|(% style="width:181px" %)(((
598 +Status2 0: Close; 1: Open (PA4 of pin)
599 +)))
600 +
601 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230630155908-6.png?width=927&height=295&rev=1.1||alt="image-20230630155908-6.png"]]
602 +
603 +
604 +* (((
605 +(% style="color:blue" %)**Count mod:Default=0**
606 +)))
607 +
608 +0: Uplink total open door times since factory
609 +
610 +1: Uplink total open door times since last FPORT=2 uplink.
611 +
612 +
613 +* (% style="color:blue" %)**TDC flag**
614 +
615 +When the flag is 1, it means sending packets at normal time intervals.
616 +
617 +Otherwise, it is a packet sent at non-TDC time.
618 +
619 +
620 +* (((
621 +(% style="color:#0000ff" %)**Alarm1 or Alarm2**
622 +)))
623 +
624 +See [[Alarm Base on Timeout>>||anchor="H2.9AlarmBaseonTimeout"]]
625 +
626 +
627 +* (((
628 +(% style="color:blue" %)**Status1 **(% style="color:#0000ff" %)**or **(% style="color:blue" %)**Status2**
629 +)))
630 +
631 +This bit is 1 when the door sensor is open and 0 when it is close.
632 +
633 +
634 +* (((
635 +(% style="color:blue" %)**Total open door events1 **(% style="color:#0000ff" %)**or**(% style="color:blue" %)** Total open door events2**
636 +)))
637 +
638 +Total pulse/counting base on open door.
639 +
640 +Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
641 +
642 +
643 +* (((
644 +(% style="color:blue" %)**The last door open duration1 **(% style="color:#0000ff" %)**or**(% style="color:blue" %)** The last door open duration2**
645 +)))
646 +
647 +Door sensor last open duration.
648 +
649 +Unit: sec.
650 +
651 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230701094042-1.png?width=763&height=154&rev=1.1||alt="image-20230701094042-1.png"]]
652 +
653 +
654 +=== 2.3.3  Historical Door Open/Close Event, FPORT~=3 ===
655 +
656 +
657 +DS03A-NB stores sensor values and users can retrieve these history values via the downlink command.
658 +
659 +The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
660 +
661 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
662 +|=(% colspan="5" style="background-color:#4F81BD;color:white;width:515px" %)**Real-Time Open/Close Status, FPORT=3**
663 +|(% style="width:60px" %)**Size(bytes)**|(% style="width:80px" %)**1**|(% style="width:120px" %)**3**|(% style="width:150px" %)**3**|(% style="width:90px" %)**4**
664 +|(% style="width:95px" %)**Value**|(% style="width:97px" %)(((
665 +Status & [[Alarm>>||anchor="2.9AlarmBaseonTimeout"]]
666 +)))|(% style="width:95px" %)Total open door events|(% style="width:119px" %)(((
667 +The last door open duration (unit: sec)
668 +)))|(% style="width:108px" %)Unix TimeStamp
669 +
670 +**Status & Alarm:**
671 +
672 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:515px" %)
673 +|(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:75px" %)**bit7**|(% style="background-color:#4f81bd; color:white; width:65px" %)**bit6**|(% style="background-color:#4f81bd; color:white; width:50px" %)**[bit5:bit4]**|(% style="background-color:#4f81bd; color:white; width:50px" %)**bit3**|(% style="background-color:#4f81bd; color:white; width:70px" %)**bit2**|(% style="background-color:#4f81bd; color:white; width:80px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:75px" %)**bit0**
674 +|(% style="width:76px" %)**Value**|(% style="width:88px" %)No ACK message|(% style="width:92px" %)Poll Message Flag|(% style="width:89px" %)Reserve|(% style="width:90px" %)(((
675 +Count mod
676 +)))|(% style="width:95px" %)(((
677 +TDC flag 0:No; 1:Yes
678 +)))|(% style="width:116px" %)(((
679 +Alarm 0: No Alarm; 1: Alarm
680 +)))|(% style="width:112px" %)(((
681 +Status 0:Close; 1: Open
682 +)))
683 +
684 +* (((
685 +Each data entry is 11 bytes and has the same structure as [[Real-Time open/close status>>||anchor="H2.3.2A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]], to save airtime and battery, DS03A-NB will send max bytes according to the current DR and Frequency bands.
686 +)))
687 +
688 +For example, in the US915 band, the max payload for different DR is:
689 +
690 +(((
691 +**~1. DR0**: max is 11 bytes so one entry of data
692 +)))
693 +
694 +(((
695 +**2. DR1**: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
696 +)))
697 +
698 +(((
699 +**3. DR2**: total payload includes 11 entries of data
700 +)))
701 +
702 +(((
703 +**4. DR3**: total payload includes 22 entries of data.
704 +)))
705 +
706 +If DS03A-NB doesn't have any data in the polling time. It will uplink 11 bytes of 0
707 +
708 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230630155556-4.png?width=938&height=146&rev=1.1||alt="image-20230630155556-4.png"]]
709 +
710 +**Downlink:**
711 +
712 +0x31 64 9E 7D 34 64 9E 7E 9C 05
713 +
714 +
715 +**Uplink:**
716 +
717 +45 00 00 00 00 00 00 64 9E 7D 48 40 00 00 00 00 00 63 64 9E 7D 9C 41 00 00 01 00 00 63 64 9E 7D A4 40 00 00 01 00 00 8D 64 9E 7E 31 43 00 00 02 00 00 8D 64 9E 7E 44 48 00 00 02 00 00 1F 64 9E 7E 59 4B 00 00 03 00 00 1F 64 9E 7E 6B
718 +
719 +
720 +**Parsed Value:**
721 +
722 +[COUNTMOD, TDC_FLAG, ALARM,  DOOR_STATUS, OPEN_DOOR_TIMES, LAST_DOOR_OPEN_DURATION, TIME]
723 +
724 +
725 +[SUM,YES,FALSE,OPEN,0,0,2023-06-30 06:59:20],
726 +
727 +[SUM,NO,FALSE,CLOSE,0,99,2023-06-30 07:00:44],
728 +
729 +[SUM,NO,FALSE,OPEN, 1,99,2023-06-30 07:00:52],
730 +
731 +[SUM,NO,FALSE,CLOSE,1,141,2023-06-30 07:03:13],
732 +
733 +[SUM,NO,TRUE,OPEN, 2,141,2023-06-30 07:03:32],
734 +
735 +[PART,NO,FALSE,CLOSE,2,31,2023-06-30 07:03:53],
736 +
737 +[PART,NO,TRUE,OPEN, 3,31,2023-06-30 07:04:11],
738 +
739 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230630172740-1.png?width=868&height=199&rev=1.1||alt="image-20230630172740-1.png"]]
740 +
741 +
742 +== 2.4 Test Uplink and Change Update Interval ==
743 +
744 +
470 470  By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%) & AT+NOUD=8
471 471  
472 472  User can use below commands to change the (% style="color:blue" %)**uplink interval**.
... ... @@ -476,11 +476,9 @@
476 476  User can also push the button for more than 1 seconds to activate an uplink.
477 477  
478 478  
479 -== 2.4 Multi-Samplings and One uplink ==
754 +== 2.5 Multi-Samplings and One uplink ==
480 480  
481 481  
482 -(% style="color:red" %)**Notice: The AT+NOUD feature is upgraded to Clock Logging, please refer [[Clock Logging Feature>>||anchor="H2.14Clocklogging28Sincefirmwareversionv1.2.129"]].**
483 -
484 484  To save battery life, DS03A-NB will sample Water Flow data every 15 minutes and send one uplink every 2 hours. So each uplink it will include 8 stored data + 1 real-time data. They are defined by:
485 485  
486 486  * (% style="color:#037691" %)**AT+TR=900**   (%%) ~/~/ The unit is seconds, and the default is to record data once every 900 seconds (15 minutes, the minimum can be set to 180 seconds)
... ... @@ -492,7 +492,7 @@
492 492  [[image:1692424376354-959.png]]
493 493  
494 494  
495 -== 2.5 Trggier an uplink by external interrupt ==
768 +== 2.6 Trggier an uplink by external interrupt ==
496 496  
497 497  
498 498  DS03A-NB has an external trigger interrupt function. Users can use the PB15 pin to trigger the upload of data packets.
... ... @@ -510,7 +510,7 @@
510 510  * (% style="color:#037691" %)**AT+INTMOD=3  **(%%) ~/~/ Trigger by rising edge
511 511  (% style="display:none" %) (%%)
512 512  
513 -== 2.6 Set Transmit Interval Time ==
786 +== 2.7 Set Transmit Interval Time ==
514 514  
515 515  
516 516  (((
... ... @@ -552,7 +552,7 @@
552 552  Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
553 553  )))(% style="display:none" %) (%%)
554 554  
555 -== 2.7 Enable / Disable Alarm ==
828 +== 2.8 Enable / Disable Alarm ==
556 556  
557 557  
558 558  Feature: Enable/Disable Alarm for open/close event. Default value 0.
... ... @@ -571,7 +571,7 @@
571 571  0xA7 00  ~/~/ Same As AT+DISALARM=0
572 572  
573 573  
574 -== 2.8 Alarm Base on Timeout ==
847 +== 2.9 Alarm Base on Timeout ==
575 575  
576 576  
577 577  DS03A-NB can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc. Related Parameters are:
... ... @@ -653,7 +653,7 @@
653 653  If user send 0xA9 02 00 00 1E: equal to AT+TTRIG2=0,30  **or**  0xA9 02 00 00 00: Equal to AT+TTRIG2=0,0.
654 654  
655 655  
656 -== 2.9 TTRIG1 & TTRIG2 timeout status alarm ==
929 +== 2.10 TTRIG1 & TTRIG2 timeout status alarm ==
657 657  
658 658  
659 659  It needs to be used with AT+TTRIG1 or AT+TTRIG2. When TTRIG1 or TTRIG2 times out and causes an alarm, and the status does not change subsequently, an alarm packet will be sent at the alarm interval.
... ... @@ -682,7 +682,7 @@
682 682  Example:  0C aa  => AT+TTRALARM= aa
683 683  
684 684  
685 -== 2.10 Count Mod ==
958 +== 2.11 Count Mod ==
686 686  
687 687  
688 688  Feature: Manually set the count mode.
... ... @@ -711,7 +711,7 @@
711 711  Example:  0B aa  => AT+COUNTMOD = second byte
712 712  
713 713  
714 -== 2.11 Number of channel of door sensors ==
987 +== 2.12 Number of channel of door sensors ==
715 715  
716 716  
717 717  Feature: Set the number of door sensor channels.
... ... @@ -740,12 +740,12 @@
740 740  Example:  0D aa => AT+TTRCHANNEL = second byte
741 741  
742 742  
743 -== 2.12 Clear the open door times and the duration of the last open door ==
1016 +== 2.13 Clear the open door times and the duration of the last open door ==
744 744  
745 745  
746 746  (% style="color:blue" %)**AT Command:**
747 747  
748 -(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1021 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
749 749  |=(% style="width: 163px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 290px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 57px;background-color:#4F81BD;color:white" %)**Response**
750 750  |(% style="width:155px" %)AT+CLRC|(% style="width:259px" %)clear the open door times and the duration of the last open door.|(% style="width:44px" %)(((
751 751  OK
... ... @@ -756,7 +756,7 @@
756 756  The sensor will clear the open door times and the duration of the last open door.
757 757  
758 758  
759 -== 2.13 Set the count value of the number of open door ==
1032 +== 2.14 Set the count value of the number of open door ==
760 760  
761 761  
762 762  (% style="color:blue" %)**AT Command:**
... ... @@ -788,99 +788,6 @@
788 788  0xA6 02 00 00 32  ==>  AT+SETCNT=2,50
789 789  
790 790  
791 -== 2.14 Clock logging (Since firmware version v1.2.1) ==
792 -
793 -
794 -Sometimes when we deploy lots of end nodes in field. We want all sensors sample data at the same time, and upload these data together for analyze. In such case, we can use clock loging feature.
795 -
796 -We can use this command to set the start time of data recording and the time interval to meet the requirements of the specific collection time of data.
797 -
798 -* (% style="color:blue" %)**AT Command: AT+CLOCKLOG=a,b,c,d**
799 -
800 -(% style="color:blue" %)**a:**(%%)** 0:** Disable Clock logging.  ** 1: **Enable Clock Logging
801 -
802 -(% style="color:blue" %)**b:**(%%)** **Specify First sampling start second: range **(0 ~~ 3599, 65535)   ** ~/~/ (% style="color:red" %)**Note:**(%%)** **If parameter b is set to 65535, the log period starts after the node accesses the network and sends packets.
803 -
804 -(% style="color:blue" %)**c:**(%%)** **Specify the sampling interval: range **(0 ~~ 255 minutes)**
805 -
806 -(% style="color:blue" %)**d:**(%%)** **How many entries should be uplink on every TDC **(max 32)**
807 -
808 -[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SPH01-NB_NB-IoT_Soil_pH_Sensor_User_Manual/WebHome/image-20240315141254-1.png?rev=1.1||alt="image-20240315141254-1.png"]]
809 -
810 -**Example:**
811 -
812 -**AT+CLOCKLOG=1,65535,1,5**
813 -
814 -After the node sends the first packet, data is recorded to the memory at intervals of 1 minute. For each TDC uplink, the uplink load will include: battery information + the last 5 memory records (payload + timestamp).
815 -
816 -(% class="wikigeneratedid" %)
817 -[[image:image-20240316150911-1.png||height="493" width="1144"]]
818 -
819 -(% class="wikigeneratedid" %)
820 -(% style="color:red" %)**Note: Users need to synchronize the server time before configuring this command. If the server time is not synchronized before this command is configured, the command takes effect only after the node is reset.**
821 -
822 -
823 -* (% style="color:blue" %)**Downlink Command: 0x0A**
824 -
825 -Format: Command Code (0x0A) followed by 5 bytes.
826 -
827 -* **Example 1**: Downlink Payload:** 0A01FFFF0F08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,65535,15,8
828 -* **Example 1**: Downlink Payload:** 0A0104B00F08**  ~/~/ Set SHT record time: AT+CLOCKLOG=1,1200,15,8
829 -
830 -(% style="color:red" %)**Note: When entering the downlink payload, there must be no Spaces between bytes.**
831 -
832 -
833 -== 2.15 Example Query saved historical records ==
834 -
835 -
836 -* (% style="color:blue" %)**AT Command: AT+CDP**
837 -
838 -This command can be used to search the saved history, recording up to 32 groups of data, each group of historical data contains a maximum of 100 bytes.
839 -
840 -(% class="wikigeneratedid" %)
841 -[[image:image-20240316151014-2.png||height="632" width="825"]]
842 -
843 -
844 -== 2.16 Uplink log query ==
845 -
846 -
847 -* (% style="color:blue" %)**AT Command: AT+GETLOG**
848 -
849 -This command can be used to query upstream logs of data packets.
850 -
851 -[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PS-NB-NA_NB-IoT_Analog_Sensor_User_Manual/WebHome/image-20240407191922-2.png?width=903&height=631&rev=1.1||alt="image-20240407191922-2.png"]]
852 -
853 -
854 -== 2.17 Scheduled domain name resolution ==
855 -
856 -
857 -This command is used to set up scheduled domain name resolution.
858 -
859 -(% style="color:blue" %)**AT command:**
860 -
861 -* (% style="color:#037691" %)**AT+DNSTIMER=XX   **(%%)~/~/ Unit: hour
862 -
863 -After setting this command, domain name resolution will be performed regularly.
864 -
865 -
866 -== 2.18 Set the QoS level ==
867 -
868 -
869 -This command is used to set the QoS level of **MQTT**.
870 -
871 -(% style="color:blue" %)**AT command:**
872 -
873 -* (% style="color:#037691" %)**AT+MQOS=xx**(%%)**    **~/~/ 0~~2
874 -
875 -(% style="color:blue" %)**Downlink Command: 0x07**
876 -
877 -Format: Command Code (0x07) followed by 1 byte.
878 -
879 -**Ex1:** Downlink payload: **0x0700**  ~/~/AT+MQOS=0
880 -
881 -**Ex2:** Downlink payload: **0x0701**  ~/~/AT+MQOS=1
882 -
883 -
884 884  = 3. Configure DS03A-NB =
885 885  
886 886  == 3.1 Configure Methods ==
... ... @@ -944,6 +944,11 @@
944 944  AT+SERVADDR :  Server Address
945 945  
946 946  
1127 +(% style="color:blue" %)**UDP Management**
1128 +
1129 +AT+CFM  :  Upload confirmation mode (only valid for UDP)
1130 +
1131 +
947 947  (% style="color:blue" %)**MQTT Management**
948 948  
949 949  AT+CLIENT               : Get or Set MQTT client
... ... @@ -991,12 +991,12 @@
991 991  
992 992  * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]].
993 993  
994 -* Update through UART TTL interface : **[[Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**.
1179 +* Update through UART TTL interface : **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
995 995  (% style="display:none" %) (%%)
996 996  
997 997  = 6. FAQ =
998 998  
999 -== 6.1 How can I access the BC660K-GL AT Commands? ==
1184 +== 6.1 How can I access t BC660K-GL AT Commands? ==
1000 1000  
1001 1001  
1002 1002  User can access to BC660K-GL directly and send AT Commands.
... ... @@ -1004,13 +1004,6 @@
1004 1004  [[See BC660K-GL AT Command set>>url:https://www.dropbox.com/sh/5f6ssda5fum8rvs/AABT68l8ZzWOvZ5eg2qwOoFda?dl=0]]
1005 1005  
1006 1006  
1007 -== 6.2 How to configure the certificate? ==
1008 -
1009 -
1010 -User can can refer to this [[description>>url:http://wiki.dragino.com/xwiki/bin/view/How%20to%20configure%20the%20certificate%3F/]] to configure the certificate.
1011 -
1012 -
1013 -
1014 1014  = 7. Order Info =
1015 1015  
1016 1016  
image-20240316150911-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -210.6 KB
Content
image-20240316151014-2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -105.3 KB
Content
image-20240611150437-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -46.6 KB
Content
image-20240611150520-2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -48.8 KB
Content
image-20240611150928-3.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -29.8 KB
Content
image-20240611150954-4.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -29.8 KB
Content
image-20240611151016-5.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -29.8 KB
Content
image-20240611151101-6.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -37.2 KB
Content
image-20240611151148-7.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -34.1 KB
Content
image-20240611151206-8.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -41.4 KB
Content
image-20240611151445-9.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -107.4 KB
Content
image-20240611151543-10.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -108.3 KB
Content
image-20240611151637-11.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.ting
Size
... ... @@ -1,1 +1,0 @@
1 -15.6 KB
Content