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 #ifndef SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_
ampembeng 15:6f2798e45099 17 #define SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_
ampembeng 15:6f2798e45099 18
ampembeng 15:6f2798e45099 19 #include <stdbool.h>
ampembeng 15:6f2798e45099 20
ampembeng 15:6f2798e45099 21 #include "aws_iot_shadow_interface.h"
ampembeng 15:6f2798e45099 22 #include "aws_iot_config.h"
ampembeng 15:6f2798e45099 23
ampembeng 15:6f2798e45099 24
ampembeng 15:6f2798e45099 25 extern uint32_t shadowJsonVersionNum;
ampembeng 15:6f2798e45099 26 extern bool shadowDiscardOldDeltaFlag;
ampembeng 15:6f2798e45099 27
ampembeng 15:6f2798e45099 28 extern char myThingName[MAX_SIZE_OF_THING_NAME];
ampembeng 15:6f2798e45099 29 extern char mqttClientID[MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES];
ampembeng 15:6f2798e45099 30
ampembeng 15:6f2798e45099 31 void initializeRecords(MQTTClient_t *pClient);
ampembeng 15:6f2798e45099 32 bool isSubscriptionPresent(const char *pThingName, ShadowActions_t action);
ampembeng 15:6f2798e45099 33 IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t action, bool isSticky);
ampembeng 15:6f2798e45099 34 void incrementSubscriptionCnt(const char *pThingName, ShadowActions_t action, bool isSticky);
ampembeng 15:6f2798e45099 35
ampembeng 15:6f2798e45099 36 IoT_Error_t publishToShadowAction(const char * pThingName, ShadowActions_t action, const char *pJsonDocumentToBeSent);
ampembeng 15:6f2798e45099 37 void addToAckWaitList(uint8_t indexAckWaitList, const char *pThingName, ShadowActions_t action,
ampembeng 15:6f2798e45099 38 const char *pExtractedClientToken, fpActionCallback_t callback, void *pCallbackContext,
ampembeng 15:6f2798e45099 39 uint32_t timeout_seconds);
ampembeng 15:6f2798e45099 40 bool getNextFreeIndexOfAckWaitList(uint8_t *pIndex);
ampembeng 15:6f2798e45099 41 void HandleExpiredResponseCallbacks(void);
ampembeng 15:6f2798e45099 42 void initDeltaTokens(void);
ampembeng 15:6f2798e45099 43 IoT_Error_t registerJsonTokenOnDelta(jsonStruct_t *pStruct);
ampembeng 15:6f2798e45099 44
ampembeng 15:6f2798e45099 45 #endif /* SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ */
ampembeng 15:6f2798e45099 46