<
From version < 43.2 >
edited by Xiaoling
on 2022/05/31 14:27
To version < 43.3 >
edited by Xiaoling
on 2022/05/31 14:29
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -23,7 +23,9 @@
23 23  
24 24  = 3. What does this example shows? How it works? =
25 25  
26 +(((
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.
28 +)))
27 27  
28 28  [[image:image-20220531135402-1.png]]
29 29  
... ... @@ -37,17 +37,25 @@
37 37  
38 38  [[image:image-20220531135521-3.png]]
39 39  
42 +(((
40 40  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.
44 +)))
41 41  
42 42  
43 43  
44 44  [[image:image-20220531135607-4.png]]
45 45  
50 +(((
46 46  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.
52 +)))
47 47  
54 +(((
48 48  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.
56 +)))
49 49  
58 +(((
50 50  To use the server, we need to register an account on [[ThingSpeak>>url:https://thingspeak.com/]] . Then create a channel and type the channel info. As shown below, the Channel ID is the unique ID to store our data in [[ThingSpeak>>url:https://thingspeak.com/]] .
60 +)))
51 51  
52 52  
53 53  = 4. Preparation =
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0