Table of Contents:

1. Introduction

1.1 What is LDS02 LoRaWAN Door Sensor

The Dragino LDS02 is a LoRaWAN Door Sensor. It detects door open/close status and uplink to IoT server via LoRaWAN network. user can see the door status, open time, open counts in the IoT Server.

LDS02 is powered by 2 x AAA batteries and target for long time use, these two batteries can provide about 16,000 ~ 70,000 uplink packets. After battery running out, user can easily open the enclosure and replace with 2 common AAA batteries.

The LDS02 will send periodically data every day as well as for each door open/close action. It also counts the door open times and calculate last door open duration. User can also disable the uplink for each open/close event, instead, device can count each open event and uplink periodically.

LDS02 has the open alarm feature, user can set this feature so device will send Alarm if the door has been open for a certain time.

Each LDS02 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.



1.2 Features

  • LoRaWAN Class A v1.0.3
  • Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
  • Door Open/Close detect
  • Door open/close statistics
  • 2 x AAA LR03 Batteries
  • AT Commands to change parameters
  • Uplink on periodically and open/close action
  • Remote configure parameters via LoRa Downlink
  • Firmware upgradable via program port

1.3 Storage & Operation Temperature

-10 ~ 50 °C  or -40 ~ 60 °C (depends on battery type, see FAQ)

1.4 Applications

  • Smart Buildings & Home Automation
  • Logistics and Supply Chain Management
  • Smart Metering
  • Smart Agriculture
  • Smart Cities
  • Smart Factory

1.5 Dimension

Unit: mm



1.6 Firmware Change log

LDS02 use the same firmware as LDS01:LDS02 Image files – Download link

2. Power ON LDS02

When receive the LDS02, please open the enclosure and add 2 x AAA batteries to power it. The LED will blink when device is powered. 

3. How to install LDS02

Fixed way:

  • Open the housing, install the screw through the reserved mounting hole, fix the bottom of the housing at the location to be detected, and then install the node body to the bottom housing.


  • The double-sided glue was separated according to the cutting line and glued to the bottom of the LDS02 housing, and then the LDS02 was fixed at the location to be detected.


When install the LDS02 on wall. Please make sure install as below so the marks will close to each other when close the door.

Open/Close threshold range: ~ 10mm


4. Operation Mode

4.1 How it works?

The LDS02 is configured as LoRaWAN OTAA Class A mode by default. It has OTAA keys to join network. To connect a local LoRaWAN network, user just need to input the OTAA keys in the network server and power on the LDS02. It will auto join the network via OTAA.

In case user can't set the OTAA keys in the network server and has to use the existing keys from server. User can use AT Command to set the keys in the devices.

4.2 Example to join LoRaWAN network

Here shows an example for how to join the TTN V3 Network. Below is the network structure, we use LG308 as LoRaWAN gateway here.  


The LDS02 in installed on the door edge to detect the open / close event. And send the status to LoRaWAN server. The LDS02 will uplink two type of messages to the server.


The LG308 is already set to connect to TTN V3 network . What we need to now is only configure the TTN V3:


Step 1: Create a device in TTN V3 with the OTAA keys from LDS02.

Each LDS02 is shipped with a sticker with unique device EUI:


User can enter this key in their LoRaWAN Server portal. Below is TTN V3 screen shot:

Add APP EUI in the application





Select frequency plan

If node's frequency is US915 or AU915, the frequency plan of the gateway must be consistent with that of TTN




Step 2:  Power on LDS02 and it will auto join to the TTN V3 network. After join success, it will start to upload message to TTN V3 and user can see in the panel.


4.3 Uplink Payload

Uplink Payload total 10 bytes.



Total open door events

Last door open
duration (unit: min)





Example Payload Decoder in TTN V3: https://github.com/dragino/dragino-end-node-decoder/tree/main/LDS02

4.3.1 Battery Info

Check the battery voltage for LDS02.

Ex1: 0x0B88&3FFF = 2952mV

Ex2: 0xD152&3FFF = 4434mV

4.3.2 Status

Check the open door Status for LDS02.


If payload is: 0B:  (0000 1011&1000 0000== 0), DOOR_OPEN_STATUS is 0(CLOSE)

If payload is: D1: (1101 0001&1000 0000== 1) , DOOR_OPEN_STATUS is 1(OPEN)

