AWS IoT is a new managed service that enables Internet-connected things (sensors, actuators, devices, and applications) to easily and securely interact with each other and the cloud. We have partnered with several hardware manufacturers to make it super easy for you to build your next dream machine. In this session, you will see how you can connect a real device to AWS IoT and accelerate your prototype development using Device SDKs. We will cover major hardware platforms from Arduino, Marvell, Dragonboard and MediaTek, protocols like MQTT/HTTP, various starter kits available so you can get started quickly..
2. 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”
3. Security – IoT Requirements
Strong Authentication
Fine Grained Authorization
Secure Communication
4. Security – IoT Requirements
Strong Authentication
Secure Communication
5. Security – IoT Requirements
Strong Authentication
Secure Communication
6. Security – IoT Requirements
Strong Authentication
Secure Communication
Protect your Keys
7. Security – IoT Requirements
Strong Authentication
Secure Communication
8. Security – Secure Device
SDKs make it easy to be secure
TLS Mutual Authentication
We package a TLS software library with embedded C
10. 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
17. 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
18. 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
19. 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 SHADOW
Persistent thing state
during intermittent
connections
35. 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
38. C SDK Porting – SDK Architecture
Hardware / OS
Timer Interface
MQTT Interface / Client
Custom Application
TLS Interface
You know how timers work
on your system
Thing Shadow
39. 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
40. C SDK Porting – SDK Architecture
Hardware / OS
Timer Interface
MQTT Interface / Client
Custom Application
TLS Interface
Your hardware
Thing Shadow
41. Demo of C SDK
Timers
Network
Yield()
Time on the device
42. 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)
44. 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-RTOS
Microchip 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