Connectivity and Protocols

Gateways: The Bridge Between Devices and the Internet

What an IoT gateway does: translating protocols, filtering and buffering data, and acting as a local security boundary between sensors and the wider internet.

On this page
  1. The problem a gateway solves
  2. What a gateway translates
  3. What a gateway filters
  4. What a gateway buffers
  5. Other jobs gateways take on
  6. Gateway, router, hub: how they differ
  7. Where gateways live
  8. Trade-offs and risks
  9. Choosing whether you need one

The problem a gateway solves

Many devices cannot talk to the internet directly. A small battery-powered sensor may use a radio that has no concept of internet addresses. A factory machine may speak a protocol designed decades before the web. Even devices that could connect may be better off not doing so, because each internet-facing device is another thing to secure and maintain.

A gateway sits in the middle. On one side it speaks the local language of the devices. On the other it speaks to a network that reaches the wider internet, or a private server. It is part of the broader picture of communication layers, because it joins two different stacks.

What a gateway translates

The most visible job is protocol translation. A gateway might receive a short radio message from a sensor, decode its compact format, and forward the result as a standard network message. For example:

  • Local radio frames from a field sensor become messages sent to a cloud service.
  • Readings from an industrial controller, using its own protocol, become messages in a common format.
  • Commands arriving from an app are converted into the commands a particular lamp or lock understands.

Translation can also include format changes: converting units, attaching timestamps, or renaming fields so that data from different makers lines up. This does not remove the deeper compatibility problem, but it can hide some of it from the rest of the system.

What a gateway filters

Not every reading needs to travel upstream. A gateway can drop duplicate messages, ignore readings that have not changed, average a burst of measurements, or send only values outside an expected range. This reduces data costs, especially on metered connections such as cellular, and reduces load on back-end systems.

Filtering can also be a privacy tool. If a gateway sends only summaries, such as “room occupied” rather than raw motion data, less detail leaves the premises. Whether that is useful depends on the application. Sending less is not automatically sufficient protection, so the rules should still be reviewed.

Filtering is often an early form of edge computing, where a small amount of processing happens near the devices instead of in a distant data center.

What a gateway buffers

Internet links fail. A gateway with local storage can hold readings during an outage and send them when the link returns, preserving the gaps in time series data that would otherwise be lost. This helps with offline operation: local rules, such as turning on a pump when a tank is low, can keep running even if the cloud is unreachable.

Buffers are finite. A long outage can fill the storage, and the gateway must then choose between dropping the oldest data or the newest. Good designs make that choice deliberately and attach original timestamps to buffered readings, so late arrivals are not mistaken for current ones.

Other jobs gateways take on

  • Security boundary. Devices can sit on a private local network, with only the gateway exposed. The gateway can authenticate devices, refuse unknown ones and limit what leaves. This resembles network segmentation in a home.
  • Device onboarding. Gateways often handle joining new devices to the local network and registering them upstream.
  • Local control. Some gateways run automation rules locally, so that actions do not depend on a round trip to the cloud.
  • Aggregation. Hundreds of small devices share one uplink rather than each needing its own subscription or connection.
  • Remote management. Many gateways receive configuration changes and updates remotely, which makes them a convenient point for device management.

Gateway, router, hub: how they differ

The terms overlap. A router moves internet traffic between networks without understanding the content. A gateway, in the IoT sense, usually understands the application data and converts between protocols. A hub is the consumer-facing name for something that connects several kinds of home devices, and in practice is often a gateway with a friendly interface. Product naming is inconsistent, so look at what it does rather than what it is called.

Where gateways live

They can be dedicated boxes, a function within a router or access point, a small computer on a factory floor, or a phone acting temporarily as one, as in a typical Bluetooth Low Energy accessory. In large deployments they may be rugged units on poles or in cabinets with their own power and cellular uplinks. In long-range radio networks, a gateway typically listens to many sensors across a wide area and passes their messages to a central server.

Trade-offs and risks

A gateway adds cost and one more device to power, update and monitor. It also becomes a single point of failure: if it goes down, every device behind it goes dark. Redundant gateways can help in important installations.

A gateway is also a concentrated target. Because it connects two worlds, a compromised one can expose everything behind it. Basic precautions matter: no default passwords, timely firmware updates, minimal open services and encrypted upstream connections. Keep in mind that links between devices and gateway need protection as well, since local radio traffic may be readable by anyone nearby if left unencrypted.

Choosing whether you need one

If every device speaks the same network language as your cloud service and has its own power and connectivity, a gateway may be unnecessary. If devices use constrained radios, if connectivity is expensive or unreliable, or if you want local control and a clear security boundary, a gateway is usually worthwhile. For a small home setup, a single hub may be all you ever notice. For a larger one, plan for capacity, placement and what happens when it fails.

The complete guide to connectivity and protocols

How Connected Devices Talk: A Guide to IoT Communication Layers
Read the guide

Keep exploring

Guides from other topics

All topics →