After converting the Thing Specification Language (TSL) data format, define a custom property and service on the AEP platform of China Telecom to test receiving downstream data from an IoT Platform device.
Procedure
- On the AEP platform of China Telecom, in the left-side navigation pane, choose Product Center. Find and click the product NBProduct1. On the product page, click the Service Definition tab.
- In the Custom Feature Module section, under the Properties list, click Add Property on the right. Configure the parameters as prompted and click OK.
The parameters must match the custom test property of the NBProduct1 product in IoT Platform. The following table describes some of the parameters.
For more information, see Create a product in IoT Platform.
Parameter Description Property name Enter test. Property identifier Enter test. Data type Select int. Length Select 1 byte. Unit Select None. - In the Custom Feature Module section, under Services, click Add Service on the right to configure a Message Sending service.
The following table describes the parameters.
Parameter Description Service type Select Message Sending. Service ID Enter a custom ID as prompted. Service name Enter test. Service identifier Enter test. Parameters Click Add Parameter to add the test parameter. The configuration must match the test property. - On the product page, go to Devices and click the online simulation icon
next to the nbdevice device. On the AEP-Online Debug page, click Connect in the upper-right corner. - Return to your instance in the IoT Platform console. In the left-side navigation pane, choose . On the Property Debugging tab, select Default Module.
- Set the test property value to 0 and click Set.
After the device receives the message from the cloud, the log output is as follows. In the output, the value of
testinparamsis0andversionis1.0.0. A response ofcode:200,message:successindicates that the message was sent successfully.2020-11-11 21:01:35.899,xxx 730215 "params":{"test":0},"version":"1.0.0"},result=code:200,message:success,topic=/sys/xxx - Return to the AEP platform of China Telecom. On the AEP-Online Debug page for the nbdevice device, view the device log.
As shown in the following output, the device on the AEP platform received the message from the cloud. This confirms that the downstream communication from the IoT Platform device was successful.
>[2020-11-11 21:01:30] Received cloud message: v1/dn/da,000000001812255000000005fabe0a900040f3138302e3130362e3134382e313436,taskId:0 >[2020-11-11 21:01:35] Received cloud message: v1/dn/cmd,{"test":0},taskId:2