<
From version < 46.1 >
edited by Xiaoling
on 2022/07/14 16:18
To version < 49.1 >
edited by Kilight Cao
on 2022/07/29 11:38
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Xiaoling
1 +XWiki.Kilight
Content
... ... @@ -41,7 +41,7 @@
41 41  Below shows the network structure for MQTT forwarding.
42 42  
43 43  * **For Uplink:**  The sensor sends data to LoRa Gateway via LoRa wireless, The gateway will process these data and forward to remote MQTT Broker via Internet.
44 -* **For Downlink:** The gateway subscribe a topic in the MQTT broker, when there is update on the topic, the gateway will know and broadcast the data to Local LoRa network,
44 +* **For Downlink:** The gateway subscribe a topic in the MQTT broker, when there is update on the topic, the gateway will know and broadcast the data to Local LoRa network.
45 45  
46 46  [[image:image-20220527133547-1.png]]
47 47  
... ... @@ -48,6 +48,7 @@
48 48  General MQTT structure
49 49  
50 50  
51 +
51 51  == 3.2  How sensor data is forwarded ==
52 52  
53 53  
... ... @@ -56,10 +56,13 @@
56 56  
57 57  === 3.2.1  Upstream ===
58 58  
60 +
59 59  Assume there are two sensor nodes, their ID are Node1 ID: 6734 , Node2 ID: 7456. In the remote MQTT broker there are two topics: Topic1: /channel/765800, Topic2: /channel/367860. We can set up in the gateway to map Node1 to Topic1 and Node2 to Topic2. So when there is a sensor data from Node1, the gateway will forward the data to Topic1, when there is sensor data from Node2, the gateway will forward to Topic2.
60 60  
61 61  (((
62 62  The data flow works as below diagram.
65 +
66 +
63 63  )))
64 64  
65 65  [[image:image-20220527134000-2.png]]
... ... @@ -92,6 +92,7 @@
92 92  Downstream path
93 93  
94 94  
99 +
95 95  == 3.3  Macro Definition ==
96 96  
97 97  
... ... @@ -100,6 +100,7 @@
100 100  (((
101 101  Currently the (% style="color:#4f81bd" %)**-t (topic)**(%%) and (% style="color:#4f81bd" %)**-m (message)**(%%) support Macros.
102 102  
108 +
103 103  
104 104  )))
105 105  
... ... @@ -112,7 +112,6 @@
112 112  * USERNAME: User ID (-u)
113 113  * HOSTNAME: Device Hostname
114 114  
115 -
116 116  === 3.3.2  -m message macro ===
117 117  
118 118  
... ... @@ -122,7 +122,6 @@
122 122  * META: Completely sensor data with time stamp and rssi
123 123  * JSON: Convert META to json format.
124 124  
125 -
126 126  === 3.3.3  Example for Macro ===
127 127  
128 128  
... ... @@ -317,6 +317,7 @@
317 317  
318 318  == 4.3  Simulate via Dragino Command Line ==
319 319  
324 +
320 320  For first try of MQTT connection, simulate via command line is recommend, there are many servers / connection type for MQTT. They are using different connection parameters. Simulating the connection via command line will help us rapidly connect to server and debug.
321 321  
322 322  In the Dragino Gateway, we use [[mosquitto client>>url:https://mosquitto.org/]] for MQTT connection.
... ... @@ -345,8 +345,10 @@
345 345  mosquitto_sub
346 346  
347 347  
353 +
348 348  == 4.4  Configure Dragino UI for MQTT connection ==
349 349  
356 +
350 350  This chapter are step by step to show to configure the Dragino Menu for MQTT auto connection.
351 351  
352 352  (((
... ... @@ -511,11 +511,11 @@
511 511  When use test this feature, please use the version higher then : (% style="color:#4f81bd" %)**LG02_LG08~-~-build-v5.4.1593400722-20200629-1120**(%%), in this version, the upload format is changed and readable, which is easier for integration.
512 512  
513 513  
514 -(% style="color:#4f81bd" %)**Video Instruction**(%%): (% style="color:blue" %)[[https:~~/~~/youtu.be/qJTY441-t90>>url:https://youtu.be/qJTY441-t90]]
521 +(% style="color:blue" %)**Video Instruction**(%%): (% style="color:blue" %)[[https:~~/~~/youtu.be/qJTY441-t90>>url:https://youtu.be/qJTY441-t90]]
515 515  )))
516 516  
517 517  (((
518 -(% style="color:blued" %)**Step 1**(%%): Refer [[Communicate with ABP End Node>>Communicate with ABP End Node without LoRaWAN Network Server --- LG308]] to know how to set up LG308 to work with LoRaWAN End node.
525 +(% style="color:blue" %)**Step 1**(%%): Refer [[Communicate with ABP End Node>>Communicate with ABP End Node without LoRaWAN Network Server --- LG308]] to know how to set up LG308 to work with LoRaWAN End node.
519 519  )))
520 520  
521 521  (((
... ... @@ -588,7 +588,7 @@
588 588  
589 589  (% class="box infomessage" %)
590 590  (((
591 -**mosquitto_pub -h 10.130.2.192 -p 1883 -t dragino-1d25dc/ -m "260211D,time,txt,hello,20,1,SF12,923300000,2 > /var/iot/push/test"**
598 +**mosquitto_pub -h 10.130.2.192 -p 1883 -t dragino-1d25dc/ -m "260211D,time,txt,hello,20,1,SF12,923300000,2"**
592 592  )))
593 593  
594 594  Or use [[MQTT.fx>>https://mqttfx.jensd.de/index.php/download]]
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0