Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20230327104036-1.png||height="595" width="501"]]
3
4
5
6 **Table of Contents :**
7
8 {{toc/}}
9
10
11
12
13
14
15 = 1. Introduction =
16
17 == 1.1 What is LoRaWAN Analog Sensor ==
18
19
20 (((
21 The Dragino PS-LB-NA is a (% style="color:blue" %)**LoRaWAN Analog Sensor**(%%) for Internet of Things solution. PS-LB-NA has 5v and 12v output , 4~~20mA, 0~~30v input interface to power and get value from Analog Sensor. PS-LB-NA will convert the Analog Value to LoRaWAN wireless data and send to IoT platform via LoRaWAN gateway.
22 )))
23
24 (((
25 The LoRa wireless technology used in PS-LB-NA 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.
26 )))
27
28 (((
29 PS-LB-NA (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
30 )))
31
32 (((
33 PS-LB-NA is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
34 )))
35
36 (((
37 Each PS-LB-NA 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 [[image:image-20230401154854-1.png||height="426" width="876"]]
41
42
43 == 1.2 ​Features ==
44
45
46 * LoRaWAN 1.0.3 Class A
47 * Ultra-low power consumption
48 * 1 x 0~~20mA input , 1 x 0~~30v input
49 * 5v and 12v output to power external sensor
50 * Monitor Battery Level
51 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
52 * Support Bluetooth v5.1 and LoRaWAN remote configure
53 * Support wireless OTA update firmware
54 * Uplink on periodically
55 * Downlink to change configure
56 * 8500mAh Battery for long term use
57
58 == 1.3 Specification ==
59
60
61 (% style="color:#037691" %)**Micro Controller:**
62
63 * MCU: 48Mhz ARM
64 * Flash: 256KB
65 * RAM: 64KB
66
67 (% style="color:#037691" %)**Common DC Characteristics:**
68
69 * Supply Voltage: 2.5v ~~ 3.6v
70 * Operating Temperature: -40 ~~ 85°C
71
72 (% style="color:#037691" %)**LoRa Spec:**
73
74 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
75 * Max +22 dBm constant RF output vs.
76 * RX sensitivity: down to -139 dBm.
77 * Excellent blocking immunity
78
79 (% style="color:#037691" %)**Current Input (DC) Measuring :**
80
81 * Range: 0 ~~ 20mA
82 * Accuracy: 0.02mA
83 * Resolution: 0.001mA
84
85 (% style="color:#037691" %)**Voltage Input Measuring:**
86
87 * Range: 0 ~~ 30v
88 * Accuracy: 0.02v
89 * Resolution: 0.001v
90
91 (% style="color:#037691" %)**Battery:**
92
93 * Li/SOCI2 un-chargeable battery
94 * Capacity: 8500mAh
95 * Self-Discharge: <1% / Year @ 25°C
96 * Max continuously current: 130mA
97 * Max boost current: 2A, 1 second
98
99 (% style="color:#037691" %)**Power Consumption**
100
101 * Sleep Mode: 5uA @ 3.3v
102 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
103
104 == 1.4 Supported Extenal Sensors ==
105
106
107 (% class="wikigeneratedid" id="H1.6.1ThreadInstallationType" %)
108 PS-LB-NA can be used to power and connect to traditional industrial sensors and convert the sensor output signal to LoRaWAN signal. Below are some examples field as reference:
109
110 * (% style="color:#037691" %)**Pressure Sensor**(%%): level sensors, level probes and pressure transmitters.
111 * (% style="color:#037691" %)**Flow**(%%): flow of gases, liquids, or sludges.
112 * (% style="color:#037691" %)**Level**(%%):
113 * (% style="color:#037691" %)**Temperature/ Humidity**(%%): temperature probes, such as RTD temperature probes, thermocouples.
114 * (% style="color:#037691" %)**Liquid analysis**(%%): pH values, redox potential, electrolytic conductivity, ammonia, dissolved oxygen, turbidity, chlorine, and much more
115
116 (% style="color:blue" %)**Key point for external sensor:**
117
118 * Can be powered by 5v or 12v. Require Current < 1A.
119 * Sensor has output within range: 4~~20mA or 0~~30v.
120 * Sensor will be power off and power on after deployment. and After power on, it can provide valid output within several seconds.
121
122 == 1.5 Sleep mode and working mode ==
123
124
125 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.
126
127 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.
128
129
130 == 1.6 Button & LEDs ==
131
132
133 [[image:1675071855856-879.png]]
134
135 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
136 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action**
137 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT between 1s < time < 3s|(% style="background-color:#f2f2f2; width:117px" %)Send an uplink|(% style="background-color:#f2f2f2; width:225px" %)(((
138 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
139 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
140 )))
141 |(% style="background-color:#f2f2f2; width:167px" %)Pressing ACT for more than 3s|(% style="background-color:#f2f2f2; width:117px" %)Active Device|(% style="background-color:#f2f2f2; width:225px" %)(((
142 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network.
143 (% style="background-color:#f2f2f2; color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
144 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.
145 )))
146 |(% style="background-color:#f2f2f2; width:167px" %)Fast press ACT 5 times.|(% style="background-color:#f2f2f2; width:117px" %)Deactivate Device|(% style="background-color:#f2f2f2; width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means PS-LB-NA is in Deep Sleep Mode.
147
148 == 1.7 Pin Mapping ==
149
150
151 [[image:1675072568006-274.png]]
152
153
154 * (% style="color:blue" %)**+3v3_OUT**(%%): Controllable 3.3v output, Actually voltage level same as Battery, 2.6v ~~ 3.6v
155
156 * (% style="color:blue" %)**+5v_OUT**(%%): Controllable 5.0v output
157
158 * (% style="color:blue" %)**GND**(%%): GND
159
160 * (% style="color:blue" %)**INT**(%%): Interrupt Pin
161
162 * (% style="color:blue" %)**IN1 & IN2**(%%): Digital IN1 and Digital IN2
163
164 * (% style="color:blue" %)**IDC_IN**(%%): 4~~20mA current input pin
165
166 * (% style="color:blue" %)**VDC_IN**(%%): 0~~30v sensor voltage input pin
167
168 * (% style="color:blue" %)**SDI-12_DATA**(%%): No used
169
170 * (% style="color:blue" %)**+12v_OUT**(%%): Controllable 12v output
171
172 * (% style="color:blue" %)**GND**(%%): GND
173
174 == 1.8 BLE connection ==
175
176
177 PS-LB-NA support BLE remote configure.
178
179
180 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:
181
182 * Press button to send an uplink
183 * Press button to active device.
184 * Device Power on or reset.
185
186 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
187
188
189 == 1.9 Mechanical ==
190
191
192 [[image:1675143884058-338.png]]
193
194
195 [[image:1675143899218-599.png]]
196
197
198 [[image:1675143909447-639.png]]
199
200
201 = 2. Configure PS-LB-NA to connect to LoRaWAN network =
202
203 == 2.1 How it works ==
204
205
206 The PS-LB-NA is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and activate the PS-LB-NA. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
207
208
209 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
210
211
212 Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example.
213
214
215 [[image:image-20230401155446-2.png]]
216
217
218 The LPS8V2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server.
219
220
221 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from PS-LB-NA.
222
223 Each PS-LB-NA is shipped with a sticker with the default device EUI as below:
224
225 [[image:image-20230426083226-1.png]]
226
227
228
229 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
230
231
232 (% style="color:blue" %)**Register the device**
233
234 [[image:1675144099263-405.png]]
235
236
237 (% style="color:blue" %)**Add APP EUI and DEV EUI**
238
239 [[image:1675144117571-832.png]]
240
241
242 (% style="color:blue" %)**Add APP EUI in the application**
243
244
245 [[image:1675144143021-195.png]]
246
247
248 (% style="color:blue" %)**Add APP KEY**
249
250 [[image:1675144157838-392.png]]
251
252 (% style="color:blue" %)**Step 2:**(%%) Activate on PS-LB-NA
253
254
255 Press the button for 5 seconds to activate the PS-LB-NA.
256
257 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
258
259 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
260
261
262 == 2.3 ​Uplink Payload ==
263
264 === 2.3.1 Device Status, FPORT~=5 ===
265
266
267 Include device configure status. Once PS-LB-NA Joined the network, it will uplink this message to the server.
268
269 Users can also use the downlink command(0x26 01) to ask PS-LB-NA to resend this uplink.
270
271 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
272 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
273 |(% style="background-color:#f2f2f2; width:103px" %)**Size (bytes)**|(% style="background-color:#f2f2f2; width:72px" %)**1**|(% style="background-color:#f2f2f2" %)**2**|(% style="background-color:#f2f2f2; width:91px" %)**1**|(% style="background-color:#f2f2f2; width:86px" %)**1**|(% style="background-color:#f2f2f2; width:44px" %)**2**
274 |(% style="background-color:#f2f2f2; width:103px" %)**Value**|(% style="background-color:#f2f2f2; width:72px" %)Sensor Model|(% style="background-color:#f2f2f2" %)Firmware Version|(% style="background-color:#f2f2f2; width:91px" %)Frequency Band|(% style="background-color:#f2f2f2; width:86px" %)Sub-band|(% style="background-color:#f2f2f2; width:44px" %)BAT
275
276 Example parse in TTNv3
277
278 [[image:1675144504430-490.png]]
279
280
281 (% style="color:#037691" %)**Sensor Model**(%%): For PS-LB-NA, this value is 0x16
282
283 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
284
285 (% style="color:#037691" %)**Frequency Band**:
286
287 0x01: EU868
288
289 0x02: US915
290
291 0x03: IN865
292
293 0x04: AU915
294
295 0x05: KZ865
296
297 0x06: RU864
298
299 0x07: AS923
300
301 0x08: AS923-1
302
303 0x09: AS923-2
304
305 0x0a: AS923-3
306
307 0x0b: CN470
308
309 0x0c: EU433
310
311 0x0d: KR920
312
313 0x0e: MA869
314
315
316 (% style="color:#037691" %)**Sub-Band**:
317
318 AU915 and US915:value 0x00 ~~ 0x08
319
320 CN470: value 0x0B ~~ 0x0C
321
322 Other Bands: Always 0x00
323
324
325 (% style="color:#037691" %)**Battery Info**:
326
327 Check the battery voltage.
328
329 Ex1: 0x0B45 = 2885mV
330
331 Ex2: 0x0B49 = 2889mV
332
333
334 === 2.3.2 Sensor value, FPORT~=2 ===
335
336
337 Uplink payload includes in total 9 bytes.
338
339 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
340 |(% style="background-color:#4f81bd; color:white; width:97px" %)(((
341 **Size(bytes)**
342 )))|(% style="background-color:#4f81bd; color:white; width:48px" %)**2**|(% style="background-color:#4f81bd; color:white; width:71px" %)**2**|(% style="background-color:#4f81bd; color:white; width:98px" %)**2**|(% style="background-color:#4f81bd; color:white; width:73px" %)**2**|(% style="background-color:#4f81bd; color:white; width:122px" %)**1**
343 |(% style="background-color:#f2f2f2; width:97px" %)Value|(% style="background-color:#f2f2f2; width:48px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="background-color:#f2f2f2; width:71px" %)[[Probe Model>>||anchor="H2.3.4ProbeModel"]]|(% style="background-color:#f2f2f2; width:98px" %)[[0 ~~~~ 20mA value>>||anchor="H2.3.507E20mAvalue28IDC_IN29"]]|(% style="background-color:#f2f2f2; width:73px" %)[[0 ~~~~ 30v value>>||anchor="H2.3.607E30Vvalue28pinVDC_IN29"]]|(% style="background-color:#f2f2f2; width:122px" %)[[IN1 &IN2 Interrupt  flag>>||anchor="H2.3.7IN126IN226INTpin"]]
344
345 [[image:1675144608950-310.png]]
346
347
348 === 2.3.3 Battery Info ===
349
350
351 Check the battery voltage for PS-LB-NA.
352
353 Ex1: 0x0B45 = 2885mV
354
355 Ex2: 0x0B49 = 2889mV
356
357
358 === 2.3.4 Probe Model ===
359
360
361 PS-LB-NA might connect to different kind of probes, 4~~20mA represent the full scale of the measuring range. So a 12mA output means different meaning for different probe. 
362
363
364 **For example.**
365
366 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
367 |(% style="background-color:#4f81bd; color:white; width:150px" %)**Probe Type**|(% style="background-color:#4f81bd; color:white; width:150px" %)**4~~20mA scale for this probe**|(% style="background-color:#4f81bd; color:white; width:200px" %)**Example: 12mA actually meaning for this probe**
368 |(% style="background-color:#f2f2f2; width:206px" %)PH Combination Electrodes|(% style="background-color:#f2f2f2; width:222px" %)0 ~~ 14 pH|(% style="background-color:#f2f2f2; width:356px" %)PH Value: 7
369 |(% style="background-color:#f2f2f2; width:206px" %)Water Pressure Sensor|(% style="background-color:#f2f2f2; width:222px" %)0~~5 meters|(% style="background-color:#f2f2f2; width:356px" %)2.5 meters pure water
370 |(% style="background-color:#f2f2f2; width:206px" %)Pressure transmitter probe|(% style="background-color:#f2f2f2; width:222px" %)0~~1MPa|(% style="background-color:#f2f2f2; width:356px" %)0.5MPa air / gas or water pressure
371
372 User can set different probe model for above probes. So IoT server is able to se identical how it should parse the 4~~20mA or 0~~30v sensor value and get the correct value.
373
374
375 === 2.3.5 0~~20mA value (IDC_IN) ===
376
377
378 (% style="color:#037691" %)**Payload Example**:
379
380 27AE(H) = 10158 (D)/1000 = 10.158mA.
381
382
383 [[image:image-20230821150704-1.png||height="180" width="609"]]
384
385 **Connect to a 2 wire 4~~20mA sensor.**
386
387 [[image:image-20230225154759-1.png||height="408" width="741"]]
388
389
390 === 2.3.6 0~~30V value ( pin VDC_IN) ===
391
392
393 Measure the voltage value. The range is 0 to 30V.
394
395 (% style="color:#037691" %)**Example**:
396
397 138E(H) = 5006(D)/1000= 5.006V
398
399
400 === 2.3.7 IN1&IN2&INT pin(GPIO_EXTI) ===
401
402
403 IN1 and IN2 are digital level inputs, INT(GPIO_EXTI) is interrupt pin, and their maximum input voltage is 3.6V.
404
405
406 IN1 and IN2 are used as digital input pins.
407
408 (% style="color:#037691" %)**Example**:
409
410 09 (H): (0x09&0x08)>>3=1    IN1 pin is high level.
411
412 09 (H): (0x09&0x04)>>2=0    IN2 pin is low level.
413
414
415 For motherboards older than SIB V1.2, the interrupt pin name is "INT", and for motherboards older than SIB V1.3, the interrupt pin name is "GPIO_EXTI."
416
417 This data field shows if this packet is generated by (% style="color:blue" %)**Interrupt Pin** (%%)or not. [[Click here>>||anchor="H3.3.2SetInterruptMode"]] for the hardware and software set up.
418
419 (% style="color:#037691" %)**Example:**
420
421 09 (H): (0x09&0x02)>>1=1    The level of the interrupt pin.
422
423 09 (H): 0x09&0x01=1              0x00: Normal uplink packet.
424
425 0x01: Interrupt Uplink Packet.
426
427
428 === 2.3.8 Sensor value, FPORT~=7 ===
429
430
431 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:504px" %)
432 |(% style="background-color:#4f81bd; color:white; width:94px" %)(((
433 **Size(bytes)**
434 )))|(% style="background-color:#4f81bd; color:white; width:43px" %)**2**|(% style="background-color:#4f81bd; color:white; width:367px" %)**n**
435 |(% style="background-color:#f2f2f2; width:94px" %)Value|(% style="background-color:#f2f2f2; width:43px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="background-color:#f2f2f2; width:367px" %)(((
436 Voltage value, each 2 bytes is a set of voltage values.
437 )))
438
439 [[image:image-20230220171300-1.png||height="207" width="863"]]
440
441 Multiple sets of data collected are displayed in this form:
442
443 [voltage value1], [voltage value2], [voltage value3],…[voltage value n/2]
444
445
446 === 2.3.9 ​Decode payload in The Things Network ===
447
448
449 While using TTN network, you can add the payload format to decode the payload.
450
451
452 [[image:1675144839454-913.png]]
453
454
455 PS-LB-NA TTN Payload Decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]]
456
457
458 == 2.4 Uplink Interval ==
459
460
461 The PS-LB-NA by default uplink the sensor data every 20 minutes. User can change this interval by AT Command or LoRaWAN Downlink Command. See this link: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.1ChangeUplinkInterval>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.1ChangeUplinkInterval||style="background-color: rgb(255, 255, 255);"]]
462
463
464 == 2.5 Show Data in DataCake IoT Server ==
465
466
467 [[DATACAKE>>url:https://datacake.co/]] provides a human friendly interface to show the sensor data, once we have data in TTN, we can use [[DATACAKE>>url:https://datacake.co/]] to connect to TTN and see the data in DATACAKE. Below are the steps:
468
469
470 (% style="color:blue" %)**Step 1: **(%%)Be sure that your device is programmed and properly connected to the network at this time.
471
472 (% style="color:blue" %)**Step 2:**(%%) To configure the Application to forward data to DATACAKE you will need to add integration. To add the DATACAKE integration, perform the following steps:
473
474
475 [[image:1675144951092-237.png]]
476
477
478 [[image:1675144960452-126.png]]
479
480
481 (% style="color:blue" %)**Step 3:**(%%) Create an account or log in Datacake.
482
483 (% style="color:blue" %)**Step 4:** (%%)Create PS-LB-NA product.
484
485 [[image:1675145004465-869.png]]
486
487
488 [[image:1675145018212-853.png]]
489
490
491 [[image:1675145029119-717.png]]
492
493
494 (% style="color:blue" %)**Step 5: **(%%)add payload decode
495
496 [[image:1675145051360-659.png]]
497
498
499 [[image:1675145060812-420.png]]
500
501
502 After added, the sensor data arrive TTN, it will also arrive and show in Datacake.
503
504
505 [[image:1675145081239-376.png]]
506
507
508 == 2.6 Frequency Plans ==
509
510
511 The PS-LB-NA uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.
512
513 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
514
515
516 == 2.7 Datalog Feature (Since V1.1) ==
517
518
519 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.
520
521
522 === 2.7.1 Unix TimeStamp ===
523
524
525 PS-LB-NA uses Unix TimeStamp format based on
526
527 [[image:image-20250327145437-3.jpeg]]
528
529 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
530
531 Below is the converter example:
532
533 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/1652861637105-371.png?width=732&height=428&rev=1.1||alt="1652861637105-371.png"]]
534
535
536 === 2.7.2 Set Device Time ===
537
538
539 There are two ways to set the device's time:
540
541
542 (% style="color:blue" %)**1. Through LoRaWAN MAC Command (Default settings)**
543
544 Users need to set SYNCMOD=1 to enable sync time via the MAC command.
545
546 Once PS-LB 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, PS-LB will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>||anchor="H2.3.1DeviceStatus2CFPORT3D5"]]].
547
548
549 (% 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.**
550
551
552 (% style="color:blue" %)**2. Manually Set Time**
553
554 Users need to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.
555
556
557 === 2.7.3 Poll sensor value ===
558
559
560 Users can poll sensor values based on timestamps. Below is the downlink command.
561
562 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
563 |=(% colspan="4" style="width: 160px; background-color:#4F81BD;color:white" %)**Downlink Command to poll Open/Close status (0x31)**
564 |(% style="background-color:#f2f2f2; width:67px" %)**1byte**|(% style="background-color:#f2f2f2; width:145px" %)**4bytes**|(% style="background-color:#f2f2f2; width:133px" %)**4bytes**|(% style="background-color:#f2f2f2; width:163px" %)**1byte**
565 |(% style="background-color:#f2f2f2; width:67px" %)31|(% style="background-color:#f2f2f2; width:145px" %)Timestamp start|(% style="background-color:#f2f2f2; width:133px" %)(((
566 Timestamp end
567 )))|(% style="background-color:#f2f2f2; width:163px" %)Uplink Interval
568
569 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.
570
571 For example, downlink command[[image:image-20250116174124-1.png]]
572
573 Is to check 2024/12/20 09:34:59 to 2024/12/20 14:34:59's data
574
575 Uplink Internal =5s,means PS-LB will send one packet every 5s. range 5~~255s.
576
577
578 === 2.7.4 Datalog Uplink payload (FPORT~=3) ===
579
580
581 The Datalog uplinks will use below payload format.
582
583 **Retrieval data payload:**
584
585 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
586 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
587 **Size(bytes)**
588 )))|=(% style="width: 55px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 65px; background-color:#4F81BD;color:white" %)**2**|=(% style="width: 75px; background-color: rgb(79, 129, 189); color: white;" %)**2**|=(% style="width: 170px; background-color: rgb(79, 129, 189); color: white;" %)**1**|=(% style="width: 75px; background-color: rgb(79, 129, 189); color: white;" %)**4**
589 |(% style="width:103px" %)Value|(% style="width:68px" %)(((
590 Probe_mod
591 )))|(% style="width:104px" %)(((
592 VDC_intput_V
593 )))|(% style="width:83px" %)(((
594 IDC_intput_mA
595 )))|(% style="width:201px" %)(((
596 IN1_pin_level& IN2_pin_level& Exti_pin_level&Exti_status
597 )))|(% style="width:86px" %)Unix Time Stamp
598
599 **IN1_pin_level & IN2_pin_level & Exti_pin_level & Exti_status:**
600
601 [[image:image-20250117104039-5.png||height="91" width="627"]]
602
603
604 **No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **PNACKMD=1** feature)
605
606 **Poll Message Flag**: 1: This message is a poll message reply.
607
608 * Poll Message Flag is set to 1.
609
610 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
611
612 For example, in US915 band, the max payload for different DR is:
613
614 **a) DR0:** max is 11 bytes so one entry of data
615
616 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
617
618 **c) DR2:** total payload includes 11 entries of data
619
620 **d) DR3: **total payload includes 22 entries of data.
621
622 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
623
624 **Example:**
625
626 If PS-LB-NA has below data inside Flash:
627
628 [[image:image-20250117090504-2.png]]
629
630
631 If user sends below downlink command: 316788D9BF6788DB6305
632
633 Where : Start time: 6788D9BF = time 25/1/16 10:04:47
634
635 Stop time: 6788DB63 = time 25/1/16 10:11:47
636
637
638 **PA-LB-NA will uplink this payload.**
639
640 [[image:image-20250117085341-1.png]]
641
642 (((
643 00001B620000406788D9BF  00000D130000406788D9FB  00000D120000406788DA37  00000D110000406788DA73  00000D100000406788DAAF  00000D100000406788DAEB  00000D0F0000406788DB27  00000D100000406788DB63
644 )))
645
646 (((
647 Where the first 11 bytes is for the first entry :
648 )))
649
650 (((
651 0000  0D10  0000  40  6788DB63
652 )))
653
654 (((
655 **Probe_mod **= 0x0000 = 0000
656 )))
657
658 (((
659 **VDC_intput_V **= 0x0D10/1000=3.344V
660
661 **IDC_intput_mA **= 0x0000/1000=0mA
662 )))
663
664 (((
665 **IN1_pin_level **= (0x40& 0x08)? "High":"Low" = 0(Low)
666
667 **IN2_pin_level = (**0x40& 0x04)? "High":"Low" = 0(Low)
668
669 **Exti_pin_level = (**0x40& 0x02)? "High":"Low" = 0(Low)
670
671 **Exti_status = (**0x40& 0x01)? "True":"False" = 0(False)
672 )))
673
674 (((
675 **Unix time** is 0x6788DB63 = 1737022307s = 2025/1/16 10:11:47
676 )))
677
678 **Its data format is:**
679
680 [Probe_mod, VDC_intput_V, IDC_intput_mA, IN1_pin_level**, **IN2_pin_level, Exti_pin_level, water_deep, Data_time],[Probe_mod, VDC_intput_V, IDC_intput_mA, IN1_pin_level**, **IN2_pin_level, Exti_pin_level, water_deep, Data_time],...
681
682 (% style="color:red" %)**Note: water_deep in the data needs to be converted using decoding to get it.**
683
684
685 === 2.7.5 Decoder in TTN V3 ===
686
687
688 [[image:image-20250327145403-2.jpeg]]
689
690 Please check the decoder from this link: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>url:https://github.com/dragino/dragino-end-node-decoder]]
691
692
693 == 2.8 Report on Change Feature (Since firmware V1.2) ==
694
695 === 2.8.1 Uplink payload(Enable ROC) ===
696
697
698 Used to Monitor the IDC and VDC increments, and send ROC uplink when the IDC or VDC changes exceed.
699
700 With ROC enabled, the payload is as follows:
701
702 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
703 |(% style="background-color:#4f81bd; color:white; width:97px" %)(((
704 **Size(bytes)**
705 )))|(% style="background-color:#4f81bd; color:white; width:48px" %)**2**|(% style="background-color:#4f81bd; color:white; width:71px" %)**1**|(% style="background-color:#4f81bd; color:white; width:98px" %)**2**|(% style="background-color:#4f81bd; color:white; width:73px" %)**2**|(% style="background-color:#4f81bd; color:white; width:122px" %)**1**
706 |(% style="background-color:#f2f2f2; width:97px" %)Value|(% style="background-color:#f2f2f2; width:48px" %)[[BAT>>||anchor="H2.3.3BatteryInfo"]]|(% style="background-color:#f2f2f2; width:71px" %)[[Probe Model>>||anchor="H2.3.4ProbeModel"]]|(% style="background-color:#f2f2f2; width:98px" %)[[0 ~~~~ 20mA value>>||anchor="H2.3.507E20mAvalue28IDC_IN29"]]|(% style="background-color:#f2f2f2; width:73px" %)[[0 ~~~~ 30v value>>||anchor="H2.3.607E30Vvalue28pinVDC_IN29"]]|(% style="background-color:#f2f2f2; width:122px" %)(((
707 [[IN1 & IN2 Interrupt  flag>>||anchor="H2.3.7IN126IN226INTpin28GPIO_EXTI29"]] & ROC_flag
708 )))
709
710 (% style="color:blue" %)**IN1 &IN2 , Interrupt flag , ROC_flag:**
711
712 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
713 |(% style="background-color:#4f81bd; color:white; width:50px" %)**Size(bit)**|(% style="background-color:#4f81bd; color:white; width:60px" %)**bit7**|(% style="background-color:#4f81bd; color:white; width:62px" %)**bit6**|(% style="background-color:#4f81bd; color:white; width:62px" %)**bit5**|(% style="background-color:#4f81bd; color:white; width:65px" %)**bit4**|(% style="background-color:#4f81bd; color:white; width:56px" %)**bit3**|(% style="background-color:#4f81bd; color:white; width:55px" %)**bit2**|(% style="background-color:#4f81bd; color:white; width:55px" %)**bit1**|(% style="background-color:#4f81bd; color:white; width:50px" %)**bit0**
714 |(% style="width:75px" %)Value|(% style="width:89px" %)IDC_Roc_flagL|(% style="width:46.5834px" %)IDC_Roc_flagH|(% style="width:1px" %)VDC_Roc_flagL|(% style="width:89px" %)VDC_Roc_flagH|(% style="width:89px" %)IN1_pin_level|(% style="width:103px" %)IN2_pin_level|(% style="width:103px" %)Exti_pin_level|(% style="width:103px" %)Exti_status
715
716 * (% style="color:#037691" %)**IDC_Roc_flagL**
717
718 80 (H): (0x80&0x80)=80(H)=**1**000 0000(B)  bit7=1, "TRUE", This uplink is triggered when the decrease in the IDC compared to the last ROC refresh exceeds the set threshold.
719
720 60 (H): (0x60&0x80)=0  bit7=0, "FALSE", This uplink is not triggered when the decrease in the IDC compared to the last ROC refresh does not exceeds the set threshold.
721
722
723 * (% style="color:#037691" %)**IDC_Roc_flagH**
724
725 60 (H): (0x60&0x40)=40(H)=0**1**000 0000(B)  bit6=1, "TRUE", This uplink is triggered when the increase in the value of the IDC compared to the last ROC refresh exceeds the set threshold.
726
727 80 (H): (0x80&0x40)=0  bit6=0, "FALSE", This uplink is not triggered when the increase in the value of the IDC compared to the last ROC refresh does not exceeds the set threshold.
728
729
730 * (% style="color:#037691" %)**VDC_Roc_flagL**
731
732 20 (H): (0x20&0x20)=20(H)=00**1**0 0000(B)  bit5=1, "TRUE", This uplink is triggered when the decrease in the VDC compared to the last ROC refresh exceeds the set threshold.
733
734 90 (H): (0x90&0x20)=0  bit5=0, "FALSE", This uplink is not triggered when the decrease in the VDC compared to the last ROC refresh does not exceeds the set threshold.
735
736
737 * (% style="color:#037691" %)**VDC_Roc_flagH**
738
739 90 (H): (0x90&0x10)=10(H)=000**1** 0000(B)  bit4=1, "TRUE", This uplink is triggered when the increase in the value of the VDC compared to the last ROC refresh exceeds the set threshold.
740
741 20 (H): (0x20&0x10)=0  bit4=0, "FALSE", This uplink is not triggered when the increase in the value of the VDC compared to the last ROC refresh does not exceeds the set threshold.
742
743
744 * (% style="color:#037691" %)**IN1_pin_level & IN2_pin_level**
745
746 IN1 and IN2 are used as digital input pins.
747
748 80 (H): (0x80&0x08)=0  IN1 pin is low level.
749
750 80 (H): (0x80&0x04)=0    IN2 pin is low level.
751
752
753 * (% style="color:#037691" %)**Exti_pin_level &Exti_status**
754
755 This data field shows whether the packet is generated by an interrupt pin.
756
757 Note: The Internet pin of the old motherboard is a separate pin in the screw terminal, and the interrupt pin of the new motherboard(SIB V1.3) is the **GPIO_EXTI** pin.
758
759 **Exti_pin_level:**  80 (H): (0x80&0x02)=0  "low", The level of the interrupt pin.
760
761 **Exti_status: **80 (H): (0x80&0x01)=0  "False", Normal uplink packet.
762
763
764 === 2.8.2 Set the Report on Change ===
765
766
767 Feature: Get or Set the Report on Change.
768
769
770 ==== 2.8.2.1 Wave alarm mode ====
771
772
773 Feature: By setting the detection period and a change value, the IDC/VDC variable is monitored whether it exceeds the set change value. If this change value is exceeded, the ROC uplink is sent and the comparison value is flushed.
774
775 * (% style="color:#037691" %)**Change value: **(%%)The amount by which the next detection value increases/decreases relative to the previous detection value.
776 * (% style="color:#037691" %)**Comparison value:**(%%) A parameter to compare with the latest ROC test.
777
778 (% style="color:blue" %)**AT Command: AT+ROC**
779
780 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
781 |=(% style="width: 163px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 150px; background-color: rgb(79, 129, 189); color: white;" %)**Parameters**|=(% style="width: 197px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
782 |(% style="width:143px" %)AT+ROC=?|(% style="width:154px" %)Show current ROC setting|(% style="width:197px" %)(((
783 0,0,0,0(default)
784 OK
785 )))
786 |(% colspan="1" rowspan="4" style="width:143px" %)(((
787
788
789
790
791 AT+ROC=a,b,c,d
792 )))|(% style="width:154px" %)(((
793
794
795
796
797
798
799 **a**: Enable or disable the ROC
800 )))|(% style="width:197px" %)(((
801 **0:** off
802 **1:** Turn on the wave alarm mode, send the ROC uplink when the increment exceeds the set parameter and refresh the comparison value.
803 **2:** Turn on the wave alarm mode, send the ROC uplink when the increment exceeds the set parameter and refresh the comparison value. In addition, the comparison value is refreshed when the device sends packets ([[TDC>>||anchor="H3.3.1SetTransmitIntervalTime"]] or [[ACT>>||anchor="H1.6Button26LEDs"]]).
804 )))
805 |(% style="width:154px" %)**b**: Set the detection interval|(% style="width:197px" %)(((
806 Range:  0~~65535s
807 )))
808 |(% style="width:154px" %)**c**: Setting the IDC change value|(% style="width:197px" %)Unit: uA
809 |(% style="width:154px" %)**d**: Setting the VDC change value|(% style="width:197px" %)Unit: mV
810
811 **Example:**
812
813 * AT+ROC=0,0,0,0  ~/~/ The ROC function is not used.
814 * AT+ROC=1,60,3000, 500  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA) or VDC (>500mV), sends an ROC uplink, and the comparison value is refreshed.
815 * AT+ROC=1,60,3000,0  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA), send an ROC uplink and the comparison value of IDC is refreshed. dd=0 Means doesn't monitor Voltage.
816 * AT+ROC=2,60,3000,0  ~/~/ Check value every 60 seconds. lf there is change in IDC (>3mA), send an ROC uplink and the comparison value of IDC is refreshed. dd=0 Means doesn't monitor Voltage. In addition, if the change in the IDC does not exceed 3mA, then the ROC uplink is not sent, and the comparison value is not refreshed by the ROC uplink packet. However, if the device TDC time arrives, or if the user manually sends packets, then the IDC comparison value is also refreshed.
817
818 (% style="color:blue" %)**Downlink Command: 0x09 aa bb cc dd**
819
820 Format: Function code (0x09) followed by 4 bytes.
821
822 (% style="color:blue" %)**aa: **(% style="color:#037691" %)**1 byte;**(%%) Set the wave alarm mode.
823
824 (% style="color:blue" %)**bb: **(% style="color:#037691" %)**2 bytes;**(%%) Set the detection interval. (second)
825
826 (% style="color:blue" %)**cc: **(% style="color:#037691" %)**2 bytes;**(%%) Setting the IDC change threshold. (uA)
827
828 (% style="color:blue" %)**dd: **(% style="color:#037691" %)**2 bytes;**(%%) Setting the VDC change threshold. (mV)
829
830 **Example:**
831
832 * Downlink Payload: **09 01 00 3C 0B B8 01 F4 ** ~/~/ Equal to AT+ROC=1,60,3000, 500
833 * Downlink Payload: **09 01 00 3C 0B B8 00 00 ** ~/~/ Equal to AT+ROC=1,60,3000,0
834 * Downlink Payload: **09 02 00 3C 0B B8 00 00 ** ~/~/ Equal to AT+ROC=2,60,3000,0
835
836 (% style="color:blue" %)**Screenshot of parsing example in TTN:**
837
838 * AT+ROC=1,60,3000, 500.
839
840 [[image:image-20241019170902-1.png||height="450" width="1454"]]
841
842
843 ==== 2.8.2.2 Over-threshold alarm mode ====
844
845
846 Feature: Monitors whether the IDC/VDC exceeds the threshold by setting the detection period and threshold. Alarm if the threshold is exceeded.
847
848 (% style="color:blue" %)**AT Command: AT+ROC=3,a,b,c,d,e**
849
850 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
851 |=(% style="width: 163px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 160px; background-color: rgb(79, 129, 189); color: white;" %)**Parameters**|=(% style="width: 185px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
852 |(% style="width:143px" %)AT+ROC=?|(% style="width:160px" %)Show current ROC setting|(% style="width:185px" %)(((
853 0,0,0,0(default)
854 OK
855 )))
856 |(% colspan="1" rowspan="5" style="width:143px" %)(((
857
858
859
860
861 AT+ROC=(% style="color:blue" %)**3**(%%),a,b,c,d,e
862 )))|(% style="width:160px" %)(((
863 **a: **Set the detection interval
864 )))|(% style="width:185px" %)(((
865 Range:  0~~65535s
866 )))
867 |(% style="width:160px" %)**b**: Set the IDC alarm trigger condition|(% style="width:185px" %)(((
868 **0:** Less than the set IDC threshold, Alarm
869
870 **1:** Greater than the set IDC threshold, Alarm
871 )))
872 |(% style="width:160px" %)**c**:  IDC alarm threshold|(% style="width:185px" %)(((
873 Unit: uA
874 )))
875 |(% style="width:160px" %)**d**: Set the VDC alarm trigger condition|(% style="width:185px" %)(((
876 **0:** Less than the set VDC threshold, Alarm
877
878 **1:** Greater than the set VDC threshold, Alarm
879 )))
880 |(% style="width:160px" %)**e:** VDC alarm threshold|(% style="width:185px" %)Unit: mV
881
882 **Example:**
883
884 * AT+ROC=3,60,0,3000,0,5000  ~/~/ The data is checked every 60 seconds. If the IDC is less than 3mA or the VDC is less than 5000mV, an alarm is generated.
885 * AT+ROC=3,180,1,3000,1,5000  ~/~/ The data is checked every 180 seconds. If the IDC is greater than 3mA or the VDC is greater than 5000mV, an alarm is generated.
886 * AT+ROC=3,300,0,3000,1,5000  ~/~/ The data is checked every 300 seconds. If the IDC is less than 3mA or the VDC is greater than 5000mV, an alarm is generated.
887
888 (% style="color:blue" %)**Downlink Command: 0x09 03 aa bb cc dd ee**
889
890 Format: Function code (0x09) followed by 03 and the remaining 5 bytes.
891
892 (% style="color:blue" %)**aa: **(% style="color:#037691" %)**2 bytes;**(%%) Set the detection interval.(second)
893
894 (% style="color:blue" %)**bb: **(% style="color:#037691" %)**1 byte; **(%%)Set the IDC alarm trigger condition.
895
896 (% style="color:blue" %)**cc: **(% style="color:#037691" %)**2 bytes;**(%%) IDC alarm threshold.(uA)
897
898
899 (% style="color:blue" %)**dd: **(% style="color:#037691" %)**1 byte;**(%%) Set the VDC alarm trigger condition.
900
901 (% style="color:blue" %)**ee: **(% style="color:#037691" %)**2 bytes; **(%%)VDC alarm threshold.(mV)
902
903 **Example:**
904
905 * Downlink Payload: **09 03 00 3C 00 0B B8 00 13 38** ~/~/ Equal to AT+ROC=3,60,0,3000,0,5000
906 * Downlink Payload: **09 03 00 b4 01 0B B8 01 13 38**  ~/~/ Equal to AT+ROC=3,180,1,3000,1,5000
907 * Downlink Payload: **09 03 01 2C 00 0B B8 01 13 38** ~/~/ Equal to AT+ROC=3,300,0,3000,1,5000
908
909 (% style="color:blue" %)**Screenshot of parsing example in TTN:**
910
911 * AT+ROC=3,60,0,3000,0,5000
912
913 [[image:image-20250116180136-4.png]]
914
915
916 = 3. Configure PS-LB-NA =
917
918 == 3.1 Configure Methods: ==
919
920
921 PS-LB-NA supports below configure method:
922
923 * AT Command via Bluetooth Connection (**Recommand Way**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
924 * AT Command via UART Connection : See [[FAQ>>||anchor="H6.FAQ"]].
925 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
926
927 == 3.2 General Commands ==
928
929
930 These commands are to configure:
931
932 * General system settings like: uplink interval.
933 * LoRaWAN protocol & radio related command.
934
935 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
936
937 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]]
938
939
940 == 3.3 Commands special design for PS-LB-NA ==
941
942
943 These commands only valid for PS-LB-NA, as below:
944
945
946 === 3.3.1 Set Transmit Interval Time ===
947
948
949 Feature: Change LoRaWAN End Node Transmit Interval.
950
951 (% style="color:blue" %)**AT Command: AT+TDC**
952
953 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
954 |=(% style="width: 160px; background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 160px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Response**
955 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=?|(% style="background-color:#f2f2f2; width:166px" %)Show current transmit Interval|(% style="background-color:#f2f2f2" %)(((
956 30000
957 OK
958 the interval is 30000ms = 30s
959 )))
960 |(% style="background-color:#f2f2f2; width:157px" %)AT+TDC=60000|(% style="background-color:#f2f2f2; width:166px" %)Set Transmit Interval|(% style="background-color:#f2f2f2" %)(((
961 OK
962 Set transmit interval to 60000ms = 60 seconds
963 )))
964
965 (% style="color:blue" %)**Downlink Command: 0x01**
966
967 Format: Command Code (0x01) followed by 3 bytes time value.
968
969 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
970
971 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
972 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
973
974 === 3.3.2 Set Interrupt Mode ===
975
976
977 Feature, Set Interrupt mode for GPIO_EXIT.
978
979 (% style="color:blue" %)**AT Command: AT+INTMOD**
980
981 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:507px" %)
982 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Response**
983 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=?|(% style="background-color:#f2f2f2; width:196px" %)Show current interrupt mode|(% style="background-color:#f2f2f2; width:157px" %)(((
984 0
985 OK
986 the mode is 0 =Disable Interrupt
987 )))
988 |(% style="background-color:#f2f2f2; width:154px" %)AT+INTMOD=2|(% style="background-color:#f2f2f2; width:196px" %)(((
989 Set Transmit Interval
990 0. (Disable Interrupt),
991 ~1. (Trigger by rising and falling edge)
992 2. (Trigger by falling edge)
993 3. (Trigger by rising edge)
994 )))|(% style="background-color:#f2f2f2; width:157px" %)OK
995
996 (% style="color:blue" %)**Downlink Command: 0x06**
997
998 Format: Command Code (0x06) followed by 3 bytes.
999
1000 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
1001
1002 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
1003 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
1004
1005 === 3.3.3 Set Power Output Duration ===
1006
1007
1008 Control the output duration 3V3 , 5V or 12V. Before each sampling, device will
1009
1010 ~1. first enable the power output to external sensor,
1011
1012 2. keep it on as per duration, read sensor value and construct uplink payload
1013
1014 3. final, close the power output.
1015
1016
1017 (% style="color:blue" %)**AT Command: AT+3V3T**
1018
1019 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:471px" %)
1020 |=(% style="width: 154px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 201px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 116px;background-color:#4F81BD;color:white" %)**Response**
1021 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=?|(% style="background-color:#f2f2f2; width:201px" %)Show 3V3 open time.|(% style="background-color:#f2f2f2; width:116px" %)(((
1022 0
1023 OK
1024 )))
1025 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=0|(% style="background-color:#f2f2f2; width:201px" %)Normally open 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1026 OK
1027 default setting
1028 )))
1029 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=1000|(% style="background-color:#f2f2f2; width:201px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:116px" %)(((
1030 OK
1031 )))
1032 |(% style="background-color:#f2f2f2; width:154px" %)AT+3V3T=65535|(% style="background-color:#f2f2f2; width:201px" %)Normally closed 3V3 power supply.|(% style="background-color:#f2f2f2; width:116px" %)(((
1033 OK
1034 )))
1035
1036 (% style="color:blue" %)**AT Command: AT+5VT**
1037
1038 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:465px" %)
1039 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 196px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 114px;background-color:#4F81BD;color:white" %)**Response**
1040 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=?|(% style="background-color:#f2f2f2; width:196px" %)Show 5V open time.|(% style="background-color:#f2f2f2; width:114px" %)(((
1041 0
1042 OK
1043 )))
1044 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=0|(% style="background-color:#f2f2f2; width:196px" %)Normally closed 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1045 OK
1046 default setting
1047 )))
1048 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=1000|(% style="background-color:#f2f2f2; width:196px" %)Close after a delay of 1000 milliseconds.|(% style="background-color:#f2f2f2; width:114px" %)(((
1049 OK
1050 )))
1051 |(% style="background-color:#f2f2f2; width:155px" %)AT+5VT=65535|(% style="background-color:#f2f2f2; width:196px" %)Normally open 5V power supply.|(% style="background-color:#f2f2f2; width:114px" %)(((
1052 OK
1053 )))
1054
1055 (% style="color:blue" %)**AT Command: AT+12VT**
1056
1057 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:438px" %)
1058 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 199px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 83px;background-color:#4F81BD;color:white" %)**Response**
1059 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=?|(% style="background-color:#f2f2f2; width:199px" %)Show 12V open time.|(% style="background-color:#f2f2f2; width:83px" %)(((
1060 0
1061 OK
1062 )))
1063 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=0|(% style="background-color:#f2f2f2; width:199px" %)Normally closed 12V power supply.|(% style="background-color:#f2f2f2; width:83px" %)OK
1064 |(% style="background-color:#f2f2f2; width:156px" %)AT+12VT=500|(% style="background-color:#f2f2f2; width:199px" %)Close after a delay of 500 milliseconds.|(% style="background-color:#f2f2f2; width:83px" %)(((
1065 OK
1066 )))
1067
1068 (% style="color:blue" %)**Downlink Command: 0x07**
1069
1070 Format: Command Code (0x07) followed by 3 bytes.
1071
1072 The first byte is which power, the second and third bytes are the time to turn on.
1073
1074 * Example 1: Downlink Payload: 070101F4  **~-~-->**  AT+3V3T=500
1075 * Example 2: Downlink Payload: 0701FFFF   **~-~-->**  AT+3V3T=65535
1076 * Example 3: Downlink Payload: 070203E8  **~-~-->**  AT+5VT=1000
1077 * Example 4: Downlink Payload: 07020000  **~-~-->**  AT+5VT=0
1078 * Example 5: Downlink Payload: 070301F4  **~-~-->**  AT+12VT=500
1079 * Example 6: Downlink Payload: 07030000  **~-~-->**  AT+12VT=0
1080
1081 (% style="color:red" %)**Note: Before v1.2, the maximum settable time of 3V3T, 5VT and 12VT is 65535 milliseconds. After v1.2, the maximum settable time of 3V3T, 5VT and 12VT is 180 seconds.**
1082
1083 (% style="color:red" %)**Therefore, the corresponding downlink command is increased by one byte to five bytes.**
1084
1085 **Example: **
1086
1087 * 120s=120000ms(D) =0x01D4C0(H), Downlink Payload: 07 **01** 01 D4 C0  **~-~-->**  AT+3V3T=120000
1088 * 100s=100000ms(D) =0x0186A0(H), Downlink Payload: 07 **02** 01 86 A0  **~-~-->**  AT+5VT=100000
1089 * 80s=80000ms(D) =0x013880(H), Downlink Payload: 07 **03** 01 38 80  **~-~-->**  AT+12VT=80000
1090
1091 === 3.3.4 Set the Probe Model ===
1092
1093
1094 Users need to configure this parameter according to the type of external probe. In this way, the server can decode according to this value, and convert the current value output by the sensor into water depth or pressure value.
1095
1096 (% style="color:blue" %)**AT Command: AT** **+PROBE**
1097
1098 AT+PROBE=aabb
1099
1100 When aa=00, it is the water depth mode, and the current is converted into the water depth value; bb is the probe at a depth of several meters.
1101
1102 When aa=01, it is the pressure mode, which converts the current into a pressure value;
1103
1104 bb represents which type of pressure sensor it is.
1105
1106 (A->01,B->02,C->03,D->04,E->05,F->06,G->07,H->08,I->09,J->0A,K->0B,L->0C)
1107
1108 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1109 |(% style="background-color:#4f81bd; color:white; width:154px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:269px" %)**Function**|(% style="background-color:#4f81bd; color:white" %)**Response**
1110 |(% style="background-color:#f2f2f2; width:154px" %)AT +PROBE =?|(% style="background-color:#f2f2f2; width:269px" %)Get or Set the probe model.|(% style="background-color:#f2f2f2" %)0
1111 OK
1112 |(% style="background-color:#f2f2f2; width:154px" %)AT +PROBE =0003|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 3m type.|(% style="background-color:#f2f2f2" %)OK
1113 |(% style="background-color:#f2f2f2; width:154px" %)(((
1114 AT +PROBE =000A
1115
1116
1117 )))|(% style="background-color:#f2f2f2; width:269px" %)Set water depth sensor mode, 10m type.|(% style="background-color:#f2f2f2" %)OK
1118 |(% style="background-color:#f2f2f2; width:154px" %)AT +PROBE =0101|(% style="background-color:#f2f2f2; width:269px" %)Set pressure transmitters mode, first type(A).|(% style="background-color:#f2f2f2" %)OK
1119 |(% style="background-color:#f2f2f2; width:154px" %)AT +PROBE =0000|(% style="background-color:#f2f2f2; width:269px" %)Initial state, no settings.|(% style="background-color:#f2f2f2" %)OK
1120
1121 (% style="color:blue" %)**Downlink Command: 0x08**
1122
1123 Format: Command Code (0x08) followed by 2 bytes.
1124
1125 * Example 1: Downlink Payload: 080003  **~-~-->**  AT+PROBE=0003
1126 * Example 2: Downlink Payload: 080101  **~-~-->**  AT+PROBE=0101
1127
1128 === 3.3.5 Multiple VDC /IDC collections in one uplink(Since firmware V1.1) ===
1129
1130
1131 Added AT+STDC command to collect the voltage of **VDC_INPUT/IDC_INPUT** multiple times and upload it at one time.
1132
1133 (% style="color:blue" %)**AT Command: AT** **+STDC**
1134
1135 AT+STDC=aa,bb,bb
1136
1137 (% style="color:#037691" %)**aa:**(%%)
1138 **0:** means disable this function and use TDC to send packets.
1139 **1:** means that the function is enabled to send packets by collecting VDC data for multiple times
1140 **2:** means that the function is enabled to send packets by collecting IDC data for multiple times
1141 (% style="color:#037691" %)**bb:**(%%) Each collection interval (s), the value is 1~~65535
1142 (% style="color:#037691" %)**cc:**(%%)** **the number of collection times, the value is 1~~120
1143
1144 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1145 |(% style="background-color:#4f81bd; color:white; width:160px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:215px" %)**Function**|(% style="background-color:#4f81bd; color:white" %)**Response**
1146 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=?|(% style="background-color:#f2f2f2; width:215px" %)Get the mode of multiple acquisitions and one uplink.|(% style="background-color:#f2f2f2" %)1,10,18
1147 OK
1148 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=1,10,18|(% style="background-color:#f2f2f2; width:215px" %)Set the mode of multiple acquisitions and one uplink, collect once every 10 seconds, and report after 18 times.|(% style="background-color:#f2f2f2" %)(((
1149 Attention:Take effect after ATZ
1150
1151 OK
1152 )))
1153 |(% style="background-color:#f2f2f2; width:160px" %)AT+STDC=0, 0,0|(% style="background-color:#f2f2f2; width:215px" %)(((
1154 Use the TDC interval to send packets.(default)
1155
1156
1157 )))|(% style="background-color:#f2f2f2" %)(((
1158 Attention:Take effect after ATZ
1159
1160 OK
1161 )))
1162
1163 (% style="color:blue" %)**Downlink Command: 0xAE**
1164
1165 Format: Command Code (0xAE) followed by 4 bytes.
1166
1167 * Example 1: Downlink Payload: AE 01 02 58 12** ~-~-->**  AT+STDC=1,600,18
1168
1169 = 4. Battery & Power Consumption =
1170
1171
1172 PS-LB-NA uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1173
1174 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1175
1176
1177 = 5. OTA firmware update =
1178
1179
1180 User can change firmware PS-LB-NA to:
1181
1182 * Change Frequency band/ region.
1183 * Update with new features.
1184 * Fix bugs.
1185
1186 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/gf1glloczbzz19h/AABbuYI4WY6VdAmpXo6o1V2Ka?dl=0]]**
1187
1188 Methods to Update Firmware:
1189
1190 * (Recommanded way) OTA firmware update via wireless: [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]
1191 * Update through UART TTL interface. **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
1192
1193 = 6. FAQ =
1194
1195 == 6.1 How to use PS-LB-Ix with liquid other than water? ==
1196
1197
1198 Calculated according to the ratio of the density of the measured liquid to the density of water, and add their ratio in the decoding
1199 Example: Use gasoline with a density of 0.70g/cm^3
1200 Adding to this part of the decoding divides it by 0.7 and puts a parenthesis around the equation
1201
1202 [[image:image-20230724153033-1.png]]
1203
1204 **Change:**
1205
1206 if(decode.Probe_mod===0x00)
1207 {
1208 if(decode.IDC_intput_mA<=4.0)
1209 decode.Water_deep_cm= 0;
1210 else
1211 decode.Water_deep_cm= parseFloat(~(% style="color:red" %)**(**((decode.IDC_intput_mA-4.0)*(bytes[3]*100/16)(% style="color:red" %)**/0.7)**(%%)).toFixed(3));
1212 }
1213
1214
1215 = 7. Order Info =
1216
1217
1218 Part Number: (% style="color:blue" %)**PS-LB-NA-XX-YY**
1219
1220 (% style="color:red" %)**XX**(%%): The default frequency band
1221
1222 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
1223
1224 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
1225
1226 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
1227
1228 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
1229
1230 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
1231
1232 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
1233
1234 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
1235
1236 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
1237
1238 (% style="color:#037691" %)**YY:**(%%) The grand connector hole size
1239
1240 * (% style="color:#037691" %)**M12**(%%): M12 hole
1241
1242 * (% style="color:#037691" %)**M16**(%%): M16 hole
1243
1244 * (% style="color:#037691" %)**M20**(%%): M20 hole
1245
1246 = 8. ​Packing Info =
1247
1248
1249 (% style="color:#037691" %)**Package Includes**:
1250
1251 * PS-LB-NA LoRaWAN Analog Sensor
1252
1253 (% style="color:#037691" %)**Dimension and weight**:
1254
1255 * Device Size: cm
1256
1257 * Device Weight: g
1258
1259 * Package Size / pcs : cm
1260
1261 * Weight / pcs : g
1262
1263 = 9. Support =
1264
1265
1266 * 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.
1267
1268 * 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-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0