<
From version < 67.9 >
edited by Xiaoling
on 2023/05/31 12:00
To version < 67.5 >
edited by Xiaoling
on 2023/05/31 11:27
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -17,22 +17,26 @@
17 17  
18 18  = 1. Introduction =
19 19  
20 -== 1.1 What is LoRaWAN Soil pH Sensor ==
20 +== 1.1 What is CPL03-LB LoRaWAN Pulse/Contact Sensor ==
21 21  
22 22  
23 -The Dragino SPH01-LB is a (% style="color:blue" %)**LoRaWAN Soil pH Sensor**(%%) for IoT of Agriculture. It is designed to measure the soil PH and soil temperature, so to send to the platform to analyze the soil acid or alkali level. The probe is IP68 waterproof.
23 +The Dragino CPL03-LB is a (% style="color:blue" %)**LoRaWAN Contact Sensor**(%%) for Internet of Things solution. It detects dry contact status, open time, open counts, and then upload to IoT server via LoRaWAN wireless protocol.
24 24  
25 -SPH01-LB probe is made by Solid AgCl reference electrode and Pure metal pH sensitive electrode. It can detect(% style="color:blue" %) **soil's pH **(%%)with high accuracy and stable value. The SPH01-LB probe can be buried into soil for long time use.
25 +The CPL03-LB 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.
26 26  
27 -The LoRa wireless technology used in SPH01-LB allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
27 +The LoRa wireless technology used in CPL03-LB allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
28 28  
29 -SPH01-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
29 +CPL03-LB (% style="color:blue" %)**supports open alarm feature**(%%), user can set open alarm for instant notice. CPL03-LB (% style="color:blue" %)**supports Datalog feature**(%%), it can save the data when there is no LoRaWAN network and uplink when network recover.
30 30  
31 -SPH01-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
31 +CPL03-LB is designed for outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
32 32  
33 -Each SPH01-LB is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.
33 +CPL03-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
34 34  
35 +CPL03-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
35 35  
37 +Each CPL03-LB is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.
38 +
39 +
36 36  [[image:image-20230530180339-1.png||height="408" width="806"]]
37 37  
38 38  
... ... @@ -42,15 +42,14 @@
42 42  * LoRaWAN 1.0.3 Class A
43 43  * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
44 44  * Ultra-low power consumption
45 -* Monitor soil pH with temperature compensation.
46 -* Monitor soil temperature
47 -* Monitor Battery Level
48 -* Support pH calibration by end user
49 +* Open/Close detect
50 +* Open/Close statistics
51 +* Temperature & Humidity alarm
52 +* supports open alarm feature
53 +* supports Datalog feature
49 49  * Support Bluetooth v5.1 and LoRaWAN remote configure
50 50  * Support wireless OTA update firmware
51 -* IP66 Waterproof Enclosure
52 -* IP68 rate for the Sensor Probe
53 -* AT Commands to change parameters
56 +* Uplink on periodically and open/close event
54 54  * Downlink to change configure
55 55  * 8500mAh Battery for long term use
56 56  
... ... @@ -57,36 +57,19 @@
57 57  == 1.3 Specification ==
58 58  
59 59  
60 -(% style="color:blue" %)**Common DC Characteristics:**
63 +(% style="color:#037691" %)**Common DC Characteristics:**
61 61  
62 62  * Supply Voltage: built in 8500mAh Li-SOCI2 battery , 2.5v ~~ 3.6v
63 63  * Operating Temperature: -40 ~~ 85°C
64 64  
65 -(% style="color:blue" %)**Soil pH:**
68 +(% style="color:#037691" %)**LoRa Spec:**
66 66  
67 -* Range: 3 ~~ 10 pH
68 -* Resolution: 0.01 pH
69 -* Accuracy: ±2% under (0~~50 ℃, Accuracy will poor under 0 due to frozen)
70 -* Temperature Compensation Range: 0 ~~ 50℃
71 -* IP68 Protection
72 -* Length: 3.5 meters
73 -
74 -(% style="color:blue" %)**Soil Temperature:**
75 -
76 -* Range -40℃~85℃
77 -* Resolution: 0.1℃
78 -* Accuracy: <±0.5℃(-10℃~40℃),<±0.8℃ (others)
79 -* IP68 Protection
80 -* Length: 3.5 meters
81 -
82 -(% style="color:blue" %)**LoRa Spec:**
83 -
84 84  * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
85 85  * Max +22 dBm constant RF output vs.
86 86  * RX sensitivity: down to -139 dBm.
87 87  * Excellent blocking immunity
88 88  
89 -(% style="color:blue" %)**Battery:**
75 +(% style="color:#037691" %)**Battery:**
90 90  
91 91  * Li/SOCI2 un-chargeable battery
92 92  * Capacity: 8500mAh
... ... @@ -94,7 +94,7 @@
94 94  * Max continuously current: 130mA
95 95  * Max boost current: 2A, 1 second
96 96  
97 -(% style="color:blue" %)**Power Consumption**
83 +(% style="color:#037691" %)**Power Consumption**
98 98  
99 99  * Sleep Mode: 5uA @ 3.3v
100 100  * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
... ... @@ -102,7 +102,9 @@
102 102  == 1.4 Applications ==
103 103  
104 104  
105 -* Smart Agriculture
91 +* Open/Close Detection
92 +* Pulse meter application
93 +* Dry Contact Detection
106 106  
107 107  == 1.5 Sleep mode and working mode ==
108 108  
... ... @@ -134,7 +134,7 @@
134 134  == 1.7 BLE connection ==
135 135  
136 136  
137 -SPH01-LB support BLE remote configure.
125 +CPL03-LB support BLE remote configure.
138 138  
139 139  
140 140  BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:
... ... @@ -225,127 +225,451 @@
225 225  
226 226  == 2.3 ​Uplink Payload ==
227 227  
216 +=== 2.3.1 Device Status, FPORT~=5 ===
228 228  
218 +
219 +Users can use the downlink command(**0x26 01**) to ask CPL03-LB to send device configure detail, include device configure status. CPL03-LB will uplink a payload via FPort=5 to server.
220 +
221 +The Payload format is as below.
222 +
223 +
224 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
225 +|(% colspan="6" style="background-color:#d9e2f3; color:#0070c0" %)**Device Status (FPORT=5)**
226 +|(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:44px" %)**2**
227 +|(% style="width:103px" %)**Value**|(% style="width:72px" %)Sensor Model|Firmware Version|(% style="width:91px" %)Frequency Band|(% style="width:86px" %)Sub-band|(% style="width:44px" %)BAT
228 +
229 +Example parse in TTNv3
230 +
231 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652859749264-179.png?width=723&height=275&rev=1.1||alt="1652859749264-179.png"]]
232 +
233 +
234 +(% style="color:#037691" %)**Sensor Model**(%%): For CPL03-LB, this value is 0x0A
235 +
236 +(% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
237 +
238 +(% style="color:#037691" %)**Frequency Band**:
239 +
240 +*0x01: EU868
241 +
242 +*0x02: US915
243 +
244 +*0x03: IN865
245 +
246 +*0x04: AU915
247 +
248 +*0x05: KZ865
249 +
250 +*0x06: RU864
251 +
252 +*0x07: AS923
253 +
254 +*0x08: AS923-1
255 +
256 +*0x09: AS923-2
257 +
258 +*0x0a: AS923-3
259 +
260 +*0x0b: CN470
261 +
262 +*0x0c: EU433
263 +
264 +*0x0d: KR920
265 +
266 +*0x0e: MA869
267 +
268 +
269 +(% style="color:#037691" %)**Sub-Band**:
270 +
271 +AU915 and US915:value 0x00 ~~ 0x08
272 +
273 +CN470: value 0x0B ~~ 0x0C
274 +
275 +Other Bands: Always 0x00
276 +
277 +
278 +(% style="color:#037691" %)**Battery Info**:
279 +
280 +Check the battery voltage.
281 +
282 +Ex1: 0x0B45 = 2885mV
283 +
284 +Ex2: 0x0B49 = 2889mV
285 +
286 +
287 +=== 2.3.2 Sensor Configuration, FPORT~=4 ===
288 +
289 +
290 +CPL03-LB will only send this command after getting the downlink command (0x26 02) from the server.
291 +
292 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
293 +|(% colspan="6" style="background-color:#d9e2f3; color:#0070c0; width:504px" %)**Sensor Configuration FPORT=4**
294 +|**Size(bytes)**|(% style="width:75px" %)**3**|(% style="width:77px" %)**1**|(% style="width:96px" %)**1**|(% style="width:158px" %)**2**|(% style="width:158px" %)**1**
295 +|**Value**|(% style="width:75px" %)TDC (unit:sec)|(% style="width:77px" %)Disalarm|(% style="width:96px" %)Keep status|(% style="width:158px" %)Keep time (unit: sec)|(% style="width:158px" %)Trigger mode
296 +
297 +* (((
298 +(% style="color:#037691" %)** TDC: (default: 0x001C20)**
299 +)))
300 +
229 229  (((
230 -LSPH01 will uplink payload via LoRaWAN with below payload format: 
302 +Uplink interval for the total pulse count, default value is 0x001C20 which is 7200 seconds = 2 hours.
303 +
304 +
231 231  )))
232 232  
307 +* (((
308 +(% style="color:#037691" %)** Disalarm: (default: 0)**
309 +)))
310 +
233 233  (((
234 -Uplink payload includes in total 11 bytes.
312 +(% style="color:blue" %)** If Disalarm = 1**(%%), CPL03-LB 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.
235 235  )))
236 236  
237 237  (((
238 -Normal uplink payload:
316 +(% style="color:blue" %)** If Disalarm = 0**(%%), CPL03-LB will send uplink at every TDC periodically.
317 +
318 +
239 239  )))
240 240  
241 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:470px" %)
242 -|=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)(((
243 -**Size(bytes)**
244 -)))|=(% style="width: 30px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 70px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 70px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 80px;background-color:#D9E2F3;color:#0070C0" %)**1**
245 -|(% style="width:62.5px" %)**Value**|(% style="width:62.5px" %)[[BAT>>||anchor="H2.3.1BatteryInfo"]]|(% style="width:62.5px" %)(((
246 -[[Temperature (Optional)>>||anchor="H2.3.2DS18B20Temperaturesensor"]]
247 -)))|[[Soil pH>>||anchor="H2.3.3SoilpH"]]|[[Soil Temperature>>||anchor="H2.3.4SoilTemperature"]]|(((
248 -[[Digital Interrupt (Optional)>>||anchor="H2.3.5InterruptPin"]]
249 -)))|Reserve|(((
250 -[[Message Type>>||anchor="H2.3.6MessageType"]]
321 +* (((
322 +(% style="color:#037691" %)** Keep Status & Keep Time**
251 251  )))
252 252  
253 -[[image:1654592721645-318.png]]
325 +(((
326 +Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H3.3.5AlarmBaseonTimeout"]]
254 254  
328 +
329 +)))
255 255  
256 -=== 2.3.1 Battery Info ===
331 +* (((
332 +(% style="color:#037691" %)** Trigger mode (default: 0)**
333 +)))
257 257  
335 +(((
336 +(% style="color:blue" %)** If Trigger mode = 0**(%%), count close to open event.
337 +)))
258 258  
259 -Check the battery voltage for LSPH01.
339 +(((
340 +(% style="color:blue" %)** If Trigger mode = 1**(%%), count open to close event.
341 +)))
260 260  
261 -Ex1: 0x0B45 = 2885mV
343 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652860064987-743.png?width=730&height=152&rev=1.1||alt="1652860064987-743.png"]]
262 262  
263 -Ex2: 0x0B49 = 2889mV
264 264  
346 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652860079526-831.png?width=729&height=209&rev=1.1||alt="1652860079526-831.png"]]
265 265  
266 -=== 2.3.2 DS18B20 Temperature sensor ===
267 267  
349 +=== 2.3.3 Real-Time Open/Close Status, Uplink FPORT~=2 ===
268 268  
269 -This is optional, user can connect external DS18B20 sensor to the +3.3v, 1-wire and GND pin . and this field will report temperature.
270 270  
352 +(((
353 +(((
354 +CPL03-LB will send this uplink **after** Device Status once join the LoRaWAN network successfully. And CPL03-LB will:
355 +)))
356 +)))
271 271  
272 -**Example**:
358 +(((
359 +(((
360 +periodically send this uplink every 2 hours, this interval [[can be changed>>||anchor="H3.3.1SetTransmitIntervalTime"]].
361 +)))
362 +)))
273 273  
274 -If payload is: 0105H:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
364 +(((
365 +(((
366 +Uplink Payload totals 11 bytes.
367 +)))
368 +)))
275 275  
276 -If payload is: FF3FH :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
370 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
371 +|=(% colspan="5" style="background-color:#D9E2F3;color:#0070C0; width: 520px;" %)**Real-Time Open/Close Status, FPORT=2**
372 +|(% style="width:60px" %)**Size(bytes)**|(% style="width:65px" %)**1**|(% style="width:65px" %)**3**|(% style="width:240px" %)**3**|(% style="width:90px" %)**4**
373 +|(% style="width:101px" %)**Value**|(% style="width:133px" %)Status & [[Alarm>>||anchor="H3.3.5AlarmBaseonTimeout"]]|(% style="width:92px" %)Total pulse|(% style="width:247px" %)The last open duration (unit: min)|(% style="width:149px" %)[[Unix TimeStamp>>||anchor="H2.5.2UnixTimeStamp"]]
277 277  
375 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:504px" %)
376 +|=(% colspan="4" style="background-color:#D9E2F3;color:#0070C0; width: 502px;" %)**Status & Alarm field**
377 +|(% style="width:60px" %)**Size(bit)**|(% style="width:70px" %)**6**|(% style="width:228px" %)**1**|(% style="width:146px" %)**1**
378 +|(% style="width:76px" %)Value|(% style="width:80px" %)Calculate Flag|(% style="width:208px" %)Alarm: 0: No Alarm; 1: Alarm|(% style="width:136px" %)Contact Status: 0: Open, 1: Close
278 278  
279 -=== 2.3.3 Soil pH ===
380 +* (((
381 +(% style="color:#037691" %)** Calculate Flag**
382 +)))
280 280  
384 +(((
385 +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.
386 +)))
281 281  
282 -Range: 0 ~~ 14 pH
388 +(((
389 +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.
390 +)))
283 283  
284 -**Example:**
392 +(((
393 +Default value: 0. 
394 +)))
285 285  
286 -(% style="color:#037691" %)** 0x02B7(H) = 695(D) = 6.95pH**
396 +(((
397 +Range (6 bits): (b)000000 ~~ (b) 111111
398 +)))
287 287  
400 +(((
401 +Refer: [[Set Calculate Flag>>||anchor="H3.3.8Setthecalculateflag"]]
288 288  
289 -=== 2.3.4 Soil Temperature ===
403 +
404 +)))
290 290  
406 +* (((
407 +(% style="color:#037691" %)** Alarm**
408 +)))
291 291  
292 -Get Soil Temperature 
410 +(((
411 +See [[Alarm Base on Timeout>>||anchor="H3.3.5AlarmBaseonTimeout"]]
293 293  
413 +
414 +)))
294 294  
295 -**Example**:
416 +* (((
417 +(% style="color:#037691" %)** Contact Status**
418 +)))
296 296  
297 -If payload is: **0105H**:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
420 +(((
421 +0: Open
422 +)))
298 298  
299 -If payload is: **FF3FH** :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
424 +(((
425 +1: Close
300 300  
427 +
428 +)))
301 301  
302 -=== 2.3.5 Interrupt Pin ===
430 +* (((
431 +(% style="color:#037691" %)** Total pulse**
432 +)))
303 303  
434 +(((
435 +Total pulse/counting base on dry [[contact trigger event>>||anchor="H2.3.2SensorConfiguration2CFPORT3D4"]]
436 +)))
304 304  
305 -This data field shows if this packet is generated by interrupt or not. [[Click here>>||anchor="H3.2SetInterruptMode"]] for the hardware and software set up.
438 +(((
439 +Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
306 306  
441 +
442 +)))
307 307  
308 -**Example:**
444 +* (((
445 +(% style="color:#037691" %)** The last open duration**
446 +)))
309 309  
310 -0x00: Normal uplink packet.
448 +(((
449 +Dry Contact last open duration.
450 +)))
311 311  
312 -0x01: Interrupt Uplink Packet.
452 +(((
453 +Unit: min.
454 +)))
313 313  
456 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652860403792-491.png?width=735&height=153&rev=1.1||alt="1652860403792-491.png"]]
314 314  
315 -=== 2.3.6 Message Type ===
316 316  
459 +=== 2.3.4 Real-Time Open/Close Status, 3 pulse mode, Uplink FPORT~=6 ===
317 317  
461 +
462 +(% style="color:red" %)**Note:**
463 +
464 +* Firmware support for this mode is not released. If users want to test, please contact Dragino support.
465 +* Users need to run (% style="color:blue" %)**AT+MOD=3**(%%) to support this model after updating the firmware.
466 +* This mode doesn't support Historical Events and Datalog features.
467 +
468 +(% style="color:blue" %)**CPL03-LB 3 Pulse Wiring:**
469 +
470 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/image-20221013153352-1.png?width=720&height=628&rev=1.1||alt="image-20221013153352-1.png"]]
471 +
472 +
473 +(% style="color:blue" %)**Payload:**
474 +
475 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/image-20221013153352-2.png?width=1215&height=167&rev=1.1||alt="image-20221013153352-2.png"]]
476 +
477 +
478 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:447px" %)
479 +|(% style="background-color:#d9e2f3; color:#0070c0; width:95px" %)**Size(bytes)**|(% style="background-color:#d9e2f3; color:#0070c0; width:61px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:98px" %)**3**|(% style="background-color:#d9e2f3; color:#0070c0; width:98px" %)**3**|(% style="background-color:#d9e2f3; color:#0070c0; width:95px" %)**3**
480 +|(% style="width:93px" %)Value|(% style="width:59px" %)Status|(% style="width:98px" %)(((
481 +Port1 Total Pulse(PB14)
482 +)))|(% style="width:96px" %)(((
483 +Port2 Total Pulse(PB15)
484 +)))|(% style="width:94px" %)(((
485 +Port3 Total Pulse(PA4)
486 +)))
487 +
488 +(% style="color:blue" %)**Status:**
489 +
490 +(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:257px" %)
491 +|(% style="background-color:#d9e2f3; color:#0070c0; width:75px" %)**Size(bit)**|(% style="background-color:#d9e2f3; color:#0070c0; width:112px" %)**6**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**2**
492 +|(% style="width:75px" %)Value|(% style="width:111px" %)Calculate Flag|(% style="width:68px" %)Reserve
493 +
494 +(% style="color:red" %)**Max COUNT for each port is 16777215. Exceed this number will reset to 1.**
495 +
496 +
497 +(% style="color:blue" %)**Related AT Command:**
498 +
499 +(% style="color:#037691" %)**AT+TTRMOD1:  Port1 count mode;  0: Signal falling edge(Default), 1: Signal raising edge**
500 +
501 + AT+TTRMOD1=0  Downlink Command: 0xA4 01 00
502 +
503 + AT+TTRMOD1=1  Downlink Command: 0xA4 01 01
504 +
505 +
506 +(% style="color:#037691" %)**AT+TTRMOD2:  Port2 count mode;  0: Signal falling edge(Default), 1: Signal raising edge**
507 +
508 + AT+TTRMOD1=0  Downlink Command: 0xA4 02 00
509 +
510 + AT+TTRMOD1=1  Downlink Command: 0xA4 02 01
511 +
512 +
513 +(% style="color:#037691" %)**AT+TTRMOD3:  Port3 count mode;  0: Signal falling edge(Default), 1: Signal raising edge**
514 +
515 + AT+TTRMOD1=0  Downlink Command: 0xA4 03 00
516 +
517 + AT+TTRMOD1=1  Downlink Command: 0xA4 03 01
518 +
519 +
520 +(% style="color:#037691" %)**AT+CALCFLAG:  Calculate Flag ( Default : 0 )**
521 +
522 + AT+CALCFLAG=aa
523 +
524 +
525 +(% style="color:blue" %)**Downlink Command: 0xA5 aa**
526 +
527 +(% style="color:#037691" %)**AT+COUNTMOD:  Accumulative Mode;  0: Accumulative (Default),1: Reset after uplink.**
528 +
529 + AT+COUNTMOD=0 Downlink Command: 0x0B 00
530 +
531 + AT+COUNTMOD=1 Downlink Command: 0x0B 01
532 +
533 +
534 +(% style="color:#037691" %)**AT+SETCNT:  Set count value**
535 +
536 + AT+SETCNT=1,aa  Downlink Command: 0xA6 01 aa aa aa
537 +
538 + AT+SETCNT=2,aa  Downlink Command: 0xA6 02 aa aa aa
539 +
540 + AT+SETCNT=3,aa  Downlink Command: 0xA6 03 aa aa aa
541 +
542 +
543 +(% style="color:blue" %)**Decode:  **(%%)[[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
544 +
545 +
546 +=== 2.3.5 Historical Door Open/Close Event, FPORT~=3 ===
547 +
548 +
318 318  (((
319 -For a normal uplink payload, the message type is always 0x01.
550 +CPL03-LB stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.5DatalogFeature"]].
320 320  )))
321 321  
322 322  (((
323 -Valid Message Type:
554 +The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
324 324  )))
325 325  
557 +* (((
558 +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, CPL03-LB will send max bytes according to the current DR and Frequency bands.
559 +)))
326 326  
327 -(% border="1" cellspacing="5" style="background-color:#f2f2f2; width:496px" %)
328 -|=(% style="width: 160px;background-color:#D9E2F3;color:#0070C0" %)**Message Type Code**|=(% style="width: 163px;background-color:#D9E2F3;color:#0070C0" %)**Description**|=(% style="width: 173px;background-color:#D9E2F3;color:#0070C0" %)**Payload**
329 -|(% style="width:160px" %)0x01|(% style="width:163px" %)Normal Uplink|(% style="width:173px" %)[[Normal Uplink Payload>>||anchor="H2.3200BUplinkPayload"]]
330 -|(% style="width:160px" %)0x02|(% style="width:163px" %)Reply configures info|(% style="width:173px" %)[[Configure Info Payload>>||anchor="H3.4GetFirmwareVersionInfo"]]
331 -|(% style="width:160px" %)0x03|(% style="width:163px" %)Reply Calibration Info|(% style="width:173px" %)[[Calibration Payload>>||anchor="H2.7Calibration"]]
561 +(((
562 +For example, in the US915 band, the max payload for different DR is:
563 +)))
332 332  
333 -=== 2.3.7 Decode payload in The Things Network ===
565 +(((
566 +a) (% style="color:blue" %)**DR0**(%%): max is 11 bytes so one entry of data
567 +)))
334 334  
569 +(((
570 +b) (% style="color:blue" %)**DR1**(%%): max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
571 +)))
335 335  
336 -While using TTN network, you can add the payload format to decode the payload.
573 +(((
574 +c) (% style="color:blue" %)**DR2**(%%): total payload includes 11 entries of data
575 +)))
337 337  
577 +(((
578 +d) (% style="color:blue" %)**DR3**(%%): total payload includes 22 entries of data.
579 +)))
338 338  
339 -[[image:1654592762713-715.png]]
581 +(((
582 +If CPL03-LB doesn't have any data in the polling time. It will uplink 11 bytes of 0
340 340  
584 +
585 +)))
586 +
587 +(% style="color:blue" %)** Downlink:**
588 +
589 +(% class="box" %)
341 341  (((
342 -The payload decoder function for TTN is here:
591 +**0x31 61 E9 3A D4 61 E9 3D E0 05**
343 343  )))
344 344  
594 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652861353248-624.png?width=720&height=189&rev=1.1||alt="1652861353248-624.png"]]
595 +
596 +
597 +(% style="color:blue" %)** Uplink:**
598 +
599 +(% class="box" %)
345 345  (((
346 -LSPH01 TTN Payload Decoder:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
601 +**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**
347 347  )))
348 348  
604 +(% style="color:#037691" %)** **
605 +
606 +(% style="color:#037691" %)**Parsed Value:**
607 +
608 +(((
609 +[ALARM, PIN_STATUS, TOTAL_PULSE, CALCULATE_FLAG, LAST_OPEN_DURATION, TIME]
610 +)))
611 +
612 +(((
613 +
614 +)))
615 +
616 +(((
617 +[TRUE, CLOSE, 9190, 3, 0, 2022-01-20 10:35:48],
618 +)))
619 +
620 +(((
621 +[TRUE, CLOSE, 9190, 3, 0, 2022-01-20 10:36:21],
622 +)))
623 +
624 +(((
625 +[FALSE, OPEN, 0, 3, 0, 2022-01-20 10:39:04],
626 +)))
627 +
628 +(((
629 +[TRUE, CLOSE, 2, 3, 0, 2022-01-20 10:39:16],
630 +)))
631 +
632 +(((
633 +[TRUE, CLOSE, 6, 3, 0, 2022-01-20 10:39:23],
634 +)))
635 +
636 +(((
637 +[FALSE, OPEN, 0, 0, 0, 2022-01-20 10:42:25],
638 +)))
639 +
640 +(((
641 +[FALSE, OPEN, 0, 0, 0, 2022-01-20 10:42:41],
642 +)))
643 +
644 +(((
645 +[FALSE, OPEN, 0, 3, 0, 2022-01-20 10:43:08],
646 +)))
647 +
648 +(((
649 +[TRUE, CLOSE, 7, 3, 0, 2022-01-20 10:43:34],
650 +)))
651 +
652 +(((
653 +[FALSE, CLOSE, 0, 0, 0, 2022-01-20 10:47:02],
654 +
655 +
656 +)))
657 +
658 +[[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652861480446-216.png?rev=1.1||alt="1652861480446-216.png"]]
659 +
660 +
349 349  == 2.4 Payload Decoder file ==
350 350  
351 351  
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0