In order to get started with Wind River Helix* Device Cloud, you'll need to install and configure the agent on your device. Once this is finished, you can boot up your device; the device will automatically connect to the server and register itself, providing device capabilities and configuration details.
Configuring the agent: Startup.bin
After you install the agent on your device, you must configure the agent before your device can connect to the server. In order to configure the agent, you'll need the startup.bin file, which includes the following information:
- Cloud server IP address
- Trusted CA certificate
- Client certificate
- Cloud certificate
- Client private key
- Tenant GUID
You receive the startup.bin file as part of your purchase of Device Cloud. Steps to download and apply the settings in startup.bin are included below. Note that the same startup.bin file can be distributed to all devices belonging to a client.
See the following sections:
- You have already set up your gateway and added the Intel repository
- Note that the device date and time must be set correctly
- To enable connectivity between the device and server, ensure that you open the outbound port 443 on your network. Telemetry data is sent via the secure MQTT protocol
- An administrator account on Device Cloud, as well as the user name and password for the account
From the command line on the gateway, install the agent using the following commands:
smart remove wr-iot-agent smart install iot mux ccg shellinabox
If prompted, enter
Yto confirm changes.
- To configure the agent, enter the command:
sudo iot-controlYou should see output similar to the following:
Looking for configuration file: /etc/iot/iot.cfg Looking for configuration file: /var/lib/iot/iot.cfg Looking for configuration file: ./iot.cfg Looking for configuration file: /usr/bin/iot.cfg Proxy's type (none/http/socks5/Enter to skip):
- If you need to add proxy server information, enter the proxy type and follow the onscreen instructions to specify your proxy configuration information, as shown in the sample output below. Otherwise, press ENTER to skip proxy configuration.
Proxy's type (none/http/socks5/Enter to skip): http
Proxy host: 192.168.2.1
Proxy's port: 3128
Proxy's username: (press ENTER to skip): proxyUser
- When prompted to type the path of the startup.bin file or download a copy instead, press ENTER.
- Supply the following information, providing your own user name and password:
- Cloud host:
The startup.bin file is downloaded to your gateway. The agent services start automatically and the device connects to the server, as shown in the sample output below.
Downloading file... Success: File saved to "/var/lib/iot/startup.bin" Stopping service: Internet of Things Mux... Skipped (not found) Stopping service: Internet of Things Device Manager... Skipped (not found) Stopping service: Internet of Things Core Service... Skipped (not found) Stopping service: Internet of Things Connection Gateway... Skipped (not found) Stopping service: Mosquitto Broker... Skipped (not found) Starting service: Mosquitto Broker... Success Starting service: Internet of Things Connection Gateway... Success Starting service: Internet of Things Core Service... Success Starting service: Internet of Things Device Manager... Success Starting service: Internet of Things Mux... Success Press any key to continue...
- Cloud host:
After you install the agent configuration file, you must ensure that the device registers successfully with the server.
To identify your device on the management console, you need the device identifier or MAC address, which may be referred to as the hardware address or physical address. If you have multiple network interfaces, the device may appear with the MAC address of any of the interfaces.
- To help you identify your device on the management console, find the device ID by typing the following into the command line on your gateway:
You should see output like the following. Note the device ID (5C1FB6BB-4FE8-E8FA-0FBC-AC12ABE36C18 in this example).
- To exit, press ENTER three times.
- On your host computer, sign in to the management console with your user name and password at https://www.helixdevicecloud.com.
- Click DEVICES.
- In the Device Name, ID, MAC Address box, begin typing the device name, device ID, MAC address, or any other device attribute until your device appears in the list.
- In the Device ID column, click your device. Your device is connected to the server if Online appears on the device details page under the device name in the upper-left corner of the page.
You are now ready to develop applications using the agent APIs.
Looking for configuration file: /etc/iot/iot.cfg Looking for configuration file: /var/lib/iot/iot.cfg Looking for configuration file: /home/user/iot.cfg Looking for configuration file: /usr/bin/iot.cfg Current device id: 5C1FB6BB-4FE8-E8FA-0FBC-AC12ABE36C18 Proxy's type (none/http/socks5/Enter to skip):
You can run one of the available sample applications to start telemetry and run actions from the management console. For more information, see the Sample Applications section of the Wind River Helix Device Cloud Agent Programmer's Guide, 2.3.
If your device does not appear on the server or you are having connectivity issues, see Connection Troubleshooting.