Getting started with IoTivity on Intel Devices

Published Date
11 - Oct - 2017
| Last Updated
12 - Oct - 2017
 
Getting started with IoTivity on Intel Devices

Introduction

As more IoT devices are deployed into the marketplace, there is a desire to have devices that are intelligent and able to connect with each other in a common standardized way.  IoTivity is a step in this direction providing a framework that is cross platform, architecture independent, and is an open source solution for developers to use with their IoT devices.  This tutorial shows how to get started setting up a host build system, building the framework, and running a client/server example.

Prerequisites

01:  Download and Install Ubuntu* 16 - https://www.ubuntu.com
02:  Learn more about IoTivity - https://www.iotivity.org/documentation

Tutorial

01:  Install Host Packages

sudo apt-get install \
build-essential git scons libtool autoconf \
valgrind doxygen wget unzip \
libboost-dev libboost-program-options-dev libboost-thread-dev \
uuid-dev libexpat1-dev libglib2.0-dev libsqlite3-dev libcurl4-gnutls-dev

02:  Clone Repositories

git clone https://github.com/iotivity/iotivity.git
git clone https://github.com/01org/tinycbor.git extlibs/tinycbor/tinycbor -b v0.4.1
git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls -b          

03:  Build IoTivity for Intel Devices

scons TARGET_PLATFORM=x86

04:  Run the Simple Client/Server Example

04a:  Open a new Terminal and run the Server        

export LD_LIBRARY_PATH=~/iotivity/out/linux/x86_64/release
cd ~/iotivity/out/linux/x86_64/release/resource/examples
./simpleserver

04b:  Open a new Terminal and run the Client

export LD_LIBRARY_PATH=~/iotivity/out/linux/x86_64/release
cd ~/iotivity/out/linux/x86_64/release/resource/examples
./simpleclient

Summary

This tutorial got you started using the IoTivity framework on Intel Devices.  It was described how to setup the host build environment, how to build the source code, and run a client and server example project.  You are now ready to work with the framework examples and APIs for your next IoT project. 

For more such intel IoT resources and tools from Intel, please visit the Intel® Developer Zone

Source: https://software.intel.com/en-us/articles/getting-started-with-iotivity-on-intel-devices-0