Changes for page MQTT Forward Instruction
Last modified by Kilight Cao on 2024/08/31 16:26
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Kilight1 +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 ... ... @@ -36,7 +36,6 @@ 36 36 37 37 = 3. MQTT forward operating principle = 38 38 39 - 40 40 == 3.1 Network Structure == 41 41 42 42 ... ... @@ -50,7 +50,6 @@ 50 50 General MQTT structure 51 51 52 52 53 - 54 54 == 3.2 How sensor data is forwarded == 55 55 56 56 ... ... @@ -64,8 +64,6 @@ 64 64 65 65 ((( 66 66 The data flow works as below diagram. 67 - 68 - 69 69 ))) 70 70 71 71 [[image:image-20220527134000-2.png]] ... ... @@ -98,7 +98,6 @@ 98 98 Downstream path 99 99 100 100 101 - 102 102 == 3.3 Macro Definition == 103 103 104 104 ... ... @@ -107,7 +107,6 @@ 107 107 ((( 108 108 Currently the (% style="color:#4f81bd" %)**-t (topic)**(%%) and (% style="color:#4f81bd" %)**-m (message)**(%%) support Macros. 109 109 110 - 111 111 112 112 ))) 113 113 ... ... @@ -156,7 +156,6 @@ 156 156 ))) 157 157 158 158 159 - 160 160 == 3.4 Modify the MQTT to support more options == 161 161 162 162 ... ... @@ -284,10 +284,8 @@ 284 284 ))) 285 285 286 286 287 - 288 288 = 4. Example to communicate to a simple MQTT server = 289 289 290 - 291 291 == 4.1 Overview == 292 292 293 293 ... ... @@ -322,7 +322,6 @@ 322 322 Downstream: Subscribe a topic to get downstream 323 323 324 324 325 - 326 326 == 4.3 Simulate via Dragino Command Line == 327 327 328 328 ... ... @@ -344,7 +344,6 @@ 344 344 mosquitto_pub 345 345 346 346 347 - 348 348 (% style="color:blue" %)**For Downstream** 349 349 350 350 Use [[mosquitto_sub>>url:https://mosquitto.org/man/mosquitto_sub-1.html]] to subscribe the change on the topic. ... ... @@ -354,7 +354,6 @@ 354 354 mosquitto_sub 355 355 356 356 357 - 358 358 == 4.4 Configure Dragino UI for MQTT connection == 359 359 360 360 ... ... @@ -378,7 +378,6 @@ 378 378 forward to MQTT 379 379 380 380 381 - 382 382 === 4.4.1 Configure the MQTT Client for Upstream === 383 383 384 384 ... ... @@ -399,7 +399,6 @@ 399 399 MQTT Publish configure 400 400 401 401 402 - 403 403 [[image:image-20220527135929-13.png]] 404 404 405 405 MQTT Channel settings ... ... @@ -428,7 +428,6 @@ 428 428 MQTT Publish 429 429 430 430 431 - 432 432 === 4.4.2 Configure the MQTT Client for Downstream === 433 433 434 434 ... ... @@ -466,6 +466,7 @@ 466 466 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. 467 467 468 468 454 + 469 469 === 4.5.1 Use LoRa Raw protocol for communication ~-~- For LG01/LG02 === 470 470 471 471 ... ... @@ -496,7 +496,6 @@ 496 496 LoRa Parameter should match 497 497 498 498 499 - 500 500 Below is the test result after the Arduino Sketch is running. 501 501 502 502 [[image:image-20220527140459-19.png]] ... ... @@ -504,13 +504,11 @@ 504 504 Upstream Data Flow 505 505 506 506 507 - 508 508 [[image:image-20220527140542-20.png]] 509 509 510 510 Downstream Data Flow 511 511 512 512 513 - 514 514 === 4.5.2 Use LoRaWAN Protocol for communication ~-~- For LG308/LPS8/DLOS8 === 515 515 516 516 ... ... @@ -547,44 +547,36 @@ 547 547 [[image:image-20220613191345-4.png]] 548 548 549 549 550 - 551 551 (% style="color:blue" %)**Step 4**(%%): Map the Device Address to Remote ID in MQTT server. 552 552 553 553 [[image:image-20220613190635-2.png]] 554 554 555 555 556 - 557 557 (% style="color:blue" %)**Step 5: Upstream**(%%): Save the change, we can see the log info via "sytem log", End Node and MQTT Server 558 558 559 559 [[image:image-20220527141843-24.png]] 560 560 561 561 562 - 563 - 564 564 [[image:image-20220527141933-25.png]] 565 565 566 566 Choose ASCII Format 567 567 568 568 569 - 570 570 [[image:image-20220527142028-26.png]] 571 571 572 572 LHT65 Decoder 573 573 574 574 575 - 576 576 (% style="color:blue" %)**Step 6: Set up subscribe**(%%)**:** Subscribe a topci for downstream. 577 577 578 578 [[image:image-20220613191426-5.png]] 579 579 580 580 581 - 582 582 (% style="color:blue" %)**Step 7: Downstream**(%%): Save the change, we can see the log info via "sytem log", End Node and MQTT Server. 583 583 584 584 [[image:image-20220527142239-28.png]] 585 585 586 586 587 - 588 588 === 4.5.3 MQTT Downstream format === 589 589 590 590 ... ... @@ -613,7 +613,6 @@ 613 613 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]] 614 614 615 615 616 - 617 617 = 5. How to Debug = 618 618 619 619