Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20221031143350-3.png]]
5
6 (% style="display:none" %) (%%)
7
8
9
10 **Table of Contents:**
11
12 {{toc/}}
13
14
15
16
17
18
19
20
21
22 = 1.  Introduction =
23
24
25 == 1.1  ​What is LWL03A LoRaWAN Water Leak ==
26
27
28 (((
29 The Dragino LWL03A is a (% style="color:blue" %)**LoRaWAN None-Position Rope Type Water Leak Controller**(%%). User can lay the (% style="color:blue" %)**LWL03A + Water Leak Cable**(%%) on the ground to detect water leakage. The water leak cable is sensitivity, when there is water over the leak cable. LWL03A will indicates a (% style="color:blue" %)**water leak event**(%%) and uplink to IoT server via LoRaWAN network.
30 )))
31
32 (((
33 LWL03A is powered by (% style="color:blue" %)**8500mAh battery**(%%) and target for long time use up to 10 years.
34 )))
35
36 (((
37 The LWL03A will send periodically data every 2 hours as well as for each water leak event. It also counts the water leak times and calculate last water leak duration.
38 )))
39
40 (((
41 Each LWL03A is pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto connect after power on.
42 )))
43
44
45
46 == ​1.2  Features ==
47
48
49 * LoRaWAN v1.0.3 Class A protocol.
50 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
51 * Water Leak detect
52 * 8500mAh Li-SoCI2 battery
53 * AT Commands to change parameters
54 * Uplink on periodically and leakage event
55 * Remote configure parameters via LoRa Downlink
56 * Firmware upgradable via program port
57
58 == 1.3  Cable Specification ==
59
60
61
62
63 == 1.4  ​Applications ==
64
65
66 * Smart Buildings & Home Automation
67 * Smart Cities
68 * Smart Factory
69
70 == 1.5  Mechanical ==
71
72
73 [[image:1667211179108-212.png]]
74
75
76 [[image:1667211192189-120.png]]
77
78
79
80 == 1.6  Installation ==
81
82
83 [[image:image-20221101180548-1.png||height="684" width="679"]]
84
85
86 [[image:image-20221031145604-4.png]]
87
88
89
90 == 1.7  Firmware Change log ==
91
92
93 [[LWL03A Image files – Download link & Changelog>>url:https://www.dropbox.com/sh/23v29gi61jq9mp6/AABgwJQ_xuybFivgbDZwTyNGa?dl=0]]
94
95
96
97 == 1.8  Pin Definitions and Switch ==
98
99
100 [[image:1654741572060-177.png]]
101
102 **LWL03A is based on LSN50v2**
103
104
105
106 === 1.8.1  Pin Definition ===
107
108
109 (((
110 The device is pre-configured to connect to a door sensor. The other pins are not used. If user wants to know more about other pins, please refer to the user manual of LSN50v2 at:  [[https:~~/~~/www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0>>https://www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0]]
111 )))
112
113
114
115 === 1.8.2  Jumper JP2(Power ON/OFF) ===
116
117
118 Power on Device when putting this jumper.
119
120
121
122 === 1.8.3  BOOT MODE / SW1 ===
123
124
125 (((
126 1)  ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run.
127 )))
128
129 (((
130 2)  Flash: work mode, the device starts to work and send out console output for further debug
131 )))
132
133
134
135 === 1.8.4  Reset Button ===
136
137
138 Press to reboot the device.
139
140
141
142 === 1.8.5  LED ===
143
144
145 It will flash:
146
147 ~1. Boot the device in flash mode
148
149 2. Send an uplink packet
150
151
152
153 = 2.  Operation Mode =
154
155
156 == 2.1  How it works ==
157
158
159 (((
160 The LWL03A is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join network. To connect a local LoRaWAN network, user just need to input the OTAA keys in the network server and [[power on>>||anchor="H1.8.2A0JumperJP228PowerON2FOFF29"]] the LWL03A. It will auto join the network via OTAA.
161 )))
162
163 (((
164 In case user can't set the OTAA keys in the network server and has to use the existing keys from server. User can [[use AT Command>>https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS01/]] to set the keys in the devices.
165 )))
166
167
168
169 == 2.2  Example to use for LoRaWAN network ==
170
171
172 (((
173 Here shows an example for how to join the [[TTN V3 Network>>url:https://eu1.cloud.thethings.network/]]. Below is the network structure, we use [[LG308>>url:http://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html]] as LoRaWAN gateway here.
174
175
176 )))
177
178 (((
179 [[image:image-20221031151740-5.png]]
180
181
182 )))
183
184 (((
185 The LWL03A has water leak detect probe as above. When there is water between these two detect probe, they will be short and generate the water leak event. and send the status to LoRaWAN server. The LWL03A will uplink two type of messages to the server.
186
187 * A keep-alive message which send every 2 hours. (Interval can be changed)
188
189 * An emergency event message when detect a water leak/water no leak. (leak/no [[leak event can be disabled>>||anchor="H3.4A0Enable2FDisableAlarm"]])
190
191 * A periodically update at every 10 minutes when in water leak.(Interval can be changed)
192
193 * A message when switch from water leak to none water leak. ([[Alarm event can be disabled>>||anchor="H3.8A0AlarmBaseonTimeout"]])
194
195 The LG308 is already set to connect to [[TTN V3 network >>url:https://eu1.cloud.thethings.network/]]. What we need to now is only configure the TTN V3:
196
197
198 (((
199 (% style="color:blue" %)**Step 1**(%%):  Create a device in TTN V3 with the OTAA keys from LWL03A.
200 )))
201
202 (((
203 Each LWL03A is shipped with a sticker with the default device EUI as below:
204 )))
205 )))
206
207 [[image:image-20220607170145-1.jpeg]]
208
209
210 Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:
211
212
213 **Add APP EUI in the application:**
214
215 [[image:1654742558691-332.png]]
216
217
218 [[image:1654742595660-519.png]]
219
220
221 [[image:1654742610413-498.png]]
222
223
224
225 [[image:1654742630064-347.png]]
226
227 **Add APP KEY and DEV EUI**
228
229
230
231 (% style="color:blue" %)**Step 2**(%%): Power on LWL03A
232
233
234 [[image:1654742860601-778.png]]
235
236
237
238 Put the jumper to power on LWL03A and it will auto-join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and the user can see it in the panel.
239
240 [[image:image-20221031161420-7.png||height="289" width="1322"]]
241
242
243
244 == 2.3  ​Uplink Payload ==
245
246
247 (((
248 Uplink payloads have two types:
249 )))
250
251 * (((
252 Leak/No leak Status: Use FPORT=2
253 )))
254 * (((
255 Other control commands: Use other FPORT fields.
256 )))
257
258 (((
259 The application server should parse the correct value based on FPORT settings.
260 )))
261
262
263
264 === 2.3.1  Device Status, FPORT~=5 ===
265
266
267 (((
268 Include device configure status. Once LWL03A Joined the network, it will uplink this message to the server. After that, LWL03A will uplink Device Status every 12 hours.
269 )))
270
271 (((
272 Users can also use the downlink command(% style="color:blue" %)**(0x26 01)**(%%) to ask LWL03A to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.
273 )))
274
275 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
276 |=(% scope="row" %)**Size(bytes)**|**11**|**2**|**1**|**1**|**2**
277 |=**Value**|Sensor Model|Firmware Version|Frequency Band|Sub-band|BAT
278
279 **Example parse in TTNv3:**
280
281 [[image:image-20221031161732-8.png||height="432" width="1339"]]
282
283
284 * (% style="color:#4f81bd" %)**Sensor Model**(%%): For LWL03A, this value is 0x14
285
286 * (% style="color:#4f81bd" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
287
288 * (% style="color:#4f81bd" %)**Frequency Band**:
289
290 *0x01: EU868
291
292 *0x02: US915
293
294 *0x03: IN865
295
296 *0x04: AU915
297
298 *0x05: KZ865
299
300 *0x06: RU864
301
302 *0x07: AS923
303
304 *0x08: AS923-1
305
306 *0x09: AS923-2
307
308 *0x0a: AS923-3
309
310 *0x0b: CN470
311
312 *0x0c: EU433
313
314 *0x0d: KR920
315
316 *0x0e: MA869
317
318
319 * (% style="color:#4f81bd" %)**Sub-Band**:
320
321 AU915 and US915: value 0x00 ~~ 0x08
322
323 CN470: value 0x0B ~~ 0x0C
324
325 Other Bands: Always 0x00
326
327
328 * (% style="color:#4f81bd" %)**Battery Info:**
329
330 Check the battery voltage.
331
332 Ex1: 0x0B45 = 2885mV
333
334 Ex2: 0x0B49 = 2889mV
335
336
337
338 === 2.3.2  Sensor Configuration, FPORT~=4 ===
339
340
341 (((
342 LWL03A will only send this command after getting the downlink command (0x26 02) from the server.
343 )))
344
345 (((
346 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
347 |=(% scope="row" %)**Size(bytes)**|**3**|**1**|**1**|**2**|**1**
348 |=**Value**|TDC (unit: sec)|Disalarm|Keep status|Keep time (unit: sec)|Leak alarm time
349 )))
350
351
352 * (((
353 (% style="color:#4f81bd" %)**TDC: (default: 0x001C20)**
354 )))
355
356 (((
357 Uplink interval for the Leak/No leak Event, default value is 0x001C20 which is 7200 seconds = 2 hours.
358 )))
359
360
361 * (((
362 (% style="color:#4f81bd" %)**Disalarm: (default: 0)**
363 )))
364
365 (((
366 (% style="color:#037691" %) **If Disalarm = 1**(%%), LWL03A will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many Leak/No leak event, and platform only care about the total number of pulse.
367 )))
368
369 (((
370 (% style="color:#037691" %) **If Disalarm = 0**(%%), LWL03A will send uplink at every TDC periodically and send data on each Leak/No leak event. This is useful for the application user need to monitor the Leak/No leak event in real-time.
371 )))
372
373 (((
374 (% style="color:red; font-weight:bold" %)** Note: When Disalarm=0, a high frequently Leak**(% style="color:red" %)**/No leak event will cause lots of uplink and drain battery very fast. **
375 )))
376
377
378 * (((
379 (% style="color:#4f81bd" %)**Keep Status & Keep Time**
380 )))
381
382 (((
383 Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H3.8A0AlarmBaseonTimeout"]]
384 )))
385
386
387 * (% style="color:#4f81bd" %)**Leak alarm time**
388
389 Regularly update a confirm uplink when water leaks, default value is 0x0A which is 10 minutes.
390
391
392
393 === 2.3.3  Real-Time Open/Close Status, Uplink FPORT~=2 ===
394
395
396 LWL03A will send this uplink **after** Device Status once join the LoRaWAN network successfully. And LWL03A will:
397
398 ~1. periodically send this uplink every 2 hours, this interval [[can be changed>>||anchor="H3.1A0SetTransmitIntervalTime"]].
399
400 2. There is an Leak/No leak event.
401
402
403 Uplink Payload totals 11 bytes.
404
405 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
406 |=(% colspan="5" style="width: 492px;" %)**Real-Time Open/Close Status, FPORT=2**
407 |(% style="width:60px" %)**Size(bytes)**|(% style="width:70px" %)**1**|(% style="width:90px" %)**3**|(% style="width:120px" %)**3**|(% style="width:80px" %)**4**
408 |(% style="width:101px" %)**Value**|(% style="width:77px" %)Status & [[Alarm>>||anchor="H3.8A0AlarmBaseonTimeout"]](((
409 &TDC flag
410 )))|(% style="width:99px" %)Total leak events|(% style="width:88px" %)(((
411 last leak
412 duration (unit: sec)
413 )))|(% style="width:126px" %)[[Unix TimeStamp>>||anchor="H2.4.1A0UnixTimeStamp"]]
414
415 **Status & Alarm:**
416
417 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:490px" %)
418 |=(% scope="row" style="width: 60px;" %)**Size(bit)**|(% style="width:50px" %)**6**|(% style="width:100px" %)**1**|(% style="width:140px" %)**1**|(% style="width:140px" %)**1**
419 |=(% style="width: 82px;" %)**Value**|(% style="width:71px" %)Reserve|(% style="width:176px" %)(((
420 TDC flag
421 0:No;1:Yes
422 )))|(% style="width:176px" %)(((
423 Alarm
424 0: No Alarm;
425 1: Alarm
426 )))|(% style="width:131px" %)Status
427 0: No leak, 1: leak
428
429 [[image:1667205498482-181.png]]
430
431
432 **Please check the decoder from this link: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/LWL03A>>https://github.com/dragino/dragino-end-node-decoder/tree/main/LWL03A]]**
433
434
435
436 === 2.3.4  Historical Water Leak/No leak Event, FPORT~=3 ===
437
438
439 (((
440 LWL03A stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.4A0DatalogFeature"]].
441 )))
442
443 (((
444 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time leak/no leak status.
445 )))
446
447 (((
448
449 )))
450
451 * (((
452 Each data entry is 11 bytes and has the same structure as [[Real-Time open/close status>>||anchor="H2.3.3A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]], to save airtime and battery, LWL03A will send max bytes according to the current DR and Frequency bands.
453 )))
454
455 (((
456 For example, in the US915 band, the max payload for different DR is:
457 )))
458
459 (% style="color:blue" %)**1. DR0**(%%): max is 11 bytes so one entry of data
460
461 (% style="color:blue" %)**2. DR1**(%%): max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
462
463 (% style="color:blue" %)**3. DR2**(%%): total payload includes 11 entries of data
464
465 (% style="color:blue" %)**4. DR3**(%%): total payload includes 22 entries of data.
466
467
468 If LWL03A doesn't have any data in the polling time. It will uplink 11 bytes of 0
469
470
471
472 [[image:1667205726581-981.png]]
473
474
475
476 (((
477 (% style="color:#037691" %)**Access via serial port:**
478 )))
479
480 [[image:image-20221031164229-9.png]]
481
482
483 (((
484 (% style="color:#037691" %)**Downlink:**
485 )))
486
487 (((
488 0x31 63 5C D2 B8 63 5C D8 1C 05
489 )))
490
491
492 (((
493 (% style="color:#037691" %)**Uplink:**
494 )))
495
496 (((
497 01 00 00 0A 00 00 0A 63 5C D2 F2 00 00 00 0A 00 00 15 63 5C D3 07 03 00 00 0F 00 00 00 63 5C D4 99 00 00 00 0F 00 00 28 63 5C D4 B7 02 00 00 11 00 00 E3 63 5C D6 52 00 00 00 00 00 00 00 63 5C D7 11 02 00 00 10 00 00 01 63 5C D7 51 00 00 00 10 00 00 01 63 5C D7 81 01 00 00 00 00 00 01 63 5C D7 8F 00 00 00 0D 00 00 0D 63 5C D7 F9
498 )))
499
500
501 (((
502 (% style="color:#037691" %)**Parsed Value:**
503
504
505 [ALARM, WATER_LEAK_STATUS, WATER_LEAK_TIMES, LAST_WATER_LEAK_DURATION, TIME]
506
507
508 [FALSE,LEAK,10,10,2022-10-29 07:14:58],
509
510 [FALSE,NO LEAK,10,21,2022-10-29 07:15:19],
511
512 [TRUE,LEAK,15,0,2022-10-29 07:22:01],
513
514 [FALSE,NO LEAK,15,40,2022-10-29 07:22:31],
515
516 [TRUE,NO LEAK,17,227,2022-10-29 07:29:22],
517
518 [FALSE,NO LEAK,0,0,2022-10-29 07:32:33],
519
520 [TRUE,NO LEAK,16,1,2022-10-29 07:33:37],
521
522 [FALSE,NO LEAK,16,1,2022-10-29 07:34:25],
523
524 [FALSE,LEAK,0,1,2022-10-29 07:34:39],
525
526 [FALSE,NO LEAK,13,13,2022-10-29 07:36:25],
527 )))
528
529
530
531 == 2.4  Datalog Feature ==
532
533
534 When a user wants to retrieve sensor value, he can send a poll command from the IoT platform to ask the sensor to send value in the required time slot.
535
536
537
538 === 2.4.1  Unix TimeStamp ===
539
540
541 LWL03A use Unix TimeStamp format based on
542
543 [[image:image-20220609113256-8.png]]
544
545
546 (((
547 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
548 )))
549
550 (((
551 Below is the converter example
552 )))
553
554 [[image:image-20220609113256-9.png||height="467" width="1127"]]
555
556
557 (((
558 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
559 )))
560
561
562
563 === 2.4.2  Set Device Time ===
564
565
566 (((
567 There are two ways to set the device's time:
568 )))
569
570 (((
571 (% style="color:blue" %)**1.  Through LoRaWAN MAC Command (Default settings)**
572 )))
573
574 (((
575 Users need to set **SYNCMOD=1** to enable sync time via the MAC command.
576 )))
577
578 (((
579 Once LWL03A Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LWL03A. If LWL03A fails to get the time from the server, LWL03A will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>||anchor="H2.3.1A0DeviceStatus2CFPORT3D5"]]].
580 )))
581
582
583 (((
584 (% style="color:red" %)**Note**: **LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature.**
585 )))
586
587
588 (((
589 (% style="color:blue" %)**2.  Manually Set Time**
590 )))
591
592 (((
593 Users need to set **SYNCMOD=0** to manual time, otherwise, the user set time will be overwritten by the time set by the server.
594 )))
595
596
597
598 == 2.5 ​Show Data in DataCake IoT Server ==
599
600 (((
601 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:
602 )))
603
604 (((
605 (% style="color:blue" %)**Step 1**(%%)**: Link TTNv3 to Datacake.**[[https:~~/~~/docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti>>url:https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti]]
606 )))
607
608 (((
609 (% style="color:blue" %)**Step 2**(%%)**: Configure LWL03A in Datacake.**
610 )))
611
612
613
614
615 [[image:image-20221102092921-1.png]]
616
617
618 [[image:image-20221102092921-2.png]]
619
620
621 [[image:image-20221102092921-3.png]]
622
623
624 [[image:image-20221102092921-4.png||height="444" width="1168"]]
625
626
627 [[image:image-20221102092921-5.png]]
628
629
630 [[image:image-20221102092921-6.png||height="439" width="1180"]]
631
632
633 [[image:image-20221102092921-7.png||height="339" width="1174"]]
634
635
636 [[image:image-20221102092921-8.png]]
637
638
639 [[image:image-20221102092921-9.png]]
640
641
642
643
644
645
646
647
648
649
650
651 = 3.  Configure LWL03A via AT Command or LoRaWAN Downlink =
652
653
654 (((
655 Use can configure LWL03A via AT Command or LoRaWAN Downlink.
656 )))
657
658 * (((
659 AT Command Connection: See [[FAQ>>||anchor="H5.A0FAQ"]].
660 )))
661 * (((
662 LoRaWAN Downlink instruction for different platforms: [[IoT LoRaWAN Server>>doc:Main.WebHome]]
663 )))
664
665 (((
666 There are two kinds of commands to configure LWL03A, they are:
667 )))
668
669 * (((
670 (% style="color:#4f81bd" %)** General Commands**.
671 )))
672
673 (((
674 These commands are to configure:
675 )))
676
677 * (((
678 General system settings like: uplink interval.
679 )))
680 * (((
681 LoRaWAN protocol & radio related command.
682 )))
683
684 (((
685 They are same for all Dragino Device which support DLWS-007 LoRaWAN Stack. These commands can be found on the wiki: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]]
686 )))
687
688 (((
689
690 )))
691
692 * (((
693 (% style="color:#4f81bd" %)** Commands special design for LWL03A**
694 )))
695
696 (((
697 These commands only valid for LWL03A, as below:
698 )))
699
700
701
702 == 3.1  Set Transmit Interval Time ==
703
704
705 Feature: Change LoRaWAN End Node Transmit Interval.
706
707 (% style="color:#4472c4" %)**AT Command: AT+TDC**
708
709 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:510px" %)
710 |=(% style="width: 156px;" %)**Command Example**|=(% style="width: 133px;" %)**Function**|=(% style="width: 220px;" %)**Response**
711 |(% style="width:156px" %)AT+TDC?|(% style="width:133px" %)Show current transmit Interval|(% style="width:220px" %)(((
712 30000
713
714 OK
715
716 the interval is 30000ms = 30s
717 )))
718 |(% style="width:156px" %)AT+TDC=60000|(% style="width:133px" %)Set Transmit Interval|(% style="width:220px" %)(((
719 OK
720
721 Set transmit interval to 60000ms = 60 seconds
722 )))
723
724 (((
725 (% style="color:#4472c4" %)**Downlink Command: 0x01**
726 )))
727
728 (((
729 Format: Command Code (0x01) followed by 3 bytes time value.
730 )))
731
732 (((
733 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
734 )))
735
736 * (((
737 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
738 )))
739 * (((
740 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
741
742
743
744
745 )))
746
747 == 3.2  Set Password ==
748
749
750 Feature: Set device password, max 9 digits.
751
752 (% style="color:#4472c4" %)**AT Command: AT+PWORD**
753
754 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:404.989px" %)
755 |=(% style="width: 170px;" %)**Command Example**|=(% style="width: 123px;" %)**Function**|=(% style="width: 109px;" %)**Response**
756 |(% style="width:170px" %)(((
757 AT+PWORD=?
758 )))|(% style="width:123px" %)(((
759 Show password
760 )))|(% style="width:109px" %)(((
761 (((
762 123456
763 )))
764
765 (((
766 OK
767 )))
768 )))
769 |(% style="width:170px" %)(((
770 AT+PWORD=999999
771 )))|(% style="width:123px" %)(((
772 Set password
773 )))|(% style="width:109px" %)(((
774 OK
775 )))
776
777 (% style="color:#4472c4" %)**Downlink Command:**
778
779 No downlink command for this feature.
780
781
782
783 == 3.3  Quit AT Command ==
784
785
786 Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.
787
788 (% style="color:#4472c4" %)**AT Command: AT+DISAT**
789
790 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:451.989px" %)
791 |=(% style="width: 155px;" %)**Command Example**|=(% style="width: 198px;" %)**Function**|=(% style="width: 96px;" %)**Response**
792 |(% style="width:155px" %)AT+DISAT|(% style="width:198px" %)Quit AT Commands mode|(% style="width:96px" %)OK
793
794 (% style="color:#4472c4" %)**Downlink Command:**
795
796 No downlink command for this feature.
797
798
799
800 == 3.4  Enable / Disable Alarm ==
801
802
803 Feature: Enable/Disable Alarm for open/close event. Default value 0.
804
805 (% style="color:#4472c4" %)**AT Command:**
806
807 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
808 |=(% style="width: 157px;" %)**Command Example**|=(% style="width: 257px;" %)**Function**|=**Response**
809 |(% style="width:157px" %)AT+DISALARM=1|(% style="width:257px" %)End node will only send packet in TDC time.|OK
810 |(% style="width:157px" %)AT+DISALARM=0|(% style="width:257px" %)End node will send packet in TDC time or status change for water leak sensor|OK
811
812 (% style="color:#4472c4" %)**Downlink Command:**
813
814 0xA7 01  ~/~/ Same As AT+DISALARM=1
815
816 0xA7 00  ~/~/ Same As AT+DISALARM=0
817
818
819
820 == 3.5  Clear count ==
821
822
823 Feature: Clear current door open.
824
825 (% style="color:#4472c4" %)**AT Command:**
826
827 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510.222px" %)
828 |=(% style="width: 155px;" %)**Command Example**|=(% style="width: 266px;" %)**Function**|=(% style="width: 85px;" %)**Response**
829 |(% style="width:155px" %)AT+CLRC|(% style="width:266px" %)Clear the count of door open events.|(% style="width:85px" %)OK
830
831 (% style="color:#4472c4" %)**Downlink Command:**
832
833 0xA6 01 ~/~/ Same As AT+ CLRC
834
835
836
837 == 3.6  Set system time ==
838
839
840 Feature: Set system time, Unix format. [[See here for format detail.>>||anchor="H2.4.1A0UnixTimeStamp"]]
841
842 (% style="color:#4472c4" %)**AT Command:**
843
844
845 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
846 |=**Command Example**|=**Function**|=**Response**
847 |AT+TIMESTAMP=1611104352|Set System time to 2021-01-20 00:59:12|OK
848
849 (% style="color:#4472c4" %)**Downlink Command:**
850
851 0x306007806000  ~/~/ Set timestamp to 0x(6007806000),Same as AT+TIMESTAMP=1611104352
852
853
854
855 == 3.7  Set Time Sync Mode ==
856
857
858 (((
859 Feature: Enable/Disable Sync system time via LoRaWAN MAC Command (DeviceTimeReq), LoRaWAN server must support v1.0.3 protocol to reply to this command.
860 )))
861
862 (((
863 SYNCMOD is set to 1 by default. If user wants to set a different time from the LoRaWAN server, the user needs to set this to 0.
864 )))
865
866
867 (% style="color:#4472c4" %)**AT Command:**
868
869 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
870 |=**Command Example**|=**Function**|=**Response**
871 |AT+SYNCMOD=1|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) The default is zero time zone.|OK
872 |AT+SYNCMOD=1,8|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to East eight time zone.|OK
873 |AT+SYNCMOD=1,-12|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to West Twelve Time Zone.|OK
874
875 (% style="color:#4472c4" %)**Downlink Command:**
876
877 0x28 01  ~/~/ Same As AT+SYNCMOD=1
878
879 0x28 01 08  ~/~/ Same As AT+SYNCMOD=1,8
880
881 0x28 01 F4  ~/~/ Same As AT+SYNCMOD=1,-12
882
883 0x28 00  ~/~/ Same As AT+SYNCMOD=0
884
885
886
887 == 3.8  Alarm Base on Timeout ==
888
889
890 LWL03A can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc.
891
892 User configure this feature by using:
893
894 (% style="color:#4472c4" %)**AT Command to configure:**
895
896 * (% style="color:red" %)**AT+TTRIG=1,30** (%%) **~-~->** When status change from no leak to leak, and device keep in leak status for more than 30 seconds. LWL03A will send an uplink packet, the Alarm bit (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1.
897
898 * (% style="color:red" %)**AT+TTRIG=0,30**(%%)  **~-~->** When status change from leak to no leak, and device keep in no leak status for more than 30 seconds. LWL03A will send an uplink packet, the Alarm bit (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1.
899
900 * (((
901 (% style="color:red" %)**AT+TTRIG=0,0**  (%%) **~-~-> ** Default Value, disable timeout Alarm.
902 )))
903
904 (((
905 (% style="color:#4472c4" %)**Downlink Command to configure:**
906 )))
907
908 (((
909 **Command: (% style="color:red" %)0xA9 aa bb cc(%%)**
910 )))
911
912 (((
913 **A9:** Command Type Code
914 )))
915
916 (((
917 **aa:** status to be monitored
918 )))
919
920 (((
921 **bb cc:** timeout.
922 )))
923
924
925 (((
926 If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30
927 )))
928
929 (((
930 Or
931 )))
932
933 (((
934 0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.
935 )))
936
937
938
939 == 3.9 The working mode of the total water leakage event ==
940
941
942 (% style="color:#4472c4" %)**AT Command to configure:**
943
944 * (% style="color:red" %)**AT+COUNTMOD=0** (%%)**~-~->** Default Value, Total leak events since factory.
945
946 * (% style="color:red" %)**AT+COUNTMOD=1** (%%)**~-~->** Total leak events since last TDC uplink.
947
948 (% style="color:#4472c4" %)**Downlink Command to configure:**
949
950 Command: (% style="color:red" %)**0x0B aa**
951
952 **0B:** Command Type Code
953
954 **aa:** mod
955
956
957 If user send 0x0B 01: equal to AT+COUNTMOD=1
958
959 Or
960
961 0x0B 00: Equal to AT+COUNTMOD=0
962
963
964
965 == 3.10 Regularly update a confirm uplink when water leaks ==
966
967
968 (% style="color:#4472c4" %)**AT Command to configure:**
969
970 * (% style="color:red" %)**AT+LEAKALARM=10** (%%)**~-~->** Default Value, A periodically update at every 10 minutes when in water leak.
971
972 * (% style="color:red" %)**AT+LEAKALARM=0**   (%%)**~-~->** Disable a periodically update when in water leak.
973
974 (% style="color:#4472c4" %)**Downlink Command to configure:**
975
976 Command: (% style="color:red" %)**0x0C aa**
977
978 **0C:** Command Type Code
979
980 **aa:** uplink interval
981
982
983 If user send 0x0C 0A: equal to AT+LEAKALARM=10
984
985 Or
986
987 0x0C 00: Equal to AT+LEAKALARM=0.
988
989
990
991 == 3.11 Delay time for state changes to take effect ==
992
993
994 (% style="color:#4472c4" %)**AT Command to configure:**
995
996 * (% style="color:red" %)**AT+DETEDELAY=50** (%%)**~-~->** Default Value, Set state change, valid signal is 50ms.
997
998 * (% style="color:red" %)**AT+DETEDELAY=0**  (%%) **~-~->** Disable valid signal detection..
999
1000 (% style="color:#4472c4" %)**Downlink Command to configure:**
1001
1002 Command: (% style="color:red" %)**0x0D aa bb**
1003
1004 **0D:** Command Type Code
1005
1006 **aa bb:** timeout
1007
1008
1009 If user send 0x0D 00 32: equal to AT+DETEDELAY=50
1010
1011 Or
1012
1013 0x0D 00 00: Equal to AT+DETEDELAY=0.
1014
1015
1016
1017 == 3.12 Print data entries base on page ==
1018
1019
1020 Feature: Print the sector data from start page to stop page (max is 400 pages).
1021
1022 (% style="color:#4472c4" %)**AT Command: AT+PDTA**
1023
1024 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
1025 |=**Command Example**|=**Response**
1026 |AT+PDTA=1,1|(((
1027 Stop Tx events when read sensor data
1028
1029 8016000 22/10/28 00:39:05 bat:3627 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1030
1031 8016010 22/10/28 00:48:57 bat:3633 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1032
1033 8016020 22/10/28 00:58:57 bat:3633 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1034
1035 8016030 22/10/28 01:08:57 bat:3635 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1036
1037 8016040 22/10/28 01:11:40 bat:3635 status:no_leak leak_times:0 last_leak_duration:32 alarm:false
1038
1039 8016050 22/10/28 01:12:12 bat:3633 status:leak    leak_times:1 last_leak_duration:32 alarm:false
1040
1041 8016060 22/10/28 01:12:22 bat:3633 status:no_leak leak_times:1 last_leak_duration:0 alarm:false
1042
1043 8016070 22/10/28 02:31:54 bat:3630 status:no_leak leak_times:0 last_leak_duration:0 alarm:false
1044
1045 Start Tx events
1046
1047 OK
1048 )))
1049
1050 (% style="color:#4472c4" %)**Downlink Command:**
1051
1052 No downlink command for this feature.
1053
1054
1055
1056 == 3.13 Print last few data entries ==
1057
1058
1059 Feature: Print the last few data entries
1060
1061 (% style="color:#4472c4" %)**AT Command: AT+PLDTA**
1062
1063 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
1064 |=**Command Example**|=**Response**
1065 |AT+PLDTA=10|(((
1066 Stop Tx events when read sensor data
1067
1068 1 22/10/29 09:58:45 bat:3620 status:no_leak leak_times:0 last_leak_duration:7 alarm:false
1069
1070 2 22/10/31 00:51:04 bat:3641 status:no_leak leak_times:0 last_leak_duration:0 alarm:false
1071
1072 3 22/10/31 00:56:52 bat:3643 status:leak    leak_times:1 last_leak_duration:0 alarm:false
1073
1074 4 22/10/31 00:58:40 bat:3641 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1075
1076 5 22/10/31 00:59:22 bat:3641 status:no_leak leak_times:0 last_leak_duration:0 alarm:false
1077
1078 6 22/10/31 01:01:50 bat:3641 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1079
1080 7 22/10/31 01:02:22 bat:3641 status:leak    leak_times:1 last_leak_duration:0 alarm:false
1081
1082 8 22/10/31 02:20:40 bat:3627 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1083
1084 9 22/10/31 02:34:59 bat:3627 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1085
1086 10 22/10/31 02:45:55 bat:3625 status:leak    leak_times:0 last_leak_duration:0 alarm:false
1087
1088 Start Tx events
1089
1090 OK
1091 )))
1092
1093 (% style="color:#4472c4" %)**Downlink Command:**
1094
1095 No downlink command for this feature.
1096
1097
1098
1099 == 3.14  Clear Flash Record ==
1100
1101
1102 (((
1103 Feature: Clear flash storage for data log feature.
1104 )))
1105
1106 (((
1107 (% style="color:#4472c4" %)**AT Command: AT+CLRDTA**
1108
1109
1110 (% border="1" cellspacing="5" style="background-color:#ffffcc; color:green; width:500px" %)
1111 |=(% style="width: 157px;" %)**Command Example**|=(% style="width: 169px;" %)**Function**|=**Response**
1112 |(% style="width:157px" %)AT+CLRDTA|(% style="width:169px" %)Clear flash storage for data log feature.|Clear all stored sensor data… OK
1113 )))
1114
1115
1116 (((
1117 (% style="color:#4472c4" %)**Downlink Command:**
1118 )))
1119
1120 (((
1121 Example: 0xA301  ~/~/  Same as AT+CLRDTA
1122 )))
1123
1124
1125
1126 = 4.  Battery & How to replace =
1127
1128
1129 == 4.1  Battery Info ==
1130
1131 (((
1132 LWL03A is equipped with a [[8500mAH ER18505 Li-SOCI2 battery>>url:https://www.dragino.com/downloads/index.php?dir=datasheet/Battery/ER26500/]]. The battery is an un-rechargeable battery with a low discharge rate targeting 8~~10 years of use. This type of battery is commonly used in IoT targets for long-term running, such as water meters.
1133 )))
1134
1135 (((
1136 The battery related documents as below:
1137 )))
1138
1139 * [[Battery Dimension>>url:https://www.dragino.com/downloads/index.php?dir=datasheet/Battery/]],
1140
1141 * [[Lithium-Thionyl Chloride Battery  datasheet>>url:https://www.dragino.com/downloads/downloads/datasheet/Battery/ER26500/ER26500_Datasheet-EN.pdf]],
1142
1143 * [[Lithium-ion Battery-Capacitor datasheet>>url:https://www.dragino.com/downloads/index.php?dir=datasheet/Battery/]], [[Tech Spec>>url:https://www.dragino.com/downloads/index.php?dir=datasheet/Battery/]]
1144
1145 (((
1146 The discharge curve is not linear so can't simply use percentage to show the battery level. Below is the battery performance.
1147 )))
1148
1149
1150 [[image:1654593587246-335.png]]
1151
1152
1153 Minimum Working Voltage for the LWL03A:
1154
1155 LWL03A:  2.45v ~~ 3.6v
1156
1157
1158
1159 === 4.1.1  ​Battery Note ===
1160
1161
1162 (((
1163 The Li-SICO battery is designed for small current / long period application. It is not good to use a high current, short period transmit method. The recommended minimum period for use of this battery is 5 minutes. If you use a shorter period time to transmit LoRa, then the battery life may be decreased.
1164 )))
1165
1166
1167
1168 == 4.2  Replace Battery ==
1169
1170
1171 (((
1172 Any battery with range 2.45 ~~ 3.6v can be a replacement. We recommend to use Li-SOCl2 Battery.
1173 )))
1174
1175 (((
1176 And make sure the positive and negative pins match.
1177 )))
1178
1179 [[image:image-20221031154914-6.png]]
1180
1181
1182
1183 == 4.3  Battery Life Analyze ==
1184
1185
1186 (((
1187 Dragino battery powered products are all run in Low Power mode. User can check the guideline from this link to calculate the estimate battery life:
1188 )))
1189
1190 (((
1191 [[https:~~/~~/www.dragino.com/downloads/downloads/LoRa_End_Node/Battery_Analyze/DRAGINO_Battery_Life_Guide.pdf>>url:https://www.dragino.com/downloads/downloads/LoRa_End_Node/Battery_Analyze/DRAGINO_Battery_Life_Guide.pdf]]
1192 )))
1193
1194 (((
1195 When entering the first command, the (% style="color:red" %)**RED LED**(%%) will on and user can now input AT Commands. After input all needed AT Commands, please input (% style="color:red" %)**AT+CLPM=1**(%%) to set the device to work in Low Power mode and (% style="color:red" %)**RED LED**(%%) will be off.
1196 )))
1197
1198 (((
1199 More detail AT Command manual can be found at [[AT Command Manual>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS01/]]
1200 )))
1201
1202
1203
1204 = 5.  FAQ =
1205
1206
1207 == 5.1  How to use AT Command to configure LWL03A ==
1208
1209
1210 LWL03A UART connection photo
1211
1212
1213 [[image:1654757007713-791.png]]
1214
1215
1216 (((
1217 In the PC, you need to set the serial baud rate to (% style="color:green" %)**9600**(%%) to access the serial console for LWL03A. LWL03A will output system info once power on as below:
1218 )))
1219
1220
1221 [[image:image-20220609144231-3.png||height="644" width="922"]]
1222
1223
1224
1225 == 5.2  How to upgrade the firmware? ==
1226
1227
1228 A new firmware might be available for:
1229
1230 * Support new features
1231
1232 * For bug fix
1233
1234 * Change LoRaWAN bands.
1235
1236 Instruction for how to upgrade: [[Firmware Upgrade Instruction>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome||anchor="H2.HardwareUpgradeMethodSupportList"]]
1237
1238
1239 Firmware location: [[https:~~/~~/www.dropbox.com/sh/23v29gi61jq9mp6/AABgwJQ_xuybFivgbDZwTyNGa?dl=0>>url:https://www.dropbox.com/sh/23v29gi61jq9mp6/AABgwJQ_xuybFivgbDZwTyNGa?dl=0]]
1240
1241
1242
1243 == 5.3  How to change the LoRa Frequency Bands/Region? ==
1244
1245
1246 (((
1247 Users can follow the introduction for how to upgrade image. When downloading the images, choose the required image file for download.
1248 )))
1249
1250
1251 = 6.  Order Info =
1252
1253
1254 (% style="color:red" %)**Notice: LWL03A includes a one meter water leak cable, If user want to extend the lenght, please choose Water Leak Cable DR-WLN-XXX.**
1255
1256 **Water Leak Controller Part Number: (% style="color:blue" %)LWL03A-XXX(%%)**
1257
1258 (% style="color:blue" %)**XXX**:
1259
1260 * (% style="color:red" %)**EU433**(%%): frequency bands EU433
1261 * (% style="color:red" %)**EU868**(%%): frequency bands EU868
1262 * (% style="color:red" %)**KR920**(%%): frequency bands KR920
1263 * (% style="color:red" %)**CN470**(%%): frequency bands CN470
1264 * (% style="color:red" %)**AS923**(%%): frequency bands AS923
1265 * (% style="color:red" %)**AU915**(%%): frequency bands AU915
1266 * (% style="color:red" %)**US915**(%%): frequency bands US915
1267 * (% style="color:red" %)**IN865**(%%): frequency  bands IN865
1268 * (% style="color:red" %)**CN779**(%%): frequency bands CN779
1269
1270 **Water Leak Cable Part Number: (% style="color:blue" %)DR-WLN-XXX(%%)**
1271
1272 (% style="color:blue" %)**XXX:**
1273
1274 * (% style="color:red" %)**1M : **(%%)1 meter water leak cable
1275 * (% style="color:red" %)**5M : **(%%)5 meters water leak cable
1276 * (% style="color:red" %)**10M: **(%%)10 meters water leak cable
1277
1278 = 7.  ​Packing Info =
1279
1280
1281 **LWL03A Package Includes**:
1282
1283 * LWL03A x 1
1284 * 1 x 1m water lead cable
1285 * 1 x termination end
1286
1287 = 8.  ​Support =
1288
1289
1290 * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
1291
1292 * Provide as much information as possible regarding your enquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[support@dragino.com>>url:http://../../../../../../D:%5C%E5%B8%82%E5%9C%BA%E8%B5%84%E6%96%99%5C%E8%AF%B4%E6%98%8E%E4%B9%A6%5CLoRa%5CLT%E7%B3%BB%E5%88%97%5Csupport@dragino.com]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0