Wiki source code of LTS5 LoRa HMI Touch Screen
Version 4.6 by Edwin Chen on 2024/09/16 08:55
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | |||
2 | [[image:image-20240915231842-1.png]] | ||
3 | |||
4 | |||
5 | (% _mstvisible="1" %) | ||
6 | (% _msthash="315238" _msttexthash="18964465" _mstvisible="3" %)**Table of Contents:** | ||
7 | |||
8 | {{toc/}} | ||
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | = 1. Introduction = | ||
18 | |||
19 | == 1.1 What is LTS5 LoRa HMI touch screen == | ||
20 | |||
21 | LTS5 is a (% style="color:blue" %)LoRa / LoRaWAN HMI Touch Screen(%%) designed for display purpose of IoT project. It have a 5.0" HMI touch screen, and support WiFi, Bluetooch, LoRa wireless protocol. | ||
22 | |||
23 | LTS5 is an Open Source software project. The MCU is ESP32 and Dragino LA66 LoRa module. There are lots of development source for ESP32 which can greatly reduce the development time. | ||
24 | |||
25 | The HMI touch screen of LTS5 supports drap & drop design. Developer can use SquareLine to easily customize the display UI for different application. | ||
26 | |||
27 | LTS5 use LA66 LoRa module, this module can be program to support private LoRa protocol or LoRaWAN protocol. | ||
28 | |||
29 | |||
30 | == 1.2 Features == | ||
31 | |||
32 | * Support Private LoRa protocol or LoRaWAN protocol | ||
33 | * Support WiFi & BLE wireless protocol | ||
34 | * 5.0" HMI touch screen | ||
35 | * Support LVGL case. SquareLine program. | ||
36 | * Support RS485 Interface | ||
37 | * Open Source Project | ||
38 | * Wall Attachable. | ||
39 | * 5V DC power | ||
40 | * IP Rating: IP52 | ||
41 | |||
42 | |||
43 | == 1.3 Specification == | ||
44 | |||
45 | **Display:** | ||
46 | |||
47 | * TFT Touch SCreen | ||
48 | * Accuracy Tolerance: Typ ±0.2 °C | ||
49 | * Long Term Drift: < 0.03 °C/yr | ||
50 | * Operating Range: -10 ~~ 50 °C or -40 ~~ 60 °C (depends on battery type, see [[FAQ>>||anchor="H6.5Whyiseedifferentworkingtemperatureforthedevice3F"]]) | ||
51 | |||
52 | |||
53 | |||
54 | == 1.4 Power Consumption == | ||
55 | |||
56 | * External 5V DC power adapter | ||
57 | |||
58 | |||
59 | == 1.5 Storage & Operation Temperature == | ||
60 | |||
61 | |||
62 | -10 ~~ 50 °C or -40 ~~ 60 °C (depends on battery type, see [[FAQ>>||anchor="H6.5Whyiseedifferentworkingtemperatureforthedevice3F"]]) | ||
63 | |||
64 | |||
65 | == 1.6 Applications == | ||
66 | |||
67 | |||
68 | * Smart Buildings & Home Automation | ||
69 | * Logistics and Supply Chain Management | ||
70 | * Smart Metering | ||
71 | * Smart Agriculture | ||
72 | * Smart Cities | ||
73 | * Smart Factory | ||
74 | |||
75 | |||
76 | = 2. Operation Mode = | ||
77 | |||
78 | == 2.1 How it work? == | ||
79 | |||
80 | |||
81 | Each PB01 is shipped with a worldwide unique set of LoRaWAN OTAA keys. To use PB01 in a LoRaWAN network, user needs to input the OTAA keys in LoRaWAN network server. After this, if PB01 is under this LoRaWAN network coverage, PB01 can join the LoRaWAN network and start to transmit sensor data. The default period for each uplink is** 20 minutes**. | ||
82 | |||
83 | |||
84 | == 2.2 How to Activate PB01? == | ||
85 | |||
86 | |||
87 | (% style="color:red" %)** 1. Open enclosure from below position.** | ||
88 | |||
89 | [[image:image-20220621093835-1.png]] | ||
90 | |||
91 | |||
92 | (% style="color:red" %)** 2. Insert 2 x AAA LR03 batteries and the node is activated.** | ||
93 | |||
94 | [[image:image-20220621093835-2.png]] | ||
95 | |||
96 | |||
97 | (% style="color:red" %)** 3. Under the above conditions, users can also reactivate the node by long pressing the ACT button.** | ||
98 | |||
99 | [[image:image-20220621093835-3.png]] | ||
100 | |||
101 | |||
102 | User can check [[LED Status>>||anchor="H2.8LEDIndicator"]] to know the working state of PB01. | ||
103 | |||
104 | |||
105 | == 2.3 Example to join LoRaWAN network == | ||
106 | |||
107 | |||
108 | This section shows an example for how to join the [[TheThingsNetwork>>url:https://www.thethingsnetwork.org/]] LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are of similar procedure. | ||
109 | |||
110 | (% _mstvisible="1" class="wikigeneratedid" %) | ||
111 | Assume the LPS8v2 is already set to connect to [[TTN V3 network >>url:https://eu1.cloud.thethings.network/]]. We need to add the PB01 device in TTN V3 portal. | ||
112 | |||
113 | [[image:image-20240705094824-4.png]] | ||
114 | |||
115 | (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from PB01. | ||
116 | |||
117 | Each PB01 is shipped with a sticker with the default DEV EUI as below: | ||
118 | |||
119 | [[image:image-20230426083617-1.png||height="294" width="633"]] | ||
120 | |||
121 | |||
122 | Enter these keys in the LoRaWAN Server portal. Below is TTN V3 screen shot: | ||
123 | |||
124 | Create application. | ||
125 | |||
126 | choose to create the device manually. | ||
127 | |||
128 | Add JoinEUI(AppEUI), DevEUI, AppKey.(% style="display:none" %) | ||
129 | |||
130 | [[image:image-20240507142116-1.png||height="410" width="1138"]](% style="display:none" %) (%%) | ||
131 | |||
132 | |||
133 | [[image:image-20240507142157-2.png||height="559" width="1147"]] | ||
134 | |||
135 | [[image:image-20240507142401-3.png||height="693" width="1202"]] | ||
136 | |||
137 | [[image:image-20240507142651-4.png||height="760" width="1190"]] | ||
138 | |||
139 | **Default mode OTAA**(% style="display:none" %) | ||
140 | |||
141 | |||
142 | (% style="color:blue" %)**Step 2**(%%): Use ACT button to activate PB01 and it will auto join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and user can see in the panel. | ||
143 | |||
144 | [[image:image-20240507143104-5.png||height="434" width="1398"]] | ||
145 | |||
146 | |||
147 | == 2.4 Uplink Payload == | ||
148 | |||
149 | |||
150 | Uplink payloads include two types: Valid Sensor Value and other status / control command. | ||
151 | |||
152 | * Valid Sensor Value: Use FPORT=2 | ||
153 | * Other control command: Use FPORT other than 2. | ||
154 | |||
155 | === 2.4.1 Uplink FPORT~=5, Device Status === | ||
156 | |||
157 | |||
158 | Users can get the Device Status uplink through the downlink command: | ||
159 | |||
160 | (% style="color:#4472c4" %)**Downlink: **(%%)**0x2601** | ||
161 | |||
162 | Uplink the device configures with FPORT=5. | ||
163 | |||
164 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:370px" %) | ||
165 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)**Size(bytes)(% style="display:none" %) (%%)**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2** | ||
166 | |(% style="width:99px" %)Value|(% style="width:62px" %)Sensor Model|(% style="width:80px" %)Firmware Version|(% style="width:82px" %)Frequency Band|(% style="width:85px" %)Sub-band|(% style="width:46px" %)BAT | ||
167 | |||
168 | [[image:image-20240507152130-12.png||height="469" width="1366"]](% style="display:none" %) | ||
169 | |||
170 | Example Payload (FPort=5): [[image:image-20240507152254-13.png||height="26" width="130"]] | ||
171 | |||
172 | |||
173 | (% style="color:#4472c4" %)**Sensor Model**(%%): For PB01, this value is 0x35. | ||
174 | |||
175 | (% style="color:#4472c4" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version. | ||
176 | |||
177 | (% style="color:#4472c4" %)**Frequency Band**: | ||
178 | |||
179 | *0x01: EU868 | ||
180 | |||
181 | *0x02: US915 | ||
182 | |||
183 | *0x03: IN865 | ||
184 | |||
185 | *0x04: AU915 | ||
186 | |||
187 | *0x05: KZ865 | ||
188 | |||
189 | *0x06: RU864 | ||
190 | |||
191 | *0x07: AS923 | ||
192 | |||
193 | *0x08: AS923-1 | ||
194 | |||
195 | *0x09: AS923-2 | ||
196 | |||
197 | *0x0a: AS923-3 | ||
198 | |||
199 | |||
200 | (% style="color:#4472c4" %)**Sub-Band**(%%): value 0x00 ~~ 0x08(only for CN470, AU915,US915. Others are0x00) | ||
201 | |||
202 | (% style="color:#4472c4" %)**BAT**(%%): shows the battery voltage for PB01. | ||
203 | |||
204 | (% style="color:#4472c4" %)**Ex1**(%%): 0x0C DE = 3294mV | ||
205 | |||
206 | |||
207 | === 2.4.2 Uplink FPORT~=2, Real time sensor value === | ||
208 | |||
209 | |||
210 | PB01 will send this uplink after Device Status uplink once join LoRaWAN network successfully. And it will periodically send this uplink. Default interval is 20 minutes and [[can be changed>>||anchor="H3.1A0DownlinkCommandSet"]]. | ||
211 | |||
212 | Uplink uses FPORT=2 and every 20 minutes send one uplink by default. | ||
213 | |||
214 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:460px" %) | ||
215 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
216 | **Size(bytes)** | ||
217 | )))|=(% style="width: 60px;background-color:#4F81BD;color:white" %)2|=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
218 | **1** | ||
219 | )))|=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
220 | **1** | ||
221 | )))|=(% style="width: 90px;background-color:#4F81BD;color:white" %)((( | ||
222 | **2** | ||
223 | )))|=(% style="width: 40px;background-color:#4F81BD;color:white" %)((( | ||
224 | **2** | ||
225 | ))) | ||
226 | |(% style="width:97px" %)((( | ||
227 | Value | ||
228 | )))|(% style="width:39px" %)Battery|(% style="width:39px" %)((( | ||
229 | Sound_ACK | ||
230 | |||
231 | &Sound_key | ||
232 | )))|(% style="width:100px" %)((( | ||
233 | ((( | ||
234 | Alarm | ||
235 | ))) | ||
236 | )))|(% style="width:77px" %)((( | ||
237 | ((( | ||
238 | Temperature | ||
239 | ))) | ||
240 | )))|(% style="width:47px" %)((( | ||
241 | Humidity | ||
242 | ))) | ||
243 | |||
244 | Example in TTN. | ||
245 | |||
246 | [[image:image-20240507150155-11.png||height="549" width="1261"]] | ||
247 | |||
248 | Example Payload (FPort=2): (% style="background-color:yellow" %)**0C EA 03 01 01 11 02 A8** | ||
249 | |||
250 | ==== (% style="color:blue" %)**Battery:**(%%) ==== | ||
251 | |||
252 | Check the battery voltage. | ||
253 | |||
254 | * Ex1: 0x0CEA = 3306mV | ||
255 | * Ex2: 0x0D08 = 3336mV | ||
256 | |||
257 | ==== (% style="color:blue" %)**Sound_ACK & Sound_key:**(%%) ==== | ||
258 | |||
259 | Key sound and ACK sound are enabled by default. | ||
260 | |||
261 | * Example1: 0x03 | ||
262 | |||
263 | Sound_ACK: (03>>1) & 0x01=1, OPEN. | ||
264 | |||
265 | **~ ** Sound_key: 03 & 0x01=1, OPEN. | ||
266 | |||
267 | * Example2: 0x01 | ||
268 | |||
269 | Sound_ACK: (01>>1) & 0x01=0, CLOSE. | ||
270 | |||
271 | **~ ** Sound_key: 01 & 0x01=1, OPEN. | ||
272 | |||
273 | |||
274 | ==== (% style="color:blue" %)**Alarm:**(%%) ==== | ||
275 | |||
276 | Key alarm. | ||
277 | |||
278 | * Ex1: 0x01 & 0x01=1, TRUE. | ||
279 | * Ex2: 0x00 & 0x01=0, FALSE. | ||
280 | |||
281 | ==== (% style="color:blue" %)**Temperature:**(%%) ==== | ||
282 | |||
283 | * Example1: 0x0111/10=27.3℃ | ||
284 | * Example2: (0xFF0D-65536)/10=-24.3℃ | ||
285 | |||
286 | If payload is: FF0D : (FF0D & 8000 == 1) , temp = (FF0D - 65536)/100 =-24.3℃ | ||
287 | |||
288 | (FF0D & 8000:Judge whether the highest bit is 1, when the highest bit is 1, it is negative) | ||
289 | |||
290 | |||
291 | ==== (% style="color:blue" %)**Humidity:**(%%) ==== | ||
292 | |||
293 | * Humidity: 0x02A8/10=68.0% | ||
294 | |||
295 | === 2.4.3 Uplink FPORT~=3, Datalog sensor value === | ||
296 | |||
297 | |||
298 | PB01 stores sensor value and user can retrieve these history value via downlink command. The Datalog sensor value are sent via FPORT=3. | ||
299 | |||
300 | [[image:image-20240510144912-1.png||height="471" width="1178"]](% style="display:none" %) | ||
301 | |||
302 | |||
303 | * Each data entry is 11 bytes, to save airtime and battery, PB01 will send max bytes according to the current DR and Frequency bands.(% style="display:none" %) | ||
304 | |||
305 | For example, in US915 band, the max payload for different DR is: | ||
306 | |||
307 | 1. **DR0**: max is 11 bytes so one entry of data | ||
308 | 1. **DR1**: max is 53 bytes so devices will upload 4 entries of data (total 44 bytes) | ||
309 | 1. **DR2**: total payload includes 11 entries of data | ||
310 | 1. **DR3**: total payload includes 22 entries of data. | ||
311 | |||
312 | (% style="color:red" %)**Notice: PB01 will save 178 set of history data, If device doesn't have any data in the polling time. Device will uplink 11 bytes of 0.** | ||
313 | |||
314 | See more info about the [[Datalog feature>>||anchor="H2.6A0DatalogFeature"]]. | ||
315 | |||
316 | (% style="display:none" %) (%%) | ||
317 | |||
318 | === 2.4.4 Decoder in TTN V3 === | ||
319 | |||
320 | |||
321 | In LoRaWAN protocol, the uplink payload is HEX format, user need to add a payload formatter/decoder in LoRaWAN Server to get human friendly string. | ||
322 | |||
323 | In TTN , add formatter as below: | ||
324 | |||
325 | [[image:image-20240507162814-16.png||height="778" width="1135"]] | ||
326 | |||
327 | ((( | ||
328 | Please check the decoder from this link: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]] | ||
329 | ))) | ||
330 | |||
331 | ((( | ||
332 | |||
333 | ))) | ||
334 | |||
335 | == 2.5 Show data on Datacake == | ||
336 | |||
337 | |||
338 | ((( | ||
339 | Datacake IoT platform provides a human friendly interface to show the sensor data in charts, 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: | ||
340 | ))) | ||
341 | |||
342 | ((( | ||
343 | |||
344 | ))) | ||
345 | |||
346 | ((( | ||
347 | (% style="color:blue" %)**Step 1**(%%): Be sure that your device is programmed and properly connected to the LoRaWAN network. | ||
348 | ))) | ||
349 | |||
350 | ((( | ||
351 | (% style="color:blue" %)**Step 2**(%%): Configure your Application to forward data to Datacake you will need to add integration. Go to TTN V3 Console ~-~-> Applications ~-~-> Integrations ~-~-> Add Integrations. | ||
352 | ))) | ||
353 | |||
354 | ((( | ||
355 | ~1. Add Datacake: | ||
356 | ))) | ||
357 | |||
358 | ((( | ||
359 | 2. Select default key as Access Key: | ||
360 | ))) | ||
361 | |||
362 | ((( | ||
363 | 3. In Datacake console ([[https:~~/~~/datacake.co/>>url:https://datacake.co/]]) , add PB01: | ||
364 | ))) | ||
365 | |||
366 | ((( | ||
367 | Please refer to the figure below. | ||
368 | ))) | ||
369 | |||
370 | [[image:image-20240510150924-2.png||height="612" width="1186"]] | ||
371 | |||
372 | |||
373 | Log in to DATACAKE, copy the API under the account. | ||
374 | |||
375 | [[image:image-20240510151944-3.png||height="581" width="1191"]] | ||
376 | |||
377 | |||
378 | |||
379 | [[image:image-20240510152150-4.png||height="697" width="1188"]] | ||
380 | |||
381 | |||
382 | [[image:image-20240510152300-5.png||height="298" width="1191"]] | ||
383 | |||
384 | |||
385 | [[image:image-20240510152355-6.png||height="782" width="1193"]] | ||
386 | |||
387 | [[image:image-20240510152542-8.png||height="545" width="739"]] | ||
388 | |||
389 | [[image:image-20240510152634-9.png||height="748" width="740"]] | ||
390 | |||
391 | |||
392 | [[image:image-20240510152809-10.png||height="607" width="732"]] | ||
393 | |||
394 | [[image:image-20240510153934-14.png||height="460" width="1199"]] | ||
395 | |||
396 | |||
397 | [[image:image-20240510153435-12.png||height="428" width="1197"]] | ||
398 | |||
399 | |||
400 | Copy and paste the [[TTN decoder>>https://github.com/dragino/dragino-end-node-decoder]] here and save. | ||
401 | |||
402 | [[image:image-20240510153624-13.png||height="468" width="1195"]] | ||
403 | |||
404 | |||
405 | Visual widgets please read the DATACAKE documentation. | ||
406 | |||
407 | (% style="display:none" %) (%%) | ||
408 | |||
409 | == 2.6 Datalog Feature == | ||
410 | |||
411 | |||
412 | (% _msthash="315262" _msttexthash="32283004" _mstvisible="1" %) | ||
413 | When user want to retrieve sensor value, he can send a poll command from the IoT platform to ask sensor to send value in the required time slot. | ||
414 | |||
415 | |||
416 | === 2.6.1 Unix TimeStamp === | ||
417 | |||
418 | |||
419 | Unix TimeStamp shows the sampling time of uplink payload. format base on | ||
420 | |||
421 | [[image:image-20220523001219-11.png||_mstalt="450450" _mstvisible="3" height="97" width="627"]] | ||
422 | |||
423 | User can get this time from link: [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/||_mstvisible="3"]] : | ||
424 | |||
425 | For example: if the Unix Timestamp we got is hex 0x60137afd, we can convert it to Decimal: 1611889405. and then convert to the time: 2021 – Jan ~-~- 29 Friday 03:03:25 (GMT) | ||
426 | |||
427 | |||
428 | [[image:1655782409139-256.png]] | ||
429 | |||
430 | |||
431 | === 2.6.2 Poll sensor value === | ||
432 | |||
433 | |||
434 | ((( | ||
435 | User can poll sensor value based on timestamps from the server. Below is the downlink command. | ||
436 | ))) | ||
437 | |||
438 | ((( | ||
439 | 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. | ||
440 | ))) | ||
441 | |||
442 | ((( | ||
443 | For example, downlink command [[image:image-20220621113526-13.png]] (% _mstvisible="3" style="display:none" %) | ||
444 | ))) | ||
445 | |||
446 | ((( | ||
447 | Is to check 2020/12/1 07:40:00 to 2020/12/1 08:40:00's data | ||
448 | ))) | ||
449 | |||
450 | ((( | ||
451 | Uplink Internal =5s,means PB01 will send one packet every 5s. range 5~~255s. | ||
452 | ))) | ||
453 | |||
454 | |||
455 | === 2.6.3 Datalog Uplink payload === | ||
456 | |||
457 | |||
458 | See [[Uplink FPORT=3, Datalog sensor value>>||anchor="H2.4.3A0UplinkFPORT3D32CDatalogsensorvalue"]] | ||
459 | |||
460 | (% style="display:none" %) (%%) (% style="display:none" %) | ||
461 | |||
462 | == 2.7 Button == | ||
463 | |||
464 | |||
465 | * ACT button | ||
466 | |||
467 | Long press this button PB01 will reset and join network again. | ||
468 | |||
469 | [[image:image-20240510161626-17.png||height="192" width="224"]] | ||
470 | |||
471 | * Alarm button | ||
472 | |||
473 | Press the button PB01 will immediately uplink data, and alarm is "TRUE". | ||
474 | |||
475 | [[image:image-20240705095149-5.png||height="164" width="162"]](% style="display:none" %) | ||
476 | |||
477 | |||
478 | == 2.8 LED Indicator == | ||
479 | |||
480 | |||
481 | ((( | ||
482 | The PB01 has a triple color LED which for easy showing different stage. | ||
483 | ))) | ||
484 | |||
485 | Hold the ACT green light to rest, then the green flashing node restarts, the blue flashing once upon request for network access, and the green constant light for 5 seconds after successful network access | ||
486 | |||
487 | ((( | ||
488 | (% style="color:#037691" %)**In a normal working state**: | ||
489 | ))) | ||
490 | |||
491 | * When the node is restarted, hold the ACT (% style="color:green" %)**GREEN**(%%) lights up , then the (% style="color:green" %)**GREEN**(%%) flashing node restarts.The (% style="color:blue" %)**BLUE**(%%) flashing once upon request for network access, and the (% style="color:green" %)**GREEN**(%%) constant light for 5 seconds after successful network access(% style="color:#0000ff" %)**.** | ||
492 | * During OTAA Join: | ||
493 | ** **For each Join Request uplink:** the (% style="color:green" %)**GREEN LED** (%%)will blink once. | ||
494 | ** **Once Join Successful:** the (% style="color:green" %)**GREEN LED**(%%) will be solid on for 5 seconds. | ||
495 | * After joined, for each uplink, the (% style="color:blue" %)**BLUE LED**(%%) or (% style="color:green" %)**GREEN LED** (%%)will blink once. | ||
496 | * Press the alarm button,The (% style="color:red" %)**RED**(%%) flashes until the node receives the ACK from the platform and the (% style="color:blue" %)**BLUE**(%%) light stays 5s. | ||
497 | |||
498 | ((( | ||
499 | |||
500 | ))) | ||
501 | |||
502 | == 2.9 Buzzer == | ||
503 | |||
504 | |||
505 | The PB01 has** button sound** and** ACK sound** and users can turn on or off both sounds by using [[AT+SOUND>>||anchor="H3.3A0Setbuttonsoundandbuttonalarm"]]. | ||
506 | |||
507 | * (% style="color:#4f81bd" %)**Button sound**(%%)** **is the music produced by the node after the alarm button is pressed. | ||
508 | |||
509 | Users can use[[ AT+OPTION>>||anchor="H3.4A0Setbuzzermusic2807E429"]] to set different button sounds. | ||
510 | |||
511 | * (% style="color:#4f81bd" %)**ACK sound **(%%)is the notification tone that the node receives ACK. | ||
512 | |||
513 | = 3. Configure PB01 via AT command or LoRaWAN downlink = | ||
514 | |||
515 | |||
516 | Users can configure PB01 via AT Command or LoRaWAN Downlink. | ||
517 | |||
518 | * AT Command Connection: See [[FAQ>>||anchor="H6.FAQ"]]. | ||
519 | |||
520 | * LoRaWAN Downlink instruction for different platforms: [[IoT LoRaWAN Server>>doc:Main.WebHome]] | ||
521 | |||
522 | There are two kinds of commands to configure PB01, they are: | ||
523 | |||
524 | * (% style="color:#4f81bd" %)**General Commands:** | ||
525 | |||
526 | These commands are to configure: | ||
527 | |||
528 | * General system settings like: uplink interval. | ||
529 | |||
530 | * LoRaWAN protocol & radio-related commands. | ||
531 | |||
532 | They are the same for all Dragino Devices which supports DLWS-005 LoRaWAN Stack(Note~*~*). These commands can be found on the wiki: [[End Device Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]] | ||
533 | |||
534 | |||
535 | * (% style="color:#4f81bd" %)**Commands special design for PB01** | ||
536 | |||
537 | These commands are only valid for PB01, as below: | ||
538 | |||
539 | (% style="display:none" %) (%%) | ||
540 | |||
541 | == 3.1 Downlink Command Set == | ||
542 | |||
543 | |||
544 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %) | ||
545 | |=(% style="width: 130px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 151px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 92px; background-color: rgb(79, 129, 189); color: white;" %)**Response**|=(% style="width: 206px; background-color: rgb(79, 129, 189); color: white;" %)**Downlink** | ||
546 | |(% style="width:130px" %)AT+TDC=?|(% style="width:151px" %)((( | ||
547 | |||
548 | |||
549 | View current TDC time | ||
550 | )))|(% style="width:92px" %)((( | ||
551 | 1200000 | ||
552 | OK | ||
553 | )))|(% style="width:206px" %)Default 1200000(ms) | ||
554 | |(% style="width:130px" %)AT+TDC=300000|(% style="width:151px" %)Set TDC time|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
555 | ((( | ||
556 | 0X0100012C: | ||
557 | 01: fixed command | ||
558 | 00012C: 0X00012C= | ||
559 | |||
560 | 300(seconds) | ||
561 | ))) | ||
562 | |||
563 | ((( | ||
564 | |||
565 | ))) | ||
566 | ))) | ||
567 | |(% style="width:130px" %)ATZ|(% style="width:151px" %)Reset node|(% style="width:92px" %) |(% style="width:206px" %)0x04FF | ||
568 | |(% style="width:130px" %)AT+FDR|(% style="width:151px" %)Restore factory settings|(% style="width:92px" %) |(% style="width:206px" %)0X04FE | ||
569 | |(% style="width:130px" %)AT+CFM=?|(% style="width:151px" %)View the current confirmation mode status|(% style="width:92px" %)((( | ||
570 | 0,7,0 | ||
571 | |||
572 | OK | ||
573 | )))|(% style="width:206px" %)Default 0,7,0 | ||
574 | |(% style="width:130px" %)AT+CFM=1,7,1|(% style="width:151px" %)((( | ||
575 | Confirmed uplink mode, the maximum number of retries is seven, and uplink fcnt increase by 1 for each retry | ||
576 | )))|(% style="width:92px" %)((( | ||
577 | OK | ||
578 | )))|(% style="width:206px" %)((( | ||
579 | 05010701 | ||
580 | |||
581 | 05: fixed command | ||
582 | |||
583 | 01:confirmed uplink | ||
584 | |||
585 | 07: retry 7 times | ||
586 | |||
587 | 01: fcnt count plus 1 | ||
588 | ))) | ||
589 | |(% style="width:130px" %)AT+NJM=?|(% style="width:151px" %)((( | ||
590 | Check the current network connection method | ||
591 | )))|(% style="width:92px" %)((( | ||
592 | 1 | ||
593 | OK | ||
594 | )))|(% style="width:206px" %)Default 1 | ||
595 | |(% style="width:130px" %)AT+NJM=0|(% style="width:151px" %)Change the network connection method to ABP|(% style="width:92px" %)((( | ||
596 | Attention:Take effect after ATZ | ||
597 | OK | ||
598 | )))|(% style="width:206px" %)((( | ||
599 | 0X2000: ABP | ||
600 | 0x2001: OTAA | ||
601 | 20: fixed command | ||
602 | ))) | ||
603 | |(% style="width:130px" %)AT+RPL=?|(% style="width:151px" %)View current RPL settings|(% style="width:92px" %)((( | ||
604 | 0 | ||
605 | OK | ||
606 | )))|(% style="width:206px" %)Default 0 | ||
607 | |(% style="width:130px" %)AT+RPL=1|(% style="width:151px" %)set RPL=1 |(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
608 | 0x2101: | ||
609 | 21: fixed command | ||
610 | 01: for details, check wiki | ||
611 | ))) | ||
612 | |(% style="width:130px" %)AT+ADR=?|(% style="width:151px" %)View current ADR status|(% style="width:92px" %)((( | ||
613 | 1 | ||
614 | OK | ||
615 | )))|(% style="width:206px" %)Default 0 | ||
616 | |(% style="width:130px" %)AT+ADR=0|(% style="width:151px" %)Set the ADR state to off|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
617 | 0x2200: close | ||
618 | 0x2201: open | ||
619 | 22: fixed command | ||
620 | ))) | ||
621 | |(% style="width:130px" %)AT+DR=?|(% style="width:151px" %)View the current DR settings|(% style="width:92px" %)OK|(% style="width:206px" %) | ||
622 | |(% style="width:130px" %)AT+DR=1|(% style="width:151px" %)((( | ||
623 | set DR to 1 | ||
624 | It takes effect only when ADR=0 | ||
625 | )))|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
626 | 0X22000101: | ||
627 | 00: ADR=0 | ||
628 | 01: DR=1 | ||
629 | 01: TXP=1 | ||
630 | 22: fixed command | ||
631 | ))) | ||
632 | |(% style="width:130px" %)AT+TXP=?|(% style="width:151px" %)View the current TXP|(% style="width:92px" %)OK|(% style="width:206px" %) | ||
633 | |(% style="width:130px" %)AT+TXP=1|(% style="width:151px" %)((( | ||
634 | set TXP to 1 | ||
635 | It takes effect only when ADR=0 | ||
636 | )))|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
637 | 0X22000101: | ||
638 | 00: ADR=0 | ||
639 | 01: DR=1 | ||
640 | 01: TXP=1 | ||
641 | 22: fixed command | ||
642 | ))) | ||
643 | |(% style="width:130px" %)AT+RJTDC=10|(% style="width:151px" %)Set RJTDC time interval|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
644 | 0X26000A: | ||
645 | 26: fixed command | ||
646 | 000A: 0X000A=10(min) | ||
647 | for details, check wiki | ||
648 | ))) | ||
649 | |(% style="width:130px" %) |(% style="width:151px" %)((( | ||
650 | ((( | ||
651 | ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_ | ||
652 | |||
653 | Retrieve stored data for a specified period of time | ||
654 | ))) | ||
655 | |||
656 | ((( | ||
657 | |||
658 | ))) | ||
659 | )))|(% style="width:92px" %) |(% style="width:206px" %)((( | ||
660 | 0X3161DE7C7061DE8A800A: | ||
661 | 31: fixed command | ||
662 | 61DE7C70:0X61DE7C70=2022/1/12 15:00:00 | ||
663 | 61DE8A80:0X61DE8A80=2022/1/12 16:00:00 | ||
664 | 0A: 0X0A=10(second) | ||
665 | View details 2.6.2 | ||
666 | ))) | ||
667 | |(% style="width:130px" %)AT+DDETECT=?|(% style="width:151px" %)View the current DDETECT setting status and time|(% style="width:92px" %)((( | ||
668 | 1,1440,2880 | ||
669 | OK | ||
670 | )))|(% style="width:206px" %)Default 1,1440,2880(min) | ||
671 | |(% style="width:130px" %)AT+DDETECT=((( | ||
672 | 1,1440,2880 | ||
673 | )))|(% style="width:151px" %)((( | ||
674 | Set DDETECT setting status and time | ||
675 | ((% style="color:red" %)When the node does not receive the downlink packet within the set time, it will re-enter the network(%%)) | ||
676 | )))|(% style="width:92px" %)OK|(% style="width:206px" %)((( | ||
677 | 0X320005A0: close | ||
678 | 0X320105A0: open | ||
679 | 32: fixed command | ||
680 | 05A0: 0X05A0=1440(min) | ||
681 | ))) | ||
682 | |||
683 | == 3.2 Set Password == | ||
684 | |||
685 | |||
686 | Feature: Set device password, max 9 digits. | ||
687 | |||
688 | (% style="color:#4f81bd" %)**AT Command: AT+PWORD** | ||
689 | |||
690 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:372px" %) | ||
691 | |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:128px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:89px" %)**Response** | ||
692 | |(% style="width:155px" %)AT+PWORD=?|(% style="width:124px" %)Show password|(% style="width:86px" %)((( | ||
693 | 123456 | ||
694 | OK | ||
695 | ))) | ||
696 | |(% style="width:155px" %)AT+PWORD=999999|(% style="width:124px" %)Set password|(% style="width:86px" %)OK | ||
697 | |||
698 | (% style="color:#4f81bd" %)**Downlink Command:** | ||
699 | |||
700 | No downlink command for this feature. | ||
701 | |||
702 | |||
703 | == 3.3 Set button sound and ACK sound == | ||
704 | |||
705 | |||
706 | Feature: Turn on/off button sound and ACK alarm. | ||
707 | |||
708 | (% style="color:#4f81bd" %)**AT Command: AT+SOUND** | ||
709 | |||
710 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:372px" %) | ||
711 | |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:128px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:89px" %)**Response** | ||
712 | |(% style="width:155px" %)((( | ||
713 | AT+SOUND=? | ||
714 | )))|(% style="width:124px" %)Get the current status of button sound and ACK sound|(% style="width:86px" %)((( | ||
715 | 1,1 | ||
716 | OK | ||
717 | ))) | ||
718 | |(% style="width:155px" %)((( | ||
719 | AT+SOUND=0,1 | ||
720 | )))|(% style="width:124px" %)Turn off the button sound and turn on ACK sound|(% style="width:86px" %)OK | ||
721 | |||
722 | (% style="color:#4f81bd" %)**Downlink Command: 0xA1 ** | ||
723 | |||
724 | Format: Command Code (0xA1) followed by 2 bytes mode value. | ||
725 | |||
726 | The first byte after 0XA1 sets the button sound, and the second byte after 0XA1 sets the ACK sound.** (0: off, 1: on)** | ||
727 | |||
728 | * **Example: **Downlink Payload: A10001 ~/~/ Set AT+SOUND=0,1 Turn off the button sound and turn on ACK sound. | ||
729 | |||
730 | == 3.4 Set buzzer music type(0~~4) == | ||
731 | |||
732 | |||
733 | Feature: Set different alarm key response sounds.There are five different types of button music. | ||
734 | |||
735 | (% style="color:#4f81bd" %)**AT Command: AT+OPTION** | ||
736 | |||
737 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:372px" %) | ||
738 | |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:128px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:89px" %)**Response** | ||
739 | |(% style="width:155px" %)((( | ||
740 | AT+OPTION=? | ||
741 | )))|(% style="width:124px" %)((( | ||
742 | Get the buzzer music type | ||
743 | )))|(% style="width:86px" %)((( | ||
744 | 3 | ||
745 | |||
746 | OK | ||
747 | ))) | ||
748 | |(% style="width:155px" %)AT+OPTION=1|(% style="width:124px" %)Set the buzzer music to type 1|(% style="width:86px" %)OK | ||
749 | |||
750 | (% style="color:#4f81bd" %)**Downlink Command: 0xA3** | ||
751 | |||
752 | Format: Command Code (0xA3) followed by 1 byte mode value. | ||
753 | |||
754 | * **Example: **Downlink Payload: A300 ~/~/ Set AT+OPTION=0 Set the buzzer music to type 0. | ||
755 | |||
756 | == 3.5 Set Valid Push Time == | ||
757 | |||
758 | |||
759 | Feature: Set the holding time for pressing the alarm button to avoid miscontact. Values range from** 0 ~~1000ms**. | ||
760 | |||
761 | (% style="color:#4f81bd" %)**AT Command: AT+STIME** | ||
762 | |||
763 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:372px" %) | ||
764 | |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:128px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:89px" %)**Response** | ||
765 | |(% style="width:155px" %)((( | ||
766 | AT+STIME=? | ||
767 | )))|(% style="width:124px" %)((( | ||
768 | Get the button sound time | ||
769 | )))|(% style="width:86px" %)((( | ||
770 | 0 | ||
771 | OK | ||
772 | ))) | ||
773 | |(% style="width:155px" %)((( | ||
774 | AT+STIME=1000 | ||
775 | )))|(% style="width:124px" %)Set the button sound time to 1000**ms**|(% style="width:86px" %)OK | ||
776 | |||
777 | (% style="color:#4f81bd" %)**Downlink Command: 0xA2** | ||
778 | |||
779 | Format: Command Code (0xA2) followed by 2 bytes mode value. | ||
780 | |||
781 | * **Example: **Downlink Payload: A203E8 ~/~/ Set AT+STIME=1000 | ||
782 | |||
783 | **~ Explain: **Hold the alarm button for 10 seconds before the node will send the alarm packet. | ||
784 | |||
785 | |||
786 | |||
787 | |||
788 | = 6. FAQ = | ||
789 | |||
790 | == 6.1 == | ||
791 | |||
792 | |||
793 | = 7. Order Info = | ||
794 | |||
795 | == 7.1 Part Number == | ||
796 | |||
797 | Part Number: (% style="color:#4472c4" %)LTS5 | ||
798 | |||
799 | |||
800 | |||
801 | == 7.2 Packing Info == | ||
802 | |||
803 | **Package Includes**: | ||
804 | |||
805 | * LTS5 HMI Touch Screen | ||
806 | * 5V,2A DC Power Adapter. | ||
807 | * USB Type C Program Cable | ||
808 | |||
809 | |||
810 | = 8. Support = | ||
811 | |||
812 | * 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. | ||
813 | * 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:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]]. | ||
814 | |||
815 | |||
816 | = 9. Reference material = | ||
817 | |||
818 | * Datasheet | ||
819 | * Source Code | ||
820 | * Mechinical | ||
821 | |||
822 | |||
823 | = 10. FCC Warning = | ||
824 | |||
825 | |||
826 | This device complies with part 15 of the FCC Rules.Operation is subject to the following two conditions: | ||
827 | |||
828 | (1) This device may not cause harmful interference; | ||
829 | |||
830 | (2) this device must accept any interference received,including interference that may cause undesired operation. | ||
831 |