(mbl313) new! aws iot: understanding hardware kits, sdks, & protocols

Post on 08-Jan-2017

3.777 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Markku Lepisto

John Rotach

October 8, 2015

AWS IoT Deep DiveUnderstanding Hardware Platforms,

Devices SDKs and Protocols

MBL313

AWS IoT

Any device can connect securelyAnyone can connect a device Getting started is easy

“Securely connect one or one-billion devices to AWS,

so they can interact with applications and other devices”

Security – IoT Requirements

Strong Authentication

Fine Grained Authorization

Secure Communication

Security – IoT Requirements

Strong Authentication

Secure Communication

Security – IoT Requirements

Strong Authentication

Secure Communication

Security – IoT Requirements

Strong Authentication

Secure Communication

Protect your Keys

Security – IoT Requirements

Strong Authentication

Secure Communication

Security – Secure Device

SDKs make it easy to be secure

TLS Mutual Authentication

We package a TLS software library with embedded C

Protocols / Interaction

Device Shadow

Protocols – MQTT

MQTTS vs HTTPS:

• 93x faster throughput

• 11.89x less battery to send

• 170.9x less battery to receive

• 50% less power to keep connected

• 8x less network overhead

Source:

http://stephendnicholas.com/archives/1217

• OASIS standard protocol (v3.1.1)

• Lightweight, pub-sub, transport protocol

that is useful for connected devices

• MQTT is used on oil rigs, connected

trucks, and many more sensitive and

resource-sensitive scenarios.

• Customers have needed to build,

maintain and scale a broker to use

MQTT with cloud applications

Protocols – MQTT – Use Cases

mydevices/#

mydevices/1

mydevices/2

mydevices/3

Protocols – MQTT – Use Cases

mydevices/4

mydevices/4

Protocols – MQTT – Use Cases

mydevices/4

mydevices/4

Protocols – MQTT – Use Cases

mydevices/to_all

mydevices/to_all

Protocols – MQTT – QoS 0

1

2

3

4

5

61,2,3,5,6

Protocols – MQTT – QoS 1

1

2

3

4

5

41,2,3,4,5,6

6

Protocols – MQTT – Keep Alive

PINGREQ

PINGRESP

Although TCP/IP in theory notifies you when a socket breaks, in practice, particularly on

things like mobile and satellite links, which often “fake” TCP over the air and put

headers back on at each end, it’s quite possible for a TCP session to “black hole”, i.e. it

appears to be open still, but in fact is just dumping anything you write to it onto the floor.

Andy Stanford-Clark on the topic “Why is the keep-alive needed?“ *

* https://groups.google.com/forum/#!msg/mqtt/zRqd8JbY4oM/XrMwlQ5TU0EJ

Protocols – AWS IoT Shadow

{

"state" : {

“desired" : {

"lights": { "color": "RED" },

"engine" : "ON"

},

"reported" : {

"lights" : { "color": "GREEN" },

"engine" : "ON"

},

"delta" : {

"lights" : { "color": "RED" }

} },

"version" : 10

}

Thing

Report its current state to one or multiple shadow

Retrieve its desired state from shadow

Mobile App

Set the desired state of a device

Get the last reported state of the device

Delete the shadow

Shadow

Shadow reports delta, desired

and reported states along with metadata and version

Protocols – AWS IoT Shadow Topics (MQTT)

$aws/things/{thing}/shadow/…

Publish

…/get: to get the latest shadow state

…/update: to update the shadow state

…/delete: to remove the shadow state

Subscribe

…/accepted: shadow accepted message

…/rejected: shadow rejected message

…/delta: differences between desired and reported

DEVICE SHADOWPersistent thing state

during intermittent

connections

