Run the C POSIX Sample Gateway Application
Run the C POSIX sample gateway application to learn how to use the client software library APIs. 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 Fusion Cloud IoT Intelligent Applications.
- Build the samples. See Build the C POSIX Client Software Library Sample Applications.
- Register the device and download the provisioning file.
- Upload the humidity and temperature sensor device models to Oracle Fusion Cloud IoT Intelligent Applications. See Upload the Sample Device Models.
- Open a command prompt on the Raspberry Pi device and run this command to set the operating system variable :
export IOTCS_OS_NAME=" Raspbian GNU/Linux"
. - Run this command to set the operating system version variable:
export IOTCS_OS_VERSION="8"
. - Run this command to move to the directory containing the sample
gateway application:
cd /home/pi/iotcs/csl/posix/build/sample/arm/ts_md_vs_gw
- Run this command to run the gateway sample application:
./gateway_device_sample.out <path_to_your_provisioning_file> <your_provisioning_file_password>
. - Confirm the device is sending humidity and temperature data to Oracle Fusion Cloud IoT Intelligent
Applications: