seamless device connectivity with iotivity and zephyr · seamless device connectivity with iotivity...

39
Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By Rajesh Sola, Education Specialist

Upload: duonghuong

Post on 01-Apr-2018

229 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

Seamless Device Connectivity with

IoTivity and Zephyr

2/8/2018

By

Rajesh Sola,

Education Specialist

Page 2: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Copy Right Guidelines

© 2018 KPIT Technologies Limited, Pune, India. All Rights Reserved.

KPIT Technologies Limited believes the information in this document is accurate as of its publication

date; such information is subject to change without notice. KPIT Technologies Limited acknowledges

the proprietary rights of other companies to the trademarks, product names and such other

intellectual property rights mentioned in this document. Except as expressly permitted, neither this

documentation nor any part of it may be reproduced, stored in a retrieval system, or transmitted in

any form or by any means, electronic, mechanical, printing, photocopying, recording or otherwise,

without the prior permission of KPIT Technologies Limited and/ or any named intellectual property

rights holders under this document.

2/8/20182

Page 3: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

Automotive &

Transportation

Energy &

Resources

Consumer &

Industrial

Goods

High Tech Life Sciences Utilities

KPIT provides IT consulting and product

engineering to deliver transformational services and

products that improve the world we live in

Page 4: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/20184

Global Footprint

Page 5: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/20186

Headquartered in Pune (India)

Incorporated in 1990

Publicly traded company in India

Development Centers located in India, US,

Germany, China, and Brazil

31 offices across 16 countries

60 Patents filed

FY2017 revenues $494 Million

12,000+ Employees Globally

Corporate Quick Facts

Page 6: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Outline

• IoTivity Architecture & API support

• Running Examples & Working with Simulator

• OCF Standard Specifications

• Introduction to Zephyr OS, Network Stack

• IoTivity-constrained on Zephyr

• OCF Automotive Project

• IoTivity ports in Automotive Distributions(GENIVI, AGL)

2/8/20188

Page 7: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/20189

Page 8: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Hands-on Bundle - Checklist

IoTivity source code & built example (v1.2.1)

Eclipse with IoTivity Simulator

Zephyr source code (v1.9.2), Zephyr SDK (0.9.x)

IoTivity-Constrained source (code github.com/iotivity/iotivity-constrained)

OCF/OIC Specifications

wiki.iotivity.org

RAML Files - oneiota.org

2/8/201810

Page 9: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/201811

IoTivity

Discussion

Page 10: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

IoTivity

• Seamless Device to Device Connectivity

• Reference Implementation for OIC/OCF standards

• Cross platform support

• Essential Building Blocks

– Discovery

– Data Transmission

– Data Management

– Device Management

• Built on top of existing standards

– CoAP

– CBOR

– DTLS

2/8/201812

Page 11: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Platform Support

• OS Environments

– Generic Linux (Debian/Ubuntu)

– Yocto **

– Tizen

– OpenWrt

– Windows, Mac OS

– Android, iOS

• IoTivity-constrained

2/8/201813

• Desktop

• Reference Targets/SBCs

(Typically Yocto based)

– Minnowboard

– Intel Edison

– RaspberryPi series

– Samsung ARTIK series

– Odroid series

– Draganboard 410C

– Imx6 series

• MCU Based

– Arduino (Due) https://wiki.iotivity.org/hardware

https://wiki.iotivity.org/os

Page 12: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

APIs & Protocol Stack

2/8/201814

C APIsC++

APIs

Java

APIsNode.js

github.com/otcshare/iotivity-node

Page 13: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Building IoTivity & Examples

• Source code availability : www.iotivity.org/downloads

• Install necessary dependencies

• Clone external libraries – tinycbor, mbedtls

• Build using scons

• For detailed instructions : wiki.iotivity.org/build

• Locate built examples w.r.t out/${TARGET_OS}/${TARGET_ARCH}/${BUILD_MODE}

