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

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -SPH01-LB_LoRaWAN_Soil pH_Sensor_User_Manual
1 +SPH01-LB -- LoRaWAN Soil pH Sensor User Manual
Content
... ... @@ -17,26 +17,22 @@
17 17  
18 18  = 1. Introduction =
19 19  
20 -== 1.1 What is CPL03-LB LoRaWAN Pulse/Contact Sensor ==
20 +== 1.1 What is LoRaWAN Soil pH Sensor ==
21 21  
22 22  
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.
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.
24 24  
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.
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.
26 26  
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.
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.
28 28  
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.
29 +SPH01-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
30 30  
31 -CPL03-LB is designed for outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
31 +SPH01-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
32 32  
33 -CPL03-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
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.
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.
36 36  
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 -
40 40  [[image:image-20230530180339-1.png||height="408" width="806"]]
41 41  
42 42  
... ... @@ -46,14 +46,15 @@
46 46  * LoRaWAN 1.0.3 Class A
47 47  * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
48 48  * Ultra-low power consumption
49 -* Open/Close detect
50 -* Open/Close statistics
51 -* Temperature & Humidity alarm
52 -* supports open alarm feature
53 -* supports Datalog feature
45 +* Monitor soil pH with temperature compensation.
46 +* Monitor soil temperature
47 +* Monitor Battery Level
48 +* Support pH calibration by end user
54 54  * Support Bluetooth v5.1 and LoRaWAN remote configure
55 55  * Support wireless OTA update firmware
56 -* Uplink on periodically and open/close event
51 +* IP66 Waterproof Enclosure
52 +* IP68 rate for the Sensor Probe
53 +* AT Commands to change parameters
57 57  * Downlink to change configure
58 58  * 8500mAh Battery for long term use
59 59  
... ... @@ -60,19 +60,36 @@
60 60  == 1.3 Specification ==
61 61  
62 62  
63 -(% style="color:#037691" %)**Common DC Characteristics:**
60 +(% style="color:blue" %)**Common DC Characteristics:**
64 64  
65 65  * Supply Voltage: built in 8500mAh Li-SOCI2 battery , 2.5v ~~ 3.6v
66 66  * Operating Temperature: -40 ~~ 85°C
67 67  
68 -(% style="color:#037691" %)**LoRa Spec:**
65 +(% style="color:blue" %)**Soil pH:**
69 69  
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 +
70 70  * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
71 71  * Max +22 dBm constant RF output vs.
72 72  * RX sensitivity: down to -139 dBm.
73 73  * Excellent blocking immunity
74 74  
75 -(% style="color:#037691" %)**Battery:**
89 +(% style="color:blue" %)**Battery:**
76 76  
77 77  * Li/SOCI2 un-chargeable battery
78 78  * Capacity: 8500mAh
... ... @@ -80,7 +80,7 @@
80 80  * Max continuously current: 130mA
81 81  * Max boost current: 2A, 1 second
82 82  
83 -(% style="color:#037691" %)**Power Consumption**
97 +(% style="color:blue" %)**Power Consumption**
84 84  
85 85  * Sleep Mode: 5uA @ 3.3v
86 86  * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
... ... @@ -88,9 +88,7 @@
88 88  == 1.4 Applications ==
89 89  
90 90  
91 -* Open/Close Detection
92 -* Pulse meter application
93 -* Dry Contact Detection
105 +* Smart Agriculture
94 94  
95 95  == 1.5 Sleep mode and working mode ==
96 96  
... ... @@ -122,7 +122,7 @@
122 122  == 1.7 BLE connection ==
123 123  
124 124  
125 -CPL03-LB support BLE remote configure.
137 +SPH01-LB support BLE remote configure.
126 126  
127 127  
128 128  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:
... ... @@ -213,451 +213,127 @@
213 213  
214 214  == 2.3 ​Uplink Payload ==
215 215  
216 -=== 2.3.1 Device Status, FPORT~=5 ===
217 217  
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 -
301 301  (((
302 -Uplink interval for the total pulse count, default value is 0x001C20 which is 7200 seconds = 2 hours.
303 -
304 -
230 +LSPH01 will uplink payload via LoRaWAN with below payload format: 
305 305  )))
306 306  
307 -* (((
308 -(% style="color:#037691" %)** Disalarm: (default: 0)**
309 -)))
310 -
311 311  (((
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.
234 +Uplink payload includes in total 11 bytes.
313 313  )))
314 314  
315 315  (((
316 -(% style="color:blue" %)** If Disalarm = 0**(%%), CPL03-LB will send uplink at every TDC periodically.
317 -
318 -
238 +Normal uplink payload:
319 319  )))
320 320  
321 -* (((
322 -(% style="color:#037691" %)** Keep Status & Keep Time**
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"]]
323 323  )))
324 324  
325 -(((
326 -Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H3.3.5AlarmBaseonTimeout"]]
253 +[[image:1654592721645-318.png]]
327 327  
328 -
329 -)))
330 330  
331 -* (((
332 -(% style="color:#037691" %)** Trigger mode (default: 0)**
333 -)))
256 +=== 2.3.1 Battery Info ===
334 334  
335 -(((
336 -(% style="color:blue" %)** If Trigger mode = 0**(%%), count close to open event.
337 -)))
338 338  
339 -(((
340 -(% style="color:blue" %)** If Trigger mode = 1**(%%), count open to close event.
341 -)))
259 +Check the battery voltage for LSPH01.
342 342  
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"]]
261 +Ex1: 0x0B45 = 2885mV
344 344  
263 +Ex2: 0x0B49 = 2889mV
345 345  
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"]]
347 347  
266 +=== 2.3.2 DS18B20 Temperature sensor ===
348 348  
349 -=== 2.3.3 Real-Time Open/Close Status, Uplink FPORT~=2 ===
350 350  
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.
351 351  
352 -(((
353 -(((
354 -CPL03-LB will send this uplink **after** Device Status once join the LoRaWAN network successfully. And CPL03-LB will:
355 -)))
356 -)))
357 357  
358 -(((
359 -(((
360 -periodically send this uplink every 2 hours, this interval [[can be changed>>||anchor="H3.3.1SetTransmitIntervalTime"]].
361 -)))
362 -)))
272 +**Example**:
363 363  
364 -(((
365 -(((
366 -Uplink Payload totals 11 bytes.
367 -)))
368 -)))
274 +If payload is: 0105H:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
369 369  
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"]]
276 +If payload is: FF3FH :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
374 374  
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
379 379  
380 -* (((
381 -(% style="color:#037691" %)** Calculate Flag**
382 -)))
279 +=== 2.3.3 Soil pH ===
383 383  
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 -)))
387 387  
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 -)))
282 +Range: 0 ~~ 14 pH
391 391  
392 -(((
393 -Default value: 0. 
394 -)))
284 +**Example:**
395 395  
396 -(((
397 -Range (6 bits): (b)000000 ~~ (b) 111111
398 -)))
286 +(% style="color:#037691" %)** 0x02B7(H) = 695(D) = 6.95pH**
399 399  
400 -(((
401 -Refer: [[Set Calculate Flag>>||anchor="H3.3.8Setthecalculateflag"]]
402 402  
403 -
404 -)))
289 +=== 2.3.4 Soil Temperature ===
405 405  
406 -* (((
407 -(% style="color:#037691" %)** Alarm**
408 -)))
409 409  
410 -(((
411 -See [[Alarm Base on Timeout>>||anchor="H3.3.5AlarmBaseonTimeout"]]
292 +Get Soil Temperature 
412 412  
413 -
414 -)))
415 415  
416 -* (((
417 -(% style="color:#037691" %)** Contact Status**
418 -)))
295 +**Example**:
419 419  
420 -(((
421 -0: Open
422 -)))
297 +If payload is: **0105H**:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
423 423  
424 -(((
425 -1: Close
299 +If payload is: **FF3FH** :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
426 426  
427 -
428 -)))
429 429  
430 -* (((
431 -(% style="color:#037691" %)** Total pulse**
432 -)))
302 +=== 2.3.5 Interrupt Pin ===
433 433  
434 -(((
435 -Total pulse/counting base on dry [[contact trigger event>>||anchor="H2.3.2SensorConfiguration2CFPORT3D4"]]
436 -)))
437 437  
438 -(((
439 -Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
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.
440 440  
441 -
442 -)))
443 443  
444 -* (((
445 -(% style="color:#037691" %)** The last open duration**
446 -)))
308 +**Example:**
447 447  
448 -(((
449 -Dry Contact last open duration.
450 -)))
310 +0x00: Normal uplink packet.
451 451  
452 -(((
453 -Unit: min.
454 -)))
312 +0x01: Interrupt Uplink Packet.
455 455  
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"]]
457 457  
315 +=== 2.3.6 Message Type ===
458 458  
459 -=== 2.3.4 Real-Time Open/Close Status, 3 pulse mode, Uplink FPORT~=6 ===
460 460  
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 -
549 549  (((
550 -CPL03-LB stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.5DatalogFeature"]].
319 +For a normal uplink payload, the message type is always 0x01.
551 551  )))
552 552  
553 553  (((
554 -The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
323 +Valid Message Type:
555 555  )))
556 556  
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 -)))
560 560  
561 -(((
562 -For example, in the US915 band, the max payload for different DR is:
563 -)))
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"]]
564 564  
565 -(((
566 -a) (% style="color:blue" %)**DR0**(%%): max is 11 bytes so one entry of data
567 -)))
333 +=== 2.3.7 Decode payload in The Things Network ===
568 568  
569 -(((
570 -b) (% style="color:blue" %)**DR1**(%%): max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
571 -)))
572 572  
573 -(((
574 -c) (% style="color:blue" %)**DR2**(%%): total payload includes 11 entries of data
575 -)))
336 +While using TTN network, you can add the payload format to decode the payload.
576 576  
577 -(((
578 -d) (% style="color:blue" %)**DR3**(%%): total payload includes 22 entries of data.
579 -)))
580 580  
581 -(((
582 -If CPL03-LB doesn't have any data in the polling time. It will uplink 11 bytes of 0
339 +[[image:1654592762713-715.png]]
583 583  
584 -
585 -)))
586 -
587 -(% style="color:blue" %)** Downlink:**
588 -
589 -(% class="box" %)
590 590  (((
591 -**0x31 61 E9 3A D4 61 E9 3D E0 05**
342 +The payload decoder function for TTN is here:
592 592  )))
593 593  
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" %)
600 600  (((
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**
346 +LSPH01 TTN Payload Decoder:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
602 602  )))
603 603  
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 -
661 661  == 2.4 Payload Decoder file ==
662 662  
663 663  
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0