Skip to content

Commit 80bd1e1

Browse files
authored
Updating the espidf-aws-iot example to use AWS Embedded C Embedded SDK v3.1.5 (platformio#601)
Signed-off-by: Alex J Lennon <[email protected]>
1 parent c00f016 commit 80bd1e1

39 files changed

+1170
-231
lines changed

examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/PortingGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ For additional details about API parameters refer to the [API documentation](htt
7676
Define the `TLSDataParams` Struct as in `network_platform.h`
7777
This is used for data specific to the TLS library being used.
7878

79-
`IoT_Error_t iot_tls_init(Network *pNetwork, char *pRootCALocation, const char *pDeviceCertLocation,
80-
const char *pDevicePrivateKeyLocation, const char *pDestinationURL,
79+
`IoT_Error_t iot_tls_init(Network *pNetwork, char *pRootCALocation, char *pDeviceCertLocation,
80+
char *pDevicePrivateKeyLocation, char *pDestinationURL,
8181
uint16_t DestinationPort, uint32_t timeout_ms, bool ServerVerificationFlag);`
8282
Initialize the network client / structure.
8383

examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/README.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
**We have released version 4.0.0 beta 1 of this SDK on the [v4_beta](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v4_beta) branch and encourage everyone to give it a try.**
1+
# AWS IoT Device SDK for Embedded C
22

3-
Version 4 is a new design, and therefore **NOT** backwards compatible with version 3.0.1. We will continue to fix bugs in v3.0.1 even after v4.0.0 is released, but we may not add new features to v3.0.1.
3+
This tag [3.1.5](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v3.1.5) 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.
44

5-
Please be aware that v4 beta may have bugs and performance issues. Additionally, there are currently missing features compared to v3.0.1. See the [README](https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/v4_beta/README.md/) on the v4_beta branch for more information.
6-
7-
## Branches
8-
9-
### Master branch
10-
The [master](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/master) branch will now contain bug fixes/features that have been minimally tested to ensure nothing major is broken. The current version on the master branch is v3.0.1. Eventually, we will move v4.0.0 to the master branch and move v3.0.1 to a legacy branch.
11-
12-
### Release branch
13-
The [release](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/release) branch will contain new releases for the SDK that have been tested thoroughly on all supported platforms. Please ensure that you are tracking the release branch for all production work. The current version on the release branch is v3.0.1. Eventually, we will move v4.0.0 to the release branch and move v3.0.1 to a legacy branch.
14-
15-
### v4_beta branch
16-
The [v4_beta](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v4_beta) branch will contain new features and a new design that inherits from both the AWS IoT Device SDK Embedded C and the libraries provided with Amazon FreeRTOS. This is version 4.0.0 of the SDK. Please be aware that v4 beta may have bugs and performance issues. Eventually, we will move v4.0.0 to the master/release branches and delete v4 beta branch.
17-
18-
### Development branch
19-
20-
The [development](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/development) currently hosts development of the next iteration of the AWS IoT Embedded C SDK version 4. It is currently a work in progress and should not be used to create any products. We will update this README when that status changes.
215

226
## Overview
237

24-
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](https://github.com/aws/aws-iot-device-sdk-embedded-c/blob/master/PortingGuide.md/).
8+
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).
259

2610
## Features
2711
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.
80.6 KB
Loading
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
@page architecture SDK Architecture and Design
3+
@brief This page documents the architecture and design goals of this SDK.
4+
5+
The Embedded C SDK has a layered architecture. It is currently based on the MQTT protocol, but may support protocols like HTTP in the future.
6+
7+
This SDK is primarily targeted for resource-constrained devices.
8+
9+
@section architecture_considerations Considerations during design
10+
- Low memory footprint (around 6k of code size without TLS library for the MQTT layer)
11+
- Flexibility in picking and choosing functionality
12+
- Static memory only (no malloc)
13+
- Configurable resource usage (JSON tokens, MQTT subscription handlers, etc.)
14+
- Portability across RTOSes
15+
16+
@section architecture_diagram Layered architecture
17+
@brief There are primarily 3 layers in the SDK as shown in the diagram below.
18+
19+
@image html architecture.png
20+
21+
@subsection architecture_tls TLS layer
22+
23+
This SDK uses TLS sockets to talk to the server. We provide wrappers around mbed TLS (ARM) that allow the libraries to connect with AWS IoT Platform.
24+
25+
@subsection architecture_mqtt AWS IoT MQTT client
26+
27+
The MQTT library included in this SDK is a modification of the [Paho C MQTT client](https://www.eclipse.org/paho/clients/c/). MQTT is a standardized publish subscribe protocol popular on embedded devices. AWS IoT supports the MQTT protocol for communication with devices. This MQTT library can be used standalone or with other AWS IoT services such as Thing Shadows or Jobs.
28+
29+
@subsection architecture_shadow Thing Shadow
30+
31+
This SDK provides a client implementation for [AWS IoT Thing Shadows](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html). A device's Shadow is a JSON document that is used to store and retrieve its current state information in the cloud regardless of whether it is connected to the Internet.
32+
*/
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# SDK version.
2+
PROJECT_NUMBER = "3"
3+
4+
# Doxygen layout file for libraries.
5+
LAYOUT_FILE = doc/config/layout_library.xml
6+
7+
# Documentation output directory.
8+
OUTPUT_DIRECTORY = doc/output/
9+
10+
# Don't generate LaTeX documentation
11+
GENERATE_LATEX = NO
12+
13+
# Don't rearrange members in the input files.
14+
SORT_MEMBER_DOCS = NO
15+
16+
# Silence output (warnings only).
17+
QUIET = YES
18+
19+
# Configure Doxygen for C.
20+
OPTIMIZE_OUTPUT_FOR_C = YES
21+
TYPEDEF_HIDES_STRUCT = YES
22+
23+
# Disable the tab bar and use treeview instead.
24+
DISABLE_INDEX = YES
25+
GENERATE_TREEVIEW = YES
26+
27+
# All files should have unique names, so showing the full path is unnecessary.
28+
FULL_PATH_NAMES = NO
29+
30+
# Disable the default Doxygen diagrams.
31+
HAVE_DOT = NO
32+
33+
# Disable the default Doxygen search engine (for now).
34+
SEARCHENGINE = NO
35+
36+
# Use custom header file, footer file, and stylesheet.
37+
HTML_HEADER = doc/config/html/header.html
38+
HTML_FOOTER = doc/config/html/footer.html
39+
HTML_EXTRA_STYLESHEET = doc/config/html/style.css
40+
41+
# Don't show external pages or groups.
42+
EXTERNAL_GROUPS = NO
43+
EXTERNAL_PAGES = NO
44+
45+
# Preprocessor defines.
46+
PREDEFINED = _ENABLE_THREAD_SUPPORT_
47+
48+
# Alias for starting a dependencies section.
49+
ALIASES += dependencies{2}="@section \1_dependencies Dependencies^^@brief Dependencies of the \2.^^^^"
50+
51+
# Alias for starting a configuration settings page.
52+
ALIASES += describeconfig="Configuration settings are C pre-processor constants. They can be set with a @c #`define` in the config file (`iot_config.h`) or by using a compiler option such as `-D` in gcc. If a configuration setting is not defined, the library will use a \"sensible\" default value (unless otherwise noted). Because they are compile-time constants, a library must be rebuilt if a configuration setting is changed."
53+
ALIASES += configpage{2}="@page \1_config Configuration^^@brief Configuration settings of the \2.^^^^@describeconfig^^@par configpagemarker"
54+
ALIASES += configpage{4}="@page \1_config \3 Configuration^^@brief Configuration settings of the \2.^^^^@describeconfig^^^^The settings on this page only affect the [\2](@ref \1). In addition to the settings on this page, them \2 will also be affected by [settings that affect all \4](@ref global_\4_config).^^@par configpagemarker"
55+
ALIASES += globalconfigpage{3}="@page global_\1_config Global \2 Configuration^^^^@describeconfig^^@brief Configuration settings that affect all \3.^^@par configpagemarker"
56+
57+
# Aliases for "Possible values", "Recommended values", and "Default values"
58+
# used in configuration setting pages.
59+
ALIASES += configpossible="<b>Possible values:</b> "
60+
ALIASES += configrecommended="<b>Recommended values:</b> "
61+
ALIASES += configdefault="<b>Default value (if undefined):</b> "
62+
63+
# Alias for starting a constants page.
64+
ALIASES += constantspage{2}="@page \1_constants Constants^^@brief Defined constants of the \2.^^^^Libraries may @c #`define` constants in their headers with special meanings. This page describes the meanings and uses of any constants defined by the \2. Related constants are shown in a single section on this page.^^"
65+
66+
# Alias for starting a functions page.
67+
ALIASES += functionspage{2}="@page \1_functions Functions^^@brief Functions of the \2.^^^^The \2 consists of the following functions."
68+
ALIASES += functionspage{3}="@page \1_functions \3^^@brief Functions of the \2.^^^^The \2 consists of the following functions."
69+
70+
# Alias for listing a single function on a functions page.
71+
ALIASES += functionname{1}="@subpage \1 <br>^^ @copybrief \1^^"
72+
73+
# Alias for creating a page for a single function.
74+
ALIASES += functionpage{3}="@page \2_function_\3 \1^^^^@snippet this declare_\2_\3^^@copydoc \1"
75+
76+
# Alias for starting a handles group.
77+
ALIASES += handles{2}="@defgroup \1_datatypes_handles Handles^^@brief Opaque handles of the \2."
78+
79+
# Alias for starting an enum group.
80+
ALIASES += enums{2}="@defgroup \1_datatypes_enums Enumerated types^^@brief Enumerated types of the \2."
81+
82+
# Alias for starting a function pointers group.
83+
ALIASES += functionpointers{2}="@defgroup \1_datatypes_functionpointers Function pointers types^^@brief Function pointers types of the \2."
84+
85+
# Alias for starting a structs group.
86+
ALIASES += structs{2}="@defgroup \1_datatypes_structs Structured types^^@brief Structured types of the \2."
87+
88+
# Alias for starting a parameter structures group.
89+
ALIASES += paramstructs{2}="@defgroup \1_datatypes_paramstructs Parameter structures^^@brief Structures passed as parameters to [\2 functions](@ref \1_functions)^^^^These structures are passed as parameters to library functions. Documentation for these structures will state the functions associated with each parameter structure and the purpose of each member."
90+
91+
# Alias for "Parameter for".
92+
ALIASES += paramfor="<b>Parameter for:</b> "
93+
94+
# Alias for parameter structure initializers.
95+
ALIASES += initializer{2}="All instances of #\1 should be initialized with #\2.^^"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- This file provides the custom footer for Doxygen-generated HTML. Per the
2+
Doxygen documentation, this file may need to be regenerated when Doxygen is
3+
updated. -->
4+
5+
<!--BEGIN GENERATE_TREEVIEW-->
6+
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
7+
<ul>
8+
<li class="footer">
9+
$generatedby
10+
<a href="http://www.doxygen.org/index.html">
11+
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion
12+
</li>
13+
<li class="footer">
14+
Last updated $date
15+
</li>
16+
<li class="footer" style="float:left">
17+
SDK version $projectnumber
18+
</li>
19+
</ul>
20+
</div>
21+
<!--END GENERATE_TREEVIEW-->
22+
23+
<!--BEGIN !GENERATE_TREEVIEW-->
24+
<hr class="footer"/>
25+
<address class="footer">
26+
<small>
27+
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
28+
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
29+
</a> $doxygenversion
30+
</small>
31+
</address>
32+
<!--END !GENERATE_TREEVIEW-->
33+
34+
</body>
35+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<!-- This file provides the custom header for Doxygen-generated HTML. Per the
2+
Doxygen documentation, this file may need to be regenerated when Doxygen is
3+
updated. -->
4+
5+
<!-- HTML header for doxygen 1.8.14-->
6+
<!DOCTYPE html>
7+
<html xmlns="http://www.w3.org/1999/xhtml">
8+
9+
<head>
10+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
11+
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
12+
<meta name="generator" content="Doxygen $doxygenversion"/>
13+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
14+
<!--BEGIN PROJECT_NAME-->
15+
<title>
16+
$projectname: $title
17+
</title>
18+
<!--END PROJECT_NAME-->
19+
<!--BEGIN !PROJECT_NAME-->
20+
<title>
21+
$title
22+
</title>
23+
<!--END !PROJECT_NAME-->
24+
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
25+
<script type="text/javascript" src="$relpath^jquery.js"></script>
26+
<script type="text/javascript" src="$relpath^dynsections.js"></script>
27+
$search
28+
$mathjax
29+
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
30+
$extrastylesheet
31+
</head>
32+
33+
<body>
34+
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35+
36+
<!--BEGIN TITLEAREA-->
37+
<div id="titlearea">
38+
<table cellspacing="0" cellpadding="0">
39+
<tbody>
40+
<tr style="height: 56px;">
41+
<!--BEGIN PROJECT_LOGO-->
42+
<td id="projectlogo">
43+
<img alt="Logo" src="$relpath^$projectlogo"/>
44+
</td>
45+
<!--END PROJECT_LOGO-->
46+
<!--BEGIN PROJECT_NAME-->
47+
<td id="projectalign" style="padding-left: 0.5em;">
48+
<div id="projectname">
49+
<span id="csdkprefix">AWS IoT Device SDK C:</span>
50+
$projectname
51+
</div>
52+
<!--BEGIN PROJECT_BRIEF-->
53+
<div id="projectbrief">
54+
$projectbrief
55+
</div>
56+
<!--END PROJECT_BRIEF-->
57+
</td>
58+
<!--END PROJECT_NAME-->
59+
<!--BEGIN !PROJECT_NAME-->
60+
<!--BEGIN PROJECT_BRIEF-->
61+
<td style="padding-left: 0.5em;">
62+
<div id="projectbrief">
63+
$projectbrief
64+
</div>
65+
</td>
66+
<!--END PROJECT_BRIEF-->
67+
<!--END !PROJECT_NAME-->
68+
<!--BEGIN DISABLE_INDEX-->
69+
<!--BEGIN SEARCHENGINE-->
70+
<td>
71+
$searchbox
72+
</td>
73+
<!--END SEARCHENGINE-->
74+
<!--END DISABLE_INDEX-->
75+
</tr>
76+
<tr>
77+
<td id="returntomain">
78+
<a href="../main/index.html">Return to main page &uarr;</a>
79+
</td>
80+
</tr>
81+
</tbody>
82+
</table>
83+
</div>
84+
85+
$treeview
86+
87+
<!--END TITLEAREA-->
88+
<!-- end header part -->

0 commit comments

Comments
 (0)