0% found this document useful (0 votes)
138 views6 pages

OIC and OCF Spec Based Smart Switch Board With Raspberry PI 3

In this paper we describe about designing and development of OIC and OCF Spec based Smart Switch Board with Raspberry pi 3.Raspberry pi 3 board running Raspibian OS with IoTivity Frame work specifically, attention is given to understand the IoTivity Frame work by running an Smart Switch Board with Raspberry pi 3 as IoTivity Server Device where IoTivity ported Ubuntu PC with Eclipse Simulator will act as IoTivity Client Device. The intended out-come of this work is to understand the IoTivity Frame work and how to Discover the Devices, how to know the Status of Devices and Control the Devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views6 pages

OIC and OCF Spec Based Smart Switch Board With Raspberry PI 3

In this paper we describe about designing and development of OIC and OCF Spec based Smart Switch Board with Raspberry pi 3.Raspberry pi 3 board running Raspibian OS with IoTivity Frame work specifically, attention is given to understand the IoTivity Frame work by running an Smart Switch Board with Raspberry pi 3 as IoTivity Server Device where IoTivity ported Ubuntu PC with Eclipse Simulator will act as IoTivity Client Device. The intended out-come of this work is to understand the IoTivity Frame work and how to Discover the Devices, how to know the Status of Devices and Control the Devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Article

OIC and OCF Spec Based Smart Switch Board


with Raspberry PI 3
Matta Jayaram1, V Sandhya2

Abstract
In this paper we describe about designing and development of OIC and OCF Spec based Smart Switch
Board with Raspberry pi 3.Raspberry pi 3 board running Raspibian OS with IoTivity Frame work
specifically, attention is given to understand the IoTivity Frame work by running an Smart Switch
Board with Raspberry pi 3 as IoTivity Server Device where IoTivity ported Ubuntu PC with Eclipse
Simulator will act as IoTivity Client Device. The intended out-come of this work is to understand the
IoTivity Frame work and how to Discover the Devices, how to know the Status of Devices and Control
the Devices.

Keywords: IoTivity Framework, Raspberry Pi 3, OCF, OIC, Coap, Ison, Cbor, Scons
Introduction
Each day more and more devices are adding to the ever-growing Internet of Things (IoT). Analysts and techies are
agree that the IoT will grow to many billions of devices over the next decade.

The challenge for the IoT ecosystem is to ensure guidelines and rules to the IoT devices to connect securely and
reliably to the Internet and to each other.

IoTivity Framework defines standards for connectivity requirements. It Ensures interoperability of billions of Internet
of Things (IoT) devices. An open source software framework implementing OIC Standards. Ensures seamless device-to-
device connectivity to address the emerging needs of the Internet of Things. The IoTivity project is sponsored by the
Open Connectivity Foundation (OCF).

Related Work
Block Diagram abd Working Principle

Initially IoTivity Client and Server Devices are Connected to Local WiFi Router. Smart Switch Board with Raspberry pi 3
as IoTivity Server Device where as IoTivity ported Ubuntu PC with Eclipse Simulator will act as IoTivity Client Device.

1
PG Student, 2Asst.Prof, Dept of ECE, BVC Engineering College, JNTUK, A.P, India.
Correspondence: Mr. Jayaram Matta, BVC Engineering College, JNTUK, A.P, India.
E-mail Id: [email protected].
Orcid Id: http://orcid.org/0000-0002-6256-7040
How to cite this article: Jayaram M, V Sandhya. OIC and OCF Spec Based Smart Switch Board with Raspberry PI 3. J Adv Res
Embed Sys 2017; 4(1&2): 9-14.
ISSN: 2395-3802

© ADR Journals 2017. All Rights Reserved.


Jayaram M et al. J. Adv. Res. Embed. Sys. 2017; 4(1&2)

Initially both the Devices are Connected to Common 1. Unicast GET coap://192.168.4.32:5508/a/sb
Multicast IP (224.0.1.187) with 5683 port number. 2. Unicast GET coap://192.168.4.32:5508/a/switch1
1.Initiate Multicast Device Discover Request from
IoTivity Ported Ubuntu PC. It will Discovers all Iotivity 3. For Controlling the Device Initiate POST with
devices which are connected to that comman Multicast Different Payload States Example: 1. Unicast POST
IP. Example: Multicast GET coap://224.0.1.187:5683/ coap://192.168.4.32:5508/a/sb payload [state=true
oic/res 2.Then Initiate GET request for knowing it's / false ] 2. Unicast POST coap://192.168.4.
present status Example: 32:5508/a/switch1 payload [state=true / false ]

