AWS IoT demonstration using the Avnet Shield (AT&T LTE) and the FRDM-K64F target board.
Dependencies: K64F_FATFileSystem
Fork of mbed-os-example-tls-tls-client by
README.md@16:02008a2a2569, 2016-12-02 (annotated)
- Committer:
- ampembeng
- Date:
- Fri Dec 02 22:39:56 2016 +0000
- Revision:
- 16:02008a2a2569
- Parent:
- 15:6f2798e45099
- Child:
- 21:56f91bdacff1
Cleaned up some project TODOs added a quick start guide to the README.md that's in the root folder.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ampembeng | 16:02008a2a2569 | 1 | # AT&T Amazon Web Service Internet-of-Things demo |
ampembeng | 16:02008a2a2569 | 2 | |
ampembeng | 16:02008a2a2569 | 3 | ############################################################################################################# |
ampembeng | 16:02008a2a2569 | 4 | Resources |
ampembeng | 16:02008a2a2569 | 5 | ############################################################################################################# |
ampembeng | 16:02008a2a2569 | 6 | Getting Started with MBED using FRDM-K64F: (NOTE!!! The FRDM bootloader MUST be updated to work with Windows 10) |
ampembeng | 16:02008a2a2569 | 7 | https://developer.mbed.org/platforms/frdm-k64f/ |
ampembeng | 16:02008a2a2569 | 8 | |
ampembeng | 16:02008a2a2569 | 9 | Avnet IoT Kit quickstart: |
ampembeng | 16:02008a2a2569 | 10 | https://starterkit.att.com/quickstart |
ampembeng | 16:02008a2a2569 | 11 | |
ampembeng | 16:02008a2a2569 | 12 | AWS IoT Interactive Tutorial (what this demo is based on): |
ampembeng | 16:02008a2a2569 | 13 | https://us-west-2.console.aws.amazon.com/iot/home?region=us-west-2#/tutorial/help |
ampembeng | 16:02008a2a2569 | 14 | |
ampembeng | 16:02008a2a2569 | 15 | AWS IoT C-SDK Tutorial (targeted for Raspberry Pi-2): |
ampembeng | 16:02008a2a2569 | 16 | http://docs.aws.amazon.com/iot/latest/developerguide/iot-device-sdk-c.html |
ampembeng | 16:02008a2a2569 | 17 | |
ampembeng | 16:02008a2a2569 | 18 | Python AWS IoT Tutorial: |
ampembeng | 16:02008a2a2569 | 19 | https://github.com/aws/aws-iot-device-sdk-python |
ampembeng | 16:02008a2a2569 | 20 | |
ampembeng | 16:02008a2a2569 | 21 | ############################################################################################################# |
ampembeng | 16:02008a2a2569 | 22 | Demo Quickstart |
ampembeng | 16:02008a2a2569 | 23 | ############################################################################################################# |
ampembeng | 16:02008a2a2569 | 24 | NOTE1: FRDM-K64F bootloader must be updated to work with Windows 10 (otherwise board will reset over and over). |
ampembeng | 16:02008a2a2569 | 25 | |
ampembeng | 16:02008a2a2569 | 26 | FRDM-K64F: |
ampembeng | 16:02008a2a2569 | 27 | 1) This quickstart assumes you've gone through the "Getting Started with MBED using FRDM-K64F" and that you |
ampembeng | 16:02008a2a2569 | 28 | can successfully drag-and-drop binaries to flash the FRDM-K64F device. |
ampembeng | 16:02008a2a2569 | 29 | |
ampembeng | 16:02008a2a2569 | 30 | AT&T IoT Kit: |
ampembeng | 16:02008a2a2569 | 31 | 1) This quickstart assumes you've gone through the "Avnet IoT Kit quickstart" and your kits sim card has been |
ampembeng | 16:02008a2a2569 | 32 | activated and verified to work with the AT&T LTE network. |
ampembeng | 16:02008a2a2569 | 33 | |
ampembeng | 16:02008a2a2569 | 34 | Amazon AWS IoT: |
ampembeng | 16:02008a2a2569 | 35 | 1) Create an AWS IoT thing using AWS IoT Console. Makes sure to get your 'thing' certificates. |
mbed_official | 2:270602af41c9 | 36 | |
ampembeng | 16:02008a2a2569 | 37 | MBED: |
ampembeng | 16:02008a2a2569 | 38 | 1) In the mbed ATT_AWS_IoT_demo project open "network_interface.h" and comment in the following: |
ampembeng | 16:02008a2a2569 | 39 | #define USING_AVNET_SHIELD // NOTE: Make sure you only comment in ONE Network Connection |
ampembeng | 16:02008a2a2569 | 40 | |
ampembeng | 16:02008a2a2569 | 41 | 2) In the mbed ATT_AWS_IoT_demo project open "aws_iot_config.h" and update the following to match your AWS |
ampembeng | 16:02008a2a2569 | 42 | IoT 'thing': |
ampembeng | 16:02008a2a2569 | 43 | #define AWS_IOT_MQTT_HOST |
ampembeng | 16:02008a2a2569 | 44 | #define AWS_IOT_MQTT_CLIENT_ID |
ampembeng | 16:02008a2a2569 | 45 | #define AWS_IOT_MY_THING_NAME |
ampembeng | 16:02008a2a2569 | 46 | |
ampembeng | 16:02008a2a2569 | 47 | 3) In the mbed ATT_AWS_IoT_demo project open "certs.cpp" and update the following to match your AWS 'thing' |
ampembeng | 16:02008a2a2569 | 48 | private key and IoT certificate. NOTE Make sure the string format matches the format of AWS_IOT_ROOT_CA |
ampembeng | 16:02008a2a2569 | 49 | (which is pre-populated): |
ampembeng | 16:02008a2a2569 | 50 | const unsigned char AWS_IOT_CERTIFICATE[] |
ampembeng | 16:02008a2a2569 | 51 | const unsigned char AWS_IOT_PRIVATE_KEY[] |
ampembeng | 16:02008a2a2569 | 52 | |
ampembeng | 16:02008a2a2569 | 53 | Python GUI (optional): |
ampembeng | 16:02008a2a2569 | 54 | 1) The Python GUI "ATT_AWS_IoT_Demo_GUI.py" is used to communicate with the 'thing' device shadow, and can |
ampembeng | 16:02008a2a2569 | 55 | be used to request 'desired' and report 'reported' shadow states. This quickstart assumes you've gone |
ampembeng | 16:02008a2a2569 | 56 | through the "Python AWS IoT Tutorial" to the point where you've installed Python 2.7.11 and the libraries |
ampembeng | 16:02008a2a2569 | 57 | required to run the script (paho-mqtt, AWSIoTPythonSDK). |
ampembeng | 16:02008a2a2569 | 58 | |
ampembeng | 16:02008a2a2569 | 59 | 2) In the ATT_AWS_IoT_Demo_GUI.py script search for the "AWS IoT Config Parameters" and update them so they |
ampembeng | 16:02008a2a2569 | 60 | match the same 'thing' parameters as the mbed project. |
ampembeng | 16:02008a2a2569 | 61 | |
ampembeng | 16:02008a2a2569 | 62 | 3) Place your 'thing' certificates into file locations where the Python script can find them. For example: |
ampembeng | 16:02008a2a2569 | 63 | AWS_IOT_ROOT_CA_FILENAME = "C:/Temp/certs/rootCA-certificate.crt" |
ampembeng | 16:02008a2a2569 | 64 | AWS_IOT_PRIVATE_KEY_FILENAME = "C:/Temp/certs/private.pem.key" |
ampembeng | 16:02008a2a2569 | 65 | AWS_IOT_CERTIFICATE_FILENAME = "C:/Temp/certs/certificate.pem.crt" |
ampembeng | 16:02008a2a2569 | 66 | |
ampembeng | 16:02008a2a2569 | 67 | Once all this is setup you should be able to: |
ampembeng | 16:02008a2a2569 | 68 | 1) See the FRDM board start up and connect to Amazon and then create a 'thing' shadow (if there is none). |
ampembeng | 16:02008a2a2569 | 69 | 2) See the FRDM board get the shadow LED color. |
ampembeng | 16:02008a2a2569 | 70 | 3) Press the SW3 button on the FRDM board to cycle the LED color -> (Off R G B W) |
ampembeng | 16:02008a2a2569 | 71 | 4) Use the AWS IoT Console to "Update shadow" to set new 'desired' colors via -> (0 1 2 4 7) |
ampembeng | 16:02008a2a2569 | 72 | 5) Use the Python GUI buttons to request 'desired' colors. The GUI should also report the "AWS Reported LED Status" |