Create a cloud gateway device (SL 651)
You need to import device certificates for a first-party authenticated cloud gateway product to create cloud gateway devices. These devices are used to authenticate the connection when a physical device connects to IoT Platform. This topic describes the steps to import device certificates.
Prerequisites
You have added a cloud gateway and created a cloud gateway product that uses first-party authentication. For more information, see Create a cloud gateway product (SL 651).
Limits
You cannot create single devices for some products. You must import device authentication information in batches for the following products:
All products of MQTT-based Enterprise instances. To import device information in batches, see Add devices in batches.
Cloud gateway-associated products of Premium Enterprise instances. To import device information in batches, see Add devices in batches (MQTT), Add devices in batches (GB/T 32960), Add devices in batches (JT/T 808), and Create cloud gateway devices (SL 651).
Background information
-
After a cloud gateway that uses third-party authentication is created, when a device connects for the first time, IoT Platform uses the value of the
telemetryAddressrequest parameter from the Function Compute (FC) authentication function as the device name. IoT Platform then automatically creates and authenticates the device. -
After you create a cloud gateway that uses first-party authentication, you must import device certificates into IoT Platform to create cloud gateway devices. For more information, see the procedure below.
Add devices in batches
Log on to the IoT Platform console.
On the Instance Overview page, click the target Enterprise instance of the Exclusive Edition.
In the navigation pane on the left, choose . Find the cloud gateway product that you created and click Manage Devices in the Actions column.
-
On the Devices page, click Add in Batches.
-
In the Add Devices in Batches dialog box, click Download .csv Template to download the template file.
-
In the template, fill in the
telemetryAddressandPassword, and then save the file. For the specific format of the telemetry address and device password, see Section6.2.3.2in Hydrological Monitoring Data Communication Protocol SL 651-2014.-
telemetryAddress: String. A 5-byte Binary-Coded Decimal (BCD) code. The first byte is 00. The next four bytes follow the SL 502 standard. For example, if the telemetry station address is12345678, the finaltelemetryAddressis "12345678". -
Password: String. A 2-byte hexadecimal (HEX) code. For example,126,126converted to HEX is "7e7e".
-
-
Return to the Add Devices in Batches dialog box. Click Upload File to upload the completed file to the IoT Platform console. Then, click OK.
If the list of devices to be uploaded contains invalid information, an error message appears. Click Download Invalid List to view the invalid entries. Correct the entries and upload the file again.
Results
After the device certificates are imported, IoT Platform uses the uploaded telemetryAddress value as the device name to create a device. The device list displays information about the created device.
The created devices, such as test2 and test3, have an initial status of Inactive. The enable/disable switch is on by default.
Next steps
After you create the cloud gateway devices, update the access domain name for the devices:
If the devices are already configured with an access domain name, configure a canonical name (CNAME) record to map the domain name to the cloud gateway connection domain name (cloud gateway URL). For more information about domain name resolution, see Alibaba Cloud DNS.
If the devices are not configured with an access domain name, configure the cloud gateway URL on the devices.
To obtain the cloud gateway URL, see View cloud gateway details.
For more information about how cloud gateway devices communicate after they connect to IoT Platform, see Message communication.