O Ivity Ntroduction: Martin Hsu Intel Open Source Technology Center
O Ivity Ntroduction: Martin Hsu Intel Open Source Technology Center
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
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
Device Low-Power Data
Lite Device
Standardized Profiles
Management Management Management Sensing/Control
Application
Interoperability
Resource Encapsulation
Resource Innovation Opportunities
Container Base Layer
Necessary connectivity
Base Layer Messaging Security
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
Device Low-Power Data
Lite Device
Standardized Profiles
Management Management Management Sensing/Control
Application
Interoperability
Resource Encapsulation
Resource Innovation Opportunities
Container Base Layer
Necessary connectivity
Base Layer Messaging Security
6
Discovery Subsystem
Client
COAP
C C
Server
COAP
HTTP Gateway
C
C C
COAP
Server
Discovery within
Constrained local network
Environment
Internet
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
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
Device Low-Power Data
Lite Device
Standardized Profiles
Management Management Management Sensing/Control
Application
Interoperability
Resource Encapsulation
Resource Innovation Opportunities
Container Base Layer
Necessary connectivity
Base Layer Messaging Security
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
Uses the Iotivity Base APIs Simulator
Service
Primitive
Resource
Services Scene
Applications Directory Manager
Resource
Resource
Primitive Services Container
Server
Builder
Resource
Broker
IoTivity Base
13
Scene Manager
15 C
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
Problem Solution
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
Resource Resource Builder
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
with resources of 1, 2 and 4.
not respond to multicast
discovery queries
Device 2
Device 3
Publishes resources to
• Discovery of RD server
Resource Directory
• Publish Resource to RD
Multicast
query request
• Update / Delete Resource
Device 4
20
Cloud-Native Architecture for IoT
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)
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
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
Extensible
Profiles, Data &
Resource Models ?
? ?
Thread
Z-Wave
ZigBee
Comms Protocols
IP IP IP IP = 6LoWPAN
802.15.4
802.15.4
Wi-Fi
Transports
BLE
26
Security Building Blocks
Provisioning Manager
CK Ownership
manager transfer
Provisioning
Credential Database
Just Works Random PIN
Generator
Resources
27