Skip to content
IoT Crest

IoT gateway: what it does and how to choose one

Updated , 8 min read

Short answer: An IoT gateway is the device that connects things which cannot reach a network on their own, such as Modbus meters on an RS-485 bus, Zigbee or Bluetooth sensors, or LoRa nodes, to an IP network and the systems above it. It translates their protocols into something like MQTT, buffers data when the uplink fails, and acts as the security boundary for the devices behind it. Choose one by the field interfaces it must speak, the uplink it needs, where it will be installed and how it will be updated.

What an IoT gateway does: protocol translation from Modbus, Zigbee, BLE and LoRaWAN to MQTT, buffering when the uplink drops, security, and how to choose one.

This article covers what an IoT gateway is, the four jobs it does, how it differs from a router and from an edge computer, the main kinds (smart home hubs, LoRaWAN gateways, industrial edge gateways, cellular gateways, phones), what store-and-forward means, and a checklist for choosing one. It does not cover product recommendations, configuration of a specific gateway model, or the design of a cloud platform behind it.

An IoT gateway is a device that sits between connected devices and the network above them, and does the work the devices cannot do for themselves. A power meter that only speaks Modbus RTU over a serial cable, a temperature sensor that only has a Zigbee or Bluetooth radio, or a soil probe that sends a few bytes over LoRa cannot publish to a cloud platform or a plant historian directly. The gateway talks to them in their own protocol, turns what they report into named, timestamped readings, and sends those upward over an IP network, usually as MQTT or through an OPC UA server. It is one of the building blocks described in what an industrial IoT system is made of, and the industrial IoT hub collects the other parts. This article explains what a gateway does, how it differs from a router and an edge computer, the kinds you will meet, and what to check when choosing one.

Why gateways exist

Most sensors and field devices are built for a narrow job at the lowest cost and power. Giving each one an Ethernet port, a full IP stack, encryption and a cloud client would make it larger, more expensive and, if it runs on a battery, much shorter lived. So the devices use whatever suits their situation: a serial bus in a plant, a low-power mesh in a house, a long-range radio across a farm. The gateway is where those many local networks meet the one IP network.

There is a second reason. Even where a device could connect directly, you may not want it to. A plant full of controllers and drives connected individually to the internet is a plant with hundreds of things to patch and protect. One gateway per line or per building, with the field devices behind it, gives a single place to apply security and a single connection to watch.

The four jobs a gateway does

Protocol translation. On the field side the gateway acts as a master or coordinator: it polls Modbus devices over RS-485, forms a Zigbee network, scans for Bluetooth Low Energy advertisements, or reads a PLC over its own industrial protocol. It then maps what it reads into the protocol the upper systems expect. For Modbus that means knowing which registers hold which values, their data types and scaling, which is configuration rather than anything the device announces. The Modbus RTU article explains what the gateway is reading.

Data handling. Field devices often report far more than anyone needs to store. A gateway can filter, average, convert units, attach timestamps and names, and send only changes or summaries. This is the simplest form of edge processing, and the edge computing against cloud computing article covers when to do more of it locally.

Buffering. When the uplink fails, a gateway with local storage keeps collecting and sends the backlog, in order and with the original timestamps, when the link returns. This is called store-and-forward and is covered below.

Security and management. The gateway holds the credentials and certificates for the upstream connection, encrypts traffic with TLS, and keeps the field devices off the wider network entirely. It is also the thing that gets monitored and updated remotely, and it often relays configuration or firmware to the devices behind it.

Where an IoT gateway sits field side meters: RS-485 sensors: Zigbee tags: Bluetooth LE PLC: fieldbus gateway 1 translate 2 filter, timestamp 3 buffer 4 secure, update store on disk MQTT over TLS broker historian, cloud the field devices never touch the IP network; the gateway is the boundary
Diagram: meters on an RS-485 bus, Zigbee sensors, Bluetooth tags and a PLC all connect to a gateway in their own protocols. The gateway translates, filters and timestamps the readings, keeps them on local storage, and publishes them over MQTT with TLS to a broker, from which a historian or cloud platform takes them. The field devices never join the IP network themselves.

Gateway, router or edge computer?

The words overlap, and vendors use them loosely.

A router forwards IP packets between networks without looking at what they mean. Your home router connects the house network to the internet; it does not know what a Zigbee sensor is. A gateway, in the IoT sense, understands at least one non-IP protocol or one application protocol and converts between them. A device can be both, and many industrial gateways include a cellular router.

