![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
V.06 11/3
Dependencies: FT6206 SDFileSystem SPI_TFT_ILI9341 TFT_fonts
Fork of ATT_AWS_IoT_demo by
AWS_openssl/aws_iot_config.h@16:02008a2a2569, 2016-12-02 (annotated)
- Committer:
- ampembeng
- Date:
- Fri Dec 02 22:39:56 2016 +0000
- Revision:
- 16:02008a2a2569
- Parent:
- 15:6f2798e45099
- Child:
- 18:6370da1de572
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 | 15:6f2798e45099 | 1 | /* |
ampembeng | 15:6f2798e45099 | 2 | * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
ampembeng | 15:6f2798e45099 | 3 | * |
ampembeng | 15:6f2798e45099 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
ampembeng | 15:6f2798e45099 | 5 | * You may not use this file except in compliance with the License. |
ampembeng | 15:6f2798e45099 | 6 | * A copy of the License is located at |
ampembeng | 15:6f2798e45099 | 7 | * |
ampembeng | 15:6f2798e45099 | 8 | * http://aws.amazon.com/apache2.0 |
ampembeng | 15:6f2798e45099 | 9 | * |
ampembeng | 15:6f2798e45099 | 10 | * or in the "license" file accompanying this file. This file is distributed |
ampembeng | 15:6f2798e45099 | 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
ampembeng | 15:6f2798e45099 | 12 | * express or implied. See the License for the specific language governing |
ampembeng | 15:6f2798e45099 | 13 | * permissions and limitations under the License. |
ampembeng | 15:6f2798e45099 | 14 | */ |
ampembeng | 15:6f2798e45099 | 15 | |
ampembeng | 15:6f2798e45099 | 16 | /** |
ampembeng | 15:6f2798e45099 | 17 | * @file aws_iot_config.h |
ampembeng | 15:6f2798e45099 | 18 | * @brief AWS IoT specific configuration file |
ampembeng | 15:6f2798e45099 | 19 | */ |
ampembeng | 15:6f2798e45099 | 20 | |
ampembeng | 15:6f2798e45099 | 21 | #ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_ |
ampembeng | 15:6f2798e45099 | 22 | #define SRC_SHADOW_IOT_SHADOW_CONFIG_H_ |
ampembeng | 15:6f2798e45099 | 23 | |
ampembeng | 15:6f2798e45099 | 24 | // Get from console |
ampembeng | 15:6f2798e45099 | 25 | // ================================================= |
ampembeng | 15:6f2798e45099 | 26 | #define AWS_IOT_MQTT_HOST "TODO" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow |
ampembeng | 15:6f2798e45099 | 27 | #define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S |
ampembeng | 15:6f2798e45099 | 28 | #define AWS_IOT_MQTT_CLIENT_ID "TODO" ///< MQTT client ID should be unique for every device |
ampembeng | 15:6f2798e45099 | 29 | #define AWS_IOT_MY_THING_NAME "TODO" ///< Thing Name of the Shadow this device is associated with |
ampembeng | 15:6f2798e45099 | 30 | |
ampembeng | 16:02008a2a2569 | 31 | // NOTE: Since the mbed-os does not use a file system these are unused (see certs.pp) |
ampembeng | 15:6f2798e45099 | 32 | #define AWS_IOT_ROOT_CA_FILENAME "rootCA-certificate.crt" ///< Root CA file name |
ampembeng | 15:6f2798e45099 | 33 | #define AWS_IOT_CERTIFICATE_FILENAME "certificate.pem.crt" ///< device signed certificate file name |
ampembeng | 15:6f2798e45099 | 34 | #define AWS_IOT_PRIVATE_KEY_FILENAME "private.pem.key" ///< Device private key filename |
ampembeng | 15:6f2798e45099 | 35 | // ================================================= |
ampembeng | 15:6f2798e45099 | 36 | |
ampembeng | 15:6f2798e45099 | 37 | // MQTT PubSub |
ampembeng | 15:6f2798e45099 | 38 | #define AWS_IOT_MQTT_TX_BUF_LEN 512 ///< Any time a message is sent out through the MQTT layer. The message is copied into this buffer anytime a publish is done. This will also be used in the case of Thing Shadow |
ampembeng | 15:6f2798e45099 | 39 | #define AWS_IOT_MQTT_RX_BUF_LEN 512 ///< Any message that comes into the device should be less than this buffer size. If a received message is bigger than this buffer size the message will be dropped. |
ampembeng | 15:6f2798e45099 | 40 | #define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5 ///< Maximum number of topic filters the MQTT client can handle at any given time. This should be increased appropriately when using Thing Shadow |
ampembeng | 15:6f2798e45099 | 41 | |
ampembeng | 15:6f2798e45099 | 42 | // Thing Shadow specific configs |
ampembeng | 15:6f2798e45099 | 43 | #define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1 ///< Maximum size of the SHADOW buffer to store the received Shadow message |
ampembeng | 15:6f2798e45099 | 44 | #define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 ///< Maximum size of the Unique Client Id. For More info on the Client Id refer \ref response "Acknowledgments" |
ampembeng | 15:6f2798e45099 | 45 | #define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 ///< This is size of the extra sequence number that will be appended to the Unique client Id |
ampembeng | 15:6f2798e45099 | 46 | #define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 ///< This is size of the the total clientToken key and value pair in the JSON |
ampembeng | 15:6f2798e45099 | 47 | #define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10 ///< At Any given time we will wait for this many responses. This will correlate to the rate at which the shadow actions are requested |
ampembeng | 15:6f2798e45099 | 48 | #define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10 ///< We could perform shadow action on any thing Name and this is maximum Thing Names we can act on at any given time |
ampembeng | 15:6f2798e45099 | 49 | #define MAX_JSON_TOKEN_EXPECTED 120 ///< These are the max tokens that is expected to be in the Shadow JSON document. Include the metadata that gets published |
ampembeng | 15:6f2798e45099 | 50 | #define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60 ///< All shadow actions have to be published or subscribed to a topic which is of the format $aws/things/{thingName}/shadow/update/accepted. This refers to the size of the topic without the Thing Name |
ampembeng | 15:6f2798e45099 | 51 | #define MAX_SIZE_OF_THING_NAME 20 ///< The Thing Name should not be bigger than this value. Modify this if the Thing Name needs to be bigger |
ampembeng | 15:6f2798e45099 | 52 | #define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME ///< This size includes the length of topic with Thing Name |
ampembeng | 15:6f2798e45099 | 53 | |
ampembeng | 15:6f2798e45099 | 54 | // Auto Reconnect specific config |
ampembeng | 15:6f2798e45099 | 55 | #define AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000 ///< Minimum time before the First reconnect attempt is made as part of the exponential back-off algorithm |
ampembeng | 15:6f2798e45099 | 56 | #define AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 8000 ///< Maximum time interval after which exponential back-off will stop attempting to reconnect. |
ampembeng | 15:6f2798e45099 | 57 | |
ampembeng | 15:6f2798e45099 | 58 | // Links to our certs from certs.cpp |
ampembeng | 15:6f2798e45099 | 59 | extern const unsigned char AWS_IOT_ROOT_CA[]; |
ampembeng | 15:6f2798e45099 | 60 | extern const unsigned char AWS_IOT_CERTIFICATE[]; |
ampembeng | 15:6f2798e45099 | 61 | extern const unsigned char AWS_IOT_PRIVATE_KEY[]; |
ampembeng | 15:6f2798e45099 | 62 | |
ampembeng | 15:6f2798e45099 | 63 | #endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */ |
ampembeng | 15:6f2798e45099 | 64 | |
ampembeng | 15:6f2798e45099 | 65 |