Architecture and Features
Total Page:16
File Type:pdf, Size:1020Kb
IOTIVITY INTRODUCTION Martin Hsu Intel Open Source Technology Center 1 Content may contain references, logos, trade or service marks that are the property of their respective owners. Agenda • Overview • Architecture • Base Layer & APIs • Primitive Services & APIs 2 IoTivity Overview OCF Topologies Supported •An open source software framework implementing OCF Standards •Ensures seamless device-to-device and OCF Client OCF Server device-to-cloud connectivity to address P2P Direct emerging needs of IoT OCF Client OCF Client •Licensed under Apache License Version XMPP/ Cloud 2.0 STUN/ TURN/ICE CoAP over TCP •Available on TIZEN, Android, Arduino, OCF Intermediary Gateway Linux(Ubuntu) Platforms Gateway OCF Servers OCF IoTivity OCF Servers Cloud based (Standards) (Open Source) Remote Access intelligent Services 3 IoTivity – High Level Architecture Rich Device Key Goals Consumer Enterprise Industrial Automotive Health …. APIs Common Solution (C/C++/Java/JS) Established Protocols Service Layer Security & Identity Lite Device Device Low-Power Data Standardized Profiles Management Management Management Sensing/Control Application Interoperability Resource Resource Encapsulation Innovation Opportunities Container Base Layer Necessary connectivity Base Layer Messaging Security Discovery Messaging Security Discovery IoTivity Profiles IoTivity Framework IoTivity Connectivities* 4 IoTivity Base Layer & APIs 5 IoTivity – High Level Architecture Rich Device Key Goals Consumer Enterprise Industrial Automotive Health …. APIs Common Solution (C/C++/Java/JS) Established Protocols Service Layer Security & Identity Lite Device Device Low-Power Data Standardized Profiles Management Management Management Sensing/Control Application Interoperability Resource Resource Encapsulation Innovation Opportunities Container Base Layer Necessary connectivity Base Layer Messaging Security Discovery Messaging Security Discovery IoTivity Profiles IoTivity Framework IoTivity Connectivities* 6 Discovery Subsystem Client COAP C C Server COAP HTTP Gateway C C COAP C Server Discovery within Constrained local network Environment Internet Connectivity Discovery Description CoAP Mechanism WiFi & IP Multicast CoAP Multicast Port: 5683 • Open IETF Standard (RFC 7252) Ethernet (Assigned by IANA) • Compact 4 Byte Header (over IP) CoAP Secure Port: 5684 • UDP (Default), SMS, TCP IP Unicast Precondition: Support over UDP OIC Server Address & Port are • Strong DTLS Security known • Asynchronous Subscription • Built-In Discovery Bluetooth Using Scan & OCF Specific Service UUID (EDR & Advertise BLE) CoAP: Constrained Application Protocol IANA: Internet Assigned Numbers Authority 7 Security Features & Architecture Note platform hardening not part of the OCF Specs & IoTivity implementation. 8 Messaging - Connectivity Abstraction Resource Model CA Control Component - Target network selection, interface control & monitoring CA API - CoAP message serialization & parsing CA Control Network CoAP Blockwise Interface - Block-wise messaging flow control Config. Protocol Transfer Controller Transport Adapter Component Transport Adapter - Data transmission over UDP, TCP, BLE(GATT), BT(SPP) & NFC IP BLE BT TCP NFC Adapter Adapter Adapter Adapter Adapter - Secure data exchanging using DTLS Platform Adapter Platform Adapter Component Ubuntu Android Tizen Arduino Interface Interface Interface Interface - Ubuntu, Wi-Fi, Ethernet and BLE - Android Wi-Fi, BLE and BT Ubuntu Android Tizen Arduino - Tizen Wi-Fi, BLE and BT - Arduino Wi-Fi, Ethernet and BLE Legend CA Component CA Module External Ubuntu Android Tizen Arduino 9 Messaging - Remote Access over XMPP STUN/ TURN GW/Proxy RA Server S1 S2 S3 (LW) (LW) (cRA) C1 Local subnet (RA) Feature - Remote client discover & securely interface with resource servers when not on same subnet - Adheres to access control policies - End-to-End Secure Device Type Use Case Light weight (LW) Device Accessible within subnet. No RA, require GW/proxy device for access Constrained RA (cRA) RA access for non latency-sensitive, low BW applications Endpoint RA Endpoint (RA) Full RA access 10 IoTivity Primitive Services & APIs 11 IoTivity – High Level Architecture Rich Device Key Goals Consumer Enterprise Industrial Automotive Health …. APIs Common Solution (C/C++/Java/JS) Established Protocols Service Layer Security & Identity Lite Device Device Low-Power Data Standardized Profiles Management Management Management Sensing/Control Application Interoperability Resource Resource Encapsulation Innovation Opportunities Container Base Layer Necessary connectivity Base Layer Messaging Security Discovery Messaging Security Discovery IoTivity Profiles IoTivity Framework IoTivity Connectivities* 12 Purpose of Primitive Services Provides easier and simpler APIs for App developers (Heavy Lifting done by Framework) Soft Sensor Manager Multi-Phy Protocol Easy Setup Bridge Mostly designed to run on Smart or Controller devices Notification Simulator Uses the Iotivity Base APIs Service Primitive Resource Services Scene Applications Directory Manager Resource Resource Server Primitive Services Container Resource Builder Broker IoTivity Base 13 Scene Manager Helps Users to create a Scenario or Scene for controlling Multiple IoT devices & their “ “Away Home” Scene functionality LED Bulb 15 C e.g. Thermostat Door Lock • Away Home – All Lights turned off, Doors locked • Watching Movie – Living Room lights off, TV On, Speaker On 14 Simulator Service Simulating different OCF resources Feature OCF resources • Server Thermostat Simulates - OCF resources can be simulated, Using Fan resource model definition (RAML) files. Light - Manages creation, deletion, request Service Provider handling and notifications for OCF resources. Sending different requests to verify features supported by OCF resources • Client Remote OCF resources - Searching for different types of resources Modify Temp erature available in the network. Speed Increase - Sending different types of requests both Power Off manual and automatically and displays the Client Controller response payload received. 15 MultiPhy Easy Setup Low Power Management – Resource Hosting Solution Problem Offloads request/data handling from remote clients Reduces the power consumption of resource constraint device How many subscriptions thin device could Thin Device enhances its lifetime delegating its support with its constrained system resource? resource subscriber to richer hosting device Hosting(Rich) device Thin(Light) device Subscription User/Consumer Thin(Light) device Subscription User/Consumer 17 Supporting Material 18 Resource Encapsulation Resource Module Description Container Resource Broker • Remote Resource Presence check (regardless of Remote Server supporting Resource Encapsulation presence feature) Resource • Provide consistent reachability management for discovered resource of Client Wrapper Server interest Builder Resource Resource Resource Cache Maintains last information of Remote Resource (regardless of Remote Server is Broker Cache • observable) • Data Centric API (Send/Recv Message Getter/Setter, Data Cache) IoTivity Base Server Builder • Att. setter to provide easy way to create resource • Changes “msg Handling” to “Data Setting” for users • Monitors value of attributes so that notify-back for observation whenever attribute has changed 19 Low Power Management – Resource Directory -Constrained device that Device 2 hosts RD and needs to sleep and can responds on behalf of device 1 & 4. Device 1 Unicast response by device 2 not respond to multicast with resources of 1, 2 and 4. discovery queries Device 2 Device 3 • Discovery of RD server Publishes resources to Resource Directory • Publish Resource to RD Multicast query request • Update / Delete Resource Device 4 20 Cloud-Native Architecture for IoT • Devices can reach the cloud directly. • Devices can self-organize if the cloud is not accessible. • Architecture and protocols don’t have to be replaced when device deployment changes from local-only to cloud- connected. • Encourages end-to-end micro-services. Onboarding & Provisioning Call Flow 22 Protocol Bridge using Resource Container • Integrates non-OCF resources (Bundle) • Handles dynamic loading of resource Maps OCF to bundles & dynamic creation of resources 2. Loads resource Hue light bundles hueLight.cpp • Supports C++ .so files & Java .jar files OCF hueToOCF.so light • Common configuration for bundles and interface configured resources OCF light interface OCF bridge (with resource container) OCF 1. Loads Designed to work devices with non light configuration interface OCF devices containerConfig.xml (resource instance Enables control of legacy devices specific configuration) which are already in market with existing APIs using a OIC complaint device 23 Interoperability … • Full interoperability from the connectivity layer up to the service layer is the only way to truly guarantee a satisfactory UX • Interoperability at the Connectivity and/or Platform layer only provides partial interoperability which can ultimately lead to fragmentation ① Connectivity Level ② Platform Level ③ Service Level Interoperability Interoperability Interoperability Vertical Vertical Vertical Vertical Vertical Vertical Services Services Services Services Services Services Platform Platform Platform Platform Platform Platform Connectivity Connectivity Connectivity Connectivity Connectivity Connectivity OIC Scope 24 Client Entity Handler CoAP CoAP DTLS DTLS UDP UDP IP IP Transport Specific 25 Consumer Radio-Based Standards Applications & Services Data & Control Points Profiles, Data & Resource Models ? ? Extensible ? Comms Protocols Wave - Thread ZigBee Z IP IP IP IP = 6LoWPAN Fi - Transports BLE Wi Bluetooth®Low Energy 802.15.4 802.15.4 26 Security Building Blocks Provisioning Manager CK Ownership manager transfer Provisioning Database Credential Just Works Random PIN Generator Policy Resource Secure Resource Manager Engine Manager Resources ACL DOXM PSTAT SVC Persistent Storage AMACL CRED CRL 27 .