Device Registration
Overview
The NA server calls the API for registering a directly connected device to add devices to the IoT platform. For details about the API, see the API reference document.
This topic describes how to call the API for registering a directly connected device based on the Java code sample of the API.
Procedure
- In the Eclipse, choose verifyCode, nodeId, timeout, manufacturerId, manufacturerName, deviceType, model, and protocolType.
, and change the values of
Parameters are described as follows:
- The values of verifyCode and nodeId must be the same as the IMEI or MAC address of a physical device. If a device simulator is used, the value of verifyCode can be a combination of digits, letters, and special characters. The value can be user-defined but must be unique.
- The unit of timeout is second. The values of timeout are as follows:
- 0: indicates that the device never expires.
- > 0: indicates that the device must be made online within the specified period. Otherwise, the IoT platform removes the device immediately after the period expires. If timeout is not specified, the default interval (180 seconds) is used.
- After a device is bound, timeout becomes invalid and the device will never expire.
- The values of manufacturerId, manufacturerName, deviceType, model, and protocolType must be the same as those in the profile file.
- Right-click RegisterDirectConnectedDevice.java and choose .
- View the response log on the console. If deviceId is obtained, the registration is successful.
Developers can check whether the newly registered device is displayed on the
of the Developer Center. In this case, the registered device has only the device ID information.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot