iot-connect.cfg Reference
The iot-connect.cfg file contains attribute-value pairs in JavaScript Object Notation (JSON) format that enable the device manager to connect to Device Cloud.
For the C agent, this file is also the base connection configuration file for other applications on the device that use the Device Cloud APIs. For more information, see Generating a Connection Configuration File for a C Application.
This file is typically generated using a configuration program. For more information, see the following:
Attribute |
Description |
---|---|
cloud |
the object contains the attributes that specify the address and authentication information to connect to Device Cloud |
proxy |
the object contains attributes that specify optional proxy settings if the device connects through a proxy server |
qos_level |
MQTT QOS level to use for the connection default value: 1 value values: 0, 1 Only downgrade to level 0 if you have a completely stable connection and level 1 causes issues. |
validate_cloud_cert |
validate SSL certifications default value: true Do not change the default value for a production environment. |
Cloud Object
Attribute |
Description |
---|---|
host |
the endpoint of Device Cloud obtained from the Developer page on the Management Portal |
port |
the port to use for the connection valid values: 8883, 1883, 443 Port 443 is only supported only by the Python agent on Linux and Mac OS X. |
token |
the application token of the device manager application, hdc_device_manager_app, available on the Applications page on the Management Portal |
Proxy Object
Attribute |
Description |
---|---|
host |
proxy server address |
port |
proxy server port |
type |
type of proxy valid values: SOCKS4, SOCKS5, HTTP |
username |
proxy username, if required |
password |
proxy password, if required |
The following shows an example that uses the endpoint for North America.
{
"cloud": {
"host": "api.devicecloud.windriver.com",
"port": 8883,
"token": "SBAeksRIOdIsGXYB"
},
"proxy": {
"host": "192.168.24.23",
"password": "iot",
"port": 3128,
"type": "HTTP",
"username": "iot"
},
"qos_level": 1,
"validate_cloud_cert": true
}