3 More Connected Devices Than People World Population

  • Slides: 50
Download presentation

3 More Connected Devices Than People World Population 6. 3 Billion 6. 8 Billion

3 More Connected Devices Than People World Population 6. 3 Billion 6. 8 Billion 7. 2 Billion 7. 6 Billion Connected Devices 500 Million 12. 5 Billion 25 Billion 50 Billion Connected Devices Person 0. 08 More connected devices than people 2003 [Source: Cisco IBSG, April 2011] 1. 84 3. 47 6. 58 2010 2015 2020

4 Internet of Things Wave Expected growth in the number of connected devices Definition

4 Internet of Things Wave Expected growth in the number of connected devices Definition of Io. T* : Intelligent interactivity between human and things to exchange information & knowledge for new value creation. *National Io. T Blueprint (Draft)

5

5

6

6

7

7

8

8

9

9

10 物聯網系統架構 Application Server 應用 層 Internet (TCP/IP suite) 網路 層 感知 層 Gateway/Data

10 物聯網系統架構 Application Server 應用 層 Internet (TCP/IP suite) 網路 層 感知 層 Gateway/Data Broker Zigbee, Bluetooth, Wi-Fi. RF , . . . Sensor nodes

12 感知層(Sensors) • 運算處理器(平台) • 處理以及發送感測資料,接收命令執行特定動作 • 微處理器/微控制器 + 與感測器相連的介面 • 處理器: 8051 -based,

12 感知層(Sensors) • 運算處理器(平台) • 處理以及發送感測資料,接收命令執行特定動作 • 微處理器/微控制器 + 與感測器相連的介面 • 處理器: 8051 -based, ARM Cortex-M based • 介面:UART, SPI, I 2 C, GPIO (digital), Analog I/O • 常見的開發板 • Arduino, Raspberry Pi, Beagle Bone, Intel Edison, Media. Tek Link. It One and Smart 7688, Realtek Ameba

15 Io. T communication patterns 1: N Telemetry Inquiries Information flows from device to

15 Io. T communication patterns 1: N Telemetry Inquiries Information flows from device to other systems for conveying status changes in the device Requests from devices looking to gather required information or asking to initiate activities 1: N Commands from other systems to a device or a group of devices to perform specific activities Notifications Information flows from other systems to a device or a group for conveying status changes in the world

16 Io. T protocols landscape . . . we could continue

16 Io. T protocols landscape . . . we could continue

17 Io. T protocols trends

17 Io. T protocols trends

18 Standardization • HTTP • IETF standard (RFC 2616 is HTTP/1. 1) • Co.

18 Standardization • HTTP • IETF standard (RFC 2616 is HTTP/1. 1) • Co. AP • IETF standard (RFC 7252) • MQTT • OASIS standard (v 3. 1. 1) • AMQP • OASIS and ISO 19464 standard (1. 0)

19 HTTP : request/response one to many with more requests

19 HTTP : request/response one to many with more requests

20 Co. AP : binary HTTP-like • HTTP-like based on UDP (no TCP) •

20 Co. AP : binary HTTP-like • HTTP-like based on UDP (no TCP) • request/response • packet order and retrasmission into sw stack • HTTP verbs, status codes, … • “options” like HTTP headers but binary • client more simple than HTTP • observer pattern available • avoid HTTP (long) polling

21 Co. AP : Qo. S and architecture • Quality of Service • «confirmable»

21 Co. AP : Qo. S and architecture • Quality of Service • «confirmable» and non «confirmable» messages • security • DTLS (Datagram TLS) • resource discovery (Co. RE link format) • Co. AP node acts as server • addressing problem (mobile roaming, NAT, …) • REST architecture • proxy Co. AP – HTTP simple (with caching)

22 MQTT : introduction • MQTT. . . • yesterday : Message Queue Telemetry

