• Keine Ergebnisse gefunden

Bachelor PO - RIOT im Internet of Things

N/A
N/A
Protected

Academic year: 2022

Aktie "Bachelor PO - RIOT im Internet of Things"

Copied!
9
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Bachelor PO - RIOT im Internet of Things

Sebastian Meiling

iNET RG, HAW Hamburg

sebastian.meiling@haw-hamburg.de

(2)

Patterns

• Unicast 1:1

• Broadcast 1:*

• Multicast 1:n

send to broadcast address

send to multicast address client-server like

(3)

Signaling

Polling

(periodic) request data from sensor node

1 request [+ 1 ACK] + 1 response/data [+ 1 ACK]

Timer

periodically send sensor data to server/gateway

1 data message [+ 1 ACK]

Event

send sensor data triggered by event, e.g., threshold

1 data message [+ 1 ACK]

(4)

IoT Networking

typical characteristics:

wireless communication using low power, lossy radios

nodes may sleep, thus don't (want to) receive at all times

(likely) multiple hops between sender and receiver

multi hop communication requires routing protocol

RIOT uses RPL

designed for 1:n and m:1 communication,

1:1 unicast also possible, but less efficient

ok!

how?

root

(5)

RESTful API

uses standardized HTTP methods:

GET retrieve data item, 1 GET-Request + 1 Response [+ 2 ACKs]

PUT update data item, 1 PUT-Message + 1 Response [+ 2 ACKs]

POST create data item, 1 POST+ 1 Response (new ID) [+ 2 ACKs]

resources are encoded and accessed via URLs:

example usages:

GET /temperature or GET /temperature/node01/

PUT /temperatures/node01/2015-10-16_08-55-10

POST /temperatures/node01/

https://en.wikipedia.org/wiki/Wireless_sensor_network schema <- host = IP -> <---- PATH ---->

send [GET /wiki/Wireless_sensor_network] to en.wikipedia.org

(6)

CoAP

• Constrained Application Protocol, RFC 7252

• lightweight HTTP equivalent for the IoT

• wide variety of payload types (like MIME)

• uses UDP transport, unlike HTTP+TCP

• optional ACK-like mechanism and retries

• libraries for C/C++, Java, Python, etc...

• CoAP for Firefox Browser, Add-On Copper

• see: http://coap.technology

(7)

CoAP in RIOT

native CoAP support by gcoap

or third party libraries:

libcoap: (nearly) feature complete, standard conform

microcoap: small, simple, but server side only

we recommend gcoap:

lightweight and simple, based on nanocoap

supports client and server side already

caveat: under development, e.g. observe (PR #6469)

See example: https://github.com/RIOT-OS/RIOT/tree/master/

examples/gcoap

(8)

CoAP Demo

• showing RIOT as CoAP server

• Raspberry Pi as gateway/router

• Firefox Copper as CoAP client

• Demo source code on line:

https://github.com/RIOT-Makers/climote/tree/master/monica

(9)

www.riot-os.org

Referenzen

ÄHNLICHE DOKUMENTE

○ Mandatory: proper presentation, slides, documented source code checked-in.

• wireless communication using low power, lossy radios. • nodes may sleep, thus don't (want to) receive at

● Create CoAP resources for temperature, humidity and air pressure. • /sens/temp

A system in which objects in the physical world can be connected to the Internet by sensors and actuators (coined 1999 by Kevin Ashton)1.

Internatonal Conference on Embedded Wireless Systems and Networks 2016... Car sharing

International Conference on Embedded Wireless Systems and Networks 2016... Home

A system in which objects in the physical world can be connected to the Internet by sensors and actuators (coined 1999 by Kevin Ashton)1.

RIOT-Device, sobald der rote Laser des Arms auf den RGB-Sensor gerichtet ist und dadurch ein stark erhöhter Rotwert registriert wird.. Ausgelöst durch den Interrupt wird