A gateway is a device that connects its client devices to Cloud IoT Core and performs several tasks on their behalf, such as:
- communicating with Cloud IoT Core
- connecting to the internet when the device can't directly connect itself, such as a ZigBee or Bluetooth device
- authenticating to Cloud IoT Core when the device can't send its own credentials, or when you want to add a layer of security by using the credentials of both the device and the gateway
- publishing telemetry events, getting configuration data, or setting device state
- storing and processing data
- translating protocols
You can manage gateways in the same way as any other device: they can publish their own telemetry data, report state, and receive configuration data.
Cloud IoT Core supports gateway connections and communication over both MQTT and HTTP.
The following diagram gives an overview of the device/gateway architecture for use with the MQTT bridge.
To understand gateways, you should be familiar with the following concepts:
- Create or remove an association between the device and the gateway. Binding enables devices to access Cloud IoT Core through the gateway without having to provide their own JSON Web Token (JWT). Binding is optional; see Non-gateway Device Authentication for more details.
- (MQTT only) Enable or disable communication between an authenticated device and Cloud IoT Core through the gateway.
To use gateways with Cloud IoT Core:
Decide how to authenticate the devices to Cloud IoT Core through the gateway.
Optional: Create devices, if you haven't already.
Try a demo that walks you through the process of creating a gateway and a device, binding the device to the gateway, listening for configuration messages, and sending state data on behalf of the device.
Using Cloud IoT Core gateways with a Raspberry Pi
To learn how to set up and use gateways with a Raspberry Pi*, see the community tutorial.
*Raspberry Pi is a trademark of the Raspberry Pi Foundation.
Sent gateway messages are billed as normal device traffic. For details, see the main Pricing documentation.