Dragino LDS03A User manual

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 1 / 33
LDS03A Outdoor Open/Close Door Sensor Manual
Document Version: 1.0.0
Image Version: v1.0
Version
Description
Date
1.0
Release
2021-Nov-19

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 2 / 33
1. Introduction..............................................................................................................................4
1.1 What is LDS03A Open/Close Door Sensor ..................................................................................4
1.2 Features......................................................................................................................................6
1.3 Storage & Operation Temperature.............................................................................................6
1.4 Applications................................................................................................................................6
1.5 Mechanical.................................................................................................................................7
1.6 Pin Definitions and Switch..........................................................................................................8
1.6.1 Pin Definition ....................................................................................................................8
1.6.2 Jumper JP2(Power ON/OFF) .............................................................................................8
1.6.3 BOOT MODE / SW1...........................................................................................................8
1.6.4 Reset Button .....................................................................................................................8
1.6.5 LED....................................................................................................................................8
2. Operation Mode .......................................................................................................................9
2.1 How it works?.............................................................................................................................9
2.2 Example to use for LoRaWAN network.......................................................................................9
2.3 Uplink Payload..........................................................................................................................13
2.3.1 Device Status, FPORT=5..................................................................................................13
2.3.2 Sensor Configuration, FPORT=4......................................................................................14
2.3.3 Real-Time Open/Close Status, Uplink FPORT=2..............................................................15
2.3.4 Historical Door Open/Close Event, FPORT=3..................................................................15
2.4 Datalog Feature........................................................................................................................17
2.4.1 Unix TimeStamp..............................................................................................................17
2.4.2 Set Device Time ..............................................................................................................17
2.4.3 Poll sensor value.............................................................................................................18
2.4.4 Decoder in TTN V3..........................................................................................................18
2.5 Show data on Datacake............................................................................................................19
3. Configure LDS03A via AT Command or LoRaWAN Downlink....................................................23
3.1 Set Transmit Interval Time........................................................................................................23
3.2 Set Password ............................................................................................................................24
3.3 Quit AT Command ....................................................................................................................24
3.4 Enable / Disable Alarm.............................................................................................................24
3.5 Clear count ...............................................................................................................................25
3.6 Set system time ........................................................................................................................25

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 3 / 33
3.7 Set Time Sync Mode .................................................................................................................25
3.8 Alarm Base on Timeout ............................................................................................................26
3.9 Clear Flash Record ....................................................................................................................27
4. Battery & how to replace........................................................................................................28
4.1 Battery Type .............................................................................................................................28
4.2 Replace Battery ........................................................................................................................28
4.3 Power Consumption Analyze....................................................................................................28
4.3.1 Battery Note ...................................................................................................................29
4.3.2 Replace the battery.........................................................................................................30
5. FAQ.........................................................................................................................................31
5.1 How to use AT Command to configure LDS03A ........................................................................31
5.2 How to upgrade the firmware? ................................................................................................32
5.3 How to change the LoRa Frequency Bands/Region?................................................................32
6. Trouble Shooting.....................................................................................................................32
7. Order Info ...............................................................................................................................33
8. Packing Info ............................................................................................................................33
9. Support...................................................................................................................................33
10. FCC Warning.......................................................................................................................33

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 4 / 33
1. Introduction
1.1 What is LDS03A Open/Close Door Sensor
The Dragino LDS03A is an 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.
LDS03A is powered by a 8500mAh Li-SOCI2 battery. It can be used for up to 10 years.
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.
LDS03A has a Datalog feature, it will record the open/close event and the user can retrieve the
history from LoRaWAN.
LDS03A has the 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.
LDS03A is designed for outdoor use. It has a weatherproof enclosure and industrial level battery
to work in low to high temperatures.

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 5 / 33
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.
*Battery life depends on how often to send data, please see battery analyzer.

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 6 / 33
1.2 Features
✓LoRaWAN v1.0.3 Class A protocol.
✓Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
✓Door Open/Close detect
✓Door open/close statistics
✓8500mAh industrial battery(none-rechargeable)
✓AT Commands to change parameters
✓Uplink on periodically and open/close event
✓Datalog feature
✓Remote configure parameters via LoRa Downlink
✓Firmware upgradable via program port
✓Wall Mountable
✓Outdoor Use
1.3 Storage & Operation Temperature
-40°C to +85°C
1.4 Applications

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 7 / 33
1.5 Mechanical

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 8 / 33
1.6 Pin Definitions and Switch
LDS03A is based on LSN50v2
1.6.1 Pin Definition
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:
http://www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/
1.6.2 Jumper JP2(Power ON/OFF)
Power on Device when putting this jumper.
1.6.3 BOOT MODE / SW1
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.
2) Flash: work mode, the device starts to work and send out console output for further debug
1.6.4 Reset Button
Press to reboot the device.
1.6.5 LED
It will flash:
1) Boot the device in flash mode
2) Send an uplink packet

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 9 / 33
2. Operation Mode
2.1 How it works?
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.
2.2 Example to use for LoRaWAN network
This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other
LoRaWAN IoT servers are similar.
✓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 for detail.
Assume the LG308 is already set to connect to the TTN V3 network . We need to add the LDS03A
device in TTN V3:
Step 1: Create a device in TTN V3 with the OTAA keys from LDS03A.
Each LDS03A is shipped with a sticker with the default device EUI as below:

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 10 / 33
Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:
Add APP EUI in the application.

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 11 / 33

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 12 / 33
Add APP KEY and DEV EUI
Step 2: Power on LDS03A

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 13 / 33
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.
2.3 Uplink Payload
Uplink payloads have two types:
➢Open/Close Status: Use FPORT=2
➢Other control commands: Use other FPORT fields.
The application server should parse the correct value based on FPORT settings.
2.3.1 Device Status, FPORT=5
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.
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.
Example parse in TTNv3
Device Status (FPORT=5)
Size (bytes)
1
2
1
1
2
Value
Sensor Model
Firmware Version
Frequency Band
Sub-band
BAT

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 14 / 33
➢Sensor Model: For LDS03A, this value is 0x0A
➢Firmware Version: 0x0100, Means: v1.0.0 version
➢Frequency Band:
*0x01: EU868
*0x02: US915
*0x03: IN865
*0x04: AU915
*0x05: KZ865
*0x06: RU864
*0x07: AS923
*0x08: AS923-1
*0x09: AS923-2
*0x0a: AS923-3
*0x0b: CN470
*0x0c: EU433
*0x0d: KR920
*0x0e: MA869
➢Sub-Band:
✓AU915 and US915:value 0x00 ~ 0x08
✓CN470: value 0x0B ~ 0x0C
✓Other Bands: Always 0x00
➢Battery Info:
Check the battery voltage.
Ex1: 0x0B45 = 2885mV
Ex2: 0x0B49 = 2889mV
2.3.2 Sensor Configuration, FPORT=4
LDS03A will only send this command after getting the downlink command (0x26 02) from the
server.
Sensor Configuration FPORT=4
Size (bytes)
3
1
1
2
Value
TDC (unit: sec)
Disalarm
Keep status
Keep time (unit: min)

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 15 / 33
2.3.3 Real-Time Open/Close Status, Uplink FPORT=2
LDS03A will send this uplink after Device Status once join the LoRaWAN network successfully.
And LDS03A will:
a) periodically send this uplink every 2 hours, this interval can be changed.
b) There is an Open/Close event.
Uplink Payload totals 11 bytes.
2.3.4 Historical Door Open/Close Event, FPORT=3
LDS03A stores sensor values and users can retrieve these history values via the downlink
command.
The historical payload includes one or multiplies entries and every entry has the same payload as
Real-Time open/close status.
Real-Time Open/Close Status, FPORT=2
Size (bytes)
1
3
3
4
Value
Status &
Alarm
Total open
door events
The last door open
duration (unit: min)
Unix TimeStamp
Status & Alarm field
Size (bit)
6
1
1
Value
Reserve
Enable/disable Timeout Alarm
0: No Alarm; 1: Alarm
Status
0: Close, 1: Open

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 16 / 33
➢Each data entry is 11 bytes and has the same structure as Real-Time open/close status, to
save airtime and battery, LDS03A will send max bytes according to the current DR and
Frequency bands.
For example, in the US915 band, the max payload for different DR is:
a) DR0: max is 11 bytes so one entry of data
b) DR1: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
c) DR2: total payload includes 11 entries of data
d) DR3: total payload includes 22 entries of data.
If LDS03A doesn’t have any data in the polling time. It will uplink 11 bytes of 0
Downlink:
0x31 61 8E 57 40 61 8E 81 70 05
Uplink:
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
Parsed Value:
[ALARM, DOOR_OPEN_STATUS, DOOR_OPEN_TIMES,LAST_DOOR_OPEN_DURATION, TIME]
[FALSE,CLOSE,0,0,2021-11-12 12:35:27],
[FALSE,OPEN,1,0,2021-11-12 12:36:34],
[FALSE,CLOSE,1,2,2021-11-12 12:39:00],
[FALSE,OPEN,2,2,2021-11-12 12:39:17],
[FALSE,CLOSE,2,1,2021-11-12 12:40:38],
[FALSE,CLOSE,2,1,2021-11-12 14:35:19],
[FALSE,OPEN,3,1,2021-11-12 14:50:32],
[FALSE,CLOSE,3,2,2021-11-12 14:53:02],
[FALSE,OPEN,4,2,2021-11-12 14:58:35],
[FALSE,CLOSE,4,0,2021-11-12 14:59:28],

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 17 / 33
2.4 Datalog Feature
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.
2.4.1 Unix TimeStamp
LDS03A use Unix TimeStamp format based on
Users can get this time from the link: https://www.epochconverter.com/ :
Below is the converter example
So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time
2021 –Jan -- 29 Friday 03:03:25
2.4.2 Set Device Time
There are two ways to set the device’s time:
1. Through LoRaWAN MAC Command (Default settings)
Users need to set SYNCMOD=1 to enable sync time via the MAC command.
Once LDS03A Joined the 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 the next time request
[via Device Status (FPORT=5)].
Note: LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this
MAC command feature.

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 18 / 33
2. Manually Set Time
Users need to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten
by the time set by the server.
2.4.3 Poll sensor value
Users can poll sensor values based on timestamps. Below is the downlink command.
Downlink Command to poll Open/Close status (0x31)
1byte
4bytes
4bytes
1byte
31
Timestamp start
Timestamp end
Uplink Interval
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.
For example, downlink command 31 618E5740 618E8170 05
Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00’s data
Uplink Internal =5s,means LDS03A will send one packet every 5s. range 5~255s.
2.4.4 Decoder in TTN V3
Please check the decoder from this link:
https://www.dragino.com/downloads/index.php?dir=LoRa_End_Node/LDS03A/paylo
ad_decode/

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 19 / 33
2.5 Show data on Datacake
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:
Step 1: Link TTNv3 to Datacake
https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti
Step 2: Configure LDS03A in Datacake

www.dragino.com
LDS03A Outdoor Open/Close Door Sensor 20 / 33
Table of contents
Other Dragino Accessories manuals

Dragino
Dragino LDDS04 User manual

Dragino
Dragino LHT65 User manual

Dragino
Dragino LHT52 User manual

Dragino
Dragino LoRaWAN LDS02 User manual

Dragino
Dragino LHT65 User manual

Dragino
Dragino LSN50 LoRa User manual

Dragino
Dragino LoRaWAN LiDAR ToF User manual

Dragino
Dragino D20-LB User manual

Dragino
Dragino LDS01 User manual

Dragino
Dragino LWL01 User manual