Configuring Login Parameters
API Function
This API is used to set the parameters required for device connection.
API Description
1 2 | HW_INT IOTA_ConfigSetStr(HW_INT iItem, HW_CHAR *pValue)
HW_INT IOTA_ConfigSetUint(HW_INT iItem, HW_UINT uiValue)
|
Parameter Description
| Parameter | Mandatory or Optional | Type | Description |
|---|---|---|---|
| key | Mandatory | int | Configuration items used for device connection.
|
| value | Mandatory | String | Value of each configuration item.
|
EN_IOTA_CFG_TYPE:
| Enumerated Item | Value | Type | Description |
|---|---|---|---|
| EN_IOTA_CFG_DEVICEID | 0 | String | Logical device ID assigned by the platform. |
| EN_IOTA_CFG_DEVICESECRET | 1 | String | Authentication secret for a device to access the platform. |
| EN_IOTA_CFG_APPID | 2 | String | Identifier of an application. |
| EN_IOTA_CFG_IOCM_ADDR | 3 | String | Server IP address. |
| EN_IOTA_CFG_IOCM_PORT | 4 | unsigned int | Server port. |
| EN_IOTA_CFG_MQTT_ADDR | 5 | String | IP address of the MQTT server. |
| EN_IOTA_CFG_MQTT_PORT | 6 | unsigned int | Port number of the MQTT server. |
Return Value
For details, see Function Return Values.
Example
1 2 3 | // Call this API to configure parameters.
IOTA_ConfigSetStr (EN_IOTA_CONFIG_IOCM_ADDR, "10.0.0.1");
IOTA_ConfigSetUint(EN_IOTA_CFG_IOCM_PORT, 8943);
|
Last Article: Unbinding a Device
Next Article: (Optional) Configuring the Login Information Encryption Algorithm
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.