Changes for page MQTT Forward Instruction
Last modified by Kilight Cao on 2024/08/31 16:26
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -284,15 +284,19 @@ 284 284 ))) 285 285 286 286 287 -= 4. Example to communicate to a simple MQTT server = 288 288 289 -= =4.1Overview==288 += 4. Example to communicate to a simple MQTT server = 290 290 290 + 291 +== 4.1 Overview == 292 + 293 + 291 291 This section is an example to show how to set up LG01-N to communicate with a MQTT server. The MQTT server is a simple utility set up in a local PC. Note: User can set up same server via [[this instruction>>url:http://www.steves-internet-guide.com/install-mosquitto-broker/]]. 292 292 293 293 294 -== 4.2 Simulate via MQTT.fx utility == 297 +== 4.2 Simulate via MQTT.fx utility == 295 295 299 + 296 296 The [[MQTT.fx>>url:http://mqttfx.jensd.de/index.php/download]] is a MQTT client tool. We can use this to simulate a MQTT connection to our MQTT broker first to make sure the MQTT broker works. This will also help us understand how it works. 297 297 298 298 ((( ... ... @@ -318,14 +318,15 @@ 318 318 Downstream: Subscribe a topic to get downstream 319 319 320 320 321 -== 4.3 Simulate via Dragino Command Line == 322 322 326 +== 4.3 Simulate via Dragino Command Line == 327 + 323 323 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. 324 324 325 325 In the Dragino Gateway, we use [[mosquitto client>>url:https://mosquitto.org/]] for MQTT connection. 326 326 327 327 328 -(% style="color: #4f81bd" %)**For Upstream**333 +(% style="color:blue" %)**For Upstream** 329 329 330 330 command is [[mosquitto_pub>>url:https://mosquitto.org/man/mosquitto_pub-1.html]] 331 331 ... ... @@ -338,8 +338,9 @@ 338 338 mosquitto_pub 339 339 340 340 341 -(% style="color:#4f81bd" %)**For Downstream** 342 342 347 +(% style="color:blue" %)**For Downstream** 348 + 343 343 Use [[mosquitto_sub>>url:https://mosquitto.org/man/mosquitto_sub-1.html]] to subscribe the change on the topic. 344 344 345 345 [[image:image-20220527135440-10.png]]