Demo application for using the AT&T IoT Starter Kit Powered by AWS.
Dependencies: SDFileSystem
Fork of ATT_AWS_IoT_demo by
IoT Starter Kit Powered by AWS Demo
This program demonstrates the AT&T IoT Starter Kit sending data directly into AWS IoT. It's explained and used in the Getting Started with the IoT Starter Kit Powered by AWS on starterkit.att.com.
What's required
- AT&T IoT LTE Add-on (also known as the Cellular Shield)
- NXP K64F - for programming
- microSD card - used to store your AWS security credentials
- AWS account
- Python, locally installed
If you don't already have an IoT Starter Kit, you can purchase a kit here. The IoT Starter Kit Powered by AWS includes the LTE cellular shield, K64F, and a microSD card.
Diff: README.md
- Revision:
- 16:02008a2a2569
- Parent:
- 15:6f2798e45099
- Child:
- 21:56f91bdacff1
diff -r 6f2798e45099 -r 02008a2a2569 README.md --- a/README.md Thu Dec 01 18:05:38 2016 +0000 +++ b/README.md Fri Dec 02 22:39:56 2016 +0000 @@ -1,3 +1,72 @@ -# Avnet AT&T Amazon Web Service Internet-of-Things demo +# AT&T Amazon Web Service Internet-of-Things demo + +############################################################################################################# +Resources +############################################################################################################# +Getting Started with MBED using FRDM-K64F: (NOTE!!! The FRDM bootloader MUST be updated to work with Windows 10) +https://developer.mbed.org/platforms/frdm-k64f/ + +Avnet IoT Kit quickstart: +https://starterkit.att.com/quickstart + +AWS IoT Interactive Tutorial (what this demo is based on): +https://us-west-2.console.aws.amazon.com/iot/home?region=us-west-2#/tutorial/help + +AWS IoT C-SDK Tutorial (targeted for Raspberry Pi-2): +http://docs.aws.amazon.com/iot/latest/developerguide/iot-device-sdk-c.html + +Python AWS IoT Tutorial: +https://github.com/aws/aws-iot-device-sdk-python + +############################################################################################################# +Demo Quickstart +############################################################################################################# +NOTE1: FRDM-K64F bootloader must be updated to work with Windows 10 (otherwise board will reset over and over). + +FRDM-K64F: +1) This quickstart assumes you've gone through the "Getting Started with MBED using FRDM-K64F" and that you + can successfully drag-and-drop binaries to flash the FRDM-K64F device. + +AT&T IoT Kit: +1) This quickstart assumes you've gone through the "Avnet IoT Kit quickstart" and your kits sim card has been + activated and verified to work with the AT&T LTE network. + +Amazon AWS IoT: +1) Create an AWS IoT thing using AWS IoT Console. Makes sure to get your 'thing' certificates. -TODO \ No newline at end of file +MBED: +1) In the mbed ATT_AWS_IoT_demo project open "network_interface.h" and comment in the following: + #define USING_AVNET_SHIELD // NOTE: Make sure you only comment in ONE Network Connection + +2) In the mbed ATT_AWS_IoT_demo project open "aws_iot_config.h" and update the following to match your AWS + IoT 'thing': + #define AWS_IOT_MQTT_HOST + #define AWS_IOT_MQTT_CLIENT_ID + #define AWS_IOT_MY_THING_NAME + +3) In the mbed ATT_AWS_IoT_demo project open "certs.cpp" and update the following to match your AWS 'thing' + private key and IoT certificate. NOTE Make sure the string format matches the format of AWS_IOT_ROOT_CA + (which is pre-populated): + const unsigned char AWS_IOT_CERTIFICATE[] + const unsigned char AWS_IOT_PRIVATE_KEY[] + +Python GUI (optional): +1) The Python GUI "ATT_AWS_IoT_Demo_GUI.py" is used to communicate with the 'thing' device shadow, and can + be used to request 'desired' and report 'reported' shadow states. This quickstart assumes you've gone + through the "Python AWS IoT Tutorial" to the point where you've installed Python 2.7.11 and the libraries + required to run the script (paho-mqtt, AWSIoTPythonSDK). + +2) In the ATT_AWS_IoT_Demo_GUI.py script search for the "AWS IoT Config Parameters" and update them so they + match the same 'thing' parameters as the mbed project. + +3) Place your 'thing' certificates into file locations where the Python script can find them. For example: + AWS_IOT_ROOT_CA_FILENAME = "C:/Temp/certs/rootCA-certificate.crt" + AWS_IOT_PRIVATE_KEY_FILENAME = "C:/Temp/certs/private.pem.key" + AWS_IOT_CERTIFICATE_FILENAME = "C:/Temp/certs/certificate.pem.crt" + +Once all this is setup you should be able to: +1) See the FRDM board start up and connect to Amazon and then create a 'thing' shadow (if there is none). +2) See the FRDM board get the shadow LED color. +3) Press the SW3 button on the FRDM board to cycle the LED color -> (Off R G B W) +4) Use the AWS IoT Console to "Update shadow" to set new 'desired' colors via -> (0 1 2 4 7) +5) Use the Python GUI buttons to request 'desired' colors. The GUI should also report the "AWS Reported LED Status" \ No newline at end of file