# AWS IoT Device SDK for Embedded C
This tag [3.1.2](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v3.1.2) contains the v3 version of AWS IoT Device SDK for Embedded C. No new features will be added to this tag; instead, only bug fixes will be made and minimally tested.
## Overview
The AWS IoT device SDK for embedded C is a collection of C source files which can be used in embedded applications to securely connect to the [AWS IoT platform](http://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html). It includes transport clients **MQTT**, **TLS** implementations and examples for their use. It also supports AWS IoT specific features such as **Thing Shadow**. It is distributed in source form and intended to be built into customer firmware along with application code, other libraries and RTOS. For additional information about porting the Device SDK for embedded C onto additional platforms please refer to the [PortingGuide](./PortingGuide.md).
## Features
The Device SDK simplifies access to the Pub/Sub functionality of the AWS IoT broker via MQTT and provide APIs to interact with Thing Shadows. The SDK has been tested to work with the AWS IoT platform to ensure best interoperability of a device with the AWS IoT platform.
### MQTT Connection
The Device SDK provides functionality to create and maintain a mutually authenticated TLS connection over which it runs MQTT. This connection is used for any further publish operations and allow for subscribing to MQTT topics which will call a configurable callback function when these topics are received.
### Thing Shadow
The Device SDK implements the specific protocol for Thing Shadows to retrieve, update and delete Thing Shadows adhering to the protocol that is implemented to ensure correct versioning and support for client tokens. It abstracts the necessary MQTT topic subscriptions by automatically subscribing to and unsubscribing from the reserved topics as needed for each API call. Inbound state change requests are automatically signalled via a configurable callback.
### Jobs
The Device SDK implements features to facilitate use of the AWS Jobs service. The Jobs service can be used for device management tasks such as updating program files, rotating device certificates, or running other maintenance tasks such are restoring device settings or restarting devices.
## Design Goals of this SDK
The embedded C SDK was specifically designed for resource constrained devices (running on micro-controllers and RTOS).
Primary aspects are:
* Flexibility in picking and choosing functionality (reduce memory footprint)
* Static memory only (no malloc’s)
* Configurable resource usage(JSON tokens, MQTT subscription handlers, etc…)
* Can be ported to a different RTOS, uses wrappers for OS specific functions
For more information on the Architecture of the SDK refer [here](http://aws-iot-device-sdk-embedded-c-docs.s3-website-us-east-1.amazonaws.com/index.html)
## Collection of Metrics
Beginning with Release v2.2.0 of the SDK, AWS collects usage metrics indicating which language and version of the SDK is being used. This allows us to prioritize our resources towards addressing issues faster in SDKs that see the most and is an important data point. However, we do understand that not all customers would want to report this data by default. In that case, the sending of usage metrics can be easily disabled by the user by setting the `DISABLE_METRICS` flag to true in the
`aws_iot_config.h` for each application.
## How to get started ?
Ensure you understand the AWS IoT platform and create the necessary certificates and policies. For more information on the AWS IoT platform please visit the [AWS IoT developer guide](http://docs.aws.amazon.com/iot/latest/developerguide/iot-security-identity.html).
In order to quickly get started with the AWS IoT platform, we have ported the SDK for POSIX type Operating Systems like Ubuntu, OS X and RHEL. The SDK is configured for the mbedTLS library and can be built out of the box with *GCC* using *make utility*. You'll need to download mbedTLS from the official ARMmbed repository. We recommend that you pick the latest version of 2.16 LTS release in order to have up-to-date security fixes.
## Installation
This section explains the individual steps to retrieve the necessary files and be able to build your first application using the AWS IoT device SDK for embedded C.
Steps:
* Create a directory to hold your application e.g. (/home/*user*/aws_iot/my_app)
* Change directory to this new directory
* Download the SDK to device and place in the newly created directory
* Expand the tarball (tar -xf <tarball.tar>). This will create the below directories:
* `certs` - TLS certificates directory
* `docs` - SDK API and file documentation. This folder is not present on GitHub. You can access the documentation [here](http://aws-iot-device-sdk-embedded-c-docs.s3-website-us-east-1.amazonaws.com/index.html)
* `external_libs` - The mbedTLS and jsmn source files
* `include` - The AWS IoT SDK header files
* `platform` - Platform specific files for timer, TLS and threading layers
* `samples` - The sample applications
* `src` - The AWS IoT SDK source files
* `tests` - Contains tests for verifying that the SDK is functioning as expected. More information can be found [here](https://github.com/aws/aws-iot-device-sdk-embedded-c/blob/master/tests/README.md/)
* View further information on how to use the SDK in the README file for samples that can be found [here](https://github.com/aws/aws-iot-device-sdk-embedded-c/blob/master/samples/README.md/)
Also, for a guided example on getting started with the Thing Shadow, visit the AWS IoT Console's [Interactive Guide](https://console.aws.amazon.com/iot).
## Porting to different platforms
As Embedded devices run on different real-time operating systems and TCP/IP stacks, it is one of the important design goals for the Device SDK to keep it portable. Please refer to the [porting guide](https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/master/PortingGuide.md/) to get more information on how to make this SDK run on your devices (i.e. microcontrollers).
## Migrating from 1.x to 2.x
The 2.x branch makes several changes to the SDK. This section provides information on what changes will be required in the client application for migrating from v1.x to 2.x.
* The first change is in the folder structure. Client applications using the SDK now need to keep only the certs, external_libs, include, src and platform folder in their application. The folder descriptions can be found above
* All the SDK headers are in the `include` folder. These need to be added to the makefile as include directories
* The source files are in the `src` folder. These need to be added to the makefile as one of the source directories
* Similar to 1.x, the platform folder contains the platform specific headers and source files. These need to be added to the makefile as well
* The `platform/threading` folder only needs to be added if multi-threading is required, and the `_ENABLE_THREAD_SUPPORT_` macro is defined in config
* The list below provides a mapping for migrating from the major APIs used in 1.x to the new APIs:
| Description | 1.x | 2.x |
| :---------- | :-- | :-- |
| Initializing the client | ```void aws_iot_mqtt_init(MQTTClient_t *pClient);``` | ```IoT_Error_t aws_iot_mqtt_init(AWS_IoT_Client *pClient, IoT_Client_Init_Params *pInitParams);``` |
| Connect | ```IoT_Error_t aws_iot_mqtt_connect(MQTTConnectParams *pParams);``` | ```IoT_Error_t aws_iot_mqtt_connect(AWS_IoT_Client *pClient, IoT_Client_Connect_Params *pConnectParams);``` |
| Subscribe | ```IoT_Error_t aws_iot_mqtt_subscribe(MQTTSubscribeParams *pParams);``` | ```IoT_Error_t aws_iot_mqtt_subscribe(AWS_IoT_Client *pClient, const char *pTopicName, uint16_t topicNameLen, QoS qos, pApplicationHandler_t pApplicationHandler, void *pApplicationHand
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
aws资源支持鸿蒙系统的AWS IoT 亚马逊物联网云平台接入软件包。适用于嵌入式 C 的 AWS IoT 设备开发工具包是 C 源文件的集合,可用于嵌入式应用程序以安全地连接到 AWS IoT 平台。它包括传输客户端、MQTT、TLS 实现及其使用示例。它还支持 AWS IoT 特定功能,例如 Thing Shadow。它以源代码形式分发,旨在与应用程序代码、其他库和 RTOS 一起内置到客户固件中。有关将嵌入式 C 设备 SDK 移植到其他平台的更多信息,请参阅移植指南。设备开发工具包简化了通过 MQTT 对 AWS IoT 代理的发布/订阅功能的访问,并提供与 Thing Shadows 交互的 API。该开发工具包已经过测试,可与 AWS IoT 平台配合使用,以确保设备与 AWS IoT 平台具有最佳互操作性。设备 SDK 提供创建和维护运行 MQTT 的相互身份验证的 TLS 连接的功能。此连接用于任何进一步的发布操作,并允许订阅 MQTT 主题,该主题将在收到这些主题时调用可配置的回调函数。设备开发工具包实施了一些功能,以方便使用 AWS Jobs 服务。作业服务可用于设
资源推荐
资源详情
资源评论





























收起资源包目录





































































































共 145 条
- 1
- 2
资源评论


传奇开心果编程

- 粉丝: 1w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 2023年小程序简介(三篇).docx
- 机械设计制造及自动化专业毕业设计开题报告.doc
- 电力信息通信系统网络安全防护研究论文.doc
- 网络安全宣传周演讲稿.docx
- 预训练变换器与文本排序
- 智能家居竞争策略分析报告.docx
- 网站企业会员协议书专业版.doc
- 第2章网页制作与发布第1节了解网页与网站.docx
- 春湘教版科学五下43《神奇的基因工程》课件1.pptx
- 片微型计算机原理及其应用电子教案.doc
- 雄安智慧城市建设方案最新.docx
- 浙江2011年4月自考真题CADCAM实用技术85704.doc
- 电子商务实习报告范文(精选).doc
- 通信电子线路习题解答.doc
- 出口收汇网络核销服务协议.doc
- 基于Cocos2D-X的跨平台游戏的设计与实现毕业设计论文.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