A Thread border router is a useful edge case. Thread devices already speak IPv6, so the border router forwards packets between the Thread mesh and the home’s Wi-Fi or Ethernet without translating them; the Thread border router article explains the difference. A Zigbee coordinator, by contrast, has to translate, because Zigbee devices do not use IP at all.

An edge computer runs applications close to the machines: analytics, a local dashboard, a machine-learning model. An edge gateway is a gateway with enough computing power to do some of that as well, often by running containers or a flow tool such as Node-RED. The line between the two is a matter of how much software runs on the box.

The kinds of IoT gateway

KindField sideUplinkTypical setting
Smart home hubZigbee, Z-Wave, Thread, BluetoothWi-Fi or EthernetHome, small office
LoRaWAN gatewayLoRa radio, many channels at onceEthernet or cellularFarms, campuses, cities
Industrial edge gatewayRS-485, RS-232, CAN, digital and analog inputs, Ethernet fieldbusesEthernet, cellular, Wi-FiPlants, utilities, buildings
Cellular gateway or routerEthernet or serial from local equipmentLTE, LTE-M, 5GRemote sites, vehicles, kiosks
Phone or tablet appBluetooth LEThe phone’s own connectionWearables, personal devices

Smart home hubs are gateways for the house: they form a Zigbee or Z-Wave network, pair devices, and expose them to apps and voice assistants. Whether that hub works without the internet is a separate question, covered in the local-only smart home guide.

LoRaWAN gateways are the odd ones out. They do not decode the data. A LoRaWAN gateway receives every LoRa packet it can hear on its channels and forwards it, unchanged and still encrypted, to a network server, which removes duplicates, checks it and passes it to the application. The device’s data is encrypted end to end between the device and the application, so the gateway cannot read it. The LoRaWAN article covers the network structure.

Industrial edge gateways are built for control cabinets: DIN-rail mounting, a 24 volt DC supply, a wide operating temperature range, isolated serial ports, and often digital and analog inputs, including 4-20 mA loops, for signals that come straight from sensors. They usually poll Modbus devices and read PLCs, then publish over MQTT or serve the values through OPC UA, as described in OPC UA and MQTT in factories.

Cellular gateways connect equipment at sites with no wired internet, using a SIM and a mobile network. For low-data devices, LTE-M and NB-IoT modems are common; the NB-IoT vs LTE-M article and the IoT SIM card guide cover those choices. For gateways that move more data, such as video or a site’s whole internet link, 5G RedCap modules are the newer mid-range option.

Every uplink fails sometimes: a cellular signal fades, a firewall rule changes, a cloud service has an outage. A gateway that simply forwards readings loses everything until the link returns. A gateway with store-and-forward keeps polling, writes each reading with its original timestamp to local storage, and when the connection comes back sends the backlog in order before resuming live data.

Store-and-forward during an uplink outage uplink link down readings buffer fills on disk drains readings keep their original timestamps, so the record has no gap; size the storage for the longest outage you expect
Diagram: readings arrive at a steady rate. While the uplink is down, the gateway stores them on local storage and the buffer grows; when the link returns, it sends the stored readings in order with their original timestamps until the buffer is empty, then continues with live data, so the record downstream has no gap.

Three details decide whether this works in practice. The gateway’s clock must be right, set from NTP or a GPS receiver, or the buffered timestamps are wrong. The storage must be large enough for the longest outage you expect at your data rate, and you should know what the gateway does when it fills: drop the oldest data or stop collecting. And the receiving side must accept late data with old timestamps; some dashboards and databases treat a reading as arriving when it is received rather than when it was taken. MQTT’s QoS levels help with delivery once the link is up, as the MQTT explainer describes, but they do not replace a local buffer.

How to choose an IoT gateway