– resource/examples/*

– service/*

– resource/csdk/stack/samples/linux/*

2/8/201816

Demo/Hands-on

Page 14: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Working with Simulator

2/8/201817

https://wiki.iotivity.org/iotivity_simulator

Demo/Hands-on

Page 15: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/201818

OCF Standard Specifications

Discussion

Page 16: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Open Connectivity Foundation(OCF)

• Formerly Open Interconnect Consortium(OIC)

• Fill the gaps in IOT standards

• Secure Interoperability

• Elements

– Standard Specifications - OCF

– Reference Implementations - IoTivity, AllJoyn

– Data Models - OneIoTa

– Device Certification

• Market Segments/Verticals

– Smart Home

– Automotive

– Health Care

– Smart Industry

2/8/201819

StandardsReference

Implementation

Vertical Profiles & Data Models

Certification

Page 17: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

OCF Architecture & Elements

• Client

• Server

• Resource

• CRUDN

• Messaging

• Transport

2/8/201821

Major Aspects:-

• Resource Model

• RESTful Operations

• Abstractions

Page 18: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Functional Block Diagram & Communication layers

2/8/201822

Framework:-

• Identification & Addressing

• Discovery

• Resource Model

• CRUDN

• Messaging

• Device Management

• Security

OCF Roles

OCF- non OCF Bridging

Page 19: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Resource Models

• Resources are

– Hosted by server

– Accessed by client

• Resource Encapsulation

• Resource Container

• Bridging scenarios

– OCF to OCF

– OCF to Non OCF

2/8/201823

rt Resource Type

if Resource Interfaces

n Name

id Resource IdentityCommon Properties

of Resources

Page 20: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Request-Response Flow

2/8/201824

Request: /GET

Response : State

Response : Ok

Request : /POST On

Client Server

Page 21: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Interfaces

2/8/201825

Baseline oic.if.baseline

linkslist oic.if.ll

Batch oic.if.b

read-only oic.if.r

read-write oic.if.rw

actuator oic.if.a

sensor oic.if.s

Page 22: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Identification and Addressing

• Network Address

• URIs

– Fully Qualified

– Relative

• Namespace in URI

• Resource Identification

– Resource Type

– Interface

– Properties

• Common Resources

2/8/201826

{

"rt": "oic.r.foobar",

"if": "oic.if.a",

"value": "foo value"

}

Resource

Type

URI

Device oic.wk.d /oic/d

Platform oic.wk.p /oic/p

Discovery oc.wk.res /oic/res

Presence oc.wk.ad /oic/res

Page 23: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Resource Discovery & Introspection

• CoAP based endpoint discovery

• Advertising & Discovery

• Discover all devices

GET /oic/res

• Resource specific discovery

GET /oic/res?rt=oic.r.switch.binary

• Provisioning

– onboarding

– configuration

• Resource Directory

• Payload formats

2/8/201827

Page 24: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

CRUDN Operations

• RESTful API model

• CRUDN operations

• CoAP Transport Layer

• CRUDN-REST mapping

• CBOR Data Format

• Future Transports

2/8/201828

C - CREATE

R - RETRIEVE

U - UPDATE

D - DELETE

N – NOTIFY *

Page 25: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Data Models – oneIoTa.org

2/8/201829

Page 26: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Device Profiles

• Automotive

• Smart Home

• Smart Industry

• Healthcare

2/8/201830

Page 27: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Network and Connectivity

• L2 Connectivity

• Networking

• Transport

• Framework

• Application Profiles

2/8/201831

Page 28: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/201832

Zephyr

Discussion

Page 29: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Introduction to Zephyr

• Small Scalable Open Source RTOS

• Single Address Space

• Linux Like

– Driver Model

– Configuration Model (KConfig)

– Device Tree Bindings

• Wide spread of targets

• Reuse of existing stacks & satndards

• IOT Friendly

– Rich Drivers & APIs

– Network Stack

– Support for BLE and PAN

– Protocol Support

2/8/201833

Little Brother

Of Linux!!

Page 30: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Network Sub System

2/8/201834

• L2 Stack and Drivers

• IPv6 support

• 6LowPAN over BLE, IEEE 802.15.4 and RPL

• BSD Compatible Socket APIs – TCP, UDP

• Application layer Protocols

– MQTT, HTTP, CoAP, LWM2M

• Added security – TLS, DTLS

• Working with Qemu without target board

• github.com/zephyrproject-rtos/net-tools

Page 31: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Zephyr System Architecture

2/8/201835

Page 32: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

Running Zephyr Examples

2/8/201836

ARM Cortex-M3

• Setting up SDK

• Hello World Program

• Semi hosting output

x86 Arch

Demo/Hands-on

Page 33: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/201837

IoTivity-Constrained

Discussion

Page 34: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

IoTivity-constrained

2/8/201838

Ref:- https://wiki.iotivity.org/constrained

https://github.com/iotivity/iotivity-constrained

Available

Ports

Page 35: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

OCF in Zephyr

2/8/201839

Demo/Hands-on

Page 36: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited2/8/201840

OCF in Automotives

Page 37: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

OCF’s Automotive Project

• Interoperable standard for connected

vehicles

• Basis for

– V2X solutions

– Smart Phone Interaction, eg:- RVI

• Initial data models for IVI and HVAC

(OneIota.org)

2/8/201841

openconnectivity.org/business/markets/automotive

Page 38: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

© KPIT Technologies Limited

IoTivity in Automotive Distributions

• meta-oic layer in Yocto based distributions - GENIVI & AGL

• Currently IoTivity 1.2.1 (OIC 1.1) is implemented in meta-oic layer

2/8/201842

wiki.iotivity.org/automotive wiki.iotivity.org/yocto

Page 39: Seamless Device Connectivity with IoTivity and Zephyr · Seamless Device Connectivity with IoTivity and Zephyr 2/8/2018 By ... – Intel Edison ... C++ APIs Java APIs

Technologies for a better world

Thank you