IoTivity Framework Adopt Open Standards like IETF when applicable &
standardize on areas, not addressed Open Source
IoTivity is an open source project , it is hosted by the Framework implementing OIC Standards.Licensed under
Linux Foundation and sponsored by the Open Apache License Version 2.0.Available on TIZEN, Android,
Connectivity Foundation (OCF) .OCF is a group of Arduino, Linux(Ubuntu) Platforms
technology companies such as Samsung Electronics and
Intel who together will develop standard specifications, Hard Ware Requirements
promote a set of interoperability guidelines and
provides a certification program to enable the Internet Raspberry pi 3
of Things. This project is independent from the OCF. Any
individual or company can contribute to the project. The Raspberry Pi 3 is the third generation Raspberry Pi.It
is a series of small single-board computers developed in
Architectural goal of IoTivity is to create and Implement the United Kingdom by the Raspberry Pi Foundation . It
a new standard by which billions of wired and wireless replaced the Raspberry Pi 2 Model B in February 2016.
devices will connect to the internet and to each other. Compared to the Raspberry Pi 2 it has:

Key Focus of OIC and IoTivity • A 1.2GHz Broadcom BCM2837 64-bit quad-core
ARMv8 CPU
Defines the standards for connectivity requirements • BCM43438 802.11n Wireless LAN
Ensures interoperability of billions of Internet of Things • Bluetooth 4.1 and Bluetooth Low Energy (BLE)
(IoT) devices.An open source software framework
implementing OIC Standards. Ensures seamless device- Like the Pi 2, it also has:
to-device connectivity to address the emerging needs of
the Internet of Things. OIC Standards addresses multiple 1GB RAM, 4 USB ports, 40 GPIO pins, Full HDMI port,
vertical domains including Home Automation, Ethernet port, Combined 3.5mm audio jack and
Automotive, Enterprise, HealthCare, Industrial composite video, Camera interface (CSI), Display
scenarios. Initial focus on Smart Home & Office solutions interface (DSI), Micro SD card slot (now push-pull rather
than push-push), VideoCore IV 3D graphics core.

ISSN: 2395-3802 10
J. Adv. Res. Embed. Sys. 2017; 4(1&2) Jayaram M et al.

The Raspberry Pi 3 has an identical form factor to the Raspberry pi3 Supports Noobs, Rasbian, Ubuntumate,
previous Pi 2 (and Pi 1 Model B+) and has complete Snappy Ubuntu Core, windows 10 IoT Core, OSMC,
compatibility with Raspberry Pi 1 and 2. Libreelec, Pinet, RISC OS with Custom we build we can
also flash Mac OS, Android OS.

Figure.Raspberry pi 3

Relays also a switch that connects or disconnects two circuits.


But instead of manual operation a relay is applied with
A Relay can be defined as a Electric switch.In Switches an electrical signal, which in turn connects or
are used to close or open the circuit manually .Relay is disconnects another circuit.

Fig.Four Relay Module

Four or Six Modular Switch Board

We need a Four or Six Modular Switch Board

11 ISSN: 2395-3802
Jayaram M et al. J. Adv. Res. Embed. Sys. 2017; 4(1&2)

Project Setup Eclipse simulator setup

Building IoTivity 1.2.0 for Raspberry Pi 3 Follow the steps below for eclipse installation:

• Installing Raspbian on Raspberry Pi 1. Download eclipse from http://www.eclipse.org/


