Last modified by Xiaoling on 2022/09/02 18:11

From version 1.5
edited by Xiaoling
on 2022/05/31 13:53
Change comment: There is no comment for this version
To version 19.3
edited by Xiaoling
on 2022/05/31 14:07
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -25,20 +25,24 @@
25 25  
26 26  The server we use here is ThingSpeak which has an intuitive chart to show the test result for our test.The ThingSpeak IoT service now supports MQTT subscriptions to receive instant updates when [[ThingSpeak>>url:https://thingspeak.com/]] channel gets updated. The method here is general and can be used with other IoT servers for MQTT connection as well.
27 27  
28 -[[~[~[image:https://wiki.dragino.com/images/3/3d/MQTT_1.png~|~|height="68" width="260"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_1.png]]
28 +[[image:image-20220531135402-1.png]]
29 29  
30 30  Message Queuing Telemetry Transport
31 31  
32 -[[~[~[image:https://wiki.dragino.com/images/thumb/c/cb/YuanliMQTT.png/400px-YuanliMQTT.png~|~|height="139" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:YuanliMQTT.png]]
33 33  
33 +[[image:image-20220531135449-2.png]]
34 +
34 34  working principle
35 35  
36 -[[~[~[image:https://wiki.dragino.com/images/thumb/f/f9/MQTT_2.png/400px-MQTT_2.png~|~|height="160" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_2.png]]
37 37  
38 +[[image:image-20220531135521-3.png]]
39 +
38 38  Schematic diagram: uplink.In this section, we will try to program LG01 to uplink data to ThingSpeak. The data flow in this example.We have already tried ① and ② in the above simple LoRa example. Now we will try the step ③ first, after it work as expect, we will integrate these three steps together for a complete uplink example.
39 39  
40 -[[~[~[image:https://wiki.dragino.com/images/thumb/d/de/MQTT_3.png/400px-MQTT_3.png~|~|height="160" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_3.png]]
41 41  
43 +
44 +[[image:image-20220531135607-4.png]]
45 +
42 42  Schematic diagram:downlink.In this section, we will try to program LG01 to fetch download data from ThingSpeak, then broadcast this data to local LoRa network. The end node will get this message and check if they need to do something. Similar with Uplink Example, we will first try to do it in PC, then do it in Linux side, and finally integrate it with LoRa.
43 43  
44 44  MQTT agreement to achieve the need: client and server There are three identities in the MQTT protocol: Publish, Broker (server), Subscribe. Among them, the publisher and the subscriber of the message are all clients, the broker is the server, and the publisher can be both the subscriber and the subscriber. MQTT transmission of information is divided into: Topic and payload in two parts Topic, can be understood as the type of message subscribers Subscribe, you will receive the theme of the message content (payload) The payload, which can be understood as the content of the message, refers to the specific content to be used by the subscribers.
... ... @@ -50,10 +50,13 @@
50 50  
51 51  == 4.1 Hardware ==
52 52  
53 -1. [[~[~[image:https://wiki.dragino.com/images/thumb/f/fb/2.png/300px-2.png~|~|height="283" width="300"~]~]>>url:https://wiki.dragino.com/index.php/File:2.png]](((
57 +1. [[image:image-20220531135650-5.png]](((
54 54  Listening on the LoRa wireless channel, while there is new LoRa packet arrives, parse it and send out to IoT Server.
59 +
60 +
61 +
55 55  )))
56 -1. [[~[~[image:https://wiki.dragino.com/images/thumb/4/4a/1.png/400px-1.png~|~|height="216" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:1.png]](((
63 +1. [[image:image-20220531135750-6.png]](((
57 57  The LoRa End node keeps getting temperature and humidity from the sensor and sends out via LoRa periodically.
58 58  )))
59 59  
... ... @@ -66,7 +66,6 @@
66 66  1. [[DHTlib>>url:https://github.com/goodcheney/Lora/blob/patch-1/Lora%20Shield/Examples/DHTlib.zip]]
67 67  
68 68  
69 -
70 70  == 4.3 Server(For example) ==
71 71  
72 72  * [[ThingSpeak>>url:https://thingspeak.com/]]
... ... @@ -76,14 +76,20 @@
76 76  
77 77  * Need this keys:
78 78  
79 -1. [[~[~[image:https://wiki.dragino.com/images/thumb/b/bc/Server1.png/400px-Server1.png~|~|height="185" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:Server1.png]](((
85 +1. [[image:image-20220531140054-8.png]](((
80 80  Channel ID,Write API Key
87 +
88 +
89 +
81 81  )))
82 -1. [[~[~[image:https://wiki.dragino.com/images/thumb/e/e2/Server2.png/400px-Server2.png~|~|height="128" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:Server2.png]](((
91 +1. [[image:image-20220531140326-13.png]](((
83 83  Account->My Profile,MQTT API Key
93 +
94 +
95 +
84 84  )))
85 85  1. (((
86 -[[~[~[image:https://wiki.dragino.com/images/thumb/f/f3/IOT_Configure1.png/400px-IOT_Configure1.png~|~|alt="IOT Configure1.png" height="132" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:IOT_Configure1.png]]
98 +[[image:image-20220531140304-12.png]]
87 87  )))
88 88  
89 89  
... ... @@ -91,31 +91,40 @@
91 91  
92 92  Tips:Please confirm that your LG01 version is 4.3.3.
93 93  
94 -[[~[~[image:https://wiki.dragino.com/images/thumb/e/eb/LG01_Version.png/400px-LG01_Version.png~|~|height="219" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:LG01_Version.png]]
106 +[[image:image-20220531140248-11.png]]
95 95  
96 -Overview
108 +**Overview**
97 97  
98 -[[~[~[image:https://wiki.dragino.com/images/thumb/f/f6/MQTT_LG01_Configure_1.png/400px-MQTT_LG01_Configure_1.png~|~|height="281" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_LG01_Configure_1.png]]
99 99  
100 -Senosor->IOT Server
101 101  
102 -[[~[~[image:https://wiki.dragino.com/images/thumb/6/64/MQTT_LG01_Configure_2.png/400px-MQTT_LG01_Configure_2.png~|~|height="152" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_LG01_Configure_2.png]]
112 +[[image:image-20220531140425-14.png]]
103 103  
104 -MQTT->Configure MQTT Server
114 +**Senosor->IOT Server**
105 105  
106 -[[~[~[image:https://wiki.dragino.com/images/thumb/6/6a/MQTT_LG01_Configure_3.png/400px-MQTT_LG01_Configure_3.png~|~|height="91" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_LG01_Configure_3.png]]
107 107  
108 -MQTT->MQTT Channel
117 +[[image:image-20220531140458-15.png]]
109 109  
110 -[[~[~[image:https://wiki.dragino.com/images/thumb/3/36/MQTT_LG01_Configure_4.png/400px-MQTT_LG01_Configure_4.png~|~|height="257" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_LG01_Configure_4.png]]
119 +**MQTT->Configure MQTT Server**
111 111  
112 -Sensor->LoRa/LoraWAN
113 113  
114 -[[~[~[image:https://wiki.dragino.com/images/thumb/6/61/MQTT_LG01_Configure_5.png/400px-MQTT_LG01_Configure_5.png~|~|height="230" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_LG01_Configure_5.png]]
115 115  
116 -Configure network access.Network->Internet Access
123 +[[image:image-20220531140538-16.png]]
117 117  
125 +**MQTT->MQTT Channel**
118 118  
127 +
128 +
129 +[[image:image-20220531140611-17.png]]
130 +
131 +**Sensor->LoRa/LoraWAN**
132 +
133 +
134 +
135 +[[image:image-20220531140651-18.png]]
136 +
137 +Configure network access.**Network->Internet Access**
138 +
139 +
119 119  == 4.6 Try MQTT API call with LG01 Linux command ==
120 120  
121 121  === 4.6.1 Input the command at the console ===
image-20220531135402-1.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +13.1 KB
Content
image-20220531135449-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +13.5 KB
Content
image-20220531135521-3.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +32.7 KB
Content
image-20220531135607-4.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +42.4 KB
Content
image-20220531135650-5.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +219.8 KB
Content
image-20220531135750-6.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +590.7 KB
Content
image-20220531135954-7.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +79.2 KB
Content
image-20220531140054-8.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +78.9 KB
Content
image-20220531140120-9.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +33.5 KB
Content
image-20220531140154-10.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +16.3 KB
Content
image-20220531140248-11.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +20.3 KB
Content
image-20220531140304-12.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +16.4 KB
Content
image-20220531140326-13.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +33.4 KB
Content
image-20220531140425-14.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +33.4 KB
Content
image-20220531140458-15.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +32.8 KB
Content
image-20220531140538-16.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +35.1 KB
Content
image-20220531140611-17.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +96.6 KB
Content
image-20220531140651-18.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Xiaoling
Size
... ... @@ -1,0 +1,1 @@
1 +35.0 KB
Content