You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Submodule Pointers, Remove OTA and Update Demo Instructions in Readme Files (#1929)
* Update the manifest.yml to point to latest LTS
* Update the submodule pointers
* updating manifest.yml to remove ota submodule
* Removed ota submodule
* modify cmake to remove the ota submodule
* Update cmake files and remove ota files
* Resolve CI checks
* Resolve doxygen checks
* Update the demo instructions in readme files
* Resolve formatting issues
* Rectify instruction writing style
* Remove OTA related instructions from README.md
* Fix CI checks
* Update CSDK version in manifest file
* Update CHANGELOG.md
* Update 3rdparty submodule pointers
* Make changes to integrate with MbedTLSv3.5.1 and remove OTA cmake targets
* Handle unused parameters
* Handle unused variables
* FixCI checks
* Fix formatting
* Fix Formatting
* Fix Formatting
* Fix Formatting
* Fix Formatting
* Resolve PR comments
* Updated README and CHANGELOG to include versioning info
* Fixing CI checks
* Fixing OTA Documentation
Copy file name to clipboardExpand all lines: .github/workflows/update-submodules.yml
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ on:
8
8
required: true
9
9
default: main
10
10
allowed:
11
-
description: 'Optional regex pattern passed to `grep` to update only the specified library submodules, e.g. "ota\|jobs" updates only libraries with "ota" or "jobs" in the name.'
11
+
description: 'Optional regex pattern passed to `grep` to update only the specified library submodules, e.g. "jobs" updates only libraries with "jobs" in the name.'
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,27 @@
1
1
# Changelog for AWS IoT Device SDK for Embedded C
2
2
3
+
## 202412.00 (December 2024)
4
+
5
+
### Major Changes
6
+
7
+
-[#1929](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1929) This release brings the following changes:
8
+
- Include [202406.01-LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/releases/tag/202406.01-LTS) versions of coreMQTT, corePKCS11, coreHTTP, coreJSON, backoffAlgorithm, AWS IoT Device Shadow, AWS IoT Jobs, AWS IoT Device Defender, AWS IoT Fleet Provisioning and SigV4 libraries.
9
+
- Remove the OTA library and its associated demo.
10
+
11
+
NOTE: We recommend transitioning to the [new modular and composable OTA approach](https://freertos.org/Documentation/03-Libraries/07-Modular-over-the-air-updates/01-Over-the-air-updates) . To get started, see the new [OTA reference demo](https://github.com/FreeRTOS/Lab-Project-ota-example-for-AWS-IoT-Core?tab=readme-ov-file).
12
+
- Update MbedTLS version to v3.5.1
13
+
- Update readme instructions for demos for better user experience.
14
+
15
+
### Minor Changes
16
+
17
+
-[#1843](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1845), [#1848](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1848), [#1860](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1860), [#1859](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1859), [#1861](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1861), [#1870](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1870), [#1845](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1845) Minor bug fixes and improvements.
-[#1850](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1852) Add CI Workflows to build the non-aws demos on incoming pull-requests.
20
+
-[#1844](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1844) Update doxygen to 1.9.6.
21
+
-[#1875](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1875) Add a Fleet provisioning demo to get certificate and private key via CreateKeysAndCertificate API.
22
+
-[#1899](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1899) Add Tunnelmole as an open source tunneling option in addition to ngrok.
23
+
-[#1901](https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1901) Add a HTTP demo to generate a pre-signed URL to an S3 object file.
Copy file name to clipboardExpand all lines: MISRA.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -36,4 +36,4 @@ Deviations from the MISRA standard are listed below:
36
36
| Rule 11.8 | Required | An OpenSSL API `SSL_set_tlsext_host_name`, which is used in the TLS transport implementation, internally casts a string literal to a `void *` pointer. |
37
37
| Rule 13.4 | Required | A POSIX-specific macro utility `FD_SET` is flagged for this violation. This macro utility, whose implementation is supplied by the system, is used in the transport implementation. |
38
38
| Rule 14.4 | Required | A POSIX-specific macro utility `FD_ZERO` is flagged for this violation. This macro utility, whose implementation is supplied by the system, is used in the transport implementation. |
39
-
| Rule 21.6 | Required | The Standard Library input/output functions for opening and closing files are used by the OpenSSL transport implementation, since the OpenSSL API `PEM_read_X509` to read PEM files takes `FILE *` as an argument. The standard C library file handling functions are also used in POSIX platform implementation of OTA. |
39
+
| Rule 21.6 | Required | The Standard Library input/output functions for opening and closing files are used by the OpenSSL transport implementation, since the OpenSSL API `PEM_read_X509` to read PEM files takes `FILE *` as an argument. |
*[Migration guide from v3.1.5 to 202009.00 and newer releases](#migration-guide-from-v315-to-20200900-and-newer-releases)
37
37
*[MQTT Migration](#mqtt-migration)
38
38
*[Shadow Migration](#shadow-migration)
@@ -52,8 +52,6 @@
52
52
*[Configuring the S3 demos](#configuring-the-s3-demos)
53
53
*[Setup for AWS IoT Jobs demo](#setup-for-aws-iot-jobs-demo)
54
54
*[Setup for the Greengrass local auth demo](#setup-for-the-greengrass-local-auth-demo)
55
-
*[Prerequisites for the AWS Over-The-Air Update (OTA) demos](#prerequisites-for-the-aws-over-the-air-update-ota-demos)
56
-
*[Scheduling an OTA Update Job](#scheduling-an-ota-update-job)
57
55
*[Building and Running Demos](#building-and-running-demos)
58
56
*[Build a single demo](#build-a-single-demo)
59
57
*[Build all configured demos](#build-all-configured-demos)
@@ -141,11 +139,7 @@ See memory requirements for the latest release [here](https://aws.github.io/aws-
141
139
142
140
#### AWS IoT Over-the-air Update
143
141
144
-
The [AWS IoT Over-the-air Update](https://github.com/aws/ota-for-aws-iot-embedded-sdk) (OTA) library enables you to manage the notification of a newly available update, download the update, and perform cryptographic verification of the firmware update. Using the OTA library, you can logically separate firmware updates from the application running on your devices. You can also use the library to send other files (e.g. images, certificates) to one or more devices registered with AWS IoT. More details about OTA library can be found in [AWS IoT Over-the-air Update documentation](https://docs.aws.amazon.com/freertos/latest/userguide/freertos-ota-dev.html).
145
-
146
-
The AWS IoT Over-the-air Update library has a dependency on [coreJSON](https://github.com/FreeRTOS/coreJSON) for parsing of JSON job document and [tinyCBOR](https://github.com/intel/tinycbor.git) for decoding encoded data streams, other than the standard C library. It can be used with any MQTT library, HTTP library, and operating system (e.g. Linux, FreeRTOS) (see [demos](demos/ota) with coreMQTT and coreHTTP over Linux).
147
-
148
-
See memory requirements for the latest release [here](https://aws.github.io/aws-iot-device-sdk-embedded-C/202211.00/libraries/aws/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#ota_memory_requirements).
142
+
Removed since v2022412.00. We recommend transitioning to the [new modular and composable OTA approach](https://freertos.org/Documentation/03-Libraries/07-Modular-over-the-air-updates/01-Over-the-air-updates) . To get started, see the new [OTA reference demo](https://github.com/FreeRTOS/Lab-Project-ota-example-for-AWS-IoT-Core?tab=readme-ov-file).
149
143
150
144
#### AWS IoT Fleet Provisioning
151
145
@@ -228,6 +222,12 @@ For example, a second release in June 2021 would be 202106.01. Although the SDK
228
222
229
223
All of the released versions of the C-SDK libraries are available as git tags. For example, the last release of the v3 SDK version is available at [tag 3.1.5](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v3.1.5).
230
224
225
+
### 202412.00
226
+
227
+
This release includes [202406.01-LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/releases/tag/202406.01-LTS) versions of coreMQTT, corePKCS11, coreHTTP, coreJSON, backoffAlgorithm, AWS IoT Device Shadow, AWS IoT Jobs, AWS IoT Device Defender, AWS IoT Fleet Provisioning and SigV4 libraries.
228
+
229
+
Additionally it updates the MbedTLS version to v3.5.1 and removes the OTA library and its associated demo. We recommend transitioning to the [new modular and composable OTA approach](https://freertos.org/Documentation/03-Libraries/07-Modular-over-the-air-updates/01-Over-the-air-updates) . To get started, see the new [OTA reference demo](https://github.com/FreeRTOS/Lab-Project-ota-example-for-AWS-IoT-Core?tab=readme-ov-file).
230
+
231
231
### 202211.00
232
232
[API documentation of 202211.00 release](https://aws.github.io/aws-iot-device-sdk-embedded-C/202211.00/index.html)
233
233
@@ -297,10 +297,6 @@ Guide for porting AWS IoT Device Shadow library is available [here](https://aws.
297
297
298
298
Guide for porting AWS IoT Device Defender library is available [here](https://aws.github.io/aws-iot-device-sdk-embedded-C/202211.00/libraries/aws/device-defender-for-aws-iot-embedded-sdk/docs/doxygen/output/html/defender_porting.html).
299
299
300
-
### Porting AWS IoT Over-the-air Update
301
-
302
-
Guide for porting OTA library to your platform is available [here](https://aws.github.io/aws-iot-device-sdk-embedded-C/202211.00/libraries/aws/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/ota_porting.html).
303
-
304
300
## Migration guide from v3.1.5 to 202009.00 and newer releases
305
301
306
302
### MQTT Migration
@@ -379,8 +375,7 @@ Dependency | Version | Usage
379
375
380
376
#### AWS IoT Account Setup
381
377
382
-
You need to setup an AWS account and access the AWS IoT console for running the AWS IoT Device Shadow library, AWS IoT Device Defender library, AWS IoT Jobs library,
383
-
AWS IoT OTA library and coreHTTP S3 download demos.
378
+
You need to setup an AWS account and access the AWS IoT console for running the AWS IoT Device Shadow library, AWS IoT Device Defender library, AWS IoT Jobs library, and coreHTTP S3 download demos.
384
379
Also, the AWS account can be used for running the MQTT mutual auth demo against AWS IoT broker.
385
380
Note that running the AWS IoT Device Defender, AWS IoT Jobs and AWS IoT Device Shadow library demos require the setup of a Thing resource for the device running the demo.
An Amazon Root CA certificate can be downloaded from [here](https://www.amazontrust.com/repository/).
445
440
446
-
To create a provisioning template and claim credentials, sign into your AWS account and visit [here][create_provtemplate]. Make sure to enable the "Use the AWS IoT registry to manage your device fleet" option. Once
441
+
To create a provisioning template and claim credentials, sign into your AWS account and follow the steps given in the [readme.md in the demo folder](./demos/fleet_provisioning/readme.md) and visit [here][create_provtemplate]. Make sure to enable the "Use the AWS IoT registry to manage your device fleet" option. Once
447
442
you have created the template and credentials, modify the claim certificate's policy to match the [sample policy][sample_claim_policy].
448
443
449
444
In order to set these configurations manually, edit `demo_config.h` in the demo folder to `#define` the following:
@@ -505,38 +500,21 @@ The following creates a job that specifies a Linux Kernel link for downloading.
Note: Replace the placeholders in angle brackets with your specific information.
512
+
508
513
509
514
#### Setup for the Greengrass local auth demo
510
515
511
516
For setting up the Greengrass local auth demo, see [the README in the demo folder](./demos/greengrass/greengrass_demo_local_auth/README.md).
512
517
513
-
#### Prerequisites for the AWS Over-The-Air Update (OTA) demos
514
-
515
-
1. To perform a successful OTA update, you need to complete the prerequisites mentioned [here](https://docs.aws.amazon.com/freertos/latest/userguide/ota-prereqs.html).
516
-
1. A code signing certificate is required to authenticate the update. A code signing certificate based on the SHA-256 ECDSA algorithm will work with the current demos. An example of how to generate this kind of certificate can be found [here](https://docs.aws.amazon.com/freertos/latest/userguide/ota-code-sign-cert-esp.html).
517
-
1. The code signing certificate can be either baked into firmware as a string, or stored as a file.
518
-
1. For baked in certificate method, copy the certificate to signingcredentialSIGNING_CERTIFICATE_PEM in [ota_pal_posix.c](https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/platform/posix/ota_pal/source/ota_pal_posix.c).
519
-
2. For file storage method, store the certificate as a file and supply the file path in "Path name of code signing certificate on device" field when creating the OTA job in AWS IoT Console.
520
-
521
-
#### Scheduling an OTA Update Job
522
-
523
-
After you build and run the initial executable you will have to create another executable and schedule an OTA update job with this image.
524
-
1. Increase the version of the application by setting macro `APP_VERSION_BUILD` in `demos/ota/ota_demo_core_[mqtt/http]/demo_config.h` to a different version than what is running.
525
-
1. Rebuild the application using the [build steps](#building-and-running-demos) below into a different directory, say `build-dir-2`.
526
-
1. Rename the demo executable to reflect the change, e.g. `mv ota_demo_core_mqtt ota_demo_core_mqtt2`
527
-
1. Create an OTA job:
528
-
1. Go to the [AWS IoT Core console](https://console.aws.amazon.com/iot/).
529
-
1. Manage → Jobs → Create → Create a FreeRTOS OTA update job → Select the corresponding name for your device from the thing list.
530
-
1. Sign a new firmware → Create a new profile → Select any SHA-ECDSA signing platform → Upload the code signing certificate(from prerequisites) and provide its path on the device.
531
-
1. Select the image → Select the bucket you created during the [prerequisite steps](#prerequisites-for-the-aws-over-the-air-update-ota-demos) → Upload the binary `build-dir-2/bin/ota_demo2`.
532
-
1. The path on device should be the absolute path to place the executable and the binary name: e.g. `/home/ubuntu/aws-iot-device-sdk-embedded-C-staging/build-dir/bin/ota_demo_core_mqtt2`.
533
-
1. Select the IAM role created during the [prerequisite steps](#prerequisites-for-the-aws-over-the-air-update-ota-demos).
534
-
1. Create the Job.
535
-
1. Run the initial executable again with the following command: `sudo ./ota_demo_core_mqtt` or `sudo ./ota_demo_core_http`.
536
-
1. After the initial executable has finished running, go to the directory where the downloaded firmware image resides which is the path name used when creating an OTA job.
537
-
1. Change the permissions of the downloaded firmware to make it executable, as it may be downloaded with read (user default) permissions only: `chmod 775 ota_demo_core_mqtt2`
538
-
1. Run the downloaded firmware image with the following command: `sudo ./ota_demo_core_mqtt2`
539
-
540
518
### Building and Running Demos
541
519
542
520
Before building the demos, ensure you have installed the [prerequisite software](#prerequisites). On Ubuntu 18.04 and 20.04, `gcc`, `cmake`, and OpenSSL can be installed with:
@@ -563,8 +541,6 @@ mqtt_demo_mutual_auth
563
541
mqtt_demo_plaintext
564
542
mqtt_demo_serializer
565
543
mqtt_demo_subscription_manager
566
-
ota_demo_core_http
567
-
ota_demo_core_mqtt
568
544
pkcs11_demo_management_and_rng
569
545
pkcs11_demo_mechanisms_and_digests
570
546
pkcs11_demo_objects
@@ -629,6 +605,7 @@ Any version after 1.6.14 will drop privileges as soon as the configuration file
You will be prompted to configure the Common Name (CN) after running the following command. It's crucial to enter the same value that was specified for the `BROKER_ENDPOINT` macro in the demo_config.h file. In this particular instance, the correct value to enter is simply "localhost".
632
609
```sh
633
610
# Generate server key and certificate.# Provide the Subject field information as appropriate for Server certificate. Make sure the Common Name (CN) field is different from the root CA certificate.
634
611
openssl req -nodes -sha256 -new -keyout server.key -out server.csr # Sign with the CA cert.
@@ -668,18 +645,30 @@ Run httpbin through port 80:
668
645
docker pull kennethreitz/httpbin
669
646
docker run -p 80:80 kennethreitz/httpbin
670
647
```
648
+
The `kennetheitz/httpbin` docker image is not compatible with linux/arm64 platform that is used by Mac machines. Hence instead of that use `mccutchen/go-httpbin`.
649
+
```sh
650
+
#To install the image run:
651
+
652
+
$ docker pull mccutchen/go-httpbin
653
+
654
+
#To run the server on local host on port 80 run
655
+
656
+
$ docker run -p 80:8080 mccutchen/go-httpbin
657
+
```
658
+
671
659
672
660
`SERVER_HOST` defined in `demos/http/http_demo_plaintext/demo_config.h` can now be set to `localhost`.
673
661
674
662
To run `http_demo_basic_tls`, you could use either [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client), an open source tunneling tool, or [ngrok](https://ngrok.com/download), a popular closed source tunneling tool, to create an HTTPS tunnel to the httpbin server currently hosted on port 80:
675
663
676
664
**Using Tunnelmole**
665
+
677
666
First, install Tunnelmole. On Linux, Mac and Windows Subsystem for Linux, use
The above may not function correctly on ARM machines like mac. As an alternative, you can clone the repository and build the application from its source code.
683
672
For Windows without WSL, [download tmole.exe](https://tunnelmole.com/downloads/tmole.exe) and add it to your [PATH](https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows).
684
673
685
674
Then run `tmole 80`
@@ -702,7 +691,17 @@ Set `SERVER_HOST` in `demos/http/http_demo_basic_tls/demo_config.h` to the https
702
691
703
692
Set `SERVER_HOST` in `demos/http/http_demo_basic_tls/demo_config.h` to the https link provided by ngrok, without `https://` preceding it.
704
693
705
-
You must also download the Root CA certificate provided by the ngrok https link and set `ROOT_CA_CERT_PATH` in `demos/http/http_demo_basic_tls/demo_config.h` to the file path of the downloaded certificate.
694
+
**Getting the Root CA**
695
+
696
+
Download the Root CA certificate from the obtained https link. To obtain this:
697
+
698
+
1. Open the https link in your browser.
699
+
2. Click on the https lock button in the url bar.
700
+
3. Download the chain of certificates.
701
+
4. Locate the last certificate in the chain - this is your required Root CA certificate.
702
+
5. Copy this certificate and paste it into a new .pem file.
703
+
704
+
Set the macro ROOT_CA_CERT_PATH in demo_config.h to the file path of your newly created Root CA certificate.
706
705
707
706
## Generating Documentation
708
707
Note: For pre-generated documentation, please visit [Releases and Documentation](#releases-and-documentation) section.
0 commit comments