Changes

m
no edit summary
Line 1: Line 1:  
__TOC__
 
__TOC__
 
==Summary==
 
==Summary==
In this guide, Modbus TCP master MQTT Gateway function will be configured with two different types of MQTT Brokers. First using third-party MQTT Broker services (in this example ''Flespi.io''). Second, using the RUT240 router as MQTT Broker. Two RUT955 routers will be used as Modbus TCP Master and Slave, and the PC acts as MQTT Publisher and Subscriber.
+
In this guide, Modbus TCP master MQTT Gateway function will be configured with two different types of MQTT Brokers. First using third-party MQTT Broker services (in this example ''Flespi.io''). Second, using another router as MQTT Broker. Two RUT955 routers will be used as Modbus TCP Master and Slave, and the PC acts as MQTT Publisher and Subscriber.
    
==Configuration overview & prerequisites==
 
==Configuration overview & prerequisites==
 
*Two RUT955 routers - one acts as Modbus TCP Master, another as Modbus TCP Slave
 
*Two RUT955 routers - one acts as Modbus TCP Master, another as Modbus TCP Slave
 
*Flespi.io account to act as an MQTT Broker/Publisher/Subscriber (for first configuration example)
 
*Flespi.io account to act as an MQTT Broker/Publisher/Subscriber (for first configuration example)
*RUT240 with a Public IP address to act as MQTT Broker (for second configuration example)
+
*RUT with a Public IP address to act as MQTT Broker (for second configuration example)
 
*An end device (PC, Laptop) to act as MQTT Subscriber/Publisher (for second configuration example)
 
*An end device (PC, Laptop) to act as MQTT Subscriber/Publisher (for second configuration example)
    
==Configuration using flespi.io as MQTT Broker==
 
==Configuration using flespi.io as MQTT Broker==
[[File:Networking Topology MQTT MODBUS flespi configuration v1.png|center|frameless|800x800px]]
+
[[File:Networking Topology MQTT MODBUS flespi configuration v1.png|center|class=tlt-border|800x800px]]
    
===Configuring RUT955 Modbus TCP Slave===
 
===Configuring RUT955 Modbus TCP Slave===
Line 162: Line 162:  
''This Means that MQTT Gateway on Modbus TCP Master router is working correctly and Modbus TCP Slave receives requests.''
 
''This Means that MQTT Gateway on Modbus TCP Master router is working correctly and Modbus TCP Slave receives requests.''
   −
==Configuration using RUT240 router as MQTT Broker==
+
==Configuration using a router as MQTT Broker==
    
[[File:Networking Topology MQTT MODBUS RUTbroker configuration v1.png|987x987px]]
 
[[File:Networking Topology MQTT MODBUS RUTbroker configuration v1.png|987x987px]]
Line 180: Line 180:  
[[File:Networking MQTT Modbus MQTT gateway config v1.png|border|class=tlt-border|1090x1090px]]
 
[[File:Networking MQTT Modbus MQTT gateway config v1.png|border|class=tlt-border|1090x1090px]]
   −
===Configuring RUT240 MQTT Broker===
+
===Configuring RUT MQTT Broker===
 
----
 
----
   Line 200: Line 200:  
*Open first terminal, which will act as '''Subscriber'''. Type in:
 
*Open first terminal, which will act as '''Subscriber'''. Type in:
   −
<blockquote>''mosquito_sub -h [Host_address] -p [Port] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Subscriber in terminal v1.png|border|class=tlt-border]]
+
<blockquote>''mosquitto_sub -h [Host_address] -p [Port] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Subscriber in terminal v1.png|border|class=tlt-border]]
    
*Open second terminal, which will act as '''Publisher.''' Type in:
 
*Open second terminal, which will act as '''Publisher.''' Type in:
   −
<blockquote>''mosquito_pub -h [Host] -h [Host_address] -p [Port] -m [‘Message’] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Publisher testing v1.png|border|class=tlt-border]]
+
<blockquote>''mosquitto_pub -h [Host_address] -p [Port] -m [‘Message’] -t [Topic]''</blockquote>[[File:Networking MQTT Modbus Publisher testing v1.png|border|class=tlt-border]]
    
*On the first window - '''Subscriber''', a response should appear
 
*On the first window - '''Subscriber''', a response should appear

Navigation menu