Skip to content

Commit 453a88a

Browse files
author
bhadrip
committed
Release of version 1.1.1
1 parent 76e9ddd commit 453a88a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+213
-167
lines changed

CHANGELOG.md

100755100644
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#Change Log
2+
## [1.1.1](https://github.com/aws/aws-iot-device-sdk-embedded-C/releases/tag/v1.1.1) (April 1,2016)
3+
4+
Bugfixes/Improvements:
5+
- Removing the Executable bit from all the files in the repository. Fixing [this](https://github.com/aws/aws-iot-device-sdk-embedded-C/issues/14) issue
6+
- Refactoring MQTT client to remove declaration after statement warnings
7+
- Fixing [this](https://forums.aws.amazon.com/thread.jspa?threadID=222467&tstart=0) bug
8+
9+
210
## [1.1.0](https://github.com/aws/aws-iot-device-sdk-embedded-C/releases/tag/v1.1.0) (February 10,2016)
311
Features:
412
- Auto Reconnect and Resubscribe
5-
613
Bugfixes/Improvements:
714
- MQTT buffer handling incase of bigger message
815
- Large timeout values converted to seconds and milliseconds

LICENSE.txt

100755100644
File mode changed.

NOTICE.txt

100755100644
File mode changed.

PortingGuide.md

100755100644
Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#Porting Guide
22

33
##Scope
4-
The scope of this document is to provide instructions to modify the provided source files and functions in of this SDK to run in a variety of embedded C–based environments (e.g. real-time OS, embedded Linux) and to be adjusted to use a specific TLS implementation as available with specific hardware platforms.
4+
The scope of this document is to provide instructions to modify the provided source files and functions in this SDK to run in a variety of embedded C–based environments (e.g. real-time OS, embedded Linux) and to be adjusted to use a specific TLS implementation as available with specific hardware platforms.
55

66
##Contents of the SDK
77

88
The SDK ported for linux can be downloaded from the below links.
9-
* [OpenSSL](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_openssl-1.1.0.tar)
10-
* [mbedTLS from ARM](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_mbedtls-1.1.0.tar)
9+
* [OpenSSL](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_openssl-1.1.1.tar)
10+
* [mbedTLS from ARM](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_mbedtls-1.1.1.tar)
1111

1212
The C-code files of this SDK are delivered via the following directory structure (see comment behind folder name for an explanation of its content).
1313

@@ -31,7 +31,7 @@ Current SDK Directory Layout (mbedTLS)
3131
All makefiles in this SDK were configured using the documented folder structure above, so moving or renaming folders will require modifications to makefiles.
3232

3333
##Explanation of folders and their content
34-
`iot_src` : This directory contains the SDK source code including wrappers around the MQTT library, device shadow code and utilities.
34+
`aws_iot_src` : This directory contains the SDK source code including wrappers around the MQTT library, device shadow code and utilities.
3535

3636
`aws_mqtt_embedded_client_lib` : The source code for the Embedded C MQTT client. This client is a modified version of the [Eclipse Paho](http://www.eclipse.org/paho/clients/c/embedded/) Embedded C client. The modifications include improved keep alive handling (callback on disconnect), a fix for unsubscribe functionality, buffer protection against too large MQTT messages and additional callback context to allow for a better layered architecture of the AWS IoT SDK.
3737

@@ -96,24 +96,47 @@ Clean up the connection
9696

9797
The TLS library generally provides the API for the underlying TCP socket.
9898

99+
###Sample Porting:
100+
Marvell has ported the SDK to its IoT Starter kit. [These](https://github.com/marvell-iot/aws_starter_sdk/tree/master/wmsdk/external/aws_iot/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_wmsdk) files are example implementations of the above mentioned functions.
101+
99102
##Time source for certificate validation
100103
As part of the TLS handshake the device (client) needs to validate the server certificate which includes validation of the certificate lifetime requiring that the device is aware of the actual time. Devices should be equipped with a real time clock or should be able to obtain the current time via NTP. Bypassing validation of the lifetime of a certificate is not recommended as it exposes the device to a security vulnerability, as it will still accept server certificates even when they have already expired.
101104

102105
##Integration into operating system
103106
###Single-Threaded implementation
104-
The single threaded implementation implies that the sample application code (SDK + MQTT client) is called periodically by the firmware application running on the main thread. This is done by calling the function `iot_mqtt_yield` (in the simple pub-sub example) and by calling `iot_shadow_yield()` (in the device shadow example). In both cases the keep-alive time is set to 10 seconds. This means that the yield functions need to be called at a minimum frequency of once every 10 seconds. Note however that the `iot_mqtt_yield()` function takes care of reading incoming MQTT messages from the IoT service as well and hence should be called more frequently depending on the timing requirements of an application. All incoming messages can only be processed at the frequency at which `yield` is called.
107+
The single threaded implementation implies that the sample application code (SDK + MQTT client) is called periodically by the firmware application running on the main thread. This is done by calling the function `aws_iot_mqtt_yield` (in the simple pub-sub example) and by calling `aws_iot_shadow_yield()` (in the device shadow example). In both cases the keep-alive time is set to 10 seconds. This means that the yield functions need to be called at a minimum frequency of once every 10 seconds. Note however that the `iot_mqtt_yield()` function takes care of reading incoming MQTT messages from the IoT service as well and hence should be called more frequently depending on the timing requirements of an application. All incoming messages can only be processed at the frequency at which `yield` is called.
105108

106109
###Multi-Threaded implementation
107-
In the simple multithreaded case the yield() function can be moved to a background thread. Ensure this task runs at the frequency described above. In this case, depending on the OS mechanism, a message queue or mailbox could be used to proxy incoming MQTT messages from the callback to the worker task responsible for responding to or dispatching messages. A similar mechanism could be employed to queue publish messages from threads into a publish queue that are processed by a publishing task.
110+
In the simple multithreaded case the `yield` function can be moved to a background thread. Ensure this task runs at the frequency described above. In this case, depending on the OS mechanism, a message queue or mailbox could be used to proxy incoming MQTT messages from the callback to the worker task responsible for responding to or dispatching messages. A similar mechanism could be employed to queue publish messages from threads into a publish queue that are processed by a publishing task. Ensure a synchronization primitive like mutex is used, as the library is not thread safe.
108111

109112
##Sample applications
110113

111-
The sample apps in this SDK provide a working implementation for either openSSL or mbedTLS, meaning that the function calls explained above are already implemented for these environments.
114+
The sample apps in this SDK provide a working implementation for either openSSL or mbedTLS, meaning that the function calls explained above are already implemented for these TLS libraries for linux.
112115

113116
###Memory Requirements
114-
Building the SDK shadow example using the Keil ARM toolchain on a Windows box.<br>
115-
Target is an ARM Cortex M4.<br>
116-
Code: ~8kb code+const<br>
117-
RAM: ~12kb<br>
118-
These numbers are with TLS and TCP/IP code stubbed out. This is just the SDK.
119117

118+
These numbers do not include TLS and TCP/IP code. This is just the AWS IoT SDK.
119+
120+
####Marvell Example
121+
The following sizes are of AWS IoT sample compiled for [Marvell AWS IoT](https://github.com/marvell-iot/aws_starter_sdk) platform.
122+
#####Size of Certificates
123+
124+
- Private key - 1733 bytes
125+
- Signed Certificate from AWS IoT - 1225 bytes
126+
- Root CA - 1680 bytes
127+
128+
#####Size of SDK with MQTT subscribe publish sample
129+
All sizes are in bytes
130+
131+
| Name | Text | RO Data | Data | BSS | Common | Total|
132+
|---|---|---|---|---|---|---|
133+
|MQTT Buffer: 512 bytes | 4436 | 304 | 1 | 1200 | 0 | 5941 |
134+
|MQTT Buffer: 256 bytes | 4436 | 304 | 1 | 688 | 0 | 5429 |
135+
136+
#####Size of SDK with Shadow sample
137+
All sizes are in bytes
138+
139+
| Name | Text | RO Data | Data | BSS | Common | Total|
140+
|---|---|---|---|---|---|---|
141+
|Shadow Sample with default `aws_iot_config.h` values | 9016 | 618 | 2 | 7792 | 0 | 17428 |
142+
| Shadow Sample with reduced JSON keys and less number of message handling at any given time | 9020 | 618 | 2 | 5322 | 0 | 14962 |

README.md

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Ensure you understand the AWS IoT platform and create the necessary certificates
2727

2828
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 porting of the SDK happens at the TLS layer, and for the MQTT protocol. The SDK is configured for two TLS libraries and can be built out of the box with *GCC* using *make utility*. The tarballs can be downloaded from the below links.
2929

30-
* [OpenSSL](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_openssl-1.1.0.tar)
31-
* [mbedTLS from ARM](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_mbedtls-1.1.0.tar)
30+
* [OpenSSL](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_openssl-1.1.1.tar)
31+
* [mbedTLS from ARM](https://s3.amazonaws.com/aws-iot-device-sdk-embedded-c/linux_mqtt_mbedtls-1.1.1.tar)
3232

3333
##Installation
3434
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.

aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c

100755100644
File mode changed.

aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/network_interface.h

100755100644
File mode changed.

aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer.c

100755100644
File mode changed.

aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer_linux.h

100755100644
File mode changed.

aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/mbedtls/network_mbedtls_wrapper.c

100755100644
File mode changed.

0 commit comments

Comments
 (0)