Last modified by Mengting Qiu on 2025/07/03 16:26

Show last authors
1 [[image:1654739676119-482.png||data-xwiki-image-style-alignment="center" height="496" width="437"]]
2
3
4
5
6
7 (% style="display:none" %) (%%)
8
9
10
11 **Table of Contents:**
12
13 {{toc/}}
14
15
16
17
18
19
20
21
22
23
24 = 1.  Introduction =
25
26 == 1.1  ​What is LDS03A Open/Close Door Sensor ==
27
28 (((
29
30
31 (((
32 The Dragino LDS03A is an (% style="color:blue" %)**Open/Close LoRaWAN Door Sensor**(%%). It detects door open/close status and uplinks to IoT server via LoRaWAN network. user can see the door status, open duration, open counts in the IoT Server.
33 )))
34
35 (((
36 LDS03A is powered by a (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%). It can be used for up to 10 years.
37 )))
38
39 (((
40 The LDS03A will send periodically data every 2 hours as well as for each door open/close action. It also counts the door open times and calculates the last door open duration. Users can also disable the uplink for each open/close event, instead, LDS03A can count each open event and uplink periodically.
41 )))
42
43 (((
44 LDS03A has a (% style="color:blue" %)**Datalog feature**(%%), it will record the open/close event and the user can retrieve the history from LoRaWAN.
45 )))
46
47 (((
48 LDS03A has the (% style="color:blue" %)**open alarm feature**(%%), user can set this feature so the device will send an alarm if the door has been open for a certain time.
49 )))
50
51 (((
52 LDS03A is designed for outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
53 )))
54
55 (((
56 Each LDS03A is pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto-connect after power on.
57 )))
58
59 (((
60 *Battery life depends on how often to send data, please see [[battery analyzer>>||anchor="H4.A0Battery26Howtoreplace"]].
61 )))
62 )))
63
64
65 == ​1.2  Features ==
66
67
68 * LoRaWAN v1.0.3 Class A protocol.
69 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
70 * Door Open/Close detect
71 * Door open/close statistics
72 * Probe length: 40cm
73 * 8500mAh industrial battery(none-rechargeable)
74 * AT Commands to change parameters
75 * Uplink on periodically and open/close event
76 * Datalog feature
77 * Remote configure parameters via LoRa Downlink
78 * Firmware upgradable via program port
79 * Wall Mountable
80 * Outdoor Use
81
82 == 1.3  Storage & Operation Temperature ==
83
84
85 -40°C to +85°C
86
87
88 == 1.4  ​Applications ==
89
90
91 [[image:1654741400370-813.png]]
92
93
94 == 1.5  Mechanical ==
95
96
97 [[image:1654741444887-479.png||height="404" width="519"]](% style="display:none" %)
98
99
100 [[image:1654741488515-626.png||height="321" width="787"]]
101
102
103 [[image:1654741510204-377.png||height="461" width="728"]]
104
105
106 == 1.6  Pin Definitions and Switch ==
107
108
109 [[image:1654741572060-177.png]]
110
111 **LDS03A is based on LSN50v2**
112
113
114 === 1.6.1  Pin Definition ===
115
116
117 (((
118 The device is pre-configured to connect to a door sensor. The other pins are not used. If user wants to know more about other pins, please refer to the user manual of LSN50v2 at:  [[https:~~/~~/www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0>>https://www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0]]
119 )))
120
121
122 === 1.6.2  Jumper JP2(Power ON/OFF) ===
123
124
125 Power on Device when putting this jumper.
126
127
128 === 1.6.3  BOOT MODE / SW1 ===
129
130
131 (((
132 1)  ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run.
133 )))
134
135 (((
136 2)  Flash: work mode, the device starts to work and send out console output for further debug
137 )))
138
139
140 === 1.6.4  Reset Button ===
141
142
143 Press to reboot the device.
144
145
146 === 1.6.5  LED ===
147
148
149 It will flash:
150
151 ~1. Boot the device in flash mode
152
153 2. Send an uplink packet
154
155
156 == 1.7 Magnet Distance ==
157
158
159 * Wood Door: 10mm ~~ 30mm
160 * Iron Door: 30 ~~ 45mm
161
162 = 2.  Operation Mode =
163
164 == 2.1  How it works ==
165
166
167 (((
168 Each LDS03A is shipped with a worldwide unique set of OTAA keys. To use LDS03A in a LoRaWAN network, user needs to input the OTAA keys in the LoRaWAN network server. So LDS03A can join the LoRaWAN network and start to transmit sensor data.
169 )))
170
171
172 == 2.2  Example to use for LoRaWAN network ==
173
174
175 (((
176 This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are similar.
177 )))
178
179 (((
180 [[image:1654742304325-850.png]]
181
182
183 )))
184
185 (((
186 * In this user case, the LDS03A is installed on the door edge to detect the open/close event and send the status to the LoRaWAN server. The LDS03A will uplink different types of messages to the LoRaWAN server. See [[Uplink payload>>||anchor="H2.3A0200BUplinkPayload"]] for detail.
187
188 (((
189
190
191 Assume the LG308 is already set to connect to the [[TTN V3 network >>url:https://eu1.cloud.thethings.network]]. We need to add the LDS03A device in TTN V3:
192
193
194 )))
195 )))
196
197 (((
198 (((
199 (% style="color:blue" %)**Step 1**(%%):  Create a device in TTN V3 with the OTAA keys from LDS03A.
200 )))
201
202 (((
203 Each LDS03A is shipped with a sticker with the default device EUI as below:
204 )))
205 )))
206
207 [[image:image-20230426084953-1.png||height="255" width="550"]]
208
209
210 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
211
212 **Create the application.**
213
214 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SAC01L_LoRaWAN_Temperature%26Humidity_Sensor_User_Manual/WebHome/image-20250423093843-1.png?width=756&height=264&rev=1.1||alt="image-20250423093843-1.png"]]
215
216 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111305-2.png?width=1000&height=572&rev=1.1||alt="image-20240907111305-2.png"]]
217
218
219 **Add devices to the created Application.**
220
221 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111659-3.png?width=977&height=185&rev=1.1||alt="image-20240907111659-3.png"]]
222
223 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111820-5.png?width=975&height=377&rev=1.1||alt="image-20240907111820-5.png"]]
224
225
226 **Enter end device specifics manually.**
227
228 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112136-6.png?width=697&height=687&rev=1.1||alt="image-20240907112136-6.png"]]
229
230
231 **Add DevEUI and AppKey. Customize a platform ID for the device.**
232
233 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112427-7.png?rev=1.1||alt="image-20240907112427-7.png"]]
234
235
236 (% style="color:blue" %)**Step 2**(%%):** Add decoder.**
237
238 [[image:1654742860601-778.png||height="402" width="678"]](% style="display:none" %)
239
240
241 (((
242 Put the jumper to power on LDS03A and it will auto-join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and the user can see it in the panel.
243 )))
244
245 [[image:image-20220609104802-1.png||height="369" width="1123"]]
246
247
248 == 2.3  ​Uplink Payload ==
249
250
251 (((
252 (((
253 Uplink payloads have two types:
254 )))
255
256 * (((
257 Open/Close Status: Use FPORT=2
258 )))
259 * (((
260 Other control commands: Use other FPORT fields.
261 )))
262
263 (((
264 The application server should parse the correct value based on FPORT settings.
265 )))
266
267 (((
268
269 )))
270
271 === 2.3.1  Device Status, FPORT~=5 ===
272
273
274 )))
275
276 (((
277 Include device configure status. Once LDS03A Joined the network, it will uplink this message to the server. After that, LDS03A will uplink Device Status every 12 hours.
278 )))
279
280 (((
281 Users can also use the downlink command**(0x26 01)** to ask LDS03A to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.
282 )))
283
284 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
285 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
286 |(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:44px" %)**2**
287 |(% 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
288
289 Example parse in TTNv3
290
291 [[image:image-20220609105101-2.png||height="295" width="1208"]]
292
293
294 * (% style="color:#4f81bd" %)**Sensor Model**(%%): For LDS03A, this value is 0x0A
295
296 * (% style="color:#4f81bd" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
297
298 * (% style="color:#4f81bd" %)**Frequency Band**:
299
300 *0x01: EU868
301
302 *0x02: US915
303
304 *0x03: IN865
305
306 *0x04: AU915
307
308 *0x05: KZ865
309
310 *0x06: RU864
311
312 *0x07: AS923
313
314 *0x08: AS923-1
315
316 *0x09: AS923-2
317
318 *0x0a: AS923-3
319
320 *0x0b: CN470
321
322 *0x0c: EU433
323
324 *0x0d: KR920
325
326 *0x0e: MA869
327
328
329 * (% style="color:#4f81bd" %)**Sub-Band**:
330 ** AU915 and US915:value 0x00 ~~ 0x08
331 ** CN470: value 0x0B ~~ 0x0C
332 ** Other Bands: Always 0x00
333
334 * (% style="color:#4f81bd" %)**Battery Info:**
335
336 Check the battery voltage.
337
338 Ex1: 0x0B45 = 2885mV
339
340 Ex2: 0x0B49 = 2889mV
341
342
343 === 2.3.2  Sensor Configuration, FPORT~=4 ===
344
345
346 (((
347 LDS03A will only send this command after getting the downlink command (0x26 02) from the server.
348 )))
349
350 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
351 |(% colspan="5" style="background-color:#4f81bd; color:white; width:504px" %)**Sensor Configuration FPORT=4**
352 |**Size(bytes)**|(% style="width:75px" %)**3**|(% style="width:77px" %)**1**|(% style="width:96px" %)**1**|(% style="width:158px" %)**2**
353 |Value|(% style="width:75px" %)TDC (unit:sec)|(% style="width:77px" %)Disalarm|(% style="width:96px" %)Keep status|(% style="width:158px" %)Keep time (unit: min)
354
355 (((
356
357 )))
358
359 (((
360
361 )))
362
363 * (((
364 (% style="color:#4f81bd" %)**TDC: (default: 0x001C20)**
365 )))
366
367 (((
368 Uplink interval for the Open/Close Event, default value is 0x001C20 which is 7200 seconds = 2 hours.
369 )))
370
371 (((
372
373 )))
374
375 * (((
376 (% style="color:#4f81bd" %)**Disalarm: (default: 0)**
377 )))
378
379 (((
380 (% style="color:#037691" %) **If Disalarm = 1**(%%), LDS03A will only send uplink at every TDC periodically. This is normally use for pulse meter application, in this application, there are many open/close event, and platform only care about the total number of pulse.
381 )))
382
383 (((
384 (% style="color:#037691" %) **If Disalarm = 0**(%%), LDS03A will send uplink at every TDC periodically and send data on each open/close event. This is useful for the application user need to monitor the open/close event in real-time.
385
386
387 )))
388
389 (((
390 (% style="color:red" %)** Note: When Disalarm=0, a high frequently open/close event will cause lots of uplink and drain battery very fast. **
391 )))
392
393 (((
394
395 )))
396
397 * (((
398 (% style="color:#4f81bd" %)**Keep Status & Keep Time**
399 )))
400
401 (((
402 Shows the configure value of [[Alarm Base on Timeout Feature>>||anchor="H3.8A0AlarmBaseonTimeout"]]
403 )))
404
405
406
407
408 [[image:image-20220609110018-4.png||height="291" width="1159"]]
409
410
411 === 2.3.3  Real-Time Open/Close Status, Uplink FPORT~=2 ===
412
413
414 LDS03A will send this uplink **after** Device Status once join the LoRaWAN network successfully. And LDS03A will:
415
416 ~1. periodically send this uplink every 2 hours, this interval [[can be changed>>||anchor="H3.1A0SetTransmitIntervalTime"]].
417
418 2. There is an Open/Close event. 
419
420
421 Uplink Payload totals 11 bytes.
422
423 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
424 |=(% colspan="5" style="background-color:#4F81BD;color:white; width: 515px;" %)**Real-Time Open/Close Status, FPORT=2**
425 |(% style="width:95px" %)**Size(bytes)**|(% style="width:78px" %)**1**|(% style="width:98px" %)**3**|(% style="width:144px" %)**3**|(% style="width:108px" %)**4**
426 |(% style="width:95px" %)Value|(% style="width:78px" %)Status & [[Alarm>>||anchor="H3.8A0AlarmBaseonTimeout"]]|(% style="width:98px" %)Total open door events|(% style="width:144px" %)(((
427 The last door open duration
428 )))|(% style="width:108px" %)[[Unix TimeStamp>>||anchor="H2.4.1A0UnixTimeStamp"]]
429
430 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
431 |=(% colspan="4" style="background-color:#4F81BD;color:white; width: 515px;" %)**Status & Alarm field**
432 |(% style="width:76px" %)**Size(bit)**|(% style="width:70px" %)**6**|(% style="width:240px" %)**1**|(% style="width:130px" %)**1**
433 |(% style="width:76px" %)Value|(% style="width:70px" %)Reserve|(% style="width:240px" %)[[Enable/disable Timeout Alarm>>||anchor="H3.4A0Enable2FDisableAlarm"]]
434 0: No Alarm; 1: Alarm|(% style="width:130px" %)Status
435 0: Close, 1: Open
436
437 [[image:image-20220609110547-6.png||height="337" width="1191"]]
438
439
440 * (((
441 (% style="color:blue" %)**Alarm**
442 )))
443
444 see [[Enable/disable Timeout Alarm>>||anchor="H3.4A0Enable2FDisableAlarm"]]
445
446 * (((
447 (% style="color:blue" %)**Status**
448 )))
449
450 This bit is 1 when the door sensor is open and this bit is 0 when it is close.
451
452 * (((
453 (% style="color:blue" %)**Total open door events**
454 )))
455
456 Total pulse/counting base on open door.
457
458 Range (3 Bytes) : 0x000000 ~~ 0xFFFFFF . Max: 16777215
459
460 * (((
461 (% style="color:blue" %)**The last door open duration**
462 )))
463
464 Door sensor last open duration.
465
466 (% style="color:red" %)**Note: For firmware versions prior to V1.2.0, the last opened duration of the door sensor is measured in minutes; for firmware V1.2.0 and later versions, the last opened time of the door sensor is measured in seconds.**
467
468 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/DS03A-LB/WebHome/image-20230701094042-1.png?width=763&height=154&rev=1.1||alt="image-20230701094042-1.png" height="154" width="763"]]
469
470
471 === 2.3.4  Historical Door Open/Close Event, FPORT~=3 ===
472
473
474 (((
475 LDS03A stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.4A0DatalogFeature"]].
476 )))
477
478 (((
479 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time open/close status.
480 )))
481
482 (((
483
484 )))
485
486 * (((
487 Each data entry is 11 bytes and has the same structure as [[Real-Time open/close status>>||anchor="H2.3.3A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]], to save airtime and battery, LDS03A will send max bytes according to the current DR and Frequency bands.
488 )))
489
490 (((
491 For example, in the US915 band, the max payload for different DR is:
492 )))
493
494 1. (((
495 (% style="color:blue" %)**DR0**(%%): max is 11 bytes so one entry of data
496 )))
497 1. (((
498 (% style="color:blue" %)**DR1**(%%): max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
499 )))
500 1. (((
501 (% style="color:blue" %)**DR2**(%%): total payload includes 11 entries of data
502 )))
503 1. (((
504 (% style="color:blue" %)**DR3**(%%): total payload includes 22 entries of data.
505 )))
506
507 (((
508
509
510 If LDS03A doesn't have any data in the polling time. It will uplink 11 bytes of 0
511 )))
512
513
514
515
516 [[image:image-20220609112215-7.png||height="277" width="1250"]]
517
518
519 (((
520 (% style="color:#037691" %)**Downlink:**
521 )))
522
523 (((
524 0x31 61 8E 57 40 61 8E 81 70 05
525 )))
526
527 (((
528
529 )))
530
531 (((
532 (% style="color:#037691" %)**Uplink:**
533 )))
534
535 (((
536 00 00 00 00 00 00 00 61 8E 5F 8F 01 00 00 01 00 00 00 61 8E 5F D2 00 00 00 01 00 00 02 61 8E 60 64 01 00 00 02 00 00 02 61 8E 60 75 00 00 00 02 00 00 01 61 8E 60 C6 00 00 00 02 00 00 01 61 8E 7B A7 01 00 00 03 00 00 01 61 8E 7F 38 00 00 00 03 00 00 02 61 8E 7F CE 01 00 00 04 00 00 02 61 8E 81 1B 00 00 00 04 00 00 00 61 8E 81 50
537 )))
538
539 (((
540
541 )))
542
543 (((
544 (% style="color:#037691" %)**Parsed Value:**
545 )))
546
547 (((
548 [ALARM, DOOR_OPEN_STATUS, DOOR_OPEN_TIMES,LAST_DOOR_OPEN_DURATION, TIME]
549 )))
550
551 (((
552
553 )))
554
555 (((
556 [FALSE, CLOSE, 0, 0, 2021-11-12 12:35:27],
557 )))
558
559 (((
560 [FALSE, OPEN,  1, 0, 2021-11-12 12:36:34],
561 )))
562
563 (((
564 [FALSE, CLOSE, 1, 2, 2021-11-12 12:39:00],
565 )))
566
567 (((
568 [FALSE, OPEN,  2, 2, 2021-11-12 12:39:17],
569 )))
570
571 (((
572 [FALSE, CLOSE, 2, 1, 2021-11-12 12:40:38],
573 )))
574
575 (((
576 [FALSE, CLOSE, 2, 1, 2021-11-12 14:35:19],
577 )))
578
579 (((
580 [FALSE, OPEN,  3, 1, 2021-11-12 14:50:32],
581 )))
582
583 (((
584 [FALSE, CLOSE, 3, 2, 2021-11-12 14:53:02],
585 )))
586
587 (((
588 [FALSE, OPEN,  4, 2, 2021-11-12 14:58:35],
589 )))
590
591 (((
592 [FALSE, CLOSE, 4, 0, 2021-11-12 14:59:28],
593 )))
594
595
596 == 2.4  Datalog Feature ==
597
598
599 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, LDS03A will store the reading for future retrieving purposes.
600
601
602 === 2.5.1 How datalog works ===
603
604
605 LDS03A will wait for ACK for every uplink, when there is no LoRaWAN network,LDS03A will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery.
606
607 * (((
608 a) LDS03A will do an ACK check for data records sending to make sure every data arrive server.
609 )))
610 * (((
611 b) LDS03A will send data in **CONFIRMED Mode**, but LDS03A won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if LDS03A gets a ACK, LDS03A will consider there is a network connection and resend all NONE-ACK messages.
612
613
614 )))
615
616 === 2.5.2 Enable Datalog ===
617
618
619 User need to make sure below two settings are enable to use datalog;
620
621 * (% style="color:blue" %)**SYNCMOD=1(Default)**(%%) to enable sync time via LoRaWAN MAC command, click here ([[AT+SYNCMOD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.6Settimesynchronizationmethod28ThenetworkservermustsupportLoRaWANv1.0.329]]) for detailed instructions.
622 * (% style="color:blue" %)**PNACKMD=1**(%%)** **to enable datalog feature, click here ([[AT+PNACKMD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H7.26RequesttheservertosendanACK]]) for detailed instructions.
623
624
625
626 Once LDS03A Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LDS03A . If LDS03A fails to get the time from the server, LDS03A will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
627
628 (% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.**
629
630
631 === 2.4.1  Unix TimeStamp ===
632
633
634 LDS03A use Unix TimeStamp format based on
635
636 [[image:image-20220609113256-8.png]]
637
638
639 (((
640 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
641 )))
642
643 (((
644 Below is the converter example
645 )))
646
647 [[image:image-20220609113256-9.png||height="467" width="1127"]]
648
649
650 (((
651 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
652 )))
653
654
655 == 2.5 ​Show Data in DataCake IoT Server ==
656
657
658 (((
659 (((
660 Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
661 )))
662 )))
663
664 (((
665 (((
666
667 )))
668 )))
669
670 (((
671 (((
672 (% style="color:blue" %)**Step 1**(%%)**: Link TTNv3 to Datacake.**[[https:~~/~~/docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti>>url:https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti]]
673 )))
674 )))
675
676 (((
677 (((
678 (% style="color:blue" %)**Step 2**(%%)**: Configure LDS03A in Datacake.**
679 )))
680 )))
681
682
683 [[image:1654746350207-427.png]]
684
685
686 [[image:1654747162439-840.png]]
687
688
689 [[image:1654746405400-203.png]]
690
691
692
693 [[image:1654746763908-732.png]]
694
695
696
697 [[image:1654746716087-684.png]]
698
699
700 [[image:1654746693868-718.png]]
701
702
703 [[image:1654746674738-826.png]]
704
705
706 [[image:1654746646379-591.png]]
707
708
709 [[image:1654746549277-209.png]]
710
711
712 [[image:1654746593411-887.png]]
713
714
715 = 3.  Configure LDS03A via AT Command or LoRaWAN Downlink =
716
717
718 (((
719 Use can configure LDS03A via AT Command or LoRaWAN Downlink.
720 )))
721
722 * (((
723 AT Command Connection: See [[FAQ>>||anchor="H5.A0FAQ"]].
724 )))
725 * (((
726 LoRaWAN Downlink instruction for different platforms: [[IoT LoRaWAN Server>>doc:Main.WebHome]]
727
728
729 )))
730
731 (((
732 There are two kinds of commands to configure LDS03A, they are:
733 )))
734
735 * (((
736 (% style="color:#4f81bd" %)** General Commands**.
737 )))
738
739 (((
740 These commands are to configure:
741 )))
742
743 * (((
744 General system settings like: uplink interval.
745 )))
746 * (((
747 LoRaWAN protocol & radio related command.
748 )))
749
750 (((
751 They are same for all Dragino Device which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]]
752 )))
753
754 (((
755
756 )))
757
758 * (((
759 (% style="color:#4f81bd" %)** Commands special design for LDS03A**
760 )))
761
762 (((
763 These commands only valid for LDS03A, as below:
764 )))
765
766
767
768
769 == 3.1  Work Mod ==
770
771
772 Feature: Manually set the work mode. LDS03A and CPL01 use the same firmware. User is possible to switch between this two models.
773
774 **AT Command:**
775
776
777 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
778 |=(% style="width: 170px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 212px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="background-color: rgb(79, 129, 189); color: white; width: 127px;" %)**Response**
779 |(% style="width:156px" %)AT+MOD=1|(% style="width:212px" %)Set the sensor to LDS03A.|(% style="width:127px" %)(((
780 OK
781 )))
782 |(% style="width:156px" %)AT+MOD=2|(% style="width:212px" %)Set the sensor to CPL01.|(% style="width:127px" %)(((
783 OK
784 )))
785
786 (% style="color:#4472c4" %)**Downlink Command: 0x0A**
787
788 Example1:  0A 01  => AT+MOD=1
789
790 Example2:  0A 02  => AT+MOD=2
791
792
793 == 3.2  Set Transmit Interval Time ==
794
795
796 Feature: Change LoRaWAN End Node Transmit Interval.
797
798 (% style="color:#4472c4" %)**AT Command: AT+TDC**
799
800 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
801 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
802 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
803 30000
804 OK
805 the interval is 30000ms = 30s
806 )))
807 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
808 OK
809 Set transmit interval to 60000ms = 60 seconds
810 )))
811
812 (((
813 (% style="color:#4472c4" %)**Downlink Command: 0x01**
814 )))
815
816 (((
817 Format: Command Code (0x01) followed by 3 bytes time value.
818 )))
819
820 (((
821 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
822 )))
823
824 * (((
825 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
826 )))
827 * (((
828 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
829
830
831
832 )))
833
834 == 3.3  Set Password ==
835
836
837 Feature: Set device password, max 9 digits.
838
839 (% style="color:#4472c4" %)**AT Command: AT+PWORD**
840
841 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:405px" %)
842 |=(% style="width: 170px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 123px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 112px;background-color:#4F81BD;color:white" %)**Response**
843 |(% style="width:170px" %)(((
844 AT+PWORD=?
845 )))|(% style="width:123px" %)(((
846 Show password
847 )))|(% style="width:109px" %)(((
848 (((
849 123456
850 )))
851
852 (((
853 OK
854 )))
855 )))
856 |(% style="width:170px" %)(((
857 AT+PWORD=999999
858 )))|(% style="width:123px" %)(((
859 Set password
860 )))|(% style="width:109px" %)(((
861 OK
862 )))
863
864 (% style="color:#4472c4" %)**Downlink Command:**
865
866 No downlink command for this feature.
867
868
869 == 3.4  Quit AT Command ==
870
871
872 Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.
873
874 (% style="color:#4472c4" %)**AT Command: AT+DISAT**
875
876 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:452px" %)
877 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 198px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 99px;background-color:#4F81BD;color:white" %)**Response**
878 |(% style="width:155px" %)AT+DISAT|(% style="width:198px" %)Quit AT Commands mode|(% style="width:96px" %)OK
879
880 (% style="color:#4472c4" %)**Downlink Command:**
881
882 No downlink command for this feature.
883
884
885 == 3.5  Enable / Disable Alarm ==
886
887
888 Feature: Enable/Disable Alarm for open/close event. Default value 0.
889
890 (% style="color:#4472c4" %)**AT Command:**
891
892 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
893 |(% style="background-color:#4f81bd; color:white; width:154px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:278px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:78px" %)**Response**
894 |(% style="width:154px" %)AT+DISALARM=1|(% style="width:278px" %)End node will only send packets in TDC time.|OK
895 |(% style="width:154px" %)AT+DISALARM=0|(% style="width:278px" %)End node will send packets in TDC time or status change for door sensor|OK
896
897 (% style="color:#4472c4" %)**Downlink Command:**
898
899 0xA7 01  ~/~/ Same As AT+DISALARM=1
900
901 0xA7 00  ~/~/ Same As AT+DISALARM=0
902
903
904 == 3.6  Clear count ==
905
906
907 Feature: Clear current door open.
908
909 (% style="color:#4472c4" %)**AT Command:**
910
911 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:511px" %)
912 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 266px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**Response**
913 |(% style="width:155px" %)AT+CLRC|(% style="width:266px" %)Clear the count of door open events.|(% style="width:85px" %)OK
914
915 (% style="color:#4472c4" %)**Downlink Command:**
916
917 0xA6 01 ~/~/ Same As AT+ CLRC
918
919
920 == 3.7  Set system time ==
921
922
923 Feature: Set system time, Unix format. [[See here for format detail.>>||anchor="H2.4.1A0UnixTimeStamp"]]
924
925 (% style="color:#4472c4" %)**AT Command:**
926
927 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
928 |=(% style="background-color:#4F81BD;color:white" %)**Command Example**|=(% style="background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
929 |AT+TIMESTAMP=1611104352|Set System time to 2021-01-20 00:59:12|OK
930
931 (% style="color:#4472c4" %)**Downlink Command:**
932
933 0x306007806000  ~/~/ Set timestamp to 0x(6007806000),Same as AT+TIMESTAMP=1611104352
934
935
936 == 3.8  Set Time Sync Mode ==
937
938
939 (((
940 Feature: Enable/Disable Sync system time via LoRaWAN MAC Command (DeviceTimeReq), LoRaWAN server must support v1.0.3 protocol to reply to this command.
941 )))
942
943 (((
944 SYNCMOD is set to 1 by default. If user wants to set a different time from the LoRaWAN server, the user needs to set this to 0.
945 )))
946
947
948 (% style="color:#4472c4" %)**AT Command:**
949
950 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
951 |=(% style="background-color:#4F81BD;color:white" %)**Command Example**|=(% style="background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
952 |AT+SYNCMOD=1|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) The default is zero time zone.|OK
953 |AT+SYNCMOD=1,8|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to East eight time zone.|OK
954 |AT+SYNCMOD=1,-12|Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to West Twelve Time Zone.|OK
955
956 (% style="color:#4472c4" %)**Downlink Command:**
957
958 0x28 01  ~/~/ Same As AT+SYNCMOD=1
959
960 0x28 01 08  ~/~/ Same As AT+SYNCMOD=1,8
961
962 0x28 01 F4  ~/~/ Same As AT+SYNCMOD=1,-12
963
964 0x28 00  ~/~/ Same As AT+SYNCMOD=0
965
966
967 == 3.9  Alarm Base on Timeout ==
968
969
970 (((
971 LDS03A can monitor the timeout for a status change, this feature can be used to monitor some events such as door opening too long etc. Related Parameters are:
972 )))
973
974
975 * (((
976 (% style="color:blue" %)**Keep Status: Status to be monitor**
977 )))
978
979 (((
980 Keep Status = 1: Monitor Close to Open event
981 )))
982
983 (((
984 Keep Status = 0: Monitor Open to Close event
985 )))
986
987
988
989
990 * (((
991 (% style="color:blue" %)**Keep Time: Timeout to send an Alarm**
992 )))
993
994 (((
995 Range 0 ~~ 65535(0xFFFF) seconds.
996 )))
997
998 (((
999 If keep time = 0, Disable Alarm Base on Timeout feature.
1000 )))
1001
1002 (((
1003 If keep time > 0, device will monitor the keep status event and send an alarm when status doesn't change after timeout.
1004 )))
1005
1006
1007
1008
1009 (((
1010 (% style="color:#4472c4" %)**AT Command to configure:**
1011 )))
1012
1013 * (((
1014 (% style="color:red" %)**AT+TTRIG=1,30** (%%) **~-~->** When the **Keep Status** change from close to open, and device remains in open status for more than 30 seconds. LDS03A will send an uplink packet, the [[Alarm bit>>||anchor="H2.3.3A0Real-TimeOpen2FCloseStatus2CUplinkFPORT3D2"]] (the second bit of 1^^st^^ byte of payload) on this uplink packet is set to 1.
1015 )))
1016
1017 * (((
1018 (% style="color:red" %)**AT+TTRIG=0,0**  (%%) **~-~-> ** Default Value, disable timeout Alarm.
1019 )))
1020
1021 (((
1022 (% style="color:#4472c4" %)**Downlink Command to configure:**
1023 )))
1024
1025 (((
1026 **Command: (% style="color:red" %)0xA9 aa bb cc(%%)**
1027 )))
1028
1029 (((
1030 **A9:** Command Type Code
1031 )))
1032
1033 (((
1034 **aa:** status to be monitored
1035 )))
1036
1037 (((
1038 **bb cc:** timeout.
1039 )))
1040
1041 (((
1042 If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30
1043 )))
1044
1045 (((
1046 **Or**
1047 )))
1048
1049 (((
1050 0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.
1051 )))
1052
1053
1054
1055
1056 == 3.10  Clear Flash Record ==
1057
1058
1059 (((
1060 Feature: Clear flash storage for data log feature.
1061 )))
1062
1063 (((
1064 (% style="color:#4472c4" %)**AT Command: AT+CLRDTA**
1065 )))
1066
1067 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
1068 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 169px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 174px;background-color:#4F81BD;color:white" %)**Response**
1069 |(% style="width:157px" %)AT+CLRDTA|(% style="width:169px" %)Clear flash storage for data log feature.|Clear all stored sensor data… OK
1070
1071 (((
1072 (((
1073 (% style="color:#4472c4" %)**Downlink Command:**
1074 )))
1075
1076 (((
1077 Example: 0xA301  ~/~/  Same as AT+CLRDTA
1078 )))
1079 )))
1080
1081
1082
1083
1084 == 3.11  Count Mod (Since firmware v1.2.0)(unreleased version) ==
1085
1086
1087 (% style="color:#4472c4" %)**AT Command:**
1088
1089 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:495px" %)
1090 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 246px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 92px;background-color:#4F81BD;color:white" %)**Response**
1091 |(% style="width:157px" %)(((
1092 AT+COUNTMOD=0
1093 )))|(% style="width:156px" %)(((
1094 the count value keeps accumulating mode
1095 )))|(% style="width:89px" %)(((
1096 (((
1097
1098 )))
1099
1100 (((
1101 OK
1102 )))
1103 )))
1104 |(% style="width:157px" %)(((
1105 AT+COUNTMOD=1
1106 )))|(% style="width:156px" %)(((
1107 the count value will be reset after each TDC time(Last Close Duration Reset after each uplink)
1108 )))|(% style="width:89px" %)(((
1109 OK
1110 )))
1111
1112 (% style="color:#4472c4" %)**Downlink Command:**
1113
1114 Example:  0B aa  => AT+COUNTMOD = second byte
1115
1116
1117 == 3.12  Interrupt Pin Channel Mod(Since firmware v1.2.0)(unreleased version) ==
1118
1119
1120 (% style="color:#4472c4" %)**AT Command:**
1121
1122 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:495px" %)
1123 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 246px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 92px;background-color:#4F81BD;color:white" %)**Response**
1124 |(% style="width:157px" %)(((
1125 AT+TTRCHANNEL=1
1126 )))|(% style="width:156px" %)(((
1127 set as single channel, only use PB14 pin as interrupt pin.
1128 )))|(% style="width:89px" %)(((
1129 (((
1130
1131 )))
1132
1133 (((
1134 OK
1135 )))
1136 )))
1137 |(% style="width:157px" %)(((
1138 AT+TTRCHANNEL=2
1139 )))|(% style="width:156px" %)(((
1140 is set as dual channel, use PB14 pin and PB15 pin as interrupt pin.
1141 )))|(% style="width:89px" %)(((
1142 OK
1143 )))
1144
1145 (% style="color:#4472c4" %)**Downlink Command:**
1146
1147 Example:  0D aa => AT+TTRCHANNEL = second byte
1148
1149
1150 == 3.13  Change the name of AT+TTRIG to AT+TTRIG1(Since firmware v1.2.0)(unreleased version) ==
1151
1152
1153 (% style="color:#4472c4" %)**Downlink Command:**
1154
1155 Example:  A9 01 aa bb cc  => AT+TTRIG1= third byte, 4th byte and 5th byte
1156
1157
1158 == 3.14  Added AT+TTRIG2 for PB15 pin(Since firmware v1.2.0)(unreleased version) ==
1159
1160
1161 (% style="color:#4472c4" %)**Downlink Command:**
1162
1163 Example: A9 02 aa bb cc  => AT+TTRIG2= third byte, 4th byte and 5th byte
1164
1165
1166 == 3.15  TTRIG1/2 timeout status alarm(Since firmware v1.2.0)(unreleased version) ==
1167
1168
1169 It needs to be used with AT+TTRIG1 or AT+TTRIG2. When TTRIG1 or TTRIG2 times out and causes an alarm, and the status does not change subsequently, an alarm packet will be sent at the alarm interval.
1170
1171 (% style="color:#4472c4" %)**AT Command:**
1172
1173 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:495px" %)
1174 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 246px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 92px;background-color:#4F81BD;color:white" %)**Response**
1175 |(% style="width:157px" %)(((
1176 AT+TTRALARM=0
1177 )))|(% style="width:156px" %)(((
1178 disable continuous alarm
1179 )))|(% style="width:89px" %)(((
1180 (((
1181
1182 )))
1183
1184 (((
1185 OK
1186 )))
1187 )))
1188 |(% style="width:157px" %)(((
1189 AT+TTRALARM=60
1190 )))|(% style="width:156px" %)(((
1191 The alarm interval is 60 minutes (unit: minutes)
1192 )))|(% style="width:89px" %)(((
1193 OK
1194 )))
1195
1196 (% style="color:#4472c4" %)**Downlink Command:**
1197
1198 Example:  0C aa  => AT+TTRALARM= aa
1199
1200
1201 = 4. Battery & Power Consumption =
1202
1203
1204 LDS03A uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
1205
1206 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
1207
1208
1209 = 5.  FAQ =
1210
1211 == 5.1  How to use AT Command to configure LDS03A ==
1212
1213
1214 LDS03A UART connection photo
1215
1216 [[image:1654757007713-791.png]]
1217
1218
1219 (((
1220 In the PC, you need to set the serial baud rate to (% style="color:green" %)**9600**(%%) to access the serial console for LSN50. LSN50 will output system info once power on as below:
1221 )))
1222
1223 [[image:image-20220609144231-3.png||height="644" width="922"]]
1224
1225
1226 == 5.2  How to upgrade the firmware? ==
1227
1228
1229 (((
1230 A new firmware might be available for:
1231 )))
1232
1233 * (((
1234 Support new features
1235 )))
1236 * (((
1237 For bug fix
1238 )))
1239 * (((
1240 Change LoRaWAN bands.
1241 )))
1242
1243 (((
1244 Instruction for how to upgrade: [[Firmware Upgrade Instruction>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome||anchor="H2.HardwareUpgradeMethodSupportList"]]
1245 )))
1246
1247 (((
1248 Firmware location:  [[https:~~/~~/www.dropbox.com/sh/x9rpz9ftyljg135/AAAhC5hqtQOAw9_AoEEZbl9Ca?dl=0>>https://www.dropbox.com/sh/x9rpz9ftyljg135/AAAhC5hqtQOAw9_AoEEZbl9Ca?dl=0]]
1249 )))
1250
1251
1252
1253
1254 == 5.3  How to change the LoRa Frequency Bands/Region? ==
1255
1256
1257 Users can follow the introduction for how to upgrade image. When downloading the images, choose the required image file for download.
1258
1259
1260 = 6.  Trouble Shooting =
1261
1262 == 6.1  AT Commands input doesn't work ==
1263
1264
1265 In the case if user can see the console output but can't type input to the device. Please check if you already include the (% style="color:green" %)**ENTER**(%%) while sending out the command. Some serial tool doesn't send (% style="color:green" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string.
1266
1267
1268 = 7.  Order Info =
1269
1270
1271 Part Number: (% style="color:blue" %)**LDS03A-XX**
1272
1273
1274 (% style="color:blue" %)**XX**(%%): The default frequency band
1275
1276 * (% style="color:red" %)**AS923**(%%):  LoRaWAN AS923 band
1277 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
1278 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
1279 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
1280 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
1281 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
1282 * (% style="color:red" %)**IN865**(%%):  LoRaWAN IN865 band
1283 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
1284
1285 = 8.  ​Packing Info =
1286
1287
1288 **Package Includes**:
1289
1290 * LDS03A Open/Close Sensor x 1
1291
1292 = 9.  ​Support =
1293
1294
1295 * 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.
1296 * 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]].
1297
1298 = 10.  FCC Warning =
1299
1300
1301 This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions:
1302
1303 (1) This device may not cause harmful interference;
1304
1305 (2) this device must accept any interference received, including interference that may cause undesired operation.