Show last authors
1 (% style="text-align:center" %)
2 [[image:image-20240104091254-2.png]]
3
4
5
6
7
8
9
10
11 **Table of Contents :**
12
13 {{toc/}}
14
15
16
17
18
19
20 = 1. Introduction =
21
22 == 1.1 What is LoRaWAN Tilting Sensor ==
23
24
25 The Dragino TS01-LB/LS is a (% style="color:blue" %)**LoRaWAN Tilting Sensor**(%%) for Internet of Things solution. TS01-LB/LS is an outdoor Tilting Sensor specially designed for (% style="color:blue" %)**detecting the angle of trees, buildings or large scale equipment**.
26
27 TS01-LB/LS measures pitch and roll angle and converts to LoRaWAN wireless data and sends to IoT platform via LoRaWAN network.
28
29 The LoRa wireless technology used in TS01-LB/LS allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
30
31 TS01-LB/LS (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
32
33 TS01-LB/LS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery **(%%)or (% style="color:blue" %)**solar powered + li-on battery**(%%) it is designed for long term use up to 5 years.
34
35 Each TS01-LB/LS is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.
36
37
38 == 1.2 ​Features ==
39
40
41 * LoRaWAN 1.0.3 Class A
42 * Ultra-low power consumption
43 * Detect pitch and roll angle
44 * Support Angle Alarm
45 * Support Datalog feature
46 * Monitor Battery Level
47 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
48 * Support Bluetooth v5.1 and LoRaWAN remote configure
49 * Support wireless OTA update firmware
50 * Uplink on periodically
51 * Downlink to change configure
52 * 8500mAh Li/SOCl2 Battery (TS01-LB)
53 * Solar panel + 3000mAh Li-on battery (TS01-LS)
54
55 == 1.3 Specification ==
56
57
58 (% style="color:#037691" %)**Common DC Characteristics:**
59
60 * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v
61 * Operating Temperature: -40 ~~ 85°C
62
63 (% style="color:#037691" %)**Angle Spec:**
64
65 * Measure Pitch and Roll
66 * Accuracy: 0.3°
67
68 (% style="color:#037691" %)**LoRa Spec:**
69
70 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz, Band 2 (LF): 410 ~~ 528 Mhz
71 * Max +22 dBm constant RF output vs.
72 * RX sensitivity: down to -139 dBm.
73 * Excellent blocking immunity
74
75 (% style="color:#037691" %)**Battery:**
76
77 * Li/SOCI2 un-chargeable battery
78 * Capacity: 8500mAh
79 * Self-Discharge: <1% / Year @ 25°C
80 * Max continuously current: 130mA
81 * Max boost current: 2A, 1 second
82
83 (% style="color:#037691" %)**Power Consumption:**
84
85 * Sleep Mode: 5uA @ 3.3v
86 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
87
88 == 1.4 Sleep mode and working mode ==
89
90
91 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.
92
93 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.
94
95
96 == 1.5 Button & LEDs ==
97
98
99 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-LB_Waterproof_RS485UART_to_LoRaWAN_Converter/WebHome/image-20240103160425-4.png?rev=1.1||alt="image-20240103160425-4.png"]]
100
101 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
102 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 226px;background-color:#4F81BD;color:white" %)**Action**
103 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
104 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
105 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
106 )))
107 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
108 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network.
109 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
110 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.
111 )))
112 |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode.
113
114 == 1.6 BLE connection ==
115
116
117 TS01-LB/LS support BLE remote configure.
118
119
120 BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:
121
122 * Press button to send an uplink
123 * Press button to active device.
124 * Device Power on or reset.
125
126 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
127
128
129 == 1.7 Pin Definitions ==
130
131
132 [[image:image-20230619114112-4.png]]
133
134
135 == 1.8 Mechanical ==
136
137 === 1.8.1 for LB version ===
138
139 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]]
140
141
142 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]]
143
144
145 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]]
146
147
148 === 1.8.2 for LS version ===
149
150
151 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20231231203439-3.png?width=886&height=385&rev=1.1||alt="image-20231231203439-3.png"]]
152
153 (% style="display:none" %) (%%)
154
155 == 1.9 Sketch of Pitch and Roll ==
156
157 (% style="display:none" %) (%%)
158
159 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-NB_NB-IoT_Tilting_Sensor_User_Manual/WebHome/image-20231025105743-1.png?rev=1.1||alt="image-20231025105743-1.png" height="517" width="449"]]
160
161
162 == 1.10 Installation direction ==
163
164
165 (% style="color:blue" %)**Horizontal installation:**
166
167 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-NB_NB-IoT_Tilting_Sensor_User_Manual/WebHome/image-20231025105808-2.png?rev=1.1||alt="image-20231025105808-2.png"]]
168
169 (% style="color:blue" %)**Vertical installation:**
170
171 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-NB_NB-IoT_Tilting_Sensor_User_Manual/WebHome/image-20231025105857-3.png?rev=1.1||alt="image-20231025105857-3.png"]]
172
173
174 = 2. Configure TS01-LB/LS to connect to LoRaWAN network =
175
176 == 2.1 How it works ==
177
178
179 The TS01-LB/LS is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the TS01-LB/LS. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
180
181
182 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
183
184
185 Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example.
186
187 The LPS8v2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server.
188
189
190 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from TS01-LB/LS.
191
192 Each TS01-LB/LS is shipped with a sticker with the default device EUI as below:
193
194 [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]]
195
196
197 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
198
199
200 (% style="color:blue" %)**Register the device**
201
202 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/1654935135620-998.png?rev=1.1||alt="1654935135620-998.png"]]
203
204
205 (% style="color:blue" %)**Add APP EUI and DEV EUI**
206
207 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-4.png?width=753&height=551&rev=1.1||alt="图片-20220611161308-4.png"]]
208
209
210 (% style="color:blue" %)**Add APP EUI in the application**
211
212
213 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-5.png?width=742&height=601&rev=1.1||alt="图片-20220611161308-5.png"]]
214
215
216 (% style="color:blue" %)**Add APP KEY**
217
218 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-6.png?width=744&height=485&rev=1.1||alt="图片-20220611161308-6.png"]]
219
220
221 (% style="color:blue" %)**Step 2:**(%%) Activate on TS01-LB/LS
222
223
224 Press the button for 5 seconds to activate the TS01-LB/LS.
225
226 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
227
228 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
229
230
231 == 2.3 ​Uplink Payload ==
232
233 === 2.3.1 Device Status, FPORT~=5 ===
234
235
236 Users can use the downlink command(**0x26 01**) to ask TS01-LB/LS to send device configure detail, include device configure status. TS01-LB/LS will uplink a payload via FPort=5 to server.
237
238 The Payload format is as below.
239
240 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
241 |=(% colspan="6" style="background-color:#4F81BD;color:white" %)Device Status (FPORT=5)
242 |(% style="width:60px" %)**Size(bytes)**|(% style="width:80px" %)**1**|(% style="width:140px" %)**2**|(% style="width:140px" %)**1**|(% style="width:70px" %)**1**|(% style="width:70px" %)**2**
243 |(% style="width:94px" %)Value|(% style="width:68px" %)Sensor Model|(% style="width:80px" %)Firmware Version|(% style="width:86px" %)Frequency Band|(% style="width:61px" %)Sub-band|(% style="width:61px" %)BAT
244
245 Example parse in TTNv3
246
247 [[image:TS01.png||height="249" width="1405"]]
248
249
250 (% style="color:#037691" %)**Sensor Model**(%%): For TS01-LB/LS, this value is 0x2F
251
252 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
253
254 (% style="color:#037691" %)**Frequency Band**:
255
256 0x01: EU868
257
258 0x02: US915
259
260 0x03: IN865
261
262 0x04: AU915
263
264 0x05: KZ865
265
266 0x06: RU864
267
268 0x07: AS923
269
270 0x08: AS923-1
271
272 0x09: AS923-2
273
274 0x0a: AS923-3
275
276 0x0b: CN470
277
278 0x0c: EU433
279
280 0x0d: KR920
281
282 0x0e: MA869
283
284
285 (% style="color:#037691" %)**Sub-Band**:
286
287 AU915 and US915:value 0x00 ~~ 0x08
288
289 CN470: value 0x0B ~~ 0x0C
290
291 Other Bands: Always 0x00
292
293
294 === 2.3.2  Sensor Data. FPORT~=2 ===
295
296
297 Sensor Data is uplink via FPORT=2
298
299 (% border="1" cellspacing="3" style="width:500px" %)
300 |=(% style="width: 70px;background-color:#4F81BD;color:white" %)(((
301 **Size(bytes)**
302 )))|=(% style="width: 50px;background-color:#4F81BD;color:white" %)2|=(% style="width: 150px;background-color:#4F81BD;color:white" %)1|=(% style="width: 120px;background-color:#4F81BD;color:white" %)2|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)2|=(% style="width: 50px;background-color:#4F81BD;color:white" %)1
303 |(% style="width:97px" %)Value|(% style="width:68px" %)(((
304 Battery
305 )))|(% style="width:191px" %)Alarm Flag & Level of PA8|(% style="width:170px" %)(((
306 DS18B20_Temperature
307 )))|(% style="width:46px" %)Roll|(% style="width:51px" %)Pitch|(% style="width:51px" %)instal_flag
308
309 [[image:TS01.png]]
310
311
312 ==== **Battery** ====
313
314 Sensor Battery Level.
315
316 Ex1: 0x0B45 = 2885mV
317
318 Ex2: 0x0B49 = 2889mV
319
320
321 ==== **Temperature** ====
322
323 **Example**:
324
325 If payload is: 0105H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
326
327 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
328
329 (FF3F & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
330
331
332 ==== **Roll** ====
333
334 If payload is:0197H:  (0197 & 8000==0 ),  Value:  412 / 100=4.12
335
336 If payload is:FF3FH :  (FF3F & 8000 == 1) ,  Value:  (FF3FH - 65536)/100 = -1.93
337
338
339 ==== **Pitch** ====
340
341 If payload is:0251H: (0251& 8000 ==0),  Value:  593/ 100=5.93
342
343 If payload is:FF21H :  (FF21H & 8000 == 1) ,  Value:  (FF21H - 65536)/100 = -2.23
344
345
346
347 ==== **Alarm Flag & Level of PA8** ====
348
349 **Example:**
350
351 If payload & 0x01 = 0x01  **~-~->** This is an Alarm Message.
352
353 If payload & 0x01 = 0x00  **~-~->** This is a normal uplink message, no alarm.
354
355 If payload & 0x80>>7 = 0x01  **~-~->** The PA8 is low level.
356
357 If payload & 0x80>>7 =0x00  **~-~->** The PA8 is high level.
358
359
360 ==== **Instal flag** ====
361
362 Read:0x(00)=0 (% style="color:#037691" %)  (%%) ~/~/  horizontal direction
363
364 Read:0x(01)=1  (% style="color:#037691" %)   (%%) ~/~/  Vertical direction
365
366
367 == 2.4 Payload Decoder file ==
368
369
370 In TTN, use can add a custom payload so it shows friendly reading
371
372 In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from:
373
374 [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
375
376
377 == 2.5 Datalog Feature ==
378
379
380 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, TS01-LB/LS will store the reading for future retrieving purposes.
381
382
383 === 2.5.1 Ways to get datalog via LoRaWAN ===
384
385
386 There are two methods:
387
388 (% style="color:blue" %)**Method 1:**(%%) IoT Server sends a downlink LoRaWAN command to [[poll the value>>url:http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/#H2.6.4Pollsensorvalue]] for specified time range.
389
390 (% style="color:blue" %)**Method 2: **(%%)Set [[PNACKMD=1>>url:http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/#H4.13AutoSendNone-ACKmessages]], LHT65N will wait for ACK for every uplink, when there is no LoRaWAN network, LHT65N 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.
391
392
393 Set **PNACKMD=1**, TS01-LB/LS will wait for ACK for every uplink, when there is no LoRaWAN network,TS01-LB/LS 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.
394
395 * (((
396 a) TS01-LB/LS will do an ACK check for data records sending to make sure every data arrive server.
397 )))
398 * (((
399 b) TS01-LB/LS will send data in **CONFIRMED Mode** when PNACKMD=1, but TS01-LB/LS 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 TS01-LB/LS gets a ACK, TS01-LB/LS will consider there is a network connection and resend all NONE-ACK messages.
400 )))
401
402 === 2.5.2 Unix TimeStamp ===
403
404
405 TS01-LB/LS uses Unix TimeStamp format based on
406
407 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-11.png?width=627&height=97&rev=1.1||alt="图片-20220523001219-11.png" height="97" width="627"]]
408
409 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
410
411 Below is the converter example
412
413 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220523001219-12.png?width=720&height=298&rev=1.1||alt="图片-20220523001219-12.png" height="298" width="720"]]
414
415
416 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
417
418
419 === 2.5.3 Set Device Time ===
420
421
422 **There are two ways to set device's time:**
423
424 **1.  Through LoRaWAN MAC Command (Default settings)**
425
426 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
427
428 Once TS01-LB/LS Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to TS01. If TS01-LB/LS fails to get the time from the server, TS01-LB/LS will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
429
430 (% 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.**
431
432
433 **2. Manually Set Time**
434
435 User needs to set SYNCMOD=0 to manual time, otherwise, the user set time will be overwritten by the time set by the server.
436
437
438 === 2.5.4 Poll sensor value ===
439
440
441 User can poll sensor value based on timestamps from the server. Below is the downlink command.
442
443 (% border="1" cellspacing="3" style="width:424px" %)
444 |(% style="background-color:#4f81bd; color:white; width:59px" %)**1byte**|(% style="background-color:#4f81bd; color:white; width:127px" %)**4bytes**|(% style="background-color:#4f81bd; color:white; width:123px" %)**4bytes**|(% style="background-color:#4f81bd; color:white; width:115px" %)**1byte**
445 |(% style="width:59px" %)31|(% style="width:126px" %)Timestamp start|(% style="width:122px" %)Timestamp end|(% style="width:114px" %)Uplink Interval
446
447 Timestamp start and Timestamp end use Unix TimeStamp format as mentioned above. Devices will reply with all data log during this time period, use the uplink interval.
448
449 For example, downlink command **31 5FC5F350 5FC6 0160 05**
450
451 Is to check 2020/12/1 07:40:00 to 2020/12/1 08:40:00's data
452
453 Uplink Internal =5s, means LHT65N will send one packet every 5s. range 5~~255s.
454
455
456 === 2.5.5 Datalog Uplink payload (FPORT~=3) ===
457
458
459 The Datalog uplinks will use below payload format.
460
461 **Retrieval data payload:**
462
463 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
464 |(% colspan="6" style="background-color:#4f81bd; color:white; width:510px" %)**Datalog payload (FPORT=3)**
465 |**Size(bytes)**|**2**|**2**|**2**|**1**|**4**
466 |**Value**|DS18B20_temperature|Roll|Pitch|exti_flag and alarm_flag|time stamp
467
468 **No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for [[PNACKMD=1>>url:http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/#H4.13AutoSendNone-ACKmessages]] feature)
469
470 **Poll Message Flag**: 1: This message is a poll message reply.
471
472 * Poll Message Flag is set to 1.
473
474 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
475
476 For example, in US915 band, the max payload for different DR is:
477
478 **a) DR0:** max is 11 bytes so one entry of data
479
480 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
481
482 **c) DR2:** total payload includes 11 entries of data
483
484 **d) DR3: **total payload includes 22 entries of data.
485
486 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0 
487
488 **Example:**
489
490 If TS01-LB/LS has below data inside Flash:
491
492 [[image:image-20231010190802-1.png||height="556" width="582"]]
493
494 If user sends below downlink command: 31646D84E1646D856C05
495
496 Where : Start time: 646D84E1 = time 23/5/24 03:30:41
497
498 Stop time: 646D856C= time 23/5/24 03:33:00
499
500
501 **TS01x-LB will uplink this payload.**
502
503 (% class="box" %)
504 (((
505 **00 00 02 36 01 10 40 64 6D 84 E1 00 00 02 37 01 10 40 64 6D 84 F8 00 00 02 37 01 0F 40 64 6D 85 04 00 00 02 3A 01 0F 40 64 6D 85 18 00 00 02 3C 01 0F 40 64 6D 85 36 00 00 02 3D 01 0E 40 64 6D 85 3F 00 00 02 3F 01 0E 40 64 6D 85 60 00 00 02 40 01 0E 40 64 6D 85 6A**
506 )))
507
508 Where the first 11 bytes is for the first entry:
509
510 01 10 02 36 01 10 40 64 6D 84 E1
511
512 **Ds18b20_temp**=0x0110/100=27.2
513
514 **Roll**=0x0236/100=5.66
515
516 **Pitch**=0x0110/100=2.72
517
518 **poll message flag & Alarm Flag & Level of PA8**=0x40,means reply data,sampling uplink message,the PA8 is low level.
519
520 **Unix time** is 0x646D84E1=1684899041s=23/5/24 03:30:41
521
522
523 == 2.6 Angle Alarm Feature ==
524
525
526 TS01-LB/LS work flow with Alarm feature.
527
528 TS01-LB/LS has two alarm modes.
529
530
531 (% style="color:blue" %)**Alarm Mode 1:**
532
533
534 (% style="color:#037691" %)**AT+AMOD=1**
535
536 (% style="color:#037691" %)**AT+XALARM=Xvalue, AT+YALARM=Yvalue**
537
538 When an angle change is detected that exceeds the range compared to the last time, an alarm is reported.
539
540 **For example:**
541
542 AT+XALARM=10
543
544 AT+YALARM=20
545
546 The last angle measured on the X-axis was 120 degrees, and this time the angle measured on the X-axis is 135 degrees, an alarm will be triggered to upload a data packet.
547
548 The last time the angle measured on the Y-axis was 100 degrees, but this time the angle measured on the Y-axis is 50 degrees, which will trigger an alarm and upload the data packet.
549
550 If the alarm conditions are met on the X-axis or Y-axis, an alarm will be triggered.
551
552
553 (% style="color:blue" %)**Alarm Mode 2:**
554
555
556 (% style="color:#037691" %)**AT+AMOD=2**
557
558 (% style="color:#037691" %)**AT+XALARM=min,max**
559
560 When min=0, and max≠0, Alarm higher than max
561
562 When min≠0, and max=0, Alarm lower than min
563
564 When min≠0 and max≠0, Alarm higher than max or lower than min
565
566 **Example:**
567
568 AT+ XALARM=50,80  ~/~/ Alarm when Roll lower than 50.
569
570
571 (% style="color:#037691" %)**AT+YALARM=min,max**
572
573 ² When min=0, and max≠0, Alarm higher than max
574
575 ² When min≠0, and max=0, Alarm lower than min
576
577 ² When min≠0 and max≠0, Alarm higher than max or lower than min
578
579 **~ Example:**
580
581 AT+ YALARM=20,30  ~/~/ Alarm when Pitch lower than 20.
582
583
584 (% style="color:blue" %)**Alarm Mode 0:**
585
586 AT+AMOD=0  ~/~/  Turn off alarm function
587
588
589 (% style="color:blue" %)**Alarm time setting:**
590
591 (% style="color:#037691" %)**AT+ATDC=5**   (%%) ~/~/  It means triggering an alarm every 5 minutes.
592
593
594 == 2.7 Calibration and installation direction ==
595
596
597 (% style="color:blue" %)**AT+CAL : Calibration angle**
598
599 (% style="color:red" %)**NOTE: If the installation direction is horizontal, the user needs to place the device horizontally for calibration. If the installation direction is vertical, the user needs to place the device vertically for calibration. If the direction is incorrect, it may result in opposite angles or inaccurate degrees.**
600
601 When the calibration angle is 0 or close to 0, it is considered successful calibration.
602
603
604 (% style="color:blue" %)**Installation direction command:**
605
606 (% style="color:#037691" %)**AT+INSTAL=0 ** (%%) ~/~/  horizontal direction
607
608 (% style="color:#037691" %)**AT+INSTAL=1 ** (%%) ~/~/  Vertical direction
609
610
611 == 2.8 Frequency Plans ==
612
613
614 The TS01-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.
615
616 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
617
618
619 == 2.9 ​Firmware Change Log ==
620
621
622 **Firmware download link: **[[https:~~/~~/www.dropbox.com/sh/pm9c20ft3xmqgr1/AAAgSORj4DtHuYou0YGuEhY_a?dl=0>>https://www.dropbox.com/sh/pm9c20ft3xmqgr1/AAAgSORj4DtHuYou0YGuEhY_a?dl=0]]
623
624
625 = 3. Configure TS01-LB/LS =
626
627 == 3.1 Configure Methods ==
628
629
630 (% style="color:blue" %)**TS01-LB/LS supports below configure method:**
631
632 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
633
634 * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
635
636 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
637
638 == 3.2 General Commands ==
639
640
641 These commands are to configure:
642
643 * General system settings like: uplink interval.
644
645 * LoRaWAN protocol & radio related command.
646
647 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
648
649 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]]
650
651
652 == 3.3 Commands special design for TS01-LB/LS ==
653
654
655 These commands only valid for TS01-LB/LS, as below:
656
657
658 === 3.3.1 Set Transmit Interval Time ===
659
660
661 Feature: Change LoRaWAN End Node Transmit Interval.
662
663 (% style="color:blue" %)**AT Command: AT+TDC**
664
665 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
666 |=(% 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**
667 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
668 30000
669 OK
670 the interval is 30000ms = 30s
671 )))
672 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
673 OK
674 Set transmit interval to 60000ms = 60 seconds
675 )))
676
677 (% style="color:blue" %)**Downlink Command: 0x01**
678
679 Format: Command Code (0x01) followed by 3 bytes time value.
680
681 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
682
683 **Example 1:** Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
684
685 **Example 2:** Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
686
687
688 === 3.3.2 Get Device Status ===
689
690
691 Send a LoRaWAN downlink to ask device send Alarm settings.
692
693 (% style="color:blue" %)**Downlink Payload: 0x26 01 **
694
695 Sensor will upload Device Status via FPORT=5. See payload section for detail.
696
697
698 === 3.3.3 Set Alarm Interval ===
699
700
701 The shortest time of two Alarm packet. (unit: min)
702
703 (% style="color:blue" %)**AT Command:**
704
705 * (% style="color:#037691" %)**AT+ATDC=30**  
706
707 (% style="color:blue" %)**Downlink Payload:**
708
709 * (% style="color:#037691" %)**0x(0D 00 1E)**(%%)  ~/~/  Set AT+ATDC=0x 00 1E = 30 minutes
710
711 === 3.3.4 Set Calibration ===
712
713
714 (% style="color:blue" %)**AT Command:**
715
716 * (% style="color:#037691" %)**AT+CAL**
717
718 (% style="color:blue" %)**Downlink Payload:**
719
720 * (% style="color:#037691" %)**0x(F2 00)**
721
722 === 3.3.5 Set installation direction ===
723
724
725 The shortest time of two Alarm packet. (unit: min)
726
727 (% style="color:blue" %)**AT Command:**
728
729 * (% style="color:#037691" %)**AT+INSTAL=0**
730
731 (% style="color:blue" %)**Downlink Payload:**
732
733 * (% style="color:#037691" %)**0x(F0 00)**(%%)     **~/~/ ** Set AT+INSTAL=0
734
735 === 3.3.6 Set angle alarm ===
736
737
738 (% style="color:blue" %)**AT Command:**
739
740 * (% style="color:#037691" %)**AT+XALARM=value   **
741
742 * (% style="color:#037691" %)**AT+XALARM=min,max**  
743
744 (% style="color:blue" %)**Downlink Payload:**
745
746 * (% style="color:#037691" %)**0x(F3 00 1E)**          (%%) ~/~/ Set AT+XALARM=30
747
748 * (% style="color:#037691" %)**0x(F3 00 1E 00 50)**    (%%) ~/~/ Set AT+XALARM=30,80
749
750 * (% style="color:#037691" %)**0x(F4 00 1E)**          (%%) ~/~/ Set AT+YALARM=30
751
752 * (% style="color:#037691" %)**0x(F4 00 1E 00 50)**    (%%) ~/~/ Set AT+YALARM=30,80
753
754 === 3.3.7 Set alarm mode ===
755
756
757 (% style="color:blue" %)**AT Command:**
758
759 * (% style="color:#037691" %)**AT+AMOD=1  **
760
761 (% style="color:blue" %)**Downlink Payload:**
762
763 * (% style="color:#037691" %)**0x(F5 01)**  (%%) ~/~/ Set AT+AMOD=1
764
765 === 3.3.8 Set Interrupt Mode ===
766
767
768 Feature, Set Interrupt mode for PA8 of pin.
769
770 When (% style="color:#037691" %)**AT+INTMOD=0**(%%) is set, (% style="color:#037691" %)**PA8**(%%) is used as a digital input port.
771
772 (% style="color:blue" %)**AT Command: AT+INTMOD**
773
774 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
775 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response**
776 |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)(((
777 0
778 OK
779 the mode is 0 =Disable Interrupt
780 )))
781 |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)(((
782 Set Transmit Interval
783 0. (Disable Interrupt),
784 ~1. (Trigger by rising and falling edge)
785 2. (Trigger by falling edge)
786 3. (Trigger by rising edge)
787 )))|(% style="width:157px" %)OK
788
789 (% style="color:blue" %)**Downlink Command: 0x06**
790
791 Format: Command Code (0x06) followed by 3 bytes.
792
793 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
794
795 **Example 1:** Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
796
797 **Example 2:** Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
798
799
800 = 4. Battery & Power Consumption =
801
802
803 TS01-LB use ER26500 + SPC1520 battery pack and TS01-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.
804
805 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
806
807
808 = 5. OTA Firmware update =
809
810
811 (% class="wikigeneratedid" %)
812 User can change firmware TS01-LB/LS to:
813
814 * Change Frequency band/ region.
815 * Update with new features.
816 * Fix bugs.
817
818 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/pm9c20ft3xmqgr1/AAAgSORj4DtHuYou0YGuEhY_a?dl=0]]**
819
820 Methods to Update Firmware:
821
822 * (Recommanded way) OTA firmware update via wireless : **[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]**
823
824 * Update through UART TTL interface : **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
825
826 = 6. FAQ =
827
828
829
830 = 7. Order Info =
831
832
833 Part Number: (% style="color:blue" %)**TS01-LB-XXX or TS01-LS-XXX**
834
835 (% style="color:blue" %)**XXX**(%%): The default frequency band
836
837 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
838
839 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
840
841 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
842
843 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
844
845 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
846
847 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
848
849 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
850
851 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
852
853 = 8. ​Packing Info =
854
855
856 (% style="color:#037691" %)**Package Includes**:
857
858 * TS01-LB or TS01-LS-XXX LoRaWAN Tilting Sensor
859
860 (% style="color:#037691" %)**Dimension and weight**:
861
862 * Device Size: cm
863
864 * Device Weight: g
865
866 * Package Size / pcs : cm
867
868 * Weight / pcs : g
869
870 = 9. Support =
871
872
873 * 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.
874
875 * 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.cc>>mailto:Support@dragino.cc]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0