1654739676119-482.png

  

Table of Contents:

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.

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.

​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
  • Probe length: 40cm
  • 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

1654741400370-813.png

1.5  Mechanical

1654741444887-479.png 

1654741488515-626.png

1654741510204-377.png

1.6  Pin Definitions and Switch

1654741572060-177.png

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:  https://www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0

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

1.7 Magnet Distance

  • Wood Door: 10mm ~ 30mm
  • Iron Door: 30 ~ 45mm

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.

 

1654742304325-850.png

 

  • 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:

image-20230426084953-1.png

Users can enter these keys in the LoRaWAN Server portal. Below is the TTN V3 screenshot:

Add APP EUI in the application:

1654742558691-332.png

1654742595660-519.png

1654742610413-498.png

1654742630064-347.png

Add APP KEY and DEV EUI

  

Step 2: Power on LDS03A

1654742860601-778.png 

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.

image-20220609104802-1.png

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.

Device Status (FPORT=5)
Size (bytes)12112
ValueSensor ModelFirmware VersionFrequency BandSub-bandBAT

Example parse in TTNv3

image-20220609105101-2.png

  • 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)3112
ValueTDC (unit:sec)DisalarmKeep statusKeep time (unit: min)

 

 

  • TDC: (default: 0x001C20)

Uplink interval for the Open/Close Event, default value is 0x001C20 which is 7200 seconds = 2 hours.

 

  • Disalarm: (default: 0)

 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.

 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.

 

 Note: When Disalarm=0, a high frequently open/close event will cause lots of uplink and drain battery very fast. 

 

  • Keep Status & Keep Time

Shows the configure value of Alarm Base on Timeout Feature

image-20220609110018-4.png

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:

1. periodically send this uplink every 2 hours, this interval can be changed.

2. There is an Open/Close event.  

Uplink Payload totals 11 bytes.

Real-Time Open/Close Status, FPORT=2
Size(bytes)1334
ValueStatus & AlarmTotal open door events

The last door open duration (unit: min)

Unix TimeStamp
Status & Alarm field
Size(bit)611
ValueReserveEnable/disable Timeout Alarm
0: No Alarm; 1: Alarm
Status
0: Close, 1: Open

image-20220609110547-6.png

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.

 

  • 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:

  1. DR0: max is 11 bytes so one entry of data

  2. DR1: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)

  3. DR2: total payload includes 11 entries of data

  4. 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

image-20220609112215-7.png

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],

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

image-20220609113256-8.png

Users can get this time from the link:  https://www.epochconverter.com/ :

Below is the converter example

image-20220609113256-9.png

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.

 

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.5 ​Show Data in DataCake IoT Server

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 2: Configure LDS03A in Datacake.

1654746350207-427.png

1654747162439-840.png

1654746405400-203.png

1654746763908-732.png

1654746716087-684.png

1654746693868-718.png

1654746674738-826.png

1654746646379-591.png

1654746549277-209.png

1654746593411-887.png

3.  Configure LDS03A via AT Command or LoRaWAN Downlink

Use can configure LDS03A via AT Command or LoRaWAN Downlink.

  • AT Command Connection: See FAQ.

  • LoRaWAN Downlink instruction for different platforms: IoT LoRaWAN Server

     

There are two kinds of commands to configure LDS03A, they are:

  •  General Commands.

These commands are to configure:

  • General system settings like: uplink interval.

  • LoRaWAN protocol & radio related command.

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

 

  •  Commands special design for LDS03A

These commands only valid for LDS03A, as below:

3.1  Work Mod

Feature: Manually set the work mode. LDS03A and CPL01 use the same firmware. User is possible to switch between this two models.

AT Command:

Command ExampleFunctionResponse
AT+MOD=1Set the sensor to LDS03A.

OK

AT+MOD=2Set the sensor to CPL01.

OK

Downlink Command: 0x0A

Example1:  0A 01  => AT+MOD=1

Example2:  0A 02  => AT+MOD=2

3.2  Set Transmit Interval Time

Feature: Change LoRaWAN End Node Transmit Interval.

AT Command: AT+TDC

Command ExampleFunctionResponse
AT+TDC=?Show current transmit Interval

30000
OK
the interval is 30000ms = 30s

AT+TDC=60000Set Transmit Interval

OK
Set transmit interval to 60000ms = 60 seconds

Downlink Command: 0x01

Format: Command Code (0x01) followed by 3 bytes time value.

If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.

  • Example 1: Downlink Payload: 0100001E        // Set Transmit Interval (TDC) = 30 seconds

  • Example 2: Downlink Payload: 0100003C       // Set Transmit Interval (TDC) = 60 seconds

     

3.3  Set Password

Feature: Set device password, max 9 digits.

AT Command: AT+PWORD

Command ExampleFunctionResponse

AT+PWORD=?

Show password

123456

OK

AT+PWORD=999999

Set password

OK

Downlink Command:

No downlink command for this feature.

3.4  Quit AT Command

Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.

AT Command: AT+DISAT

Command ExampleFunctionResponse
AT+DISATQuit AT Commands modeOK

Downlink Command:

No downlink command for this feature.

3.5  Enable / Disable Alarm

Feature: Enable/Disable Alarm for open/close event. Default value 0.

AT Command:

Command ExampleFunctionResponse
AT+DISALARM=1End node will only send packets in TDC time.OK
AT+DISALARM=0End node will send packets in TDC time or status change for door sensorOK

Downlink Command:

0xA7 01     // Same As AT+DISALARM=1

0xA7 00     // Same As AT+DISALARM=0

3.6  Clear count

Feature: Clear current door open.

AT Command:

