29
IoTivity 오픈소스 기술 이원석 박사 / ETRI 표준연구센터 [email protected]

IoTivity 오픈소스 기술

Embed Size (px)

Citation preview

Page 1: IoTivity 오픈소스 기술

IoTivity 오픈소스 기술

이원석 박사 / ETRI 표준연구센터

[email protected]

Page 2: IoTivity 오픈소스 기술

사물인터넷 간단한 유즈케이스

<Source: http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/ >

Page 3: IoTivity 오픈소스 기술

사물인터넷 제품 개발을 위해 무엇이 필요한가?

• 뛰어난 사물인터넷 기기간 상호운영성 ?

• 빠른 사물인터넷 제품 개발 ?

• 최신의 사물인터넷 기술 활용 ?

• 다양한 하드웨어 / 소프트웨어 플랫폼 지원 ?

Page 4: IoTivity 오픈소스 기술

IoTivity 소개 (1/2)

• 목적: 미래 IoT 세상에 출현할 수십억 개의 디바이스를 다양

한 운영체제와 네트워크 프로토콜에 상관없이 자연스럽게

연결할 수 있는 오픈소스 소프트웨어 프레임워크 개발

• OIC 표준 기반의 사물인터넷 미들웨어 오픈소스 기술

– 사물인터넷 개발자를 위한 상위 레벨 API 제공

– 리눅스 재단 운영

– 아파치 2.0 라이센스

Page 5: IoTivity 오픈소스 기술

IoTivity 소개 (2/2)

• Resource 기반 RESTful 아키텍처 모델

– CoAP 기반 非데몬 설계로 저사양, 저전력 기기 지원 용이

– 현실의 ‘Thing’을 Resource로 표현하며, CRUD & N 오퍼레

이션으로 동작

• 지원 소프트웨어 플랫폼: Ubuntu, Tizen, Android, iOS(?)

• 지원 하드웨어 플랫폼 (지속 확장): Arduino, Edison

Page 6: IoTivity 오픈소스 기술

IoTivity 아키텍처 (1/2)

Profiles

Framework

Transport

1) 근접/원격 장치 및 자원을 발견 2) 메시지과 스트리밍 모델 기반 정보 교환 및 제어

3) 장치의 구성, 권한설정, 및 진단 4) 데이터 수집, 저장, 및 분석

Page 7: IoTivity 오픈소스 기술

IoTivity 아키텍처 (2/2)

AdditionalService

REST Framework

BasicService

Resource

IoTiv

ity F

ram

ew

ork

Protocol Plugin Manager

Software Sensor Manager

Things Manager

Notification Manager

Control/ControlleeManager(CM Ver.)

IoTivity Base 2 (C++ SDK)(UD Ver.)

IoTivity Base 1 (C API Stack/Internal)

Resource Manager (Registration, Discovery, Attribute GET/SET/OBSERVE)

ConnectivityOCSocket (Socket Abstraction)

JSON Encoder/Decoder

OCCoAP (Transport)

OCStack

libcoap-4.1.1 ocrandom ocmalloc

Logger

Transport. Protocol

UDP/IP TCP/IP (Future) Future PAN (Future)

<Source: ETRI 이혜선 박사>

Page 8: IoTivity 오픈소스 기술

IoTivity 소스 디렉토리

Page 9: IoTivity 오픈소스 기술

IoTivity 아키텍처

AdditionalService

REST Framework

BasicService

Resource

IoTiv

ity F

ram

ew

ork

Protocol Plugin Manager

Software Sensor Manager

Things Manager

Notification Manager

Control/ControlleeManager(CM Ver.)

IoTivity Base 2 (C++ SDK)(UD Ver.)

IoTivity Base 1 (C API Stack/Internal)

Resource Manager (Registration, Discovery, Attribute GET/SET/OBSERVE)

ConnectivityOCSocket (Socket Abstraction)

JSON Encoder/Decoder

OCCoAP (Transport)

OCStack

libcoap-4.1.1 ocrandom ocmalloc

Logger

Transport. Protocol

UDP/IP TCP/IP (Future) Future PAN (Future)

<Source: ETRI 이혜선 박사>

Page 10: IoTivity 오픈소스 기술

IoTivity Resource API 스택

<Android*, iOS*, or Microsoft* Windows* 등 > <IoTivity Service 미지원>

고사양기기를위한 Resource API Stack 저사양기기를위한Resource API Stack

Page 11: IoTivity 오픈소스 기술

IoTivity Resource 소스 디렉토리

Page 12: IoTivity 오픈소스 기술

저사양 레퍼런스 보드 – Arduino Mega 2560

<Source: http://www.arduino.cc/en/Main/ArduinoBoardMega2560 >

Page 13: IoTivity 오픈소스 기술

IoTivity Protocol

• OIC Protocol