4.3.3 MOD

Check the MOD


If payload is: 01:MOD is 1

4.3.4 Total open door events

Get Total open door events


If payload is: 00 00  93= 147

If payload is: 00 00  00= 0

4.3.5 Last door open duration (unit: min)

Get Last door open duration 


If payload is: 00 00  25= 37

If payload is: 00 00  01= 1

4.3.6 Alarm

Get Alarm


If payload is: 01:  (0001 & 0001== 1), Alarm is 1

If payload is: 00:  (0000 & 0001== 0), Alarm is 0


4.4 Downlink Payload

Downlink Control TypeType CodeDownlink payload size(bytes)
TDC (Transmit Time Interval—Keep Alive Interval)0x014
Set confirmed mode0x052
Clear Counting0xA62
Enable/Disable Alarm0xA72
Control ADR/DR0xA83
Set Alarm Timeout0xA94

Example Downlink payload setting in TTN V3:


Type Code 0x01

If the payload=0100003C, means to control the LDS02’s Keep Alive interval to 0x00003C=60(S)

Type Code 0x04

If payload = 0x04FF, it will reset the LDS02.

Type Code 0x05

0x05 00: Set uplink to LoRaWAN unconfirmed mode

0x05 01: Set uplink to LoRaWAN confirmed mode

Type Code 0xA6

Example: 0xA601: Clear Counting
For LDS02: reset both count number and time. 

Type Code 0xA7

0xA7 01 : Equal to AT+DISALARM=1

0xA7 00 : Equal to AT+DISALARM=0

Type Code 0xA8

Format: 0xA8 aa bb

aa: 1: Enable ADR; 0: Disable ADR (Same as AT+CADR command)

bb: set DR (Same as AT+CDATARATE ,only valid after ADR=0)

Example: 0x A8 00 02 : Set ADR=0 and DR=1

Type Code 0xA9

See Alarm Base Timeout for detail.

4.5 Integrate with Datacake

Datacake provides a human friendly interface to show the sensor data, once we have 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: Be sure that your device is programmed and properly connected to the network at this time.

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:




Step 3: Create an account or log in Datacake.

Step 4: Search LDS02 and add DevEUI.


4.6 Alarm Base on Timeout

LDS02 can monitor the timeout for a status change, this feature can be used to monitor some event such as open fridge too long etc.

User configure this feature by using:

AT Command to configure:

  • AT+TTRIG=1,30    --> When status change from close to open, and device keep in open

status for more than 30 seconds. LDS02 will send an uplink packet, the Alarm bit (the lowest bit of 10th byte of payload) on this uplink packet is set to 1.

  • AT+TTRIG=0,0       -->  Default Value, disable timeout Alarm.

Downlink Command to configure:

Command: 0xA9 aa bb cc

A9: Command Type Code

aa: status to be monitor

bb cc: timeout.

If user send 0xA9 01 00 1E: equal to AT+TTRIG=1,30


0xA9 00 00 00: Equal to AT+TTRIG=0,0. Disable timeout Alarm.

4.7 LEDs

ActionLED behavior
Power OnGREEN on 1s, RED on 1s, BLUE on 1s
Joined successfulGRENN LED on 5s
Send an uplink messageGREEN LED blinks once
Got a downlink messageBLUE LED blinks once

5. Battery & How to replace

5.1 Battery Type and replace

LDS02 is equipped with 2 x AAA LR03 batteries. If the batteries running low (shows 2.1v in the platform). User can buy generic AAA battery and replace it.


  1. The LDS02 doesn't have any screw, use can use nail to open it by the middle.
  2. Make sure the direction is correct when install the AAA batteries.

Important Notice: Make sure use new AAA LR03 battery and the battery doesn't have broken surface.


Example of AAA LR03 batter:


5.2 Power Consumption Analyze

Dragino battery powered products are all run in Low Power mode. User can check the guideline from this link to calculate the estimate battery life:

6. Use AT Command

6.1 Access AT Command

LDS02 supports AT Command set. User can use a USB to TTL adapter to configure LDS02 via use AT command, as below.


In PC, User needs to set serial tool(such as putty, SecureCRT) baud rate to 115200 to access to access serial console of LDS02. Below is the output for reference:

The AT Access password is 123456.


