From 5edf841bfc06c54ca295238fee42a151e8419876 Mon Sep 17 00:00:00 2001 From: Dylan Miracle Date: Fri, 3 Dec 2021 12:50:47 -0600 Subject: [PATCH] Update README.md --- iot/api-client/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/iot/api-client/README.md b/iot/api-client/README.md index 0299b92e017..8da5fe825bf 100644 --- a/iot/api-client/README.md +++ b/iot/api-client/README.md @@ -10,32 +10,34 @@ Google Cloud IoT Core platform. ## Quickstart 1. Install the gCloud CLI as described in [the Cloud IoT Core documentation](https://cloud.google.com/iot/docs/how-tos/getting-started#set_up_the_google_cloud_sdk_and_gcloud). 2. Create a PubSub topic: - +``` gcloud beta pubsub topics create projects/my-iot-project/topics/device-events - +``` 3. Add the service account `cloud-iot@system.gserviceaccount.com` with the role `Publisher` to that PubSub topic from the [Cloud Developer Console](https://console.cloud.google.com) or by using the helper script in the /scripts folder. 4. Create a registry: +``` gcloud beta iot registries create my-registry \ --project=my-iot-project \ --region=us-central1 \ --event-pubsub-topic=projects/my-iot-project/topics/device-events +``` 5. Use the `generate_keys.sh` script to generate your signing keys: - +``` ./generate_keys.sh - +``` 6. Register a device: - +``` gcloud beta iot devices create my-python-device \ --project=my-iot-project \ --region=us-central1 \ --registry=my-registry \ --public-key path=rsa_cert.pem,type=rs256 - +``` 7. Connect a sample device using the sample app in the `mqtt_example` folder. 8. Learn how to manage devices programmatically with the sample app in the `manager` folder.