downloads
Download Raspbian Desktop version from belowLink 2. Start Eclipse and Select Help -> Install New
https://www.raspberrypi.org/downloads/raspbian/ By Software.... In the dialog appears enter below
using Win32diskimager Tool Write image to the SD card mentioned URL in Work With text field and press
enter key.
• Installing IoTivity 1.2.0 on Raspberry Pi 3 • https://downloads.iotivity.org/tools/simulator/lat
est
a. a. Download Source code from https://www. • Install below plugins and makesure that simulator
iotivity.org/downloads/iotivity-1.2.0 and extract it. properly will work.
b. Add SwitchBoard.c & .h files by making necessary • Service Provider Plugin: ~/<IoTivity home
changes in Scon Scripts This file contains the Smart directory>/ service/simulator/java/eclipse-plugin/
Switch Board Source code for 4, 6 and 8 Modular ServiceProvider Plugin
Switch Boards. • Client Controller Plugin: ~/<IoTivity home
c. From the Terminal go to the Location where the directory>/service/simulator/java/eclipse-plugin/
code base is extracted and Execute below command ClientController Plugin
$ scons TARGET_ARCH=arm TARGET_OS=linux
• Simulator Java SDK: ~/<IoTivity home directory>/
TARGET_TRANSPORT=ALL -j8
service/simulator/java/sdk
Building IoTivity 1.2.0 for Ubuntu 12.04/14.04 /16.04
Result Analysis
Install necessary Tools like gitcore, scons, build 1. Connect Raspberry pi3 to Wifi and Provide Power
essential.boost libraries, doxygen packages using apt. 1. supply to it.
Download the source code for IoTivity 1.2.0 from 2. Program executable files will load automatically
https://www.iotivity.org/downloads and Extract it to because I kept it in Raspberry pi3 startup.
your preffered folder Location. 2 From the Terminal 3. Run the IoTivity Client Controller from Eclipse
Navigate to the iotivity-1.2.0 directory. Simulator.
$ cd /home/preffered folder Location/iotivity-1.2.0
a. Click on Find Resources
3.Execute the scons build command from the iotivity- It will Discovers Smart Switch Board with Four Switches
1.2.0 directory $ scons as Resources.

ISSN: 2395-3802 12
J. Adv. Res. Embed. Sys. 2017; 4(1&2) Jayaram M et al.

b. Click on GET c. Click on POST


It will give Switches present Status ON / OFF Change state of the Individual Switches by changing
true / false
All OFF: state or value is false

All ON: state or value is true

13 ISSN: 2395-3802
Jayaram M et al. J. Adv. Res. Embed. Sys. 2017; 4(1&2)

Conclusion connectivity.org/resources/oneiota-data-model-
tool. Accessed 28/4 2016.
Nevertheless, this paper gives an insight into how the 3. “Iotivity programmers guide.”https://www.
IoTivity Frame work will work, how it address the IoT iotivity.org/documentation/linux/programmers-
challenges, Implementing standards and addressing the guideAccessed 29/4 2016.
Interoperability by making open specifications and 4. “Oic core specification v1.0.0.” http://open
openness of the code it helpful for those who need to connectivity.org/resources/specifications, 2015.
modify or existing implementation of their IoT based Accessed 19/4 2016.
Designs and products. 5. H. Virji, “The layered architecture of iotivity -
samsung open source groupblog.”https://blogs.s-
Currently this IoTivity Frame work supports Various osg.org/layered-architecture-iotivity/, nov 2015.
Constrained Os's like Contiki, RioT, Zephyr, Linux and Accessed 2/5 2016.
Rich Side SDK's like Linux, windows, Android, Tizen. 6. “Iotivity features.” https://www.iotivity.org/
documentation/featuresAccessed 29/4 2016.
The Available Development Boards Manufacturers or
7. “Registering a resource | iotivity.” https://www.
Vendors at least supporting the one of the above
iotivity.org/documentation/linux/programmers-
Constrained Os's or Rich SDK's.
guide/registering-resource.Accessed 29/4 2016.
For understanding this Framework I prepared an OIC 8. “Finding a resource iotivity.” https://www.iotivity.
and OCF spec based Four Modular Switch Board with org/documentation/linux/programmers-guide/find
Raspberry pi 3. ing-resource. Accessed 29/4 2016.
9. “Querying resource state [get] iotivity.” https://
May be in the near future this IoTivity Frame work www.iotivity.org/documentation/linux/pro gram
becomes New standard by which billions of wired and mers-guide/querying-resource-state-get. Accessed
wireless devices will connect to each other and to the 29/4 2016.
internet. 10. “Setting a resource state [put] iotivity.” https://
www.iotivity.org/documentation/linux/programm
References ers-guide/setting-resource-state-put. Accessed 29/4
2016.
1. “Oic - open connectivity foundation brings massive 11. “Observing resource state [observe] iotivity.”
scale to iot ecosystem.”http://openconnectivity. https://www.iotivity.org/documentation/linux/
org/news/open-connectivity-foundation-brings- programmers-guide/observing-resource-state-obse
massive-scale-to-iot-ecosystem, feb 2016. Accessed rve. Accessed 29/4 2016.
28/4 2016. 12. www.raspberry.org.
2. “Oic - oneiota data model tool.” http://open

ISSN: 2395-3802 14

You might also like