Protocols – AWS IoT Shadow Use Case{

"state" : {

“desired" : {

"engine" : "ON”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"reported" : {

"engine" : ”OFF”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"version" : 10

}

Protocols – AWS IoT Shadow Use Case{

"state" : {

“desired" : {

"engine" : "ON”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"reported" : {

"engine" : ”OFF”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"delta" : {

”engine" : “ON”

} },

"version" : 10

}

"engine" : ”ON”

Protocols – AWS IoT Shadow Use Case{

"state" : {

“desired" : {

"engine" : "ON”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"reported" : {

"engine" : ”OFF”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"delta" : {

”engine" : “ON”

} },

"version" : 10

}

"engine" : ”OFF”

Protocols – AWS IoT Shadow Use Case{

"state" : {

“desired" : {

"engine" : "ON”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"reported" : {

"engine" : ”OFF”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"delta" : {

”engine" : “ON”

} },

"version" : 10

}

"engine" : "ON”

Protocols – AWS IoT Shadow Use Case{

"state" : {

“desired" : {

"engine" : "ON”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"reported" : {

"engine" : ”OFF”,

“tires”: {

“LF”:40,

“RF”:38,

“LR”:37,

“RR”:39

},

“CCD”: {

“A”:0,

“B”:8,

“C”:7,

“D”:9

}

},

"version" : 10

}

"engine" : "ON”

Getting Started with AWS IoT

How do I get started?

AWS IoT SDKs IoT Starter Kits

Getting Started – SDKs

Arduino (Arduino Yún)

Node.js (Ideal for Embedded Linux)

C – Embedded (Ideal for embedded OS)

Getting Started – Arduino Yún SDK

Arduino IDE

Libraries

Hardware Ecosystem

Getting Started – Arduino Yún SDK

Demo – Build your own AWS IoT Button

SELECT * FROM sdk/rules/lambda

Action: Lambda

Getting Started – Node.js SDK

Easy install with NPM

Supports Embedded

Linux Boards

High level, but easy

access to hardware

Getting Started – Node.js SDK

Getting Started – Embedded C SDK

Deeply embedded

Port to your platform

Delivered as source

w/ POSIX port

Getting Started –Embedded C SDK

Memory Conscious

TLS

MQTT Client

Shadow SDK

Examples

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Layered

Well-defined Interfaces

Porting Points

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Your application

The soul of the device

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Shadow SDK

Subscription Management

Version Tracking

Client Tokens

JSON Helpers

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Embedded MQTT Client

Interfaces

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS InterfaceYou know how timers work

on your system

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Interface to the network

Raw sockets

TLS implementation included

Thing Shadow

C SDK Porting – SDK Architecture

Hardware / OS

Timer Interface

MQTT Interface / Client

Custom Application

TLS Interface

Your hardware

Thing Shadow

Demo of C SDK

Timers

Network

Yield()

Time on the device

Getting Started – Porting Story

Board Manufacturers

TLS + MQTT

Shadow

Pub/Sub - 8kb code, 4k RAM

Shadow – 11kb code, 6k RAM

(MQTT and SDK, no TLS, TCP/IP)

Official IoT Starter Kits, Powered by AWS

Official IoT Starter Kits on Variety of Platforms

Broadcom WICED

BCM4343W

On Threadx/Netx

Marvell

EZConnect

MW302

On FreeRTOS

Renasas RX63N

On Micrium OS

TI CC3200

On TI-RTOSMicrochip WCM

PIC32 Platform

Intel Edison

on Yocto Linux

Mediatek

LinkOne

on Linkit OS

Dragonboard

410c on

Ubuntu

Seeeduino

Arduino on

openWRT

Beaglebone

Green on

Debian

DemoEnd-to-end Solution

Earthquake Monitoring

Marvell

MW300

MediaTek

LinkIt ONE

Arduino

Yún

AWS IoT

Topics

Rules

Amazon KinesisAll

Amazon

SNS> 5 G

Intel

EdisonAWS Lambda

State: Alarm

Shadow

AWS IoT

Any device can connect securelyAnyone can connect a device Getting started is easy

Thank you!

Remember to complete

your evaluations!

top related