Installing the Agent for the Intel® IoT Gateway Software Suite

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:

Requirements

  • 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

Installing the agent

  1. 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 Y to confirm changes.

  2. To configure the agent, enter the command:
    sudo iot-control
    You 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): 
  3. 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
    Proxy's password:
  4. When prompted to type the path of the startup.bin file or download a copy instead, press ENTER.
  5. Supply the following information, providing your own user name and password:
    • Cloud host: www.helixdevicecloud.com
    • Username: hdcAdminUser
    • Password: hdcAdminUserPasswd

    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...

Confirming successful device registration

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.

  1. 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:

    sudo iot-control

    You should see output like the following. Note the device ID (5C1FB6BB-4FE8-E8FA-0FBC-AC12ABE36C18 in this example).
  2. 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):  
  3. To exit, press ENTER three times.
  4. On your host computer, sign in to the management console with your user name and password at https://www.helixdevicecloud.com.
  5. Click DEVICES.
  6. 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.
  7. 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.

     

    Next Steps

    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.

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.