Command ExampleFunctionResponse
AT+CLRCClear the count of door open events.OK

Downlink Command:

0xA6 01 // Same As AT+ CLRC

3.7  Set system time

Feature: Set system time, Unix format. See here for format detail.

AT Command:

Command ExampleFunctionResponse
AT+TIMESTAMP=1611104352Set System time to 2021-01-20 00:59:12OK

Downlink Command:

0x306007806000      // Set timestamp to 0x(6007806000),Same as AT+TIMESTAMP=1611104352

3.8  Set Time Sync Mode

Feature: Enable/Disable Sync system time via LoRaWAN MAC Command (DeviceTimeReq), LoRaWAN server must support v1.0.3 protocol to reply to this command.

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.

AT Command:

Command ExampleFunctionResponse
AT+SYNCMOD=1Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) The default is zero time zone.OK
AT+SYNCMOD=1,8Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to East eight time zone.OK
AT+SYNCMOD=1,-12Enable Sync system time via LoRaWAN MAC Command (DeviceTimeReq) Set to West Twelve Time Zone.OK

Downlink Command:

0x28 01           // Same As AT+SYNCMOD=1

0x28 01 08      // Same As AT+SYNCMOD=1,8

0x28 01 F4      // Same As AT+SYNCMOD=1,-12

0x28 00           // Same As AT+SYNCMOD=0

3.9  Alarm Base on Timeout

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:

  • Keep Status: Status to be monitor

Keep Status = 1: Monitor Close to Open event

Keep Status = 0: Monitor Open to Close event

  • Keep Time: Timeout to send an Alarm

Range 0 ~ 65535(0xFFFF) seconds.

If keep time = 0, Disable Alarm Base on Timeout feature.

If keep time > 0, device will monitor the keep status event and send an alarm when status doesn't change after timeout.

AT Command to configure:

  • 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 (the second bit of 1st 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 monitored

bb cc: timeout.

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

Or

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

3.10  Clear Flash Record

Feature: Clear flash storage for data log feature.

AT Command: AT+CLRDTA

Command ExampleFunctionResponse
AT+CLRDTAClear flash storage for data log feature.Clear all stored sensor data… OK

Downlink Command:

Example: 0xA301   //  Same as AT+CLRDTA

3.11  Count Mod (Since firmware v1.2.0)(unreleased version)

AT Command:

Command ExampleFunctionResponse

AT+COUNTMOD=0

the count value keeps accumulating mode

 

OK

AT+COUNTMOD=1

the count value will be reset after each TDC time(Last Close Duration Reset after each uplink)

OK

Downlink Command:

Example:  0B aa  => AT+COUNTMOD = second byte

3.12  Interrupt Pin Channel Mod(Since firmware v1.2.0)(unreleased version)

AT Command:

Command ExampleFunctionResponse

AT+TTRCHANNEL=1

set as single channel, only use PB14 pin as interrupt pin.

 

OK

AT+TTRCHANNEL=2

is set as dual channel, use PB14 pin and PB15 pin as interrupt pin.

OK

Downlink Command:

Example:  0D aa => AT+TTRCHANNEL = second byte

3.13  Change the name of AT+TTRIG to AT+TTRIG1(Since firmware v1.2.0)(unreleased version)

Downlink Command:

Example:  A9 01 aa bb cc  => AT+TTRIG1= third byte, 4th byte and 5th byte

3.14  Added AT+TTRIG2 for PB15 pin(Since firmware v1.2.0)(unreleased version)

Downlink Command:

Example: A9 02 aa bb cc  => AT+TTRIG2= third byte, 4th byte and 5th byte

3.15  TTRIG1/2 timeout status alarm(Since firmware v1.2.0)(unreleased version)

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.

AT Command:

Command ExampleFunctionResponse

AT+TTRALARM=0

disable continuous alarm

 

OK

AT+TTRALARM=60

 The alarm interval is 60 minutes (unit: minutes)

OK

Downlink Command:

Example:  0C aa  => AT+TTRALARM= aa

4.  Battery & Power Consumption

LDS03A uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.

Battery Info & Power Consumption Analyze .

5.  FAQ

5.1  How to use AT Command to configure LDS03A

LDS03A UART connection photo

1654757007713-791.png

In the PC, you need to set the serial baud rate to 9600 to access the serial console for LSN50. LSN50 will output system info once power on as below:

 image-20220609144231-3.png

5.2  How to upgrade the firmware?

A new firmware might be available for:

  • Support new features

  • For bug fix

  • Change LoRaWAN bands.

Instruction for how to upgrade: Firmware Upgrade Instruction

5.3  How to change the LoRa Frequency Bands/Region?

Users can follow the introduction for how to upgrade image. When downloading the images, choose the required image file for download.

6.  Trouble Shooting

6.1  AT Commands input doesn't work

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 ENTER while sending out the command. Some serial tool doesn't send ENTER while press the send key, user need to add ENTER in their string. 

7.  Order Info

Part Number: LDS03A-XX

XX: The default frequency band

  • AS923:  LoRaWAN AS923 band
  • AU915: LoRaWAN AU915 band
  • EU433: LoRaWAN EU433 band
  • EU868: LoRaWAN EU868 band
  • KR920: LoRaWAN KR920 band
  • US915: LoRaWAN US915 band
  • IN865:  LoRaWAN IN865 band
  • CN470: LoRaWAN CN470 band

8.  ​Packing Info

Package Includes:

  • LDS03A Open/Close Sensor x 1

9.  ​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.

10.  FCC Warning

This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions:

(1) This device may not cause harmful interference;

(2) this device must accept any interference received, including interference that may cause undesired operation.

Tags:
    
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0