iotivity for automotive iot interoperability

20
Samsung Open Source Group 1 Samsung Open Source Group Philippe Coval Samsung Open Source Group / SRUK [email protected] For Automotive IoT Interoperability Conference Libre Software and Hardware / Workshops Université de Rennes, France <2017-02-08>

Upload: samsung-open-source-group

Post on 22-Jan-2018

14.590 views

Category:

Software


0 download

TRANSCRIPT

Page 1: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 1Samsung Open Source Group

Philippe CovalSamsung Open Source Group / SRUK

[email protected]

For Automotive IoT Interoperability

Conference Libre Software and Hardware / WorkshopsUniversité de Rennes, France <2017-02-08>

Page 2: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 2Samsung Open Source Group

Bonjour tout le monde !

● Philippe Coval – Software engineer of Samsung OSG (EU team)

– Member of IoTivity, Tizen, Yocto, Automotive (GENIVI+AGL) projects

– I am taking care about OS/hardware support, build & usages

– Ask me for help:● https://wiki.tizen.org/wiki/User:Pcoval

Page 3: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 3Samsung Open Source Group

Agenda

● What is Open connectivity ?● What is IoTivity ? ● What is OCF automotive?● A Vehicle to Infrastructure IoT demonstration● Q&A or/and extras

?

Page 4: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 4Samsung Open Source Group

“Simplicityis the ultimate sophistication.”

~Leonardo da Vinci

Page 5: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 5Samsung Open Source Group

Open Connectivity Foundation

● “Providing the software Linking the Internet of Things”● Creating a specification, based on open standards:

– Resource based, RESTful architecture (Stateless. client/server...)

– IETF, CoAP protocol (HTTP on UDP), CBOR (JSON in binary)...

● Sponsoring reference implementation: IoTivity– under Apache 2.0 license

● Rules: Part of standard only if– Specified and Implemented

Page 6: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 6Samsung Open Source Group

OCF Automotive profile's mission

● Provide OCF technology for connected cars, by proposing– A common definition of vehicle resources

– A common way to interact with those (inside or outside vehicle)

– Based on or bridging to existing standards

● Cooperative effort with existing FLOSS Automotive projects– Tizen, GENIVI, AGL, W3C, RVI ...

Page 7: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 7Samsung Open Source Group

IoTivity is a complete framework

● Hardware: CPU, MCU, Desktop, Mobile, SBC, Tizen devices● OS: Many including GNU/Linux, Tizen, Yocto, Android or baremetal...● C API: Data transmission (flash footprint ~128KiB-)

– Resource Model / Serialization (CBOR)

– Connectivity Abstraction: CoAP, Local IP Network, BT, BLE...

– Discovery (UDP, Multicast), Security (DTLS/TLS)

● C++ API: Object Oriented (C++11)● More Bindings: JavaScript (iotivity-node)● + High level services

– Data/Device Management, Hosting, Encapsulation, Cloud interface

Page 8: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 8Samsung Open Source Group

IoTivity is resources oriented

● Resource is identified by an URI – Composed of properties

● Declared by a ResourceType

– Operations: CRUD+N ● Create, Read, Update, Delete+ Notify

● Use existing known resource models– From oneIoTa.org repository

– Ie: sensors, geolocation...

● Or create new ones (new names)– Share for interoperability

● http://www.oneiota.org/revisions/1863● oic.r.sensor.illuminance.json ● /* … */ "definitions": {

  "oic.r.sensor.illuminance": {

    "properties": {

      "illuminance": {

        "type": "number",        "readOnly": true,

        "description":    "Sensed luminous flux in lux."}  }  } /* … */ 

Page 9: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 9Samsung Open Source Group

Flow: Create, Read, Update, Delete, Notify

IoTivity Server IoTivity Client(s)Local IP Network

Registration of resource

Handling new requests Set/Get/ing properties values

Initialization as server Initialization as client

Handling new clients Discovery of resource

POST/PUT GET

UDP Multicast + CoAP

Notify updated resource Observe resource change& Handling properties OBSERVE

Page 10: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 10

OCDoResource(...OC_REST_PUT …) onPut(... OCClientResponse ...)

Example: Client updates server's resource

OCInit(..., OC_SERVER);OCCreateResource( …, onOCEntity); { OCProcess(); }