Start from the devices and the site, not the gateway catalog.

  1. Field interfaces. List every device it must talk to and how: RS-485 with Modbus RTU, Ethernet with Modbus TCP or a PLC protocol, Zigbee, Bluetooth LE, LoRa, digital or analog inputs. Count the serial ports and check whether they are isolated.
  2. Protocol support in the software. A physical port is not enough. Check that the gateway’s software has drivers for the specific protocols and, for a PLC, the specific controller family, or that you can add them.
  3. Uplink. Ethernet, Wi-Fi, cellular, or two of them with automatic failover. For cellular, check the bands and technologies against the carriers at the site.
  4. Upstream protocols. MQTT with TLS is the common choice; check whether you also need OPC UA, HTTP, or a specific cloud platform’s connector, and how topics and payloads are formatted.
  5. Buffering. How much local storage, how long that lasts at your data rate, and what happens when it is full.
  6. Environment and power. Operating temperature, mounting (DIN rail, wall, pole), ingress protection for outdoor or wash-down areas, and supply (24 V DC in a cabinet, Power over Ethernet, mains).
  7. Security. Secure boot, signed firmware updates, storage for keys or a TPM, a firewall, and how long the maker promises security updates. The firmware update article explains what to ask.
  8. Management. How a fleet of gateways is monitored, configured and updated remotely, and whether that depends on the maker’s cloud service continuing to exist.
  9. Openness. Whether you can run your own software on it, such as containers or Node-RED, or are limited to the maker’s configuration screens.

Common mistakes

Forgetting it is a single point of failure. Every device behind the gateway goes quiet when it does. Monitor it, keep a spare configured, and decide what the plant does if it stops.

Adding a second master to a bus. A Modbus RTU bus expects one master. Wiring a gateway onto a bus that a PLC or building management system already polls, without agreement from whoever owns it, causes collisions and intermittent faults. Read the values from the existing controller instead, as described in what a PLC is.

Polling too fast. Serial devices are slow. Asking every device for every register once a second can saturate a bus at 9,600 baud. Poll each value at the rate it actually changes.

Leaving the gateway on the office network. A gateway bridges the plant floor to an IP network, so it deserves the same separation as any other IoT device; the separate VLAN guide applies to plants as well as homes.

For where the gateway fits among sensors, controllers, brokers and dashboards, read what an industrial IoT system is made of, and browse the rest of the industrial IoT guides for the protocols on either side of it.

Written by the IoT Crest editorial team. Facts in this article follow the editorial policy: only well-established behavior is stated and no figures are invented.

More from Industrial IoT

  1. What is SCADA? How supervisory control works

    What SCADA is and how it works: field devices, RTUs and PLCs, communications, HMI and historian, polling, protocols, SCADA vs PLC vs DCS, and security.

  2. 4-20mA current loop: how the signal works

    4-20mA explained: how a current loop carries a reading, why it starts at 4 mA, loop power and wiring, scaling, fault levels, HART, and reading it into IoT.

  3. Modbus RTU explained: frames, registers and function codes

    Modbus RTU explained: how a master polls devices over RS-485, the frame and CRC byte by byte, the four register tables, function codes, and RTU vs TCP.

  4. MTBF vs MTTR vs MTTF: reliability metrics explained

    MTBF vs MTTR vs MTTF: what each failure metric measures, how to calculate them with a worked example, availability, and what an MTBF figure does not promise.

  5. RS-485 explained: wiring, termination and how the bus works

    RS485 explained: differential signaling on a twisted pair, the A and B lines, termination and biasing, cable length against speed, and RS-485 vs RS-232.

  6. What is a PLC? Programmable logic controllers explained

    What is a PLC: the parts of a programmable logic controller, the scan cycle, the IEC 61131-3 languages, and how PLC data reaches an industrial IoT system.

  7. Edge computing vs cloud computing for IoT: where the work should happen

    Edge computing vs cloud computing for IoT systems: what each means, how latency, bandwidth, reliability and cost differ, and how to split the work.

  8. What an industrial IoT system is made of, from sensors to dashboard

    What an industrial IoT system is made of: sensors and actuators, controllers, gateways, the plant network, a broker or historian, dashboards and alerts.

  9. Predictive maintenance with vibration and temperature sensors: how it works

    How predictive maintenance sensors work: what vibration and temperature reveal about bearings, motors and pumps, where to mount them and how alerts work.

  10. OPC UA and MQTT in factories: where each fits

    OPC UA and MQTT in factories: what each protocol does, how a client-server information model differs from publish-subscribe, and how plants use both.

All industrial IoT articles

Sponsor an article in this topic

Sponsored articles and in-article link placements for IoT vendors, agencies and SEO buyers. Every sponsored piece is labeled, edited to the same standard as the rest of the site, and placed in the hub its readers already visit. Rates on request.

Ask a question

Ask a question

Spotted an error, or want a topic covered? It goes straight to the editors, who reply by email, WhatsApp or SMS.