Registering a new device

Let's register a new device. GCP uses certificates to enforce communication security:

  1. First, we need to create the private and public RS256 keys to be used for communication between IoT Core and our sensors:
$ openssl genrsa -out device_private.pem 2048
$ openssl rsa -in device_private.pem -pubout -out device_public.pem

Otherwise, download the certificate from this book's GitHub repository at https://github.com/PacktPublishing/Hands-On-Industrial-Internet-of-Things. The private key must be stored on the device, and the public key will be installed on IoT Core.

  1. From IoT Core, we can access our device registry:

Accessing the device registry
  1. Then, we can create our device. From the registry details, we have to click on Add a device. We should provide a name, such as my-iiot-device, and the public key that we created previously, as shown in the following screenshot:

New device configuration
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset