Copyright © 2019 Moxa Inc.
Released on March 30, 2019
About Moxa
Moxa is a leading provider of edge connectivity, industrial netw orking, and ne tw ork
infrastructure
solutions for
enabling connec tivity for the Industr ial Internet o f Things. With
over 30 years of industry experience, Moxa has connected more than 50 million
devices
worldwide and has a distribution and service network that reaches cus tomers in more than
70 countries. Moxa delivers lasting business value by empowering industry with reliable
networks and sincere service for industrial communications infrastruct
ures. Information
about Moxa’s solutions is available at
www.moxa.com.
How to Contact Moxa
Tel:
+886-2-8919-1230
Fax:
+886-2-8919-1231
Connect to Azure IoT Hub with the MGate 5105 Industrial
Protocol Gateway
Moxa Technical Support Team
support@moxa.com
Contents
1. Introduction .................................................................................... 2
2. System Topology ............................................................................. 2
3. Prerequisites ................................................................................... 3
3.1 Modbus Slave Tool ..................................................................................... 3
3.2 Devi ce Exp lore r ......................................................................................... 3
3.3 Create Azure IoT Hub and Device ................................................................ 3
4. MGate 5105 Settings ....................................................................... 4
4.1 Protocol Conversion ................................................................................... 4
4.2 Modbus RTU Master Settings....................................................................... 5
4.3 Azure Device Settings ................................................................................ 5
4.4 Serial Settings .........................................................................................11
5. Modbus Slave Tool Setting ............................................................ 11
6. Device Explorer Settings ............................................................... 12
7. Communication Test ..................................................................... 13
7.1 Device-to-cloud message ..........................................................................13
7.2 Cloud-to-device message ..........................................................................14
Moxa Tech Note
MGate 5105 to Azure Cloud
Copyright © 2019 Moxa Inc.
Page 2 of 16
1. Introduction
The MG ate 5105 perform s easy prot ocol c on v ers ions betw een M odbu s RTU/ASCII, Modbus T C P,
and E therNet/IP protocols. From Firmware V ersion 4.0, it can support data that is collec ted from
these fieldbus protocol devices and pushed to a cloud server. The cloud server could be Microsoft
Azure, Aliba ba Cloud, or MQTT Brok er.
This doc umen t de m onstrates how to use the MGate 5105 th a t c onnec ts to the Micros oft Azure
IoT Hub an d publishes f ieldbu s da ta m es s a ges to this I oT Hu b or r ec eives messages from it.
2. System Topology
Figur e 1 illustrate s the sy s tem topo log y. P C1 ru ns Modbus S lave tool to act a s a Modbus RTU
device. I t connects to the MGate 5105’ s Port 1. The MGate 5105 acts as an Azure IoT device and
conn e c ts to Azu r e IoT Hub. PC2 runs Device Explorer to monitor Azu r e IoT devices in the IoT
Hub.
< Figur e 1 . System Topol ogy >