<
From version < 49.1 >
edited by Kilight Cao
on 2022/07/29 11:38
To version < 51.1 >
edited by Xiaoling
on 2024/08/19 15:00
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Kilight
1 +XWiki.Xiaoling
Content
... ... @@ -15,7 +15,7 @@
15 15  This MQTT forward instruction is for below devices:
16 16  
17 17  * Firmware Version > LG02_LG08-5.3.1580178039 [[Firmware Download>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Release/]]
18 -* LG01N, OLG01N ((% style="color:red" %)**Warning**(%%): LG01-P LG01-S use another instruction: [[MQTT for LG01-P/LG01S>>doc:Through MQTT to upload data.WebHome]])
18 +* LG01N, OLG01N ((% style="color:red" %)**Warning**(%%): LG01-P LG01-S use another instruction: [[MQTT for LG01-P/LG01S>>doc:Main.Through MQTT to upload data.WebHome]])
19 19  * LG02, OLG02
20 20  * LG308, DLOS8
21 21  * LPS8
... ... @@ -22,6 +22,7 @@
22 22  * LIG16
23 23  * MS14 series if installed with the same firmware. (in this case, the MQTT forward will work , but no LoRa support)
24 24  
25 +
25 25  = 2.  Firmware Change Log for MQTT feature =
26 26  
27 27  
... ... @@ -32,9 +32,9 @@
32 32  * LG02_LG08-5.3.1580178039
33 33  ** Initiate version
34 34  
36 +
35 35  = 3.  MQTT forward operating principle =
36 36  
37 -
38 38  == 3.1  Network Structure ==
39 39  
40 40  
... ... @@ -48,7 +48,6 @@
48 48  General MQTT structure
49 49  
50 50  
51 -
52 52  == 3.2  How sensor data is forwarded ==
53 53  
54 54  
... ... @@ -62,8 +62,6 @@
62 62  
63 63  (((
64 64  The data flow works as below diagram.
65 -
66 -
67 67  )))
68 68  
69 69  [[image:image-20220527134000-2.png]]
... ... @@ -96,7 +96,6 @@
96 96  Downstream path
97 97  
98 98  
99 -
100 100  == 3.3  Macro Definition ==
101 101  
102 102  
... ... @@ -105,7 +105,6 @@
105 105  (((
106 106  Currently the (% style="color:#4f81bd" %)**-t (topic)**(%%) and (% style="color:#4f81bd" %)**-m (message)**(%%) support Macros.
107 107  
108 -
109 109  
110 110  )))
111 111  
... ... @@ -118,6 +118,7 @@
118 118  * USERNAME: User ID (-u)
119 119  * HOSTNAME: Device Hostname
120 120  
117 +
121 121  === 3.3.2  -m message macro ===
122 122  
123 123  
... ... @@ -127,6 +127,7 @@
127 127  * META: Completely sensor data with time stamp and rssi
128 128  * JSON: Convert META to json format.
129 129  
127 +
130 130  === 3.3.3  Example for Macro ===
131 131  
132 132  
... ... @@ -152,7 +152,6 @@
152 152  )))
153 153  
154 154  
155 -
156 156  == 3.4  Modify the MQTT to support more options ==
157 157  
158 158  
... ... @@ -280,10 +280,8 @@
280 280  )))
281 281  
282 282  
283 -
284 284  = 4.  Example to communicate to a simple MQTT server =
285 285  
286 -
287 287  == 4.1  Overview ==
288 288  
289 289  
... ... @@ -318,7 +318,6 @@
318 318  Downstream: Subscribe a topic to get downstream
319 319  
320 320  
321 -
322 322  == 4.3  Simulate via Dragino Command Line ==
323 323  
324 324  
... ... @@ -340,7 +340,6 @@
340 340  mosquitto_pub
341 341  
342 342  
343 -
344 344  (% style="color:blue" %)**For Downstream**
345 345  
346 346  Use [[mosquitto_sub>>url:https://mosquitto.org/man/mosquitto_sub-1.html]] to subscribe the change on the topic.
... ... @@ -350,7 +350,6 @@
350 350  mosquitto_sub
351 351  
352 352  
353 -
354 354  == 4.4  Configure Dragino UI for MQTT connection ==
355 355  
356 356  
... ... @@ -374,7 +374,6 @@
374 374  forward to MQTT
375 375  
376 376  
377 -
378 378  === 4.4.1  Configure the MQTT Client for Upstream ===
379 379  
380 380  
... ... @@ -395,7 +395,6 @@
395 395  MQTT Publish configure
396 396  
397 397  
398 -
399 399  [[image:image-20220527135929-13.png]]
400 400  
401 401  MQTT Channel settings
... ... @@ -424,7 +424,6 @@
424 424  MQTT Publish
425 425  
426 426  
427 -
428 428  === 4.4.2  Configure the MQTT Client for Downstream ===
429 429  
430 430  
... ... @@ -462,6 +462,7 @@
462 462  In above section, we have configured the UI to support MQTT upstream and downstream. We can simulate via Linux command. In this section, we will guide how to communicate with remote LoRa End Node for upstream and downstream.
463 463  
464 464  
454 +
465 465  === 4.5.1  Use LoRa Raw protocol for communication ~-~- For LG01/LG02 ===
466 466  
467 467  
... ... @@ -492,7 +492,6 @@
492 492  LoRa Parameter should match
493 493  
494 494  
495 -
496 496  Below is the test result after the Arduino Sketch is running.
497 497  
498 498  [[image:image-20220527140459-19.png]]
... ... @@ -500,13 +500,11 @@
500 500  Upstream Data Flow
501 501  
502 502  
503 -
504 504  [[image:image-20220527140542-20.png]]
505 505  
506 506  Downstream Data Flow
507 507  
508 508  
509 -
510 510  === 4.5.2  Use LoRaWAN Protocol for communication ~-~- For LG308/LPS8/DLOS8 ===
511 511  
512 512  
... ... @@ -543,44 +543,36 @@
543 543  [[image:image-20220613191345-4.png]]
544 544  
545 545  
546 -
547 547  (% style="color:blue" %)**Step 4**(%%): Map the Device Address to Remote ID in MQTT server.
548 548  
549 549  [[image:image-20220613190635-2.png]]
550 550  
551 551  
552 -
553 553  (% style="color:blue" %)**Step 5: Upstream**(%%): Save the change, we can see the log info via "sytem log", End Node and MQTT Server
554 554  
555 555  [[image:image-20220527141843-24.png]]
556 556  
557 557  
558 -
559 -
560 560  [[image:image-20220527141933-25.png]]
561 561  
562 562  Choose ASCII Format
563 563  
564 564  
565 -
566 566  [[image:image-20220527142028-26.png]]
567 567  
568 568  LHT65 Decoder
569 569  
570 570  
571 -
572 572  (% style="color:blue" %)**Step 6: Set up subscribe**(%%)**:** Subscribe a topci for downstream.
573 573  
574 574  [[image:image-20220613191426-5.png]]
575 575  
576 576  
577 -
578 578  (% style="color:blue" %)**Step 7: Downstream**(%%): Save the change, we can see the log info via "sytem log", End Node and MQTT Server.
579 579  
580 580  [[image:image-20220527142239-28.png]]
581 581  
582 582  
583 -
584 584  === 4.5.3 MQTT Downstream format ===
585 585  
586 586  
... ... @@ -609,7 +609,6 @@
609 609  Check out this link for more mosquito-related directives [[https:~~/~~/mosquitto.org/man/mosquitto_pub-1.html>>https://mosquitto.org/man/mosquitto_pub-1.html]]
610 610  
611 611  
612 -
613 613  = 5.  How to Debug =
614 614  
615 615  
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0