Wiki source code of LC01 LoRaWAN Relay User Manual

Version 135.3 by Mengting Qiu on 2025/05/09 19:50

Show last authors
1 [[image:image-20250509194759-2.jpeg||height="503" width="503"]] (% style="display:none" %) (%%) (% style="display:none" %) (%%) (% style="display:none" %) [[image:image-20250507162148-1.jpeg||height="528" width="528"]](%%) [[image:image-20250509194713-1.jpeg||height="503" width="503"]]
2
3
4
5 **Table of Contents:**
6
7 {{toc/}}
8
9
10
11
12
13
14 = 1. Introduction =
15
16 == 1.1 What is LC01 LoRaWAN Relay ==
17
18
19 The Dragino LC01 is a (% style="color:blue" %)**LoRaWAN Relay**(%%) for Internet of Things solution. It controls the device power switch via the IoT server downlink of the LoRaWAN wireless protocol.
20
21 It can be applied to (% style="color:blue" %)**smart agricultural irrigation, smart home, industrial automation and other industries**(%%).
22
23 The LoRa wireless technology used in the LC03 allows devices to send data at low rates and reach extremely long transmission distances. The technology provides ultra-long-range spread spectrum communication and high anti-interference capabilities while minimizing current consumption.
24
25 By default, LC01 has the function of detecting the access status of devices that need power. When the device that needs power is connected, it will automatically upload the data packet; when the device that needs power is disconnected, LC01 will also automatically upload the data packet.
26
27 LC01 (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
28
29 Each LC01 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.
30
31
32 == 1.2 ​Features ==
33
34
35 * LoRaWAN Class A & Class C modes
36 * Optional Customized LoRa Protocol
37 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/RU864/IN865/MA869
38 * AT Commands to change parameters
39 * Remotely configure parameters via LoRaWAN Downlink
40 * Firmware upgradable via program port
41 * Support wireless OTA update firmware
42 * Uplink on periodically
43 * Downlink to change configure
44
45 == 1.3 Specification ==
46
47
48 (% style="color:#037691" %)**Common DC Characteristics:**
49
50 * Supply Voltage: 80~~275V AC
51 * Operating Temperature: -40~~+70°C
52
53 (% style="color:#037691" %)**LoRa Spec:**
54
55 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
56 * Max +22 dBm constant RF output vs.
57 * RX sensitivity: down to -139 dBm.
58 * Excellent blocking immunity
59
60 == 1.4 Applications ==
61
62
63 * Smart buildings & home automation
64 * Logistics and supply chain management
65 * Smart metering
66 * Smart agriculture
67 * Smart cities
68 * Smart factory
69
70 == 1.5 Working mode ==
71
72
73 (% 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.
74
75
76 == 1.6 Button & LEDs ==
77
78 [[image:image-20250507165509-5.jpeg||height="320" width="320"]]
79
80
81 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
82 |=(% 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**
83 |(% style="width:167px" %)Press the Reset button once|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
84 (% style="color:red" %)**Red led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**bBootloader mode**(%%) for 5 seconds. And then start to JOIN LoRaWAN network.
85 (% style="color:red" %)**Red led**(%%) will solidly turn on for 5 seconds after joined in network.
86 )))
87
88 (% style="display:none" %)
89
90
91 == 1.7 Mechanical ==
92
93 (% class="wikigeneratedid" id="H" %)
94 [[image:image-20250507180603-11.png]]
95
96
97
98
99 = 2. Configure LC03 to connect to LoRaWAN network =
100
101 == 2.1 How it works ==
102
103
104 The LC03 is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class C**(%%) 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 LC03. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
105
106
107 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
108
109
110 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.
111
112 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.
113
114 [[image:image-20250507171046-7.png]]
115
116 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from LC03.
117
118 Each LC03 is shipped with a sticker with the default device EUI as below:
119
120 [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]]
121
122
123 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
124
125 **Create the application.**
126
127 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SAC01L_LoRaWAN_Temperature%26Humidity_Sensor_User_Manual/WebHome/image-20250423093843-1.png?width=756&height=264&rev=1.1||alt="image-20250423093843-1.png"]]
128
129 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111305-2.png?width=1000&height=572&rev=1.1||alt="image-20240907111305-2.png"]]
130
131
132 **Add devices to the created Application.**
133
134 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111659-3.png?width=977&height=185&rev=1.1||alt="image-20240907111659-3.png"]]
135
136 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111820-5.png?width=975&height=377&rev=1.1||alt="image-20240907111820-5.png"]]
137
138
139 **Enter end device specifics manually.**
140
141 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112136-6.png?width=697&height=687&rev=1.1||alt="image-20240907112136-6.png"]]
142
143
144 **Add DevEUI and AppKey.**
145
146 **Customize a platform ID for the device.**
147
148 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112427-7.png?rev=1.1||alt="image-20240907112427-7.png"]]
149
150
151 (% style="color:blue" %)**Step 2:**(%%) Add decoder.
152
153 In TTN, user can add a custom payload so it shows friendly reading.
154
155 Click this link to get the decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/>>url:https://github.com/dragino/dragino-end-node-decoder/tree/main/]]
156
157 Below is TTN screen shot:
158
159 [[image:image-20250507171147-8.png||height="566" width="1079"]]
160
161 [[image:image-20250507171423-9.png||height="552" width="1080"]]
162
163
164 (% style="color:blue" %)**Step 3:**(%%) Activate on LC03
165
166 Press the reset button once to activate the LC03.
167
168 (% style="color:red" %)**Red led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**bootloader mode**(%%) for 5 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
169
170 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
171
172
173 == 2.3 ​Uplink Payload ==
174
175 === 2.3.1 Device Status, FPORT~=5 ===
176
177
178 Users can use the downlink command(**0x26 01**) to ask LC03 to send device configure detail, include device configure status. LC03 will uplink a payload via FPort=5 to server.
179
180 The Payload format is as below.
181
182 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
183 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
184 |(% style="width:103px" %)**Size (bytes)**|(% style="width:89px" %)**1**|(% style="width:98px" %)**2**|(% style="width:102px" %)**1**|(% style="width:116px" %)**1**
185 |(% style="width:103px" %)Value|(% style="width:89px" %)Sensor Model|(% style="width:98px" %)Firmware Version|(% style="width:102px" %)Frequency Band|(% style="width:116px" %)Sub-band
186
187 Example parse in TTNv3
188
189 [[image:image-20250507171948-10.png]]
190
191
192 (% style="color:#037691" %)**Sensor Model**(%%): For LC03, this value is 0x46
193
194 (% style="color:#037691" %)**Firmware Version**(%%): 0x0110, Means: v1.1.0 version
195
196 (% style="color:#037691" %)**Frequency Band**:
197
198 0x01: EU868
199
200 0x02: US915
201
202 0x03: IN865
203
204 0x04: AU915
205
206 0x05: KZ865
207
208 0x06: RU864
209
210 0x07: AS923
211
212 0x08: AS923-1
213
214 0x09: AS923-2
215
216 0x0a: AS923-3
217
218 0x0b: CN470
219
220 0x0c: EU433
221
222 0x0d: KR920
223
224 0x0e: MA869
225
226
227 (% style="color:#037691" %)**Sub-Band**:
228
229 AU915 and US915:value 0x00 ~~ 0x08
230
231 CN470: value 0x0B ~~ 0x0C
232
233 Other Bands: Always 0x00
234
235
236 === 2.3.2  Sensor Data. FPORT~=2 ===
237
238
239 Sensor Data is uplink via FPORT=2
240
241 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
242 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
243 **Size(bytes)**
244 )))|=(% style="width: 90px;background-color:#4F81BD;color:white" %)4|=(% style="width: 150px; background-color: #4F81BD;color:white" %)1|=(% style="width: 80px; background-color: #4F81BD;color:white" %)**1**|=(% style="width: 80px; background-color: #4F81BD;color:white" %)1
245 |(% style="width:99px" %)Value|(% style="width:130px" %)(((
246 Unix TimeStamp
247 )))|(% style="width:194px" %)EventType|(% style="width:106px" %)Plugstatus|(% style="width:97px" %)Relaystatus
248
249 [[image:image-20250427155703-5.png]]
250
251
252 ==== (% style="color:#4472c4" %)**Unit timestamp**(%%) ====
253
254 Unit TimeStamp Example: 680DE31F(H) = 1745740575(D)
255
256 Put the decimal value into this link([[https:~~/~~/www.epochconverter.com)>>https://www.epochconverter.com]])to get the time.
257
258
259 ==== (% style="color:#4472c4" %)**Plugstatus**(%%) ====
260
261 **Example**:
262
263 If payload is: 01H: Electrical INSERT
264
265 If payload is: 00H: Electrical PULL_OUT
266
267
268 ==== (% style="color:#4472c4" %)**Event**(%%) ====
269
270 **Example**:
271
272 If payload is: 01H:  PLUG_INSERT_EVENT
273
274 If payload is: 02H : PLUG_PULL_EVNET
275
276 If payload is: 03H :HEARTBEAT_EVNET
277
278 If payload is: 04H :RELAY_ACK_EVENT
279
280
281 ==== (% style="color:#4472c4" %)**Relaystatus**(%%) ====
282
283 **Example**:
284
285 If payload is: 01H:  Relay open
286
287 If payload is: 00H : Relay closed
288
289
290
291 == 2.4 Payload Decoder file ==
292
293
294 In TTN, use can add a custom payload so it shows friendly reading
295
296 In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from:
297
298 [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main>>https://github.com/dragino/dragino-end-node-decoder/tree/main]]
299
300
301 == 2.5 Datalog Feature ==
302
303
304 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, LC03 will store the reading for future retrieving purposes.
305
306
307 === 2.5.1 Ways to get datalog via LoRaWAN ===
308
309
310 With the platform downlink **07 01**, turn on the device to send None-ACK message function automatically, LC03 will wait for every upstream ACK, when there is no LoRaWAN network, LC03 will mark these records as non ack message and store the sensor data, and wait for the network to be restored (10s interval) to send all the messages.
311
312 * (((
313 a) LC03 will do an ACK check for data records sending to make sure every data arrive server.
314 )))
315 * (((
316 b) When automatic sending of None-ACK messages is enabled, the LC03 will send data in CONFIRMED mode, but if an ACK is not received, the LC03 will not resend the packet, it will only mark it as a NONE-ACK message. On subsequent uplinks, if the LC03 receives an ACK, the LC03 will consider the network connected and resend all NONE-ACK messages.
317 )))
318
319 === 2.5.2 Unix TimeStamp ===
320
321
322 LC03 uses Unix TimeStamp format based on
323
324 [[image:image-20250328173339-5.jpeg]]
325
326 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
327
328 Below is the converter example
329
330 [[image:image-20250328173355-6.jpeg]]
331
332
333 So, we can use downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
334
335
336 === 2.5.3 Set Device Time ===
337
338
339 Users need to run downlink command (% style="color:blue" %)**28 01**(%%) to enable the synchronization time.
340
341 Once LC03 Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LC03. If S31x-LB/LS fails to get the time from the server, LC03 will use the internal time and wait for next time request (The default time is once every 10 days.).
342
343 (% 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 when the automatic time synchronization function is turned on.**
344
345
346 === 2.5.4 Datalog Uplink payload (FPORT~=3) ===
347
348
349 The Datalog uplinks will use below payload format.
350
351 **Retrieval data payload:**
352
353 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %)
354 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
355 **Size(bytes)**
356 )))|=(% style="width: 40px; background-color:#4F81BD;color:white" %)4|=(% style="width: 65px; background-color: rgb(79, 129, 189); color: white;" %)1|=(% style="width: 78px; background-color: rgb(79, 129, 189); color: white;" %)**1**|=(% style="width: 89px; background-color: rgb(79, 129, 189); color: white;" %)1|=(% style="width: 94px; background-color: rgb(79, 129, 189); color: white;" %)1
357 |(% style="width:103px" %)Value|(% style="width:68px" %)(((
358 Unix Time Stamp
359 )))|(% style="width:65px" %)Event|(% style="width:78px" %)Plugstatus|(% style="width:89px" %)Relaystatus|(% style="width:94px" %)DatalogReply
360
361 **No ACK Message**:  1: This message means this payload is fromn Uplink Message which doesn't get ACK from the server before ( for **Automatically send None-ACK** feature)
362
363 **DatalogReply**: 1: This message is a poll message reply.
364
365 * Poll Message Flag is set to 1.
366
367 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
368
369 For example, in US915 band, the max payload for different DR is:
370
371 **a) DR0:** max is 11 bytes so one entry of data
372
373 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
374
375 **c) DR2:** total payload includes 11 entries of data
376
377 **d) DR3: **total payload includes 22 entries of data.
378
379 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
380
381 **Example:**
382
383 If user sends below downlink command: 31681D4580681D6FB005
384
385 Where : Start time: 681D4580 = time 25/5/9 08:00:00
386
387 Stop time: 681D6FB0 = time 25/5/9 11:00:00
388
389
390 **LC03 will uplink this payload.**
391
392 [[image:image-20250509112830-1.png||height="575" width="1213"]]
393
394 (((
395 68 1D 5C 51 04 00 00 40 68 1D 6A 61 03 00 00 40
396 )))
397
398 (((
399 Where the first 8 bytes is for the first entry:
400 )))
401
402 (((
403 68 1D 5C 51 04 00 00 40
404 )))
405
406 (((
407 **Unix time** is 0x68 1D 5C 51=1746754641s=25/5/9 09:37:00
408
409 (((
410 **Event**=0x04 = RELAY_ACK_EVENT
411 )))
412
413 (((
414 **Plugstatus**=0x00 = PULL_OUT
415
416 **Relaystatus = **0x00 = Relay closed
417
418 **DatalogReply = **0x40 = Represents the current data as polled data
419
420
421 )))
422 )))
423
424 (% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" data-widget="image" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220, 220, 220, 0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" title="单击并拖动以调整大小" %)的(% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" data-widget="image" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220, 220, 220, 0.5); display:none" tabindex="-1" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||alt="数据 URI 图片" draggable="true" height="15" role="presentation" title="单击并拖动以移动" width="15"]](% aria-label="数据 URI 图像图像小部件" contenteditable="false" role="region" style="background-image:url(http://wiki1.dragino.com/xwiki/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.61/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5); display:none" tabindex="-1" title="单击并拖动以调整大小" %)的
425
426 == 2.6 Frequency Plans ==
427
428
429 The LC03 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.
430
431 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
432
433
434 == 2.7 ​Firmware Change Log ==
435
436
437 **Firmware download link: **[[https:~~/~~/www.dropbox.com/sh/fis3g6nmhv0eokg/AAC6BcCZaX4BdqZkduUvZ3jIa?dl=0>>https://www.dropbox.com/sh/fis3g6nmhv0eokg/AAC6BcCZaX4BdqZkduUvZ3jIa?dl=0]]
438
439
440 = 3. Configure LC03 =
441
442 == 3.1 Configure Methods ==
443
444
445 LC03 supports below configure method:
446
447 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
448
449 == 3.2 General Commands ==
450
451
452 These commands are to configure:
453
454 * General system settings like: uplink interval.
455 * LoRaWAN protocol & radio related command.
456
457 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
458
459 [[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/]]
460
461
462 == 3.3 Commands special design for LC03 ==
463
464
465 These commands only valid for LC03, as below:
466
467
468 === 3.3.1 Set Transmit Interval Time ===
469
470
471 (% style="color:#037691" %)**AT Command:**
472
473 There is no AT command to set TDC time.
474
475
476 Feature: Change LoRaWAN End Node Transmit Interval.
477
478 (% style="color:blue" %)**Downlink Command: 0x01**
479
480 Format: Command Code (0x01) followed by 3 bytes time value.
481
482 If the downlink payload=**0100003C**, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
483
484 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
485 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
486
487 === 3.3.2 Get Device Status ===
488
489
490 Send a LoRaWAN downlink to ask device send Alarm settings.
491
492 (% style="color:blue" %)**Downlink Payload:  **(%%)**0x26 01**
493
494 Sensor will upload Device Status via FPORT=5. See payload section for detail.
495
496
497 === 3.3.3 Clear Flash Record ===
498
499
500 (% style="color:#037691" %)**AT Command:**
501
502 No AT command to control relay enable or disable
503
504
505 Feature: Clear flash storage for data log feature.
506
507 (% style="color:#4f81bd" %)**Downlink Command: 0x08**
508
509 * Example: 0x0801  ~/~/ Clear all saved data in flash.
510
511 === 3.3.4 Relay enable or disable ===
512
513
514 (% style="color:#037691" %)**AT Command:**
515
516 There is no AT Command to control the Relay Output
517
518
519 Feature: Controls the turning on and off of appliances plugged into the socket
520
521 (% style="color:#4f81bd" %)**Downlink Command: 0x06**
522
523 * Example: 0x06 01  ~/~/ Relay Enabled.
524 * Exampie: 0x06 00  ~/~/  Relay Disable.
525
526 === 3.3.5 Relay ~-~- Control Relay Output time ===
527
528
529 Feature: Controls the relay output time.
530
531
532 (% style="color:#037691" %)**AT Command:**
533
534 There is no AT Command to control the Relay Output
535
536
537 (% style="color:#037691" %)**Downlink Payload (prefix 0x09):**
538
539 (% style="color:blue" %)**0x09 aa bb cc dd ee ff     ** (%%)~/~/ Sets relays with time control
540
541
542 This controls the relay output time and includes 4 bytes:
543
544 (% style="color:#4f81bd" %)**First byte **(%%)**:** Type code (0x09)
545
546 (% style="color:#4f81bd" %)**Second byte (aa)**(%%): Inverter Mode
547
548 01: Relays will change back to their original state after a timeout.
549
550 00: Relays will change to the inverter state after a timeout.
551
552
553 (% style="color:#4f81bd" %)**Third byte (bb)**(%%): Control Method and Ports status:
554
555 [[image:image-20250509161958-1.png||height="151" width="606"]]
556
557
558 (% style="color:#4f81bd" %)**Fourth/Fifth/Sixth/Seventh bytes (cc dd ee ff)**(%%): Latching time. Unit: seconds
559
560
561 (% style="color:red" %)**The device will uplink a packet if the downlink code executes successfully.**
562
563
564 **Example payload:**
565
566 **~1. 09 01 01 00 00 00 06**
567
568 Relay will be set to NC, lasting 6 seconds, then revert to their original state
569
570 **2. 09 01 00 00 00 00 02**
571
572 Relay will change to NC, lasting 2 seconds, and then will will change to NO.
573
574 **3. 09 00 01 00 00 00 02**
575
576 Relay1 will change to NO, lasting 2 seconds, and then Relay will change to NC.
577
578 **4. 09 01 01 00 00 00 02**
579
580 Relay will change to NO, lasting 2 seconds, and then will revert to their original state.
581
582
583 === 3.3.6 Confirmed Mode ===
584
585
586 (% style="color:#037691" %)**AT Command:**
587
588 There is no AT command to control whether Confirmed mode is enabled or disabled.
589
590
591 Feature: Mode for sending data for which acknowledgment was not received
592
593 (% style="color:#4f81bd" %)**Downlink Command: 0x06**
594
595 * Example: 0x07 01  ~/~/ Confirmed Mode enabled.
596 * Exampie: 0x07 00  ~/~/  Confirmed Mode Disable.
597
598 === 3.3.7 Set Device Time ===
599
600
601 Feature: Set time synchronization method
602
603
604 User need to set (% style="color:blue" %)**28 01**(%%) to enable sync time via MAC command.
605
606 Once LC03 Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to LC03. If LC03 fails to get the time from the server, LC03 will use the internal time and wait for next time request (default is 10 days).
607
608 (% 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 When the time synchronization function is enabled.**
609
610
611 (% style="color:#4f81bd" %)**Downlink Command: 0x28**
612
613 * Example: 0x28 01  ~/~/ Auto-Timing Enabled
614 * Exampie: 0x28 00  ~/~/  Auto-Timing Disable.
615
616 === 3.3.8 Set the time synchronization interval ===
617
618
619 Feature: Set how often to perform time synchronization.(default is 10 days, Unit: days)
620
621
622 (% style="color:#4f81bd" %)**Downlink Command: 0x28**
623
624 * Example: 0x28 01  ~/~/ Synchronize once a day
625 * Exampie: 0x28 03  ~/~/  Synchronize once every three days
626
627 = 4. OTA Firmware update =
628
629
630 (% class="wikigeneratedid" %)
631 User can change firmware LC03 to:
632
633 * Change Frequency band/ region.
634 * Update with new features.
635 * Fix bugs.
636
637 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/fis3g6nmhv0eokg/AAC6BcCZaX4BdqZkduUvZ3jIa?dl=0]]**
638
639
640 Methods to Update Firmware:
641
642 * (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/]]**
643
644 = 5. FAQ =
645
646
647
648 = 6. Order Info =
649
650
651 Part Number: (% style="color:blue" %)**LC03-XX**
652
653 (% style="color:red" %)**XX**(%%): The default frequency band
654
655 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
656
657 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
658
659 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
660
661 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
662
663 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
664
665 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
666
667 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
668
669 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
670
671 = 7. ​Packing Info =
672
673
674 (% style="color:#037691" %)**Package Includes**:
675
676 * LC03 LoRaWAN Socket User Manual
677
678 (% style="color:#037691" %)**Dimension and weight**:
679
680 * Device Size: cm
681
682 * Device Weight: g
683
684 * Package Size / pcs : cm
685
686 * Weight / pcs : g
687
688 = 8. Support =
689
690
691 * 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.
692
693 * 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]].