Configure VxWorks with Device Cloud Support

Use a VSB and VIP project to configure VxWorks with Device Cloud support, which must include writable storage.

The examples in this procedure uses a USB flash drive for writable storage.

  • A current VxWorks 7 installation.

  1. Download and install the Device Cloud code into your VxWorks installation.
    1. Download the zip file from https://github.com/deviceWISE/device-cloud-lib/tree/vxworks_layer and extract it to a temporary directory.
    2. Copy the vxworks-layer-for-device-cloud-lib sub-directory from downLoadDir/zipExtractDir/device-cloud-lib-vxworks_layer/build-sys to your VxWorks installation under installDir/vxworks-7/pkgs/app/hdc-relNum.
    3. Download the zip file from https://github.com/deviceWISE/device-cloud-osal/tree/vxworks_layer and extract it to a temporary directory.
    4. Copy the vxworks-layer-for-device-cloud-osal sub-directory from downLoadDir/zipExtractDir/device-cloud-osal-vxworks_layer/build-sys to your VxWorks installation under installDir/vxworks-7/pkgs/app/hdc-relNum.
  2. Create a VSB project based on the BSP for your device.
  3. Add the HDC_DEVICE_CLOUD_LIB layer to your project.
  4. Add any other layers required for your system, including device storage.

    You must provide writable storage for the device manager's use and for the configuration files. For example, add the USB_STORAGE layer.

  5. Build the VSB project.
  6. Create a VIP project based on your VSB project.

    Use the PROFILE_DEVELOPMENT profile when you create the project to provide kernel shell support and other features that are useful in a development environment. The shell is required for this Quick Start.

  7. Add the INCLUDE_DEVICE_CLOUD_AGENT component.
  8. Set the INCLUDE_DEVICE_CLOUD_AGENT parameters that are required for this Quick Start.
    • Set DEVICE_CLOUD_AGENT_CONFIG_DIR to the directory path for the connection configuration files that you will create later. The path must end with /etc/iot. For example, "/bd0:1/etc/iot"

    • Set DEVICE_CLOUD_AGENT_BIN_DIR to the bin directory path for Device Cloud agent applications and scripts. For example, "/bd0:1/bin".

    • Set DEVICE_CLOUD_AGENT_RUNTIME_DIR to the directory path that will contain the device_id file (which will be created by the Device Cloud agent) and other runtime files. The path must end with /var/lib/iot/. For example: "/bd0:1/var/lib/iot".

  9. If you are going to use the kernel-mode device manager, add INCLUDE_DEVICE_CLOUD_MANAGER_KERNEL.

    Do not add this component if you want to use the RTP (user-mode) device manager. The RTP device manager is created automatically as part of the VSB build. To use it, you will need to copy it to device storage, as described later in this Quick Start.

  10. Set the DNSC_PRIMARY_NAME_SERVER configuration parameter to the primary domain server address.

    For example, to "8.8.8.8", which is the Google DNS server.

  11. Set the SNTPC_PRIMARY_IPV4_ADDR configuration parameter to the SNTPC server address.
  12. Add any other components required for your system, including storage for the connection configuration files and for the sample application.

    For example:

    • The Telnet component INCLUDE_IPTELNETS is required for remote terminal sessions, which can be accessed through the Device Cloud Device Console link in the Launchpad. For more information see the Device Cloud Device Programmer's Guide: Remote Device Access. In general, Telnet is a convenient device access method.

    • For USB support, add INCLUDE_USB_GEN2_STORAGE_INIT, INCLUDE_EHCI_INIT, INCLUDE_OHCI_INIT, and INCLUDE_UHCI_INIT, and INCLUDE_USB_XHCI_HCD_INIT.

    • For UEFI console support, add DRV_CONSOLE_EFI.

    • Optionally, to link the symbol table with VxWorks, add INCLUDE_STANDALONE_SYM_TBL.

  13. Build the VIP project.