IoT Guide

Modbus TCP to the Cloud — Ethernet, 4G, and MQTT Monitoring

Monitor your Modbus TCP/IP devices via Ethernet or 4G, read Holding/Input/Coil registers, and send the data to AWS IoT, Azure, or Eziwan Cloud. Complete guide.

Quick answer
A footbridge Modbus TCP to the Cloud connects to your devices via Ethernet (or Wi-Fi) Modbus TCP/IP, queries their Holding, Input, and Coil registers, and then publishes the values via MQTT TLS to AWS IoT Core, Azure IoT Hub, or Eziwan Cloud. The cloud connection is established via wired Ethernet or 4G LTE depending on network availability at the site.

Modbus TCP: The Industrial Ethernet Protocol

Modbus TCP/IP is the Ethernet version of the Modbus protocol, standardized in 1999. It retains the master/slave model and the register structure (Holding, Input, Coil, Discrete Input) of Modbus RTU, but transmits them over TCP/IP port 502. As a result, Modbus TCP integrates seamlessly into enterprise IT networks while remaining compatible with the existing Modbus ecosystem.

Its advantages over Modbus RTU:

  • Speed: 100 Mbit/s vs. 115 kbps max for RS-485
  • Open topology: no limit of 32 nodes on a linear bus
  • Multi-master: multiple clients can query the same slave
  • Distance: standard Ethernet up to 100 m, fiber for long distances

Modbus TCP to Cloud Connection Architecture

The gateway acts as a Modbus TCP client (master) for local devices and as an MQTT client for the cloud. It sits between the OT network and the cloud network.

LayerEquipment / Protocol
Field (devices)Controllers, drives, meters with Ethernet ports
Industrial LANEthernet switch, OT VLAN
GatewayEziwan Gateway (Modbus TCP client + MQTT client)
Cloud TransportMQTT over TLS 1.3 / 4G LTE or Ethernet WAN
CloudAWS IoT Core, Azure IoT Hub, Eziwan Cloud
ApplicationDashboard, alerts, REST API, reporting

Reading Modbus TCP Registers: Supported Data Types

The gateway queries all types of Modbus TCP registers defined by the standard:

16-bit Registers:

  • Holding Registers (FC03) — read/write, process values (setpoints, parameters)
  • Input Registers (FC04) — read-only, real-time measurements (current, voltage, flow rate)

Discrete Bits:

  • Coils (FC01/FC05) — read/write, logic outputs (relays, controls)
  • Discrete Inputs (FC02) — read-only, logic inputs (statuses, faults)

Encoded data types:

  • INT16, UINT16 (1 register)
  • INT32, UINT32, FLOAT32 IEEE 754 (2 registers, Big Endian or Little Endian)
  • INT64, DOUBLE (4 registers)
  • ASCII STRING

Sending MQTT Messages to AWS IoT, Azure IoT Hub, or Eziwan

Once the logs have been read, the gateway publishes the metrics to the target MQTT broker. The three major platforms are supported:

AWS IoT Core

  • Connection via MQTT over TLS on port 8883
  • Authentication using an AWS X.509 certificate
  • IoT rules to DynamoDB, S3, Lambda, or QuickSight

Azure IoT Hub

  • Connection via AMQP or MQTT TLS
  • Device Twin for remote configuration
  • Stream Analytics for real-time processing

Eziwan Cloud

  • Zero-touch setup, no infrastructure to manage
  • Preconfigured dashboard with industrial units
  • SMS/email alerts in less than 30 seconds

Polling and Optimization of the Sampling Rate

The choice of polling frequency affects both data freshness and mobile data usage.

Measurement TypeRecommended Frequency
Electrical quantities (P, Q, I, U)1 to 10 s
Process temperatures30 s to 5 min
Levels, flow rates1 to 5 min
Discrete states (alarms)1 to 5 s
Meters (energy, volume)5 to 15 min

The gateway can also be configured in on-change mode: a value is transmitted only if it changes by a configurable amount (deadband), which significantly reduces the volume of data.

Multi-site Monitoring: The Centralized Architecture

Across a network of several industrial sites, the same architecture is replicated:

  1. One gateway per site, each polling its local Modbus TCP devices
  2. All gateways publish to the same cloud-based MQTT broker (or to separate topics for each site)
  3. A single monitoring interface centralizes all sites
  4. Alerts are configured globally with site-specific escalation

This centralized architecture with local gateways is the standard for multi-site industrial remote monitoring.

Frequently Asked Questions

You might also like