onOCEntity(entityHandlerRequest) { switch entityHandlerRequest->method { case 'POST: // Create value case 'PUT' : // Update new resource // handling the change case 'GET' : // READ current value ... OCDoResponse(&response); }}

OCInit(..., OC_CLIENT); OCDoResource(...,OC_REST_DISCOVER, ...) onDiscover(... OCClientResponse ...)

IoTivity Server IoTivity Client(s)IP NetworkIP Network

● Client sets resource's value● Server is handling it

– and responding

Page 11: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 11

“Any sufficiently advanced technology is indistinguishable from magic.” ~ Arthur C. Clarke

Page 12: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 12Samsung Open Source Group

How to track defectives street lights?

● 1: Measure if outside's lighting is too dark– Using Embedded sensor in car (demo: I²C sensor)

– Turn car's front light on automatically

● 2: Get position from satellites (GPS, Galileo)– From: car, mobile or any (demo: simulated)

● 3: Send notice to Internet (Cloud)– Using mobile data

– 4: Forward information to city services (pull or push)● 5: Agent is assigned

– 6: to fix defective light● 7: he can also check “open data” base from his mobile

● ...

11

2

3

5

6

4

7

Page 13: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 13Samsung Open Source Group

From devices to cloud (AutoLinux FOSDEM)https://vimeo.com/202478132#iotivity-artik-20170204rzr

Page 14: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 14Samsung Open Source Group

/GeoLocationResURI{ latitude: 52.165, longitude: -2.21,}

A Vehicle to Infrastructure notification service

function handle(illuminance) {

  if (gThreshold > illuminance) {

    var data= { illuminance: illuminance,                latitude: gGeo.latitude, longitude: gGeo.longitude };

    sender.send(data); // { ARTIK's client.post(url...); }} }

client.on("resourcefound", function(resource) {

  if ("/IlluminanceResURI" === resource.resourcePath) {

    resource.on("update", handle);

  } else if ("/GeolocationResURI" === resource.resourcePath){

    resource.on("update",      function(resource) { gGeo = resource.properties; });} };

1

2

/IlluminanceResURI{ illuminance: 42}

https://api.artik.cloud/{ illuminance: 42, latitude: 52.165, longitude: -2.21}

3

1

Page 15: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 15Samsung Open Source Group

Summary

● Open Connectivity establishes a specification– for interconnecting things, products, services

– RESTful architecture based on existing standards (IETF, CoAP, Cbor)

● IoTivity implements it in C under Apache-2.0 license– Can run on micro controllers (baremetal)

– Most Operating systems: GNU/Linux, Tizen, Yocto (GENIVI, LFAGL etc)

– Other languages C++, JS are supported

● Automotive is one of OCF domains under development– Project is open to be extended with new technologies or services

Page 16: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 16

Q&A or/and Extras ?

Page 17: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 17Samsung Open Source Group

IoTivity on LF AGL + Minnow max (OSHW)https://vimeo.com/156307187#iotivity-agl-demo-platform-20160222rzr

Page 18: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 18Samsung Open Source Group

Use GeoLocation resource in Tizen appshttps://vimeo.com/164000646#tizen-genivi-20160424rzr

Page 19: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 19Samsung Open Source Group

References

● Entry points:– http://wiki.iotivity.org/automotive

– https://openconnectivity.org/industries/automotive

● Going further:– https://openconnectivity.org/resources/iotivity

– https://openconnectivity.org/resources/oneiota-data-model-tool

– https://news.samsung.com/global/samsung-contributes-to-open-iot-showcase-at-ces-2017

● Keep in touch online:– https://wiki.iotivity.org/community

– https://wiki.tizen.org/wiki/Meeting

– https://blogs.s-osg.org/author/pcoval/

Page 20: IoTivity for Automotive IoT Interoperability

Samsung Open Source Group 20Samsung Open Source Group

Merci / TrugarezThanks / 고맙습니다

Samsung OSG, SRUK, SEF, SSI,Open Connectivity Foundation and members, LinuxFoundation,

FLOSS Communities: Tizen, Yocto, EFL, LF AGL, GENIVI, eLinux,Local: LabFabFr, CampOSV, UR1 IETR Rennes, IMT Atlantique, IoTBzh.

Resources: xkcd.com, FlatIcons (CC BY 3.0: Freepik,Scott de Jonge, Gregor Cresnar)

Tools: Libreoffice, openshot,

+ YOU !

Contact:https://wiki.tizen.org/wiki/User:Pcoval