DIYmall 0.96" Inch I2c IIC Serial 128x64 Oled LCD LED White Display Module
Dependencies: Adafruit_GFX SDFileSystem
Fork of ATT_AWS_IoT_demo by
Diff: AWS_openssl/aws_iot_config.h
- 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