Demo application for using the AT&T IoT Starter Kit Powered by AWS.

Dependencies:   SDFileSystem

Fork of ATT_AWS_IoT_demo by Anthony Phillips

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.

Revision:
18:6370da1de572
Parent:
16:02008a2a2569
Child:
23:b9ff83dc965f
diff -r 46780b2de3e4 -r 6370da1de572 AWS_openssl/aws_iot_config.h
--- a/AWS_openssl/aws_iot_config.h	Fri Dec 02 22:49:17 2016 +0000
+++ b/AWS_openssl/aws_iot_config.h	Tue Dec 06 22:31:15 2016 +0000
@@ -21,17 +21,36 @@
 #ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
 #define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
 
-// Get from console
+//=====================================================================================================================
+//
+// NOTE: This defines where we pull our cert/config information from.  The options are:  
+// a) Hard code MQTT defines below and in certs.cpp
+// b) Pull certs and MQTT information from SD card.
+//
+// Pull information from SD card
+#define USING_SD_CARD
+//=====================================================================================================================
+
 // =================================================
+// USER ENTERED VALUES (only used when not using SD card)
 #define AWS_IOT_MQTT_HOST              "TODO" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
-#define AWS_IOT_MQTT_PORT              8883 ///< default port for MQTT/S
+#define AWS_IOT_MQTT_PORT              8883   ///< default port for MQTT/S
 #define AWS_IOT_MQTT_CLIENT_ID         "TODO" ///< MQTT client ID should be unique for every device
 #define AWS_IOT_MY_THING_NAME 		   "TODO" ///< Thing Name of the Shadow this device is associated with
 
-// NOTE: Since the mbed-os does not use a file system these are unused (see certs.pp)
-#define AWS_IOT_ROOT_CA_FILENAME       "rootCA-certificate.crt" ///< Root CA file name
-#define AWS_IOT_CERTIFICATE_FILENAME   "certificate.pem.crt" ///< device signed certificate file name
-#define AWS_IOT_PRIVATE_KEY_FILENAME   "private.pem.key" ///< Device private key filename
+#ifdef USING_SD_CARD // These files are only valid when SD card is being used
+// Example format for mqtt_config.txt:
+/*
+AWS_IOT_MQTT_HOST=1234asdf.iot.us-west-2.amazonaws.com
+AWS_IOT_MQTT_PORT=8883
+AWS_IOT_MQTT_CLIENT_ID=MyThingName
+WS_IOT_MY_THING_NAME=MyThingName
+*/
+#define AWS_MQTT_CONFIG_FILENAME       "/sd/certs/mqtt_config.txt"        ///< Contains the info for the four defines above
+#define AWS_IOT_ROOT_CA_FILENAME       "/sd/certs/rootCA-certificate.crt" ///< Root CA file name
+#define AWS_IOT_CERTIFICATE_FILENAME   "/sd/certs/certificate.pem.crt"    ///< device signed certificate file name
+#define AWS_IOT_PRIVATE_KEY_FILENAME   "/sd/certs/private.pem.key"        ///< Device private key filename
+#endif
 // =================================================
 
 // MQTT PubSub