Each AT Command need to add an ENTER at the end before send.

When entering the first command, the RED LED will on and user can now input AT Commands. After input all needed AT Commands, please input AT+CLPM=1 to set the device to work in Low Power mode and RED LED will be off.

More detail AT Command manual can be found at AT Command Manual

7. FAQ

7.1 How to upgrade the image?

1. Connect DAPLINK and LDS02





DIO<------>DIO (SWD)


2. Install PSoCProgrammer 3.27.1

Download Link: PSoCProgrammer3.27.1

And then use PSoCProgrammer to upgrade the firmware ( must use this version: PSoCProgrammer3.27.1 )


3. Download Sensor Firmware

Downlink Firmware Location(same as LDS01) to prepare the update.

4. Upgrade Firmware

Open PSOC Programmer, select the default configuration, no need to modify


Click the file icon to select the software to be burned:



Click the download icon, and the progress bar as shown in the figure below will appear. When PASS appears, it proves that the burning is successful.



It is very important to press the reset button after the upgrade., this is to set the device to work in Low Power mode.

If you change different LoRa Frequency Bands/Region, you need using AT+FDR command to restore factory data after program success.

7.2 How to change the LoRa Frequency Bands/Region?

If user has for example US915 frequency and want to change it to AS923 frequency. User can follow the introduction for how to upgrade image. When download the images, choose the required image file for download.

7.3 Can I disable uplink for each event to save battery life?

Yes, User can use below method to disable this:

via AT Command:

AT+DISALARM=1, End node will only send packet in TDC time.

AT+DISALARM=0, End node will send packet in TDC time or status change for door sensor.  

via LoRaWAN downlink Command:

0xA701 : Equal to AT+DISALARM=1

0xA700 : Equal to AT+DISALARM=0

7.4 How to change Sub-Band for LDS02?

Before v1.6 firmware: LDS02 works in Subband 2 by default in AU915 / US915 band. So if the LoRaWAN server works in other subband, there will be issue for LDS02 to Join the server. In this case, User can use AT COmmand to change the subband. See AT Command chapther for the hardware connection. Below are the steps to change sub-band:

  • Press rest button.
  • Send 123456 password
  • Send command AT+CFREQBANDMASK=0006 ( 0001 for subband 1, 0002 for subband 2, etc..)
  • Press rest button to restart to new subband
  • Example output:

[3369]DRAGINO LWL01 Device
[3370]Frequency Band: US915 v1.5
[3374]DevEui= 7896785455246354
[3377]class type A
[3379]freq mode intra
[3381]scan chn mask 0x0002   --> use subband 2

LM502:~# [10793]txDone
123456       --> ENTER PASSWORD
Correct Password

AT+CFREQBANDMASK=0020   --> Change to Subband6

[3371]DRAGINO LWL01 Device
[3373]Frequency Band: US915 v1.5
[3377]DevEui= 7896785455246354
[3380]class type A
[3382]freq mode intra
[3384]scan chn mask 0x0001  --> reboot and works on Subband1 now


Since firmware v1.6: LDS02 works in chn mask 0x0000. where cover all subbands. so no need to use AT Commands to change subband and it can works for every subband

7.5 My sensor works for Helium AU915 before but not it doesn't work, Why?

It is sub-band issue, See chapter 7.4.Helium Change the Subband for AU915 from subband2 to Subband6 which cause the sensor doesn't work.

7.6 Why i see different working temperature for the device?

The working temperature range of device depends on the battery user choose.

  • Normal AAA Battery can support -10 ~ 50°C working range.
  • Special AAA battery can support -40 ~ 60 °C working range. For example: Energizer L92

8. Order Info

Part Number: LDS02-XXX

XXX: The default frequency band

  • EU433: frequency  bands EU433
  • EU868: frequency  bands EU868
  • KR920: frequency  bands KR920
  • CN470: frequency bands CN470
  • AS923: frequency  bands AS923
  • AU915: frequency bands AU915
  • US915: frequency bands  US915
  • IN865:  frequency bands  IN865
  • CN779: frequency bands CN779

9. Packing Info

Package Includes:

  • LDS02 x 1

Dimension and weight:

  • Device Size: 69.2 x 29.2 x 14.8 mm


10. Support

  • 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.
  • 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.
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0