Run the Windows Sample Applications

Run the Windows sample applications to learn how to use the client software library APIs. The device client samples use software to simulate temperature and humidity sensors. The device samples periodically send temperature, humidity, and alert messages to Oracle Internet of Things Cloud Service. The gateway sample sets a threshold value, resets the device, and then switches the device on or off. The attributes, actions, and alerts of the sample temperature and humidity sensors are specified in device models which you upload to Oracle Internet of Things Cloud Service.

  1. Create the sample applications. See Create the Windows Client Software Library Sample Applications.
  2. Register the device and download the provisioning file.
  3. Upload the humidity and temperature sensor device models to Oracle Internet of Things Cloud Service. See Upload the Sample Device Models.
  4. Open a command prompt and run this command to set the IOTCS_OS_NAME environment variable: SET IOTCS_OS_NAME “%Windows%”.
  5. Run this command to set the IOTCS_OS_VERSION environment variable: SET IOTCS_OS_Version “%7%”.
  6. Run this command to move to the sample directory: cd iotcs/csl/windows /build/sample/x86/<sample_directory>. Replace <sample_directory> with the name of the folder where you created the sample applications.
  7. Run this command to run the directly connected device sample application: sample_name.exe ./trusted_asset_store password. Replace sample_name.exe with the name of the sample application you want to run, trusted_asset_store with the path to the provisioning file you downloaded when registering your device, and password with the password used to protect the provisioning file.
  8. Confirm the device is sending humidity and temperature data to Oracle Internet of Things Cloud Service:
    1. Open the Oracle Internet of Things Cloud Service Management Console.

      The URL format to access the IoT management console is: <iot instance name>.<domain name>/ui

      For example: https://myiotcs.mydomain.oraclecloud.com/ui or https://myiotcs.mydomain.oracleiotcloud.com/ui.

    2. Click the Menu (Menu icon) icon adjacent to the Oracle Internet of Things Cloud Service title on the Management Console.
    3. Click Devices.
    4. Click Alerts and Messages.
    5. Click the Messages tab and confirm there are incoming messages.