22 MQTT : introduction • MQTT. . . • yesterday : Message Queue Telemetry Transport • created by IBM & Eurotech • today : MQ Telemetry Transport. . . no queue • Features… • Lightweight • Reliable • Simple

23 MQTT : introduction • Lightweight • smallest packet size 2 bytes (header) •

23 MQTT : introduction • Lightweight • smallest packet size 2 bytes (header) • reduced clients footprint • Reliable • three Qo. S levels • at most once • at least once • exactly once • avoid packet loss on client disconnection

24 MQTT : introduction • Simple • TCP based : socket connection oriented •

24 MQTT : introduction • Simple • TCP based : socket connection oriented • Asynchronous : no wait for response • Publish/Subscribe : • decoupling producers and consumers • Payload agnostic : • no data types no metadata • any data format (text, binary, JSON, XML, BSON, Proto. Buf)

25 MQTT : publish/subscribe • Broker and connected Clients • broker receives subscriptions from

25 MQTT : publish/subscribe • Broker and connected Clients • broker receives subscriptions from clients on topics • broker receives messages and forward them • clients subscribe/publish on topics • Brokers bridge configuration

26 MQTT : topics • Topics for publish and subscribe • hierarchical • wildcards

26 MQTT : topics • Topics for publish and subscribe • hierarchical • wildcards (# and +) • ex. building 1/+/room 1, building 1/floor 1/room 1/#

27 MQTT : Quality of Service • Qo. S 0 : At most once

27 MQTT : Quality of Service • Qo. S 0 : At most once (fire and forget)

28 MQTT : Quality of Service • Qo. S 1 : At least once

28 MQTT : Quality of Service • Qo. S 1 : At least once

29 MQTT : Quality of Service • Qo. S 2 : Exactly once

29 MQTT : Quality of Service • Qo. S 2 : Exactly once

30 MQTT : security • common big problem for all Io. T protocols •

30 MQTT : security • common big problem for all Io. T protocols • MQTT is over TCP … use SSL/TLS for security • username/password on connection • encrypt payload (MQTT is payload agnostic)

34 實驗步驟(1) • 下載本課程ZIP壓縮包 • 安裝Arduino開發 具 • 解壓arduino-1. 6. 9 -windows. zip到”arduino-1. 6.

34 實驗步驟(1) • 下載本課程ZIP壓縮包 • 安裝Arduino開發 具 • 解壓arduino-1. 6. 9 -windows. zip到”arduino-1. 6. 9” 資料夾 • 將壓縮包裡libraries資料夾下的” Liquid. Crystal_v 2”複製到arduino 具裡面的 libraries資料夾中 • 啟動Arduino開發 具,安裝以下libraries: • DHT 11 Sensor Library • Thing. Speak • Sub. Pub. Client (MQTT)

35 Digital I/O Analog Input

35 Digital I/O Analog Input

36 實驗步驟(2) • 依照以下表格接線: 紅色LED串連 330歐電阻, 正極(腳較長者)接到D 3, 負極接到GND。 1602 LCD Arduino 光敏模組 Arduino

36 實驗步驟(2) • 依照以下表格接線: 紅色LED串連 330歐電阻, 正極(腳較長者)接到D 3, 負極接到GND。 1602 LCD Arduino 光敏模組 Arduino GND + 5 V VCC 5 V - GND SDA A 4 AO A 0 SCL A 5 DO 不接 DHT 11 Arduino 心率模組 Arduino + 5 V OUT D 7 - GND AO A 0 SCL A 5 DO 不接

38 實驗步驟(4) • 點選 New Channels

38 實驗步驟(4) • 點選 New Channels

39 l Channel 之設定如下,完成後按Save Channel • (共要設定 四個Fields) • 請依序建立 • Temperature(C) • Humidity(%)

39 l Channel 之設定如下,完成後按Save Channel • (共要設定 四個Fields) • 請依序建立 • Temperature(C) • Humidity(%) • Lightness • Heartbeat • 屆時會有4張折線圖