Show last authors
1 (% style="text-align:center" %)
2 [[image:1652856952171-363.png]]
3
4
5
6
7
8
9 **Table of Contents:**
10
11 {{toc/}}
12
13
14
15 = 1. Introduction =
16
17 == 1.1 What is CPL01 LoRaWAN Pulse/Contact Sensor ==
18
19 (((
20
21
22 The Dragino CPL01 is a (% style="color:blue" %)**LoRaWAN Contact Sensor**(%%). It detects open/close status and uplink to IoT server via LoRaWAN network. user can see the dry contact status, open time, open counts in the IoT Server.
23 )))
24
25 (((
26 CPL01 is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), It is designed for long term use up to 10 years. (Actually Battery life depends on the use environment, update period.)
27 )))
28
29 (((
30 The CPL01 will send periodically data every day as well as for each dry contact action. It also counts the contact open times and calculate last open duration. User can also disable the uplink for each open/close event, instead, device can count each open event and uplink periodically.
31 )))
32
33 (((
34 CPL01 has the open alarm feature, user can set this feature so device will send Alarm if the contact has been open for a certain time.
35 )))
36
37 (((
38 CPL01 is designed for outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
39 )))
40
41 (((
42 Each CPL01 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.
43 )))
44
45 (((
46 *Battery life depends on how often to send data, please see [[battery analyzer>>||anchor="H4.Battery26howtoreplace"]].
47 )))
48
49
50 == 1.2 Features ==
51
52 * LoRaWAN v1.0.3 Class A protocol.
53 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
54 * Open/Close detect
55 * Open/Close statistics
56 * 8500mAh industrial battery(none-rechargeable)
57 * AT Commands to change parameters
58 * Uplink on periodically and open/close event
59 * Datalog feature
60 * Remote configure parameters via LoRa Downlink
61 * Firmware upgradable via program port
62 * Wall Mountable
63 * Outdoor Use
64
65
66
67
68 == 1.3 Installation ==
69
70 Connect CPL01 to an Open Close sensor like below. So it can detect the open/close event.
71
72 [[image:1652857419839-473.png||height="435" width="482"]]
73
74 [[image:1652857455276-422.png||height="229" width="728"]]
75
76
77
78 == 1.4 Storage & Operation Temperature ==
79
80 -40°C to +85°C
81
82
83 == 1.5 Applications (% style="display:none" %)     (%%) ==
84
85 * Open/Close Detection
86 * Pulse meter application
87 * Dry Contact Detection
88
89
90
91
92 == 1.6 Mechanical ==
93
94 [[image:1652857762997-798.png]]
95
96 [[image:1652857791347-991.png]]
97
98
99
100 == 1.7 Pin Definitions and Switch ==
101
102 [[image:1652857867227-591.png||height="374" width="727"]]
103
104
105
106 === 1.7.1 Pin Definition ===
107
108 CPL01 is pre-configured to connect to two external wires. The other pins are not used. If user wants to know more about other pins, please refer to the user manual of LSN50v2 at: [[http:~~/~~/www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/>>url:http://www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/]]
109
110
111 === 1.7.2 Jumper JP2(Power ON/OFF) ===
112
113 Power on Device when putting this jumper.
114
115
116 === 1.7.3 BOOT MODE / SW1 ===
117
118 (((
119 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.
120 )))
121
122 (((
123 2) Flash: work mode, the device starts to work and send out console output for further debug
124 )))
125
126
127 === 1.7.4 Reset Button ===
128
129 Press to reboot the device.
130
131
132 === 1.7.5 LED ===
133
134 It will flash:
135
136 1. Boot the device in flash mode
137 1. Send an uplink packet
138
139
140
141
142
143 = 2. Operation Mode =
144
145 == 2.1 How it works? ==
146
147 (((
148 Each CPL01 is shipped with a worldwide unique set of OTAA keys. To use CPL01 in a LoRaWAN network, user needs to input the OTAA keys in the LoRaWAN network server. So CPL01 can join the LoRaWAN network and start to transmit sensor data.
149 )))
150
151
152 == 2.2 Example to use for LoRaWAN network ==
153
154 This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are similar.
155
156 [[image:1652858412212-334.png||height="327" width="723"]]
157
158
159 * (((
160 In this use case, the CPL01 is connect to a dry contact sensor to detect the open/close event and send the status to the LoRaWAN server. The CPL01 will uplink different types of messages to the LoRaWAN server. See [[Uplink payload>>||anchor="H2.3UplinkPayload"]] for detail.
161 )))
162
163 (((
164 Assume the DLOS8 is already set to connect to the [[TTN V3 network >>url:https://eu1.cloud.thethings.network]]. We need to add the CPL01 device in TTN V3:
165 )))
166
167 (((
168 (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from CPL01.
169 )))
170
171 (((
172 Each CPL01 is shipped with a sticker with the default device EUI as below:
173 )))
174
175 [[image:1652858451221-297.png]]
176
177
178 Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:
179
180 Add APP EUI in the application.
181
182 [[image:1652858478050-325.png]]
183
184
185 [[image:1652858498638-881.png||height="327" width="727"]]
186
187
188 [[image:1652858507748-628.png]]
189
190 [[image:1652858520534-791.png]]
191
192
193 Add APP KEY and DEV EUI
194
195
196
197 (% style="color:blue" %)**Step 2**(%%): Power on CPL01
198
199 [[image:1652858584749-726.png]]
200
201 (((
202 Put the jumper to power on CPL01 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.
203 )))
204
205 [[image:1652858597931-989.png||height="322" width="721"]]
206
207
208
209 == 2.3 Uplink Payload ==
210
211 (((
212 Uplink payloads have two types:
213 )))
214
215 * (((
216 Open/Close Status: Use FPORT=2
217 )))
218 * (((
219 Other control commands: Use other FPORT fields.
220 )))
221
222 (((
223 The application server should parse the correct value based on FPORT settings.
224 )))
225
226
227
228 === 2.3.1 Device Status, FPORT~=5 ===
229
230 (((
231 Include device configure status. Once CPL01 Joined the network, it will uplink this message to the server. After that, CPL01 will uplink Device Status every 12 hours.
232 )))
233
234 (((
235 Users can also use the downlink command(0x26 01) to ask CPL01 to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.
236
237 [[image:image-20220609150022-3.png]]
238 )))
239
240
241 Example parse in TTNv3
242
243 [[image:1652859749264-179.png||height="275" width="723"]]
244
245 * (((
246 **Sensor Model**: For CPL01, this value is 0x0E
247 )))
248
249 * (((
250 **Firmware Version**: 0x0100, Means: v1.0.0 version
251 )))
252
253 * (((
254 **Frequency Band**:
255 )))
256
257 (% class="box" %)
258 (((
259 *0x01: EU868
260 *0x02: US915
261 *0x03: IN865
262 *0x04: AU915
263 *0x05: KZ865
264 *0x06: RU864
265 *0x07: AS923
266 *0x08: AS923-1
267 *0x09: AS923-2
268 *0x0a: AS923-3
269 *0x0b: CN470
270 *0x0c: EU433
271 *0x0d: KR920
272 *0x0e: MA869
273 )))
274
275 * (((
276 (((
277 **Sub-Band**:
278 )))
279
280 * (((
281 AU915 and US915:value 0x00 ~~ 0x08
282 )))
283 * (((
284 CN470: value 0x0B ~~ 0x0C
285 )))
286 * (((
287 Other Bands: Always 0x00
288 )))
289 )))
290
291 * (((
292 **Battery Info:**
293 )))
294
295 (((
296 Check the battery voltage.
297 )))
298
299 (((
300 **Ex1**: 0x0B45 = 2885mV
301 )))
302
303 (((
304 **Ex2**: 0x0B49 = 2889mV
305 )))
306
307
308
309 === 2.3.2 Sensor Configuration, FPORT~=4 ===
310
311 CPL01 will only send this command after getting the downlink command (0x26 02) from the server.
312
313 [[image:image-20220609150109-4.png]]
314
315
316 * (((
317 **TDC: (default: 0x001C20)**
318 )))
319
320 (((
321 Uplink interval for the total pulse count, default value is 0x001C20 which is 7200 seconds = 2 hours.
322
323
324 )))
325
326 * (((
327 **Disalarm: (default: 0)**
328 )))
329
330 (((
331 **If Disalarm = 1**, CPL01 will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many disconnect/connect event, and platform only care about the total number of pulse.
332 )))
333
334 (((
335 **If Disalarm = 0**, CPL01 will send uplink at every TDC periodically.
336
337
338 )))
339
340 * (((
341 **Keep Status & Keep Time**
342 )))
343
344 (((
345 Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H3.5AlarmBaseonTimeout"]]
346
347
348 )))
349
350 * (((
351 **Trigger mode (default: 0)**
352 )))
353
354 (((
355 **If Trigger mode = 0**, count close to open event.
356 )))
357
358 (((
359 **If Trigger mode = 1**, count open to close event.
360 )))
361
362 [[image:1652860064987-743.png||height="152" width="730"]]
363
364
365 [[image:1652860079526-831.png||height="209" width="729"]]
366
367
368
369 === 2.3.3 Real-Time Open/Close Status, Uplink FPORT~=2 ===
370
371 (((
372 (((
373 CPL01 will send this uplink **after** Device Status once join the LoRaWAN network successfully. And CPL01 will:
374 )))
375 )))
376
377 (((
378 (((
379 periodically send this uplink every 2 hours, this interval [[can be changed>>||anchor="H3.1SetTransmitIntervalTime"]].
380 )))
381 )))
382
383 (((
384 (((
385 Uplink Payload totals 11 bytes.
386 )))
387 )))
388
389 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:510px" %)
390 |=(% colspan="5" style="width: 723px;" %)**Real-Time Open/Close Status, FPORT=2**
391 |(% style="width:101px" %)**Size (bytes)**|(% style="width:133px" %)**1**|(% style="width:92px" %)**3**|(% style="width:247px" %)**3**|(% style="width:149px" %)**4**
392 |(% style="width:101px" %)**Value**|(% style="width:133px" %)Status & [[Alarm>>||anchor="H3.5AlarmBaseonTimeout"]]|(% style="width:92px" %)Total pulse|(% style="width:247px" %)The last open duration (unit: min)|(% style="width:149px" %)[[Unix TimeStamp>>||anchor="H2.4.1UnixTimeStamp"]]
393
394 [[image:image-20220609150155-5.png]]
395
396
397 * (((
398 **Calculate Flag**
399 )))
400
401 (((
402 The calculate flag is a user define field, IoT server can use this filed to handle different meter with different pulse factor. For example, if there are 100 water meters, meter 1 ~~50 are 1 liter/pulse and meter 51 ~~ 100 has 1.5 liter/pulse.
403 )))
404
405 (((
406 User can set calculate flag to 1 for meter 1~~50 and 2 for meter 51 ~~ 100, So IoT Server can use this field for calculation.
407 )))
408
409 (((
410 Default value: 0. 
411 )))
412
413 (((
414 Range (6 bits): (b)000000 ~~ (b) 111111
415 )))
416
417 (((
418 Refer: [[Set Calculate Flag>>||anchor="H3.9Setthecalculateflag"]]
419
420
421 )))
422
423 * (((
424 **Alarm**
425 )))
426
427 (((
428 See [[Alarm Base on Timeout>>||anchor="H3.5AlarmBaseonTimeout"]]
429
430
431 )))
432
433 * (((
434 **Contact Status**
435 )))
436
437 (((
438 0: Open
439 )))
440
441 (((
442 1: Close
443
444
445 )))
446
447 * (((
448 **Total pulse**
449 )))
450
451 (((
452 Total pulse/counting base on dry [[contact trigger event>>||anchor="H2.3.2SensorConfiguration2CFPORT3D4"]]
453 )))
454
455 (((
456 Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
457
458
459 )))
460
461 * (((
462 **The last open duration**
463 )))
464
465 (((
466 Dry Contact last open duration.
467 )))
468
469 (((
470 Unit: min.
471 )))
472
473 [[image:1652860403792-491.png||height="153" width="735"]]
474
475
476
477 === 2.3.4 Historical Door Open/Close Event, FPORT~=3 ===
478
479 (((
480 CPL01 stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.4DatalogFeature"]].
481 )))
482
483 (((
484 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
485 )))
486
487 * (((
488 Each data entry is 11 bytes and has the same structure as [[Real-Time open/close status>>||anchor="H2.3.3Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]], to save airtime and battery, CPL01 will send max bytes according to the current DR and Frequency bands.
489 )))
490
491 (((
492 For example, in the US915 band, the max payload for different DR is:
493 )))
494
495 (((
496 a) DR0: max is 11 bytes so one entry of data
497 )))
498
499 (((
500 b) DR1: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
501 )))
502
503 (((
504 c) DR2: total payload includes 11 entries of data
505 )))
506
507 (((
508 d) DR3: total payload includes 22 entries of data.
509 )))
510
511 (((
512 If CPL01 doesn’t have any data in the polling time. It will uplink 11 bytes of 0
513 )))
514
515 **Downlink:**
516
517 (% class="box" %)
518 (((
519 0x31 61 E9 3A D4 61 E9 3D E0 05
520 )))
521
522 [[image:1652861353248-624.png||height="189" width="720"]]
523
524 **Uplink:**
525
526 (% class="box" %)
527 (((
528 0E 00 23 E6 00 00 00 61 E9 3B 04 0E 00 23 E6 00 00 00 61 E9 3B 25 0D 00 00 00 00 00 00 61 E9 3B C8 0E 00 00 02 00 00 00 61 E9 3B D4 0E 00 00 06 00 00 00 61 E9 3B DB 01 00 00 00 00 00 00 61 E9 3C 91 01 00 00 00 00 00 00 61 E9 3C A1 0D 00 00 00 00 00 00 61 E9 3C BC 0E 00 00 07 00 00 00 61 E9 3C D6 00 00 00 00 00 00 00 61 E9 3D A6
529 )))
530
531 **Parsed Value:**
532
533 (((
534 [ALARM, PIN_STATUS, TOTAL_PULSE, CALCULATE_FLAG, LAST_OPEN_DURATION, TIME]
535 )))
536
537 (((
538
539 )))
540
541 (((
542 [TRUE, CLOSE, 9190, 3, 0, 2022-01-20 10:35:48],
543 )))
544
545 (((
546 [TRUE, CLOSE, 9190, 3, 0, 2022-01-20 10:36:21],
547 )))
548
549 (((
550 [FALSE, OPEN, 0, 3, 0, 2022-01-20 10:39:04],
551 )))
552
553 (((
554 [TRUE, CLOSE, 2, 3, 0, 2022-01-20 10:39:16],
555 )))
556
557 (((
558 [TRUE, CLOSE, 6, 3, 0, 2022-01-20 10:39:23],
559 )))
560
561 (((
562 [FALSE, OPEN, 0, 0, 0, 2022-01-20 10:42:25],
563 )))
564
565 (((
566 [FALSE, OPEN, 0, 0, 0, 2022-01-20 10:42:41],
567 )))
568
569 (((
570 [FALSE, OPEN, 0, 3, 0, 2022-01-20 10:43:08],
571 )))
572
573 (((
574 [TRUE, CLOSE, 7, 3, 0, 2022-01-20 10:43:34],
575 )))
576
577 (((
578 [FALSE, CLOSE, 0, 0, 0, 2022-01-20 10:47:02],
579 )))
580
581 [[image:1652861480446-216.png]]
582
583
584
585 == 2.4 Datalog Feature ==
586
587 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.
588
589
590 === 2.4.1 Unix TimeStamp ===
591
592 CPL01 uses Unix TimeStamp format based on
593
594 [[image:1652861618065-927.png||height="109" width="705"]]
595
596 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
597
598 Below is the converter example
599
600 [[image:1652861637105-371.png||height="428" width="732"]]
601
602
603
604 === 2.4.2 Set Device Time ===
605
606 (((
607 (((
608 There are two ways to set the device’s time:
609 )))
610 )))
611
612 (((
613 (((
614 (% style="color:#4f81bd" %)**1. Through LoRaWAN MAC Command (Default settings)**
615 )))
616 )))
617
618 (((
619 (((
620 Users need to set SYNCMOD=1 to enable sync time via the MAC command.
621 )))
622 )))
623
624 (((
625 (((
626 Once CPL01 Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to CPL01. If CPL01 fails to get the time from the server, CPL01 will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>||anchor="H2.3.1DeviceStatus2CFPORT3D5"]]].
627 )))
628 )))
629
630 (((
631 (((
632 (% style="color:red" %)**Note**(%%): (% style="color:#4f81bd" %)LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) (%%)or higher to support this MAC command feature.
633 )))
634
635 (((
636
637 )))
638
639 (((
640 (% style="color:#4f81bd" %)**2. Manually Set Time**
641 )))
642
643 (((
644 Users need to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.
645 )))
646 )))
647
648
649 === 2.4.3 Poll sensor value ===
650
651 Users can poll sensor values based on timestamps. Below is the downlink command.
652
653 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:453.989px" %)
654 |=(% colspan="4" style="width: 451px;" %)**Downlink Command to poll Open/Close status (0x31)**
655 |(% style="width:59px" %)**1byte**|(% style="width:126px" %)**4bytes**|(% style="width:138px" %)**4bytes**|(% style="width:128px" %)**1byte**
656 |(% style="width:59px" %)31|(% style="width:126px" %)Timestamp start|(% style="width:138px" %)Timestamp end|(% style="width:128px" %)Uplink Interval
657
658 (((
659 Timestamp start and Timestamp end-use Unix TimeStamp format as mentioned above. Devices will reply with all data logs during this period, using the uplink interval.
660 )))
661
662 (((
663 For example, downlink command[[image:image-20220518162852-1.png]]
664 )))
665
666 (((
667 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00’s data
668 )))
669
670 (((
671 Uplink Internal =5s,means CPL01 will send one packet every 5s. range 5~~255s.
672 )))
673
674
675 === 2.4.4 Decoder in TTN V3 ===
676
677 [[image:1652862574387-195.png||height="359" width="722"]]
678
679 (((
680 Please check the decoder from this link:
681 )))
682
683 (((
684 [[https:~~/~~/docs.google.com/document/d/1LFTp2IupfM3O4rQ1gJgZHJNP49BZFnm2xThiErnJYPQ/edit?usp=sharing>>url:https://docs.google.com/document/d/1LFTp2IupfM3O4rQ1gJgZHJNP49BZFnm2xThiErnJYPQ/edit?usp=sharing]]
685 )))
686
687
688 = 2.5 Show data on Datacake =
689
690 (((
691 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:
692 )))
693
694 (((
695 **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]]
696 )))
697
698 (((
699 **Step 2**: Configure CPL01 in Datacake
700 )))
701
702 [[image:1652862663124-805.png]]
703
704 [[image:1652862686700-576.png]]
705
706
707
708
709 [[image:1652862716106-261.png]]
710
711 [[image:1652862734313-990.png||height="229" width="707"]]
712
713 [[image:1652862744310-982.png||height="380" width="715"]]
714
715 [[image:1652862755419-628.png||height="258" width="718"]]
716
717 [[image:1652862763975-153.png||height="214" width="720"]]
718
719 [[image:1652862773781-198.png||height="321" width="499"]]
720
721 [[image:1652862794151-835.png||height="327" width="487"]]
722
723 [[image:1652862807472-427.png||height="378" width="670"]]
724
725
726 = 3. Configure CPL01 via AT Command or LoRaWAN Downlink =
727
728 (((
729 Use can configure CPL01 via AT Command or LoRaWAN Downlink.
730 )))
731
732 * (((
733 AT Command Connection: See [[FAQ>>||anchor="H5.FAQ"]].
734 )))
735 * (((
736 LoRaWAN Downlink instruction for different platforms:  [[IoT LoRaWAN Server>>doc:Main.WebHome]]
737 )))
738
739 (((
740 There are two kinds of commands to configure CPL01, they are:
741 )))
742
743 * (((
744 (% style="color:#4f81bd" %)**General Commands**.
745 )))
746
747 (((
748 These commands are to configure:
749 )))
750
751 * (((
752 General system settings like uplink interval.
753 )))
754 * (((
755 LoRaWAN protocol & radio related command.
756 )))
757
758 (((
759 They are the same for all Dragino Devices which support DLWS-005 LoRaWAN Stack(Note~*~*). 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]]
760 )))
761
762 (((
763
764 )))
765
766 * (((
767 (% style="color:#4f81bd" %)**Commands special design for CPL01**
768 )))
769
770 (((
771 These commands are only valid for CPL01, as below:
772 )))
773
774
775 == 3.1 Set Transmit Interval Time ==
776
777 (((
778 Feature: Change LoRaWAN End Node Transmit Interval.
779 )))
780
781 (((
782 (% style="color:#4f81bd" %)**AT Command: AT+TDC**
783 )))
784
785 (((
786 [[image:image-20220609134826-1.png]]
787 )))
788
789 (((
790
791 )))
792
793 (((
794 (% style="color:#4f81bd" %)**Downlink Command: 0x01**
795 )))
796
797 (((
798
799 )))
800
801 (((
802 Format: Command Code (0x01) followed by 3 bytes time value.
803 )))
804
805 (((
806 If the downlink payload=0100003C, it means set the END Node’s Transmit Interval to 0x00003C=60(S), while type code is 01.
807 )))
808
809 * (((
810 Example 1: Downlink Payload: 0100001E ~/~/ Set Transmit Interval (TDC) = 30 seconds
811 )))
812 * (((
813 Example 2: Downlink Payload: 0100003C ~/~/ Set Transmit Interval (TDC) = 60 seconds
814
815
816
817
818 )))
819
820 == 3.2 Set Password ==
821
822 Feature: Set device password, max 9 digits
823
824 (% style="color:#4f81bd" %)**AT Command: AT+PWORD**
825
826
827 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:404.989px" %)
828 |=(% style="width: 170px;" %)**Command Example**|=(% style="width: 123px;" %)**Function**|=(% style="width: 109px;" %)**Response**
829 |(% style="width:170px" %)(((
830 AT+PWORD=?
831 )))|(% style="width:123px" %)(((
832 Show password
833 )))|(% style="width:109px" %)(((
834 (((
835 123456
836 )))
837
838 (((
839 OK
840 )))
841 )))
842 |(% style="width:170px" %)(((
843 AT+PWORD=999999
844 )))|(% style="width:123px" %)(((
845 Set password
846 )))|(% style="width:109px" %)(((
847 OK
848 )))
849
850 (% style="color:#4f81bd" %)**Downlink Command:**
851
852 No downlink command for this feature.
853
854
855 == 3.3 Quit AT Command ==
856
857 Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.
858
859 (% style="color:#4f81bd" %)**AT Command: AT+DISAT**
860
861
862 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:451.989px" %)
863 |=(% style="width: 155px;" %)**Command Example**|=(% style="width: 198px;" %)**Function**|=(% style="width: 96px;" %)**Response**
864 |(% style="width:155px" %)AT+DISAT|(% style="width:198px" %)Quit AT Commands mode|(% style="width:96px" %)OK
865
866 (% style="color:#4f81bd" %)**Downlink Command:**
867
868 No downlink command for this feature.
869
870
871 == 3.4 Enable / Disable Alarm ==
872
873 Feature: Enable/Disable Alarm for open/close event. Default value 0.
874
875 (% style="color:#4f81bd" %)**AT Command:**
876
877 [[image:image-20220609151041-6.png]]
878
879
880 (% style="color:#4f81bd" %)**Downlink Command:**
881
882 **0xA7 01** ~/~/Same As AT+DISALARM=1
883
884 **0xA7 00** ~/~/ Same As AT+DISALARM=0
885
886
887 == 3.5 Alarm Base on Timeout ==
888
889 (((
890 (((
891 CPL01 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:
892 )))
893 )))
894
895 (((
896 (((
897 (% style="color:#4f81bd" %)**1. Keep Status: Status to be monitor**
898 )))
899 )))
900
901 (((
902 (((
903 Keep Status = 1: Monitor Close to Open event
904 )))
905 )))
906
907 (((
908 (((
909 Keep Status = 0: Monitor Open to Close event
910 )))
911 )))
912
913 (((
914 (((
915 (% style="color:#4f81bd" %)**2. Keep Time: Timeout to send an Alarm**
916 )))
917 )))
918
919 (((
920 (((
921 Range 0 ~~ 65535(0xFFFF) seconds.
922 )))
923 )))
924
925 (((
926 (((
927 If keep time = 0, Disable Alarm Base on Timeout feature.
928 )))
929 )))
930
931 (((
932 (((
933 If keep time > 0, device will monitor the keep status event and send an alarm when status doesn’t change after timeout.
934 )))
935
936 (((
937
938 )))
939 )))
940
941 (((
942 (((
943 (% style="color:#4f81bd" %)**AT Command**(%%) to configure:
944 )))
945
946 (((
947 (% style="color:blue" %)**AT+TTRIG=1,30**(%%)  ~-~-> When the **Keep Status** change from connect to disconnect, and device remains in disconnect status for more than 30 seconds. CPL01 will send an uplink packet, the [[Alarm bit>>||anchor="H2.3.3Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]] (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1.
948 )))
949
950 (((
951 (% style="color:blue" %)**AT+TTIG=0,0 **(%%) ~-~-> Default Value, disable timeout Alarm.
952 )))
953 )))
954
955 (((
956
957 )))
958
959 (((
960 (((
961 (% style="color:#4f81bd" %)**Downlink Command**(%%) to configure:
962 )))
963
964 (((
965 **Command: 0xA9 aa bb cc**
966 )))
967 )))
968
969 (((
970 (((
971 A9: Command Type Code
972 )))
973 )))
974
975 (((
976 (((
977 aa: status to be monitored
978 )))
979 )))
980
981 (((
982 (((
983 bb cc: timeout.
984 )))
985 )))
986
987 (((
988
989 )))
990
991 (((
992 (((
993 If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30
994 )))
995 )))
996
997 (((
998 (((
999 Or
1000 )))
1001 )))
1002
1003 (((
1004 (((
1005 0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.
1006 )))
1007 )))
1008
1009
1010 == 3.6 Clear Flash Record ==
1011
1012 Feature: Clear flash storage for data log feature.
1013
1014 (% style="color:#4f81bd" %)**AT Command: AT+CLRDTA**
1015
1016 [[image:image-20220609151132-7.png]]
1017
1018
1019 (((
1020 (((
1021 (% style="color:#4f81bd" %)**Downlink Command:**
1022 )))
1023
1024 (((
1025 * **Example**: 0xA301 ~/~/Same as AT+CLRDTA
1026 )))
1027 )))
1028
1029
1030
1031 == 3.7 Set the sensor mode ==
1032
1033 Feature: LDS03A and CPL01 use the same firmware. User is possible to switch between this two models.
1034
1035 (% style="color:#4f81bd" %)**AT Command: AT+MOD**
1036
1037 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:443.222px" %)
1038 |=(% style="width: 156px;" %)**Command Example**|=(% style="width: 195px;" %)**Function**|=(% style="width: 88px;" %)**Response**
1039 |(% style="width:156px" %)AT+MOD =1|(% style="width:195px" %)Set the sensor to LDS03A.|(% style="width:88px" %)OK
1040 |(% style="width:156px" %)AT+MOD=2|(% style="width:195px" %)Set the sensor to CPL01.|(% style="width:88px" %)OK
1041
1042 (% style="color:#4f81bd" %)**Downlink Command:**
1043
1044 * **Example**: 0x0A02 ~/~/Same as AT+MOD=2
1045
1046
1047
1048
1049
1050 == 3.8 Set trigger mode ==
1051
1052 Feature: Set the trigger interrupt mode.
1053
1054 (% style="color:#4f81bd" %)**AT Command: AT+TTRMOD**
1055
1056 [[image:image-20220609151344-9.png]]
1057
1058
1059 (% style="color:#4f81bd" %)**Downlink Command:**
1060
1061 * **Example**: 0xA401 ~/~/Same as AT+ TTRMOD =1
1062
1063
1064
1065
1066
1067 == 3.9 Set the calculate flag ==
1068
1069 Feature: Set the calculate flag
1070
1071 (% style="color:#4f81bd" %)**AT Command: AT+CALCFLAG**
1072
1073 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:461.222px" %)
1074 |=(% style="width: 158px;" %)**Command Example**|=(% style="width: 192px;" %)**Function**|=(% style="width: 109px;" %)**Response**
1075 |(% style="width:158px" %)AT+CALCFLAG =1|(% style="width:192px" %)Set the calculate flag to 1.|(% style="width:109px" %)OK
1076 |(% style="width:158px" %)AT+CALCFLAG =2|(% style="width:192px" %)Set the calculate flag to 2.|(% style="width:109px" %)OK
1077
1078 (% style="color:#4f81bd" %)**Downlink Command:**
1079
1080 * **Example**: 0XA501 ~/~/Same as AT+CALCFLAG =1
1081
1082
1083
1084
1085
1086 == 3.10 Set count number ==
1087
1088 Feature: Manually set the count number
1089
1090 (% style="color:#4f81bd" %)**AT Command: AT+SETCNT**
1091
1092 (% border="1" cellspacing="10" style="background-color:#ffffcc; color:green; width:479.989px" %)
1093 |=(% style="width: 160px;" %)**Command Example**|=(% style="width: 221px;" %)**Function**|=(% style="width: 95px;" %)**Response**
1094 |(% style="width:160px" %)AT+ SETCNT =0|(% style="width:221px" %)Set the count number to 0.|(% style="width:95px" %)OK
1095 |(% style="width:160px" %)AT+ SETCNT =100|(% style="width:221px" %)Set the count number to 100.|(% style="width:95px" %)OK
1096
1097 (% style="color:#4f81bd" %)**Downlink Command:**
1098
1099 1. **Example**: 0xA6000001 ~/~/Same as AT+ SETCNT =1;
1100 1. **Example**: 0xA6000064 ~/~/Same as AT+ SETCNT =100
1101
1102
1103
1104
1105
1106 = 4. Battery & how to replace =
1107
1108 == 4.1 Battery Info ==
1109
1110 CPL01 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.
1111
1112 (((
1113 The battery-related documents are as below:
1114 )))
1115
1116 * (((
1117 [[Battery Dimension>>url:http://www.dragino.com/downloads/index.php?dir=datasheet/Battery/&file=LSN50-Battery-Dimension.pdf]],
1118 )))
1119 * (((
1120 [[Lithium-Thionyl Chloride Battery  datasheet>>https://www.dragino.com/downloads/downloads/datasheet/Battery/ER26500/ER26500_Datasheet-EN.pdf]],
1121 )))
1122 * (((
1123 [[Lithium-ion Battery-Capacitor datasheet>>url:http://www.dragino.com/downloads/downloads/datasheet/Battery/SPC_1520_datasheet.jpg]], [[Tech Spec>>url:http://www.dragino.com/downloads/downloads/datasheet/Battery/SPC1520%20Technical%20Specification20171123.pdf]]
1124 )))
1125
1126 (((
1127 The discharge curve is not linear so can’t simply use percentage to show the battery level. Below is the battery performance.
1128
1129 [[image:1652864571107-510.png]]
1130 )))
1131
1132 (((
1133 Minimum Working Voltage for the CPL01:
1134 )))
1135
1136 (((
1137 CPL01:  2.45v ~~ 3.6v
1138 )))
1139
1140
1141 === 4.1.1 ​Battery Note ===
1142
1143 (((
1144 The Li-SICO battery is designed for small current / long period applications. 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 to transmit LoRa, then the battery life may be decreased.
1145 )))
1146
1147
1148 == 4.2 Replace Battery ==
1149
1150 (((
1151 (((
1152 Any battery with a range of 2.45 ~~ 3.6v can be a replacement. We recommend using Li-SOCl2 Battery.
1153 )))
1154 )))
1155
1156 (((
1157 (((
1158 And make sure the positive and negative pins match.
1159 )))
1160 )))
1161
1162 [[image:image-20220518170657-2.png]]
1163
1164
1165 == 4.3 Battery Life Analyze ==
1166
1167 (((
1168 (((
1169 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:
1170 )))
1171 )))
1172
1173 (((
1174 (((
1175 [[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]]
1176 )))
1177 )))
1178
1179
1180 = 5. FAQ =
1181
1182 == 5.1 How to use AT Command to configure CPL01 ==
1183
1184 CPL01 UART connection photo
1185
1186 [[image:1652864909750-855.png||height="356" width="728"]]
1187
1188
1189 (((
1190 In the PC, you need to set the serial baud rate to (% style="color:green" %)**9600**(%%) to access the serial console for LSN50. LSN50 will output system info once power on as below:
1191 )))
1192
1193 [[image:1652864915792-686.png||height="508" width="726"]]
1194
1195
1196 == 5.2 How to upgrade the firmware? ==
1197
1198 (((
1199 (((
1200 A new firmware might be available for:
1201 )))
1202 )))
1203
1204 * (((
1205 (((
1206 Support new features
1207 )))
1208 )))
1209 * (((
1210 (((
1211 For bug fix
1212 )))
1213 )))
1214 * (((
1215 (((
1216 Change LoRaWAN bands.
1217 )))
1218 )))
1219
1220 (((
1221 (((
1222 Instruction for how to upgrade: [[Firmware Upgrade Instruction>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome||anchor="H2.HardwareUpgradeMethodSupportList"]]
1223 )))
1224 )))
1225
1226 (((
1227 (((
1228 Firmware location: (same firmware as LDS03A)[[https:~~/~~/www.dragino.com/downloads/index.php?dir=LoRa_End_Node/CPL01/Firmware/>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/CPL01/Firmware/]]
1229 )))
1230 )))
1231
1232
1233 == 5.3 How to change the LoRa Frequency Bands/Region? ==
1234
1235 Users can follow the introduction for how to upgrade image. When downloading the images, choose the required image file for download.
1236
1237
1238 = 6. Trouble Shooting =
1239
1240 == 6.1  AT Commands input doesn’t work ==
1241
1242 In the case if user can see the console output but can’t type input to the device. Please check if you already include the (% style="color:green" %)**ENTER**(%%) while sending out the command. Some serial tool doesn’t send (% style="color:green" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string.
1243
1244
1245 = 7. Order Info =
1246
1247 (((
1248 (((
1249 Part Number: (% style="color:#4f81bd" %)**CPL01-XX**
1250 )))
1251 )))
1252
1253 (((
1254 (((
1255 (% style="color:#4f81bd" %)**XX**(%%): The default frequency band
1256 )))
1257 )))
1258
1259 * (((
1260 (% style="color:red" %)**AS923 **(%%)**:** LoRaWAN AS923 band
1261 )))
1262 * (((
1263 (% style="color:red" %)**AU915 **(%%)**: **LoRaWAN AU915 band
1264 )))
1265 * (((
1266 (% style="color:red" %)**EU433 **(%%)**:** LoRaWAN EU433 band
1267 )))
1268 * (((
1269 (% style="color:red" %)**EU868 **(%%)**:** LoRaWAN EU868 band
1270 )))
1271 * (((
1272 (% style="color:red" %)**KR920 **(%%)**:** LoRaWAN KR920 band
1273 )))
1274 * (((
1275 (% style="color:red" %)**US915 **(%%)**: **LoRaWAN US915 band
1276 )))
1277 * (((
1278 (% style="color:red" %)**IN865 **(%%)**:  **LoRaWAN IN865 band
1279 )))
1280 * (((
1281 (% style="color:red" %)**CN470 **(%%)**: **LoRaWAN CN470 band
1282
1283
1284 )))
1285
1286 = 8. Packing Info =
1287
1288 (((
1289 **Package Includes**:
1290 )))
1291
1292 * (((
1293 CPL01 Open/Close Sensor x 1
1294
1295
1296 )))
1297
1298 = 9. Support =
1299
1300 * (((
1301 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.
1302 )))
1303 * (((
1304 Provide as much information as possible regarding your inquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].
1305 )))
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0