Copy Files to Device Storage

Boot your device. Copy your configuration files, CA certificates file, telemetry application, and any other files required by your system to device storage media.

The steps in this procedure are generally applicable. The examples illustrate using a USB flash drive and an Intel target with the UEFI boot loader.

For information about booting VxWorks, see your BSP reference and the VxWorks 7 Boot Loader User's Guide.

  1. Boot your VxWorks device.

    The device manager starts automatically after VxWorks boots (the task name is tManager), and connects with the Device Cloud.

  2. Create /etc/iot directories on the target media for the device and application connection configuration files.

    The full path that includes the /etc/iot directories must correspond to the one defined with the DEVICE_CLOUD_CONFIG_DIR parameter. For example, using a USB flash drive, /bd0:1/etc/iot/.

  3. Copy the iot.cfg, iot-connect.cfg, and telemetry-app.cfg to the path/etc/iot directory on the target media.
  4. Create the /var/lib/iot/ directories for the device_id file, which is created at runtime by the device manager.

    The full path that includes these directories must correspond to the one defined with the DEVICE_CLOUD_RUNTIME_DIR parameter. For example, /bd0:1/var/lib/iot/.

    File upload and download directories are created under this path for any files that are sent to or retrieved from the Device Cloud.

  5. Create /ssl/certs directories under the etc directory that you have already created on the device, for the certificate authority (CA) certificates file.

    The fill path must match the one that you have defined in your device connection configuration file iot.connect.cfg with the "ca_bundle" attribute. For example: /bd0:1/etc/ssl/certs.

  6. Download and the SSL CA certificates file https://curl.haxx.se/ca/cacert.pem and copy it to the certs directory.
  7. If you are using the RTP version of the device manager, copy it to device storage.

    First create the directory defined with DEVICE_CLOUD_AGENT_RTP_DIR (for example, /bd0:1/bin). Then copy vsbDir/usr/root/compiler/bin/iot-device-manager to it.

  8. Copy your telemetry application file to device storage.
  9. If you are going to boot the VxWorks image from device storage, copy the image to the appropriate location on the device.

    For example, if you are using a UEFI boot loader, create /EFI/BOOT directories on the drive. Then copy the image to /BOOT. For example:

    cp /home/xeno/workspace/myVIP/default/vxWorks /bd0:1/EFI/BOOT/bootapp.sys