Bind device to a gateway in Google Cloud Platform (GCP) using IoT Cloud Tester
Gateway devices connect its client devices to the Google Cloud Platform. Devices should be bound to gateway before the gateway can communicate with GCP on behalf of a device.
IoT Cloud Tester application provides an easy interface to bind device to a gateway in Google Cloud platform.
To bind device to a gateway in Google Cloud project,
- Select the project.
- In the 'Gateways' tab, select a gateway and press 'Bind/Unbind Devices' button.
- Select the device to bind.
To bind device to a gateway in GCP, a post request is made to the below URL. IoT Cloud Tester tool generates the device key for the Gateway and includes it as a post parameter.
Request sent to GCP to bind device to gateway.
POST:https://cloudiot.googleapis.com/v1/projects/iot-cloud-tutorial/locations/asia-east1/registries/reg_193129:bindDeviceToGateway
{
"deviceId" : "dev_952945",
"gatewayId" : "gw_32110"
}
The devices bound to gateway can be viewed in the Google Cloud console.