Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols

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..

  • Login to see the comments

(MBL313) NEW! AWS IoT: Understanding Hardware Kits, SDKs, & Protocols

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Markku Lepisto John Rotach October 8, 2015 AWS IoT Deep Dive Understanding Hardware Platforms, Devices SDKs and Protocols MBL313
  2. 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. 3. Security – IoT Requirements Strong Authentication Fine Grained Authorization Secure Communication
  4. 4. Security – IoT Requirements Strong Authentication Secure Communication
  5. 5. Security – IoT Requirements Strong Authentication Secure Communication
  6. 6. Security – IoT Requirements Strong Authentication Secure Communication Protect your Keys
  7. 7. Security – IoT Requirements Strong Authentication Secure Communication
  8. 8. Security – Secure Device SDKs make it easy to be secure TLS Mutual Authentication We package a TLS software library with embedded C
  9. 9. Protocols / Interaction Device Shadow
  10. 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
  11. 11. Protocols – MQTT – Use Cases mydevices/# mydevices/1 mydevices/2 mydevices/3
  12. 12. Protocols – MQTT – Use Cases mydevices/4 mydevices/4
  13. 13. Protocols – MQTT – Use Cases mydevices/4 mydevices/4
  14. 14. Protocols – MQTT – Use Cases mydevices/to_all mydevices/to_all
  15. 15. Protocols – MQTT – QoS 0 1 2 3 4 5 6 1,2,3,5,6
  16. 16. Protocols – MQTT – QoS 1 1 2 3 4 5 4 1,2,3,4,5,6 6
  17. 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. 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. 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
  20. 20. 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 }
  21. 21. 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”
  22. 22. 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”
  23. 23. 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”
  24. 24. 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”
  25. 25. Getting Started with AWS IoT How do I get started? AWS IoT SDKs IoT Starter Kits
  26. 26. Getting Started – SDKs Arduino (Arduino Yún) Node.js (Ideal for Embedded Linux) C – Embedded (Ideal for embedded OS)
  27. 27. Getting Started – Arduino Yún SDK Arduino IDE Libraries Hardware Ecosystem
  28. 28. Getting Started – Arduino Yún SDK
  29. 29. Demo – Build your own AWS IoT Button SELECT * FROM sdk/rules/lambda Action: Lambda
  30. 30. Getting Started – Node.js SDK Easy install with NPM Supports Embedded Linux Boards High level, but easy access to hardware
  31. 31. Getting Started – Node.js SDK
  32. 32. Getting Started – Embedded C SDK Deeply embedded Port to your platform Delivered as source w/ POSIX port
  33. 33. Getting Started –Embedded C SDK Memory Conscious TLS MQTT Client Shadow SDK Examples
  34. 34. C SDK Porting – SDK Architecture Hardware / OS Timer Interface MQTT Interface / Client Custom Application TLS Interface Layered Well-defined Interfaces Porting Points Thing Shadow
  35. 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
  36. 36. 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
  37. 37. C SDK Porting – SDK Architecture Hardware / OS Timer Interface MQTT Interface / Client Custom Application TLS Interface Embedded MQTT Client Interfaces Thing Shadow
  38. 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. 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. 40. C SDK Porting – SDK Architecture Hardware / OS Timer Interface MQTT Interface / Client Custom Application TLS Interface Your hardware Thing Shadow
  41. 41. Demo of C SDK Timers Network Yield() Time on the device
  42. 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)
  43. 43. Official IoT Starter Kits, Powered by AWS
  44. 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
  45. 45. Demo End-to-end Solution
  46. 46. Earthquake Monitoring Marvell MW300 MediaTek LinkIt ONE Arduino Yún AWS IoT Topics Rules Amazon Kinesis All Amazon SNS > 5 G Intel Edison AWS Lambda State: Alarm Shadow
  47. 47. AWS IoT Any device can connect securelyAnyone can connect a device Getting started is easy
  48. 48. Thank you!
  49. 49. Remember to complete your evaluations!

×