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.

Committer:
rfinn
Date:
Tue Feb 07 16:18:57 2017 +0000
Revision:
27:2f486c766854
Parent:
15:6f2798e45099
changed SDFileSystem library

Who changed what in which revision?

UserRevisionLine numberNew 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_error.h
ampembeng 15:6f2798e45099 18 * @brief Definition of error types for the SDK.
ampembeng 15:6f2798e45099 19 */
ampembeng 15:6f2798e45099 20
ampembeng 15:6f2798e45099 21 #ifndef AWS_IOT_SDK_SRC_IOT_ERROR_H_
ampembeng 15:6f2798e45099 22 #define AWS_IOT_SDK_SRC_IOT_ERROR_H_
ampembeng 15:6f2798e45099 23
ampembeng 15:6f2798e45099 24
ampembeng 15:6f2798e45099 25 /*! \public
ampembeng 15:6f2798e45099 26 * @brief IoT Error enum
ampembeng 15:6f2798e45099 27 *
ampembeng 15:6f2798e45099 28 * Enumeration of return values from the IoT_* functions within the SDK.
ampembeng 15:6f2798e45099 29 */
ampembeng 15:6f2798e45099 30 typedef enum {
ampembeng 15:6f2798e45099 31 /** Return value of yield function to indicate auto-reconnect was successful */
ampembeng 15:6f2798e45099 32 RECONNECT_SUCCESSFUL = 1,
ampembeng 15:6f2798e45099 33 /** Success return value - no error occurred. */
ampembeng 15:6f2798e45099 34 NONE_ERROR = 0,
ampembeng 15:6f2798e45099 35 /** A generic error. A placeholder for a more specific error. */
ampembeng 15:6f2798e45099 36 GENERIC_ERROR = -1,
ampembeng 15:6f2798e45099 37 /** A required parameter was passed as null. */
ampembeng 15:6f2798e45099 38 NULL_VALUE_ERROR = -2,
ampembeng 15:6f2798e45099 39 /** A connection could not be established. */
ampembeng 15:6f2798e45099 40 CONNECTION_ERROR = -3,
ampembeng 15:6f2798e45099 41 /** The subscribe failed. A SUBACK was not returned from the service. */
ampembeng 15:6f2798e45099 42 SUBSCRIBE_ERROR = -4,
ampembeng 15:6f2798e45099 43 /** The publish failed. In the case of a QoS 1 message a PUBACK was not received. */
ampembeng 15:6f2798e45099 44 PUBLISH_ERROR = -5,
ampembeng 15:6f2798e45099 45 /** The disconnect failed. The disconnect control packet could not be sent. */
ampembeng 15:6f2798e45099 46 DISCONNECT_ERROR = -6,
ampembeng 15:6f2798e45099 47 /** An error occurred when yielding to the IoT MQTT client. A possible cause is an unexpected TCP socket disconnect. */
ampembeng 15:6f2798e45099 48 YIELD_ERROR = -7,
ampembeng 15:6f2798e45099 49 /** The TCP socket could not be established. */
ampembeng 15:6f2798e45099 50 TCP_CONNECT_ERROR = -8,
ampembeng 15:6f2798e45099 51 /** The TLS handshake failed. */
ampembeng 15:6f2798e45099 52 SSL_CONNECT_ERROR = -9,
ampembeng 15:6f2798e45099 53 /** Error associated with setting up the parameters of a Socket */
ampembeng 15:6f2798e45099 54 TCP_SETUP_ERROR =-10,
ampembeng 15:6f2798e45099 55 /** A timeout occurred while waiting for the TLS handshake to complete. */
ampembeng 15:6f2798e45099 56 SSL_CONNECT_TIMEOUT_ERROR = -11,
ampembeng 15:6f2798e45099 57 /** A Generic write error based on the platform used */
ampembeng 15:6f2798e45099 58 SSL_WRITE_ERROR = -12,
ampembeng 15:6f2798e45099 59 /** SSL initialization error at the TLS layer */
ampembeng 15:6f2798e45099 60 SSL_INIT_ERROR = -13,
ampembeng 15:6f2798e45099 61 /** An error occurred when loading the certificates. The certificates could not be located or are incorrectly formatted. */
ampembeng 15:6f2798e45099 62 SSL_CERT_ERROR= -14,
ampembeng 15:6f2798e45099 63 /** The unsubscribe failed. The unsubscribe control packet could not be sent. */
ampembeng 15:6f2798e45099 64 UNSUBSCRIBE_ERROR = -15,
ampembeng 15:6f2798e45099 65 /** An error occurred while parsing the JSON string. Usually malformed JSON. */
ampembeng 15:6f2798e45099 66 JSON_PARSE_ERROR = -16,
ampembeng 15:6f2798e45099 67 /** Shadow: The response Ack table is currently full waiting for previously published updates */
ampembeng 15:6f2798e45099 68 WAIT_FOR_PUBLISH = -17,
ampembeng 15:6f2798e45099 69 /** SSL Write times out */
ampembeng 15:6f2798e45099 70 SSL_WRITE_TIMEOUT_ERROR = -18,
ampembeng 15:6f2798e45099 71 /** SSL Read times out */
ampembeng 15:6f2798e45099 72 SSL_READ_TIMEOUT_ERROR = -19,
ampembeng 15:6f2798e45099 73 /** A Generic error based on the platform used */
ampembeng 15:6f2798e45099 74 SSL_READ_ERROR = -20,
ampembeng 15:6f2798e45099 75 /** Any time an snprintf writes more than size value, this error will be returned */
ampembeng 15:6f2798e45099 76 SHADOW_JSON_BUFFER_TRUNCATED = -21,
ampembeng 15:6f2798e45099 77 /** Any time an snprintf encounters an encoding error or not enough space in the given buffer */
ampembeng 15:6f2798e45099 78 SHADOW_JSON_ERROR = -22,
ampembeng 15:6f2798e45099 79 /** Returned when the Network is disconnected and reconnect is either disabled or physical layer is disconnected */
ampembeng 15:6f2798e45099 80 NETWORK_DISCONNECTED = -23,
ampembeng 15:6f2798e45099 81 /** Returned when the Network is disconnected and the reconnect attempt has timed out */
ampembeng 15:6f2798e45099 82 NETWORK_RECONNECT_TIMED_OUT = -24,
ampembeng 15:6f2798e45099 83 /** Returned when the Network is disconnected and the reconnect attempt is in progress */
ampembeng 15:6f2798e45099 84 NETWORK_ATTEMPTING_RECONNECT = -25,
ampembeng 15:6f2798e45099 85 /** Returned when the Network is already connected and a connection attempt is made */
ampembeng 15:6f2798e45099 86 NETWORK_ALREADY_CONNECTED = -26,
ampembeng 15:6f2798e45099 87 /** The MQTT RX buffer received corrupt message */
ampembeng 15:6f2798e45099 88 RX_MESSAGE_INVALID = -27,
ampembeng 15:6f2798e45099 89 /** The MQTT RX buffer received a bigger message. The message will be dropped */
ampembeng 15:6f2798e45099 90 RX_MESSAGE_BIGGER_THAN_MQTT_RX_BUF = -28
ampembeng 15:6f2798e45099 91 }IoT_Error_t;
ampembeng 15:6f2798e45099 92
ampembeng 15:6f2798e45099 93 #endif /* AWS_IOT_SDK_SRC_IOT_ERROR_H_ */
ampembeng 15:6f2798e45099 94
ampembeng 15:6f2798e45099 95