– CoAP(Constrained Application Protocol) 지원

– Wi-Fi, BT, BLE 지원

– 연내 ZigBee, Z-Wave 지원예정

– 추가로 Thread 지원 고려 중 (Thread는 ZigBee 프로파일 경쟁 기술)

• CoAP(Constrained Application Protocol)

– UDP 기반

– Multicast 지원 (IoTivity에서 Discovery 용도로만 사용)

– IETF(Internet Engineering Task Force) CoRE Working Group에서 표준(RFC7252) 정의

Page 14: IoTivity 오픈소스 기술

IoTivity Resource 스택 지원 기능

• Resource registration (server)

• Resource discovery (client)

• Device discovery with filtering (client) – e.g. GET /oc/core?rt=light

• Property attributes (get/ set/ observe) (client / server)

• Resource tree (resources with sub-resources)

Page 15: IoTivity 오픈소스 기술

ModeType: Server / Client /Both

simpleserver

simpleclient

Resource creation

Resource finding

<Source: ETRI 이혜선 박사>

Page 16: IoTivity 오픈소스 기술

Registering a Resource

(주의) URL 당 반드시 하나의 Resource 등록

(1) platform.registerResource(“/light/1”,rt, if, …)

Page 17: IoTivity 오픈소스 기술

Finding a Resource (1/2)

(1) Platform.findResource(“/oc/core”,…)

(3) 멀티캐스트 (GET /oc/core)

(4) 질의에 매칭되는 디바이스만 응답

Page 18: IoTivity 오픈소스 기술

Finding a Resource (2/2)

Page 19: IoTivity 오픈소스 기술

Querying Resource State [GET]

Page 20: IoTivity 오픈소스 기술

Setting a Resource State [SET]

Page 21: IoTivity 오픈소스 기술

Observing resource state [Observe]

Page 22: IoTivity 오픈소스 기술

IoTivity 아키텍처

AdditionalService

REST Framework

BasicService

Resource

IoTiv

ity F

ram

ew

ork

Protocol Plugin Manager

Software Sensor Manager

Things Manager

Notification Manager

Control/ControlleeManager(CM Ver.)

IoTivity Base 2 (C++ SDK)(UD Ver.)

IoTivity Base 1 (C API Stack/Internal)

Resource Manager (Registration, Discovery, Attribute GET/SET/OBSERVE)

ConnectivityOCSocket (Socket Abstraction)

JSON Encoder/Decoder

OCCoAP (Transport)

OCStack

libcoap-4.1.1 ocrandom ocmalloc

Logger

Transport. Protocol

UDP/IP TCP/IP (Future) Future PAN (Future)

<Source: ETRI 이혜선 박사>

Page 23: IoTivity 오픈소스 기술

IoTivity Service 소스 디렉토리

Page 24: IoTivity 오픈소스 기술

Protocol Plugin Manager

• Plugin 기반 프로토콜 확장 기능 제공하며 런타임에 필요한 프로토콜에대한 .so 로딩

• Plugin은 특정한 Protocol(e.g. MQTT or AllSeen) 지원 형태나 특정한Protocol을 쓰는 특정한 기기(e.g. AllSeen FAN or Philip Hue) 지원 형태 모두 가능 (Plug-in 개발자의 선택)

<Source: SOSCON 2014 삼성전자 정진국 수석 발표자료>

Page 25: IoTivity 오픈소스 기술

Soft Sensor Manager

• 물리적/논리적 센서 정보 등을 조합하여 새로운 가상의 센서 정보를 정의할 수 있는 소프트웨어 서비스

Page 26: IoTivity 오픈소스 기술

Things Manager

• Thing의 그룹을 효과적으로 관리할 수 있는 기능 및 API 제공

– 그룹 생성, 조회, 수정, 삭제

– 그룹 상태나 디바이스 변경에 대한 Presence

– Action Set 생성, 조회, 수정, 삭제

<Source: SOSCON 2014 삼성전자 정진국 수석 발표자료>

Page 27: IoTivity 오픈소스 기술

결 론

• 뛰어난 사물인터넷 기기간 상호운영성!

• 빠른 사물인터넷 제품 개발!

• 최신의 사물인터넷 기술 활용!

• 다양한 하드웨어 / 소프트웨어 플랫폼 지원!

메일링 리스트: [email protected]

Page 28: IoTivity 오픈소스 기술

IoTivity 오픈소스 개발에 참여하기

• Discuss on mailing list to get general consensus about approach

• Pull latest code

• Build on Your Supported Build Platform

• Develop feature or fix bug following IoTivity Coding Standards; ask

questions on mailing list as needed

• Submit to Gerrit for review

• Review and respond to reviewer comments

• Change accepted!

참고: https://wiki.iotivity.org/development_workflow

Page 29: IoTivity 오픈소스 기술