Commit Graph

567 Commits (a004a21b13c3567fe98b812c47cbc0e749c74bdf)

Author SHA1 Message Date
Paul Bartell e0e488263e cellular: Update Visual Studio project files 3 years ago
Paul Bartell 7d43b62c9d cellular: Remove duplicate files 3 years ago
alfred gedeon 4242c47a8d
Demo: qemu mps2 echo client cleanup (#833) 3 years ago
johnrhen f062becb34
Create Fleet Provisioning Demo AWS Setup Script in Python (#778)
* Create CloudFormation template for demo setup

* Add CF_ prefix to CloudFormation-created resources to avoid collisions

* Update lexicon.txt

* Create initial python setup script

* Create separate demo_cleanup.py file

* Move setup items to DemoSetup folder

* Add demo_config.h setup to the demo_setup.py script

* Modify error logging on demo_setup.py

* Add file cleanup to demo_cleanup.py

* Rename convert_pem_to_der.py to convert_credentials_to_der.py

* Adjust comment wording on demo_cleanup.py

* added configUSE_TICKLESS_IDLE (#764)

* Fix tests needed for https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/435 (#766)

* Fix tests needed for https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/435

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Add tests to cover https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/435 (#768)

Add tests to cover https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/435

This ensures that the coverage does not go down with the PR
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/435.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Add tests to increase queue code coverage (#770)

These tests cover the following portion in the queue code:

static void prvUnlockQueue( Queue_t * const pxQueue )
{
    ...

    if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE )
    {
        /* The queue is a member of a queue set, and posting to
            * the queue set caused a higher priority task to unblock.
            * A context switch is required. */
        vTaskMissedYield();
    }
    else
    {
        mtCOVERAGE_TEST_MARKER();
    }

    ...
}

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update FreeRTOS-Kernel submodule pointer (#771)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Add new names to spell check dictionary (#772)

* Return error if invalid input detected in transport layer (Send/Recv) (#773)

* return error if invalid input detected in transport layer

* Create mqtt_pkcs11_demo_helpers for AWS demos (#769)

* Create mqtt_pkcs11_demo_helpers by modifying mqtt_demo_helpers

* Update formatting and variable naming

* Fix multi-line parameter formatting

* Update file headers to match latest release version

* GCC/Rx100 Demo project files update to e2 Studio v8 (#776)

* Upgrade GCC project files for e2 studio v7.8.0 in Demo/RX100-RSK_GCC_e2studio folder

* Update Demo project file to e2 Studio v8 and remove the .bat file.

* Update the choice of toolchain version.

* Update the link in file header.

Co-authored-by: NoMaY (a user of Japan.RenesasRulz.com) <NoMaY-jp@outlook.com>

* Update FreeRTOS-Cellular-Interface submodule pointer (#775)

* Update cellular sub-module pointer
* Add more log in cellular_setup.c to indicate error
* Adjust cellular transport timeout value for demo application
* Add default cellular module specific config in cellular_config.h

* Create separate demo_cleanup.py file

* Move setup items to DemoSetup folder

* Add demo_config.h setup to the demo_setup.py script

* Modify error logging on demo_setup.py

* Add file cleanup to demo_cleanup.py

* Rename convert_pem_to_der.py to convert_credentials_to_der.py

* Adjust comment wording on demo_cleanup.py

* Adjust comment wording on demo_config.h

* Format files and reduce code redundancy

* Update lexicon.txt

* Remove preconfigured fields from demo_config,h

* Update convert_credentials_to_der.py

Co-authored-by: Archit Gupta <71798289+archigup@users.noreply.github.com>

* Make python files executable

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Ravishankar Bhagavandas <bhagavar@amazon.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
Co-authored-by: NoMaY (a user of Japan.RenesasRulz.com) <NoMaY-jp@outlook.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Archit Gupta <71798289+archigup@users.noreply.github.com>
3 years ago
chinglee-iot 5a2c56bf9c
Cancel all command when MQTT command failed (#814)
* Use MQTT Agent provided API, MQTTAgent_CancelAll, to clear queue when
  MQTT command failed.
3 years ago
RichardBarry da3a1371db
Fix mpu simulator demo (#805)
* All for the Demo/Cortex_MPU_Simulator_Keil_GCC GCC demo:
+ Update the linker script so the project builds now the heap is part of the privileged data.
+ Add simulator.ini to setup the simulator memory map when the debugger starts to prevent invalid access errors.
+ Set configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY to 1 in FreeRTOSConfig.h, then fix up resultant build errors.
+ Set configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS to 0 in FreeRTOSConfig.h, then fix up resultant build errors.

* Fix compiler warning in Arm startup file.

* Update comments in the file headers to pass the git checkin tests.

* Update header comments to pass git checkin tests.

* Second attempt to get file header comments correct for the check-in tests.

* Third attempt to get the header comments correct.

* Fix spelling.

* Fix manifest check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: none <>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
Muneeb Ahmed c75769438a
Update coreHTTP submodule for llhttp (#803)
* Use dev branch of coreHTTP

* Update included http parser source files
3 years ago
Aniruddha Kanhere 07c7ba7aa9
Remove deprecated macro (ipconfigRAND32) references (#781)
* Remove ipconfigRAND32 referances from demos

* Fix license header
3 years ago
chinglee-iot 1ce4d784cc
Update FreeRTOS-Cellular-Interface submodule pointer (#775)
* Update cellular sub-module pointer
* Add more log in cellular_setup.c to indicate error
* Adjust cellular transport timeout value for demo application
* Add default cellular module specific config in cellular_config.h
3 years ago
johnrhen 348ebbcbf1
Create mqtt_pkcs11_demo_helpers for AWS demos (#769)
* Create mqtt_pkcs11_demo_helpers by modifying mqtt_demo_helpers

* Update formatting and variable naming

* Fix multi-line parameter formatting

* Update file headers to match latest release version
3 years ago
ActoryOu 9b27a5de4e
Return error if invalid input detected in transport layer (Send/Recv) (#773)
* return error if invalid input detected in transport layer
3 years ago
johnrhen 4e450d39d4
Update Fleet Provisioning Demo comments (#762) 3 years ago
johnrhen 43defa566c
Apply release changes to main branch (#759)
* Update History.txt and README.md for December release (#744)

* Update History.txt and README.md for release

* Bump mbedtls submodule to v2.28.0 (#745)

* Patch project files for mbedtls (#751)

* Apply group 1 patches

* Apply patches for group 2

* Update project files for mbedTLS new version

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in projects

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix warnings in HTTP_S3_Download demo

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update changelog and history for corePKCS11 update (#752)

* Update submodule pointer and manifest.yml for corePKCS11 (#754)

* Update readme and history.txt to show that Sigv4 is a newly added library (#756)

* Revert update to v143 of VS toolset (#757)

* [AUTO][RELEASE]: Bump file header version to "202112.00"

* Update file headers to satisfy core checks

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: johnrhen <johnrhen@users.noreply.github.com>
3 years ago
Bhaumik Jain b44f5932fe
update submodule pointer in P3 (#737) 3 years ago
chinglee-iot 8f5740a67c
Update the submodule pointer of FreeRTOS-Cellular-Interface (#739)
* Update manifest and submodule pointer of FreeRTOS-Cellular-Interface
3 years ago
Oscar Michael Abrina 3da495ccf8
Update sigv4 submodule pointer to latest release tag (#735)
* Update sigv4 submodule pointer to latest release tag

* Update manifest.yml sigv4 entry to v1.1.0
3 years ago
johnrhen eefc603422
Update fleet provisioning submodule and pointer to release tag (#736) 3 years ago
johnrhen 92c5f8fe50
Add default Claim template to fleet provisioning example (#734) 3 years ago
Aniruddha Kanhere 65fd843787
Update the submodule pointer of FreeRTOS+TCP (#733)
* Update manifest and submodule pointer of TCP

* Update TCP submodule pointer and manifest
3 years ago
johnrhen 56394747d4
Add default thing policy name to Fleet Provisioning example template (#732)
* Add default thing policy name to the example template

* Rename default Thing policy
3 years ago
johnrhen a727061dc2
Create example IoT Thing policy (#731)
* Create example claim policy and update formatting on previous examples

* Add trailing linebreak
3 years ago
Bhaumik Jain 4610b37ade
Update server root CA certificate (#730)
* update server root CA certificate for http demo

* update comments
3 years ago
johnrhen c1266ddb60
Port the AWS Fleet Provisioning demo from the CSDK (#724)
* Add fleet provisioning and tinycbor submodules

* Copy demo files from FP in CSDK and the Defender Demo

* Modify FP demo files to function in FreeRTOS

* Update styling and formatting of demo files to match FreeRTOS conventions

Co-authored-by: Archit Gupta <71798289+archigup@users.noreply.github.com>
3 years ago
johnrhen b1b3a0a3e9
Add variable PKCS11 label support to using_mbedtls_pkcs11 (#723)
The previous "using_mbedtls_pkcs11.c" implementation requires using the device key and device certificate stored under the labels "pkcs11configLABEL_DEVICE_PRIVATE_KEY_FOR_TLS" and "pkcs11configLABEL_DEVICE_CERTIFICATE_FOR_TLS".

This commit updates the NetworkCredentials to include fields for pClientCertLabel and pPrivateKeyLabel, so other labels can be used with PKCS11. This matches the behavior seen in the CSDK.

This commit also updates the "pkcs11_mqtt_mutual_auth_demo" to set the newly-added NetworkCredentials fields.
3 years ago
johnrhen d2329791aa
Fix PKCS11 demo failures (#722)
* Fix build errors from improper core_pkcs11_pal paths

* Runtime failure fixes

* Runtime PKCS11 demo failure fixes

Co-authored-by: Shivangi <66447522+gshvang@users.noreply.github.com>
3 years ago
andysun2015 426ad44c05
Remove using_mbedtls folder and move its content to the parent folder (#717)
Move the contents of FreeRTOS/FreeRTOS-Plus/Source/Application-Protocols/network_transport/using_mbedtls/
to its parent folder i.e. FreeRTOS/FreeRTOS-Plus/Source/Application-Protocols/network_transport/.
This removes one unnecessary folder in the hierarchy.
3 years ago
tianmc1 a483eba7d4
Updated HTTP S3 download demo to show SigV4 usage (#696)
* Updated HTTP S3 download demo to show SigV4 usage

* Fixed missing config in demo_config

* Added dynamic sha256 payload compute

* Fixed some compiler warnings

* Fixed some comments

* remove unused code

* Spell check updates

* Core check fix
3 years ago
andysun2015 75639a3e86
Fix build warning due to log configuration. (#715) 3 years ago
aggarg ecd1a8f9f1 [AUTO][RELEASE]: Bump file header version to "202111.00" 3 years ago
Aniruddha Kanhere e106d3fa61
Update manifest and submodule pointer of TCP (#712) 3 years ago
Shivangi 7f268e655a
[P3 Release] Update submodule Pointers of the spoke repos in P3 (#707)
* Updating submodule except OTA

* Update Manifest file

* Update Manifest file

* Updating Ota pointer

* Manifest Update
3 years ago
andysun2015 221adba9e5
Update FreeRTOS-Cellular-Interface (#705)
* Update FreeRTOS-Cellular-Interface

* manifest file update
3 years ago
andysun2015 a6dfca9829
Update file header and cellular lib commit (#704) 3 years ago
andysun2015 957fb26dbe
Add cellular library submodule path and demo (#695)
* [Cellular] Add cellulr lib submodule and demo app

* [Cellular] Fix memory violation in transport layer and add using LoggingPrintf

* Update FreeRTOS Cellular Interface

* Change the mbedtls usage in FreeRTOS-Plus

* [Cellular] Fix missing spell

* [Cellular] Add manifest.yml

* Fix missing spell

* Update manifest.yml

* [Cellular] Add integration test

* Modify the demo log level to LOG_INFO

* Update cellular interface

* The modification of the folder structure for cellular library

* Rename the naming of demo

* Adjust the location of using_mbedtls and socket_wrapper

* Adjust project setting for relocating using_mbedtls and socket_wrapper

* Turn off PSM mode

* Add start marker for CI validation.

* The modification for mbedtls platform send/recv function for cellular

* Change the project file due to the changes of mbedtls platform send/recv function for cellular

* Fix missing newline and remove unused file

* Add missing configuration.

* Make cellular and freertos tcp plus use the same transport implementation

* Add comment for the macro MBEDTLS_SSL_SEND and MBEDTLS_SSL_RECV

* Make changes from the github comment.
3 years ago
Gaurav-Aggarwal-AWS 226c987b1a
Remove non-ASCII characters (#701)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
Shivangi 20fc88cb8b
Update Submodule Pointer in P3 Repo (#699)
* changing submodule

* manifest file update

Co-authored-by: Paul Bartell <pbartell@amazon.com>
3 years ago
Shivangi 0407cbf166
Include path update (#698) 3 years ago
Shivangi 08238481d1
pkcs11 util changes (#694) 3 years ago
chinglee-iot b4cc7670df
Fix possible null pointer dereference in Log (#677)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
3 years ago
Gaurav-Aggarwal-AWS a40172758a
Update submodule pointers (#680)
* Update submodule pointers

This is needed to address doxygen failures (Which are already fixed in
the submoduled repos).

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
JD 4744787e55
Added 'extern "C"' to FreeRTOS-CLI header file. (#674)
Co-authored-by: JD Scott <jscott@hotstart.com>
4 years ago
tianmc1 176f1cae02 [AUTO][RELEASE]: Bump file header version to "202107.00" 4 years ago
tianmc1 40c9e37d10
Updated submodule libraries to latest release (#667)
* Updated submodule libraries to latest release

* Updated pointer for FreeRTOS-Plus-TCP

* Updated README about SNTP

* Updated link for coreSNTP on freertos.org

* Updated corePKCS11 to 'update-pkcs11submodule' branch for testing

* Update corePKCS11 version in manifest.yml

* Updated corePKCS11 pointer to v3.1.0

Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
4 years ago
lienng_aws 01614ca997
Replace library links with the application-protocols one (#665)
* Replace library links with the application-protocols one

The ReadMe.txt refers to library link on FreeRTOS.org which will not be available until after the library is released in github. Instead, use top level page https://www.freertos.org/application-protocols.html which lists all the libraries in this directory which is also easy for user to navigate and could avoid this issue when releasing new library.

* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt

Co-authored-by: Archit Aggarwal <architag@amazon.com>

* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt

Co-authored-by: Paul Bartell <pbartell@amazon.com>

Co-authored-by: Archit Aggarwal <architag@amazon.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
4 years ago
Archit Aggarwal 69b9155bad
Hygiene changes of old Demo folders and temporary removal of submodules (#666)
* Remove submodules of community and partner contribution repos, and stale directory of FreeRTOS+UDP

* Obselete NTP demo and rename of HTTP server demo folder

* Update manifest.yml
4 years ago
Shivangi b5ab5087db
[P3] SubModules pointer update of was libraries to latest commits (#663)
* Updating device shadow to latest commit

* updating jobs pointer

* Updating device-defender pointer
4 years ago
Oscar Michael Abrina dd80d615b5
Remove duplicate error.c in WIN32.vcxproj.filters files (#662) 4 years ago
Archit Aggarwal 1e4f79709c
Some changes for upcoming release (#657)
Update mbedTLS submodule to v2.26.0 and update History.txt
4 years ago
Shivangi 6c17a54685
CorePKCS11 Muthual Auth demo fix (#656) 4 years ago
tianmc1 aa1eed8b4e
Defender demo cleanup (#651) 4 years ago
Oscar Michael Abrina 63d38b846e
Remove redundant mbedtls error sources (#654)
Since `mbedtls_error.c` is already part of the mbedTLS submodule, the duplicate files are removed from this repository.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Aggarwal a44df5c1b9
Fix clock drift issue in SNTP demo (#655)
Issue
The existing clock discipline algorithm in the coreSNTP demo yields an inaccurate wall-clock time (in UTC) that is always behind the astronomical UTC time by the chosen polling interval period of the demo. The issue with the clock discipline algorithm was that it was calculating the slew rate to make the system clock be gradually compensated for the previous time synchronization clock drift over the period of the subsequent polling time interval. Thereby, the clock slew rate correction calculated is always lower than it should be (because it does not incorporate possible clock drift that would occur over another period of time polling interval till the next time synchronization attempt).

Fix
This PR fixes the clock discipline algorithm to make the demo calculate its system time that matches the astronomical UTC time.
The fix involves simplifying the clock discipline algorithm to use a combination of step and slew correction approaches where:

1. Step correction is applied on EVERY time successful synchronization with a time server. This immediately corrects the system time to match server time.
2. Slew rate is calculated ONCE (on the second successful time synchronization with server) and applied henceforth, on every time polling interval period to compensate gradually for the system clock drift during the period.
4 years ago
Shivangi a9c27ccdac
[P3] Update corePKCS11 demo to read the public key (#652)
* PKCS11 fix
4 years ago
Archit Aggarwal b550e6090d
Add note in coreSNTP demo about Network Time Security (NTS) (#648)
This PR makes the following changes in the coreSNTP demo:

To suggest the most secure way of using SNTP communication, we are adding a documentation note about the Network Time Security in the SNTP demo.
Hygiene update of using the FreeRTOS/backoffAlgorithm utility library for calculating time polling period interval backoff when time requests are rejected by a time server.
4 years ago
tianmc1 096824515f
Cleaned up report_builder in defender_demo_json (#644) 4 years ago
Archit Aggarwal 5a4fe788d7
Update coreSNTP demo to avoid issues from open UDP socket (#647)
Issue
There is a possible vulnerability of Denial of Service attack by keeping the UDP socket for the SNTP client task always open in the coreSNTP demo. The Denial of Service attack can occur from receiving multiple server response (duplicated or malicious) for a single SNTP time request sent by the client, and thereby, filing the socket network buffer response packets that affect future time requests.

Solution
This PR fixes this vulnerability by updating the demo to keep a UDP socket open only for the time period of waiting for server response, closing the socket on either receiving a server response or experiencing server timeout, and re-creating a UDP socket for the next polling try. This PR also adds another security functionality using a random port for UDP socket to protect against spoofing attacks from "off-network path" attackers.
4 years ago
Shivangi 3fd635b39e
[P3] Submodule pointer update to LTS Libraries (#640)
* moved submodule to backoff v1.0.1

* move corehttp module to latest commit

* move coremqtt module to latest commit

* move coremqtt Agent module to latest commit

* move coreSNTP Agent module to latest commit

* move coreJSON Agent module to latest commit

* move corePKCS11 Agent module to latest commit

* Reverting coreHttp to previous commit

* Updating coreHttp pointer after fix
4 years ago
tianmc1 6ef5c92233
Updated device-shadow submodule to support named shadow, and updated demo to use named shadow (#636) 4 years ago
thomas-coding b8bcbf2a40
Fix data copy address error (#634) 4 years ago
Archit Aggarwal ac5bf3b934
Update coreSNTP submodule and coreSNTP demo (#631)
Update the coreSNTP submodule to the latest commit. Also, make updates to the coreSNTP demo for the new changes in the SNTP library which include the following:

1. Update to the type for packet size from size_t to uint16_t for parameters in the transport and authentication interfaces.
2. Change in the call to Sntp_SendTimeRequest API to pass the new blockTimeMs parameter added to the API.
3. Update to the clock-offfset type from int32_t to int64_t for representing information in milliseconds. To accommodate this update in the SntpSetTime_t interface, the mathematical model for representing system clock has been updated to store slew rate as milliseconds/second (instead of second/second). This change improves the accuracy of the WinSim demo time correction (because the milliseconds of time difference between server and client time is corrected over the entire polling interval which makes a significant difference!).

This PR also adds demo config macros for setting the block time values passed to the Sntp_SendTimeRequest and Sntp_ReceiveTimeResponse APIs.
4 years ago
Archit Aggarwal 5a41846f05
Add authentication support to coreSNTP demo (#625)
Update the coreSNTP demo to showcase use of symmetric key algorithm of authentication scheme for securing SNTP communication between client and server.
The demo uses the AES-128-CMAC algorithm for the generating Message Authentication Code for the client on sending the SNTP time request to server as well as validating the server response received by verifying if the payload present authentication code can be generated. Use of an authentication mechanism in SNTP communication protects against server spoofing attacks as well as man-in-the-middle attacks of server response modification.

The demo uses corePKCS11 library for the AES-CMAC operations. Also, the demo adds functionality of generating random number, using corePKCS11, for sending as a parameter to the Sntp_SendTimeRequest API.

Note: For symmetric key based security mechanism to be protective against malicious, it is IMPORTANT to securely pre-share the symmetric key between client and server.
4 years ago
Archit Aggarwal f771faef4a
Add unauthenticated mode demo for coreSNTP library for time synchronization (#621)
Add the FreeRTOS/coreSNTP library as a submodule (along with manifest.yaml file update) and add a demo project to showcase use of the coreSNTP library for having a SNTP client daemon in the system for periodically synchronizing system time with the internet to maintain Coordinated Univeral Time (UTC) in a device. This demo maintains UTC time of system in RAM, thereby, representing systems without a Real-Time Clock (RTC) module in the device.

Note: This demo shows use of coreSNTP library for SNTP communication with NTP/SNTP time servers in non-authenticated mode (i.e. without any security mechanism payload beyond the standard 48 bytes of NTP packet exchange between client-server).
4 years ago
jasonpcarroll 803016a27a
Updated demo_config.h and include paths for OTA demos (#605)
Co-authored-by: Jason Carroll <czjaso@amazon.com>
4 years ago
Archit Gupta c134a58115
Fix missed variable rename (#600) 4 years ago
Hein Tibosch db1f4542e5
Let vAssertCalled() produce some logging to stdout (#598) 4 years ago
Aniruddha Kanhere 1bc759d413
Aws only files spell check (#593)
* Added spell check

* All words

* Add a missing word

* Fix header checks

* Fix header checks v1

* Fix header check v2

* Updated freertos link in header

* Fixed afr link in the header

* Fix last of header checks

* Update the spell check script to check amazon licensed files only

* Fixed paths and added comments

* Try with modified repo

* Add inplace substitute option to sed

* Use official repo as the spell checker source

* Add vendor file to the ignored list

Co-authored-by: root <root@ip-172-31-5-28.us-west-2.compute.internal>
4 years ago
Archit Aggarwal 971a6e1d22
Merge FreeRTOS 202104.00 to main (#585) 4 years ago
Prasad Vyawahare 04f0f68f61
OTA Demos (#573)
This change adds the OTA demos and required dependencies and helper components .
* Add demos , configs and project files
* Add subscription manager
* Add HTTP utils
* Submodules the OTA LTS 3.0 Library.
* Add OTA pal
4 years ago
Archit Aggarwal 43bd42db27
Rename MQTT Agent structs and files (#576) 4 years ago
alfred gedeon 1fe418dc9f
Remove unecessary file (#495) 4 years ago
Archit Aggarwal fd9c1eb7a5
Automate doxygen ZIP creation with GitHub Action (#568)
Automate creation of doxygen ZIP output by using the custom doxygen GitHub Action, that has been updated to generate ZIP artifact in PR
4 years ago
TakayukiMatsuo 1e2f99a11b
Add feature to set credentials using buffer in MQTT_Mutual_Auth_wolfSSL demo (#522)
* Add feature to set credentials using buffer
* Change instructions for giving credential data via buffer
4 years ago
Archit Aggarwal 5ac8279c1b
Change Shadow submodule to point to LTS release tag (#567) 4 years ago
Muneeb Ahmed ef6194a7ce
Replace multithreading demo with MQTT Agent (#563)
* Update MQTT agent submodule

* Copy MQTT agent demo files

* Remove other demos from connection manager

* Update demo config and uncrustify

* Update readme files

* Fix headers
4 years ago
Archit Aggarwal 999e81e721
Bump submodules of Kernel and AWS libraries (#564) 4 years ago
Muneeb Ahmed 1f47a22b23
Add MQTT Agent submodule (#551)
* Add MQTT Agent submodule

* Add MQTT agent platform files

Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years ago
Archit Gupta c8fa483b68
Add custom metrics to defender demo (#507)
Adds custom metrics to the defender demo. The metrics added are a list of the task ids and the stack high water mark.
4 years ago
Carl Lundin 5ff9863249
Update corePKCS11 submodule. (#505)
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years ago
Archit Aggarwal 693212bd05
Update Jobs demo to use DescribeJobExecution instead of StartNextPendingJobExecution API (#496)
It is recommended by the AWS IoT Jobs service to use DescribeJobExecution API for scaling purposes instead of StartNextPendingJobExecution API. Thus, update the Jobs demo to replace the latter API call with the former API call.
4 years ago
Carl Lundin a78cb45d12
Minor changes to wolfSSL MQTT demo files (#493)
* Clean up demo config for wolfSSL mutual auth. 
* Add comment about picking the correct ROOT CA.
* uncrustify using_wolfSSL.c and some other code style changes.
* Apply suggestions from code review

Co-authored-by: Archit Aggarwal <architag@amazon.com>
4 years ago
TakayukiMatsuo dfdf2ddf1f
Add MQTT_Mutual_Auth_wolfSSL demo (#464)
Add a demo that shows MQTT over TLS mutual authentication connection and communication with a broken when using wolfSSL as the TLS library.
4 years ago
Marc-Antoine Lalonde 52c9756f21
Call taskYIELD after calling FreeRTOS_send in Plaintext_FreeRTOS_send (#491)
FreeRTOS_send adds the packet to be sent to the IP task's queue for
later processing. The packet is sent later by the IP task. When
FreeRTOS is used in collaborative mode (i.e. configUSE_PREEMPTION is 0),
the Plaintext_FreeRTOS_send function returns without actually sending
the packet as the IP task never gets a chance to run.

The fact that Plaintext_FreeRTOS_send returns without actually sending
the packet causes an issue in the MQTT_Connect which expects the CONNECT
packet to be actually sent and waits for CONNACK.

This commit adds a taskYIELD call after calling FreeRTOS_send to ensure
that the IP task gets a chance to run and send the packet before the
Plaintext_FreeRTOS_send function returns.
4 years ago
alfred gedeon 3a7da90c4f
Qemu Mps2 network interrupt (#487)
* Enable netwrork nterrupt handling for Qemu MPS2

* Fix interrupt priority

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
alfred gedeon 1c99d9f200
Prevent optimization in reset handler for QEMU MPS2 (#484) 4 years ago
Joseph Julicher da9b9a800d [AUTO][RELEASE]: Bump file header version to "202012.00" 4 years ago
Joseph Julicher 45ba920ad0 [AUTO][RELEASE]: Bump submodules per manifest.yml for V202012.00 4 years ago
Joseph Julicher 2e2ba99a74 [AUTO][RELEASE]: Bump file header version to "202012.00" 4 years ago
Cobus van Eeden 89c6fc6baf
Update FreeRTOS-Plus-TCP (#479) 4 years ago
Carl Lundin 4ec66eb364 Move mbedtls tag to v2.25.0 4 years ago
Carl Lundin db18ff7d59 Fix pkcs11 demo build. 4 years ago
Sukhmani Minhas f4591cec06
Stack fix (#475) 4 years ago
Archit Gupta bff2f04c5f
Update submodule pointers (#476) 4 years ago
Oscar Michael Abrina 6155c025a2
Update submodules of CSDK libraries (#473) 4 years ago
Oscar Michael Abrina 028bf653f7
Delete HTTP demo task upon completion (#472)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Gupta 2e0de9aa70
Clean up demo project files (#468) 4 years ago
alfred gedeon 41237e01d0
Split networking from posix and qemu mps2 demos (#455)
Split networking from posix and qemu mps2 demos
4 years ago
RichardBarry a503a3a7a0
Add links to the MQTT agent in the non-agent mqtt demos (#470)
Add URL file links to the MQTT agent documentation page.
Add comment blocks into each demo that also point toward the MQTT agent documentation to ensure users are aware the agent method exists.
4 years ago
Carl Lundin 1d444eecae
Update mbedtls to v2.24.0 (#465)
* Set mbedtls submodule tag to v2.24.0

* Update projects

Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Oscar Michael Abrina f23752164b
Map errors from FreeRTOS+TCP to mbedTLS and make read non-blocking when requesting start of frame (#452)
From the FreeRTOS documentation, pdFREERTOS_ERRNO_ENOSPC means that timeout occurred before any data could be sent or received.
- In the plaintext transport-interface implementation, we would directly return `-pdFREERTOS_ERRNO_ENOSPC`. However, an error like this can occur when the TCP buffer is full, so this ought to be retriable. Libraries that consume the transport interface interpret a return value of 0 to mean that send/recv can be invoked again to get the data. As such, we should appropriately set the return value as 0 when the status is `-pdFREERTOS_ERRNO_ENOSPC`.
- In the mbedTLS port, we would directly return whatever `FreeRTOS_send` or `FreeRTOS_recv` returns. However, sometimes, the return value can be an error. In such cases, we ought to map an error from FreeRTOS+TCP to an equivalent error in mbedTLS. In the case of `-pdFREERTOS_ERRNO_ENOSPC`, we map that to `MBEDTLS_ERR_SSL_TIMEOUT`. When the mbedTLS transport-interface send/recv wrapper sees that value, it appropriately returns 0, so that the library can retry the send/recv. I've verified that when the mbedTLS port returns an error, that same error is returned by `mbedtls_ssl_write` & `mbedtls_ssl_read`.
- The TCP socket may have a receive block time.  If bytesToRecv is greater than 1 then a frame is likely already part way through reception and blocking to wait for the desired number of bytes to be available is the
most efficient thing to do.  If bytesToRecv is 1 then this may be a speculative call to read to find the start of a new frame, in which case blocking is not desirable as it could block an entire protocol agent task for the duration of the read block time and therefore negatively impact performance.  So if bytesToRecv is 1 then don't call recv unless it is known that bytes are already available.

Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
4 years ago
Sukhmani Minhas ebd1cdf702
Add comment about handling S3 request limits to S3 download demos (#462)
- Adding a comment to the top of S3 download and multi-threaded download demo source code files, to explain how to handle S3 request limits. This is done to prevent users from treating this case as a bug.
- Increasing ipconfigTCP_RX_BUFFER_LENGTH to 5000, as was done recently for other demos.
4 years ago
Oscar Michael Abrina 1c2c671e7a
Update comments about NetworkContext definition (#461)
Small change that simply specifies why the NetworkContext must be defined by each compilation unit along with details on how to include it to your project.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Aggarwal d93a3d63a0
Update demos to use version macro from coreMQTT (#460)
Update demos to use the MQTT_LIBRARY_VERSION macro for the coreMQTT version they report in their metrics
4 years ago
Archit Aggarwal c0d4c7c67c
Update MQTT config for Keep Alive demo that uses dummy timer (#457)
The MQTT library has been updated with the MQTT_RECV_POLLING_TIMEOUT_MS and MQTT_SEND_RETRY_TIMEOUT_MS configurations which should be set to zero when using a dummy timer function to avoid possibility of infinite loop when retrying failed transport send/receive calls. As the MQTT Keep Alive demo uses a dummy timer function, this PR updates the demo configuration to set these timeouts to zero.
4 years ago
Carl Lundin 492ac6edb2
Move corePKCS11 forward and update to latest core_pkcs11.h (#441)
* Move corePKCS11 forward.
* Update licenses.
* strip NULL terminator.
* Add threading_alt.h
* Use github link.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Gupta 353d2ef35b
Fix FreeRTOS+TCP submodule pointer (#453)
The FreeRTOS+TCP submodule pointer was set to a commit not in main,
which also lacked commits in main, which ended up causing build failures
for defender demo.
4 years ago
Sukhmani Minhas 57161da956
Update HTTP demo project files (#451)
* Update project filters

* Address inaccurate retry count
4 years ago
Sukhmani Minhas 87662ff4d8
Replace GPL with FreeRTOS license in MbedTLS demo config files (#447)
Since we own mbedtls_config.h files, updating the GPL to use the FreeRTOS license instead.
4 years ago
SarenaAWS 4538b99a9b
Change all occurrences of broker to server in coreHTTP demos folder. (#445) 4 years ago
yngki 46acf2863a
Update readme.txt (#446)
* Update readme.txt

* Update readme.txt

* Update readme.txt

* Update check-header.py

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years ago
Sukhmani Minhas d69c9c01e8
Port S3 multi-threaded download demo from C-SDK (#436)
Adding demo to demonstrate the use of pre-signed URLs to connect and download from a S3 bucket. Sends multiple GET requests synchronously to download a file in chunks using range headers. Uses a request and response task in addition to the main HTTP servicing task.
4 years ago
alfred gedeon b7b9ccb099
Qemu mps2 networking (#439)
* Demo: Add Support for netwroking in Qemu for MPS2 AN385
* Add tcp echo client
* Add steps to Readme
4 years ago
Archit Gupta 79e432738b
Adds error messages for AWS demo mqtt helpers + misc fixes (#440)
Switch MQTT helpers to logging error message instead of error code.
Adds time parameter to xProccessLoop so defender demo does not wait extra time.
Fixes some incorrect returns in metrics_collector.c
4 years ago
Oscar Michael Abrina 9c1efa8d02
Update WindowsTargetPlatformVersion to 10.0 (#442)
CI only supports 10.0, so this change is required for CI to build this demo correctly on Visual Studio.
4 years ago
Carl Lundin 934020a5a2
Move WolfSSL to ThirdParty and Submodule code (#433)
* Submodule wolfSSL and move wolfSSL and WolfSSL-FIPS-Ready to ThirdParty folder.

* Update VS studio project.

* Update FIPS project settings.

* Update FIPS demo readme.

* Add md to ignored file extensions.
4 years ago
leegeth 4651c46479
Add retries to demos in case of a failure. (#435) 4 years ago
Sukhmani Minhas d2fcf20caf
Port S3 Upload Demo from C-SDK (#417)
Adding demo to use script-generated pre-signed URLs to establish a TLS connection and upload a small file to an S3 bucket using a single PUT request, and then verify the upload by obtaining the file size from S3 and comparing it to the size of the local file.
4 years ago
Sukhmani Minhas 24def41337
Port S3 Download Demo from C-SDK (#416)
Adding demo to use script-generated pre-signed URLs to establish a TLS connection and synchronously download a file from an S3 bucket, with multiple GET requests.
4 years ago
Aniruddha Kanhere 9a452918d1
Add UDP demo running FreeRTOS+TCP (#425)
* Add FreeRTOS+TCP UDP only demo.

* Update folder name and remove old one

* Update the network interface to be used.

* Update headers

* Update header

* Header update and folder name correction

* Remove WinPCap folder
4 years ago
Archit Aggarwal eec68e8790
Fix TLS handshake failures in demos (#438)
Increase default size of FreeRTOS+TCP RX buffers in TLS demos to avoid TLS handshake failures
4 years ago
Oscar Michael Abrina 05dc34b27b
Clean up server setup instructions for MQTT and HTTP demos (#429)
- Removes a broken link to configure Windows Firewall
- Removes references to Mosquitto in the httpbin server setup instructions
4 years ago
Oscar Michael Abrina 73b0d1b259
Support multiple transports in the same compilation unit (#434)
By removing the definition of the NetworkContext struct in the header file, we allow the application to define it. This allows an application writer to use multiple transports in the same compilation unit. That way, multiple .c files do not have to be created for each transport.
4 years ago
Archit Gupta a7825dc973
Update FreeRTOS+TCP submodule pointer (#427)
Updates the FreeRTOS+TCP submodule pointer.
This brings in a fix that needs changes in defender demo.
4 years ago
Archit Aggarwal 682447445b
Bump backoffAlgorithm submodule for API change and update demos (#426)
The API of FreeRTOS/backoffAlgorithm library has changed to remove dependency on random number generator; instead require the caller to generate the random number and pass it to the BackoffAlgorithm_GetNextBackoff API for backoff period calculation. This PR updates the submodule pointer commit, and updates the demos and tests to use the simplied library API
4 years ago
Carl Lundin 220dd5cc1c
corePKCS11 submodule and file path update (#424)
* Move PKCS #11 submodule forward.

* Update file path for folder update in corePKCS11.

* Update mbedtls file filter.
4 years ago
Archit Gupta 5f72c0031d
Have metrics collector return amount written (#428) 4 years ago
Archit Aggarwal 152b7db2c1
Add "Demo completed successfully" log in Jobs demo (#421) 4 years ago
Oscar Michael Abrina e2652a8711
Add HTTP plaintext demo (#423)
Adds the HTTP plaintext demo from C SDK. No functionality is changed, but naming is updated appropriately. It is using freertos_plus_tcp plaintext transport implementation to send HTTP requests and then logs the response from the server.
4 years ago
Sukhmani Minhas ac1a10428b
Porting HTTP Mutual Auth Demo from C-SDK (#414)
Add demo to establish a mutually-authenticated network connection with the server before sending and verifying a simple POST request.
* Add demo files
* Move all "Http_Demo_Helpers" files into Common
* Update project files and add vendor config files
* Update http_demo_utils.c after backoff updates
4 years ago
Archit Aggarwal 036ec83b65
Replace exponential_backoff with submodule to FreeRTOS/backoffAlgorithm (#419)
A new repository, FreeRTOS/backoffAlgorithm, has been created for hosting the library for backoff calculation. This repo replaces the FreeRTOS-Plus/Source/Utilities/exponential_backoff with the submodule to the new repository, and updates all the demos that use retry logic to use the backoffAlgorithm API
4 years ago
Archit Gupta 5ba1e4cf95
Clean up defender demo (#422) 4 years ago
Archit Gupta ced1845508
Fix missing includes in defender demo (#418)
report_builder.c was missing FreeRTOS includes.
Additionally fixes root CA comments in AWS demos.
4 years ago
Archit Gupta 98b8fcd89d
Remove certs from AWS demos + misc fixes (#415)
Removes the AWS IoT cert that is included in the demo_config.h files of the Shadow and Jobs demos.
Additionally fixes some typos.
4 years ago
Archit Gupta 2b4f8d4094
Port Defender demo from C-SDK (#407) 4 years ago
Sukhmani Minhas 56a86428fe
Preparation for coreHTTP demos (#413)
Adding common utilities that will be used by 4 coreHTTP demos:
- Adding coreHTTP submodule pointer to FreeRTOS-Plus/Source/Application-Protocols/coreHTTP
- Adding folder FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/Http_Demo_Helpers with functions common to demos.
4 years ago
Carl Lundin e313e286df
Bump corePKCS11 submodule (#412)
* Move PKCS submodule forward.

* Use common mbed code.
4 years ago
SarenaAWS d59a4e4f3a
Add helpful asterisk comments to the shadow demo. (#409)
* Add helpful asterisk comments to the shadow demo.

* Update FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c

* Add stuff to the license header for GHA checks.
4 years ago
Archit Gupta 3dc4516ea1
Add device defender library submodule (#406) 4 years ago
Oscar Michael Abrina ae1226b1bb
Match WindowsTargetPlatformVersion across all MQTT VS Projects (#405)
Simply updates the Visual Studio projects so that WindowsTargetPlatformVersion is set to 10.0 for all MQTT demos.
4 years ago
Archit Aggarwal c415143077
Add demo for AWS IoT Jobs library (#404) 4 years ago
Archit Aggarwal 6debf6a2c0
Add #ifndef guards for SdkLog definition to fix conflicting definitions (#403) 4 years ago
Archit Aggarwal e96fd8b872
Changes to prepare for Jobs Library Demo (#401)
* Add submodule pointer to the aws/jobs-for-aws-iot-embedded-sdk repository for the Jobs library
* Commonize the MQTT helper functions used by the Device Shadow demo by re-locating them to FreeRTOS-Plus/Demo/AWS/MQTT_Demo_Helpers and updating the Device Shadow demo to use the new files
4 years ago
David Chalco 07f3cbafee [AUTO][RELEASE]: Bump file header version to "202011.00" 4 years ago
Muneeb Ahmed d555cdd475
Fix incorrect size calculation in MT demo (#402) 4 years ago
Aniruddha Kanhere 4312eabeb9
Update FreeRTOS+TCP submodule pointer (#400) 4 years ago
David Chalco 82916bfda8
Manual version update - files not autoversioned with upcoming prefix (#399) 4 years ago
RichardBarry ef18289398
Simplify the mqtt multitasking demo a little (#398) 4 years ago
RichardBarry 5f6464c22e
Update urls in code to those on the server (#396)
* URLs have changed on the FreeRTOS.org site - this commit matches the URLs in the code with the new URLs on the website.

* Add link to device shadow directory to the shadow docs.

* Update main.c

* Update main.c

* Update readme.txt

* Update main.c

* Update main.c

* Update readme.txt

Co-authored-by: yngki <47755894+yngki@users.noreply.github.com>
4 years ago
Oscar Michael Abrina 1876800382
Print metadata only after a line break (#397)
* Fix logging stack to print message in the first SdkLog

* Do not log metadata if on the same line

* Fix wrong var name

* Change task names to DemoTask

* Change for shadow too

* Move declaration to a separate line

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
4 years ago
Archit Aggarwal 21878bd619
Allow overriding default definitions of logging macros (#384)
* Update logging_stack.h file to avoid use of __FUNCTION__ macro

* Revert to use __FUNCTION__ instead of __FILE__

* Fix comment about metadata format

* Fix incorrect mapping of SdkLog function

* Fix typo causing LOG_METADATA_ARGS to be undefined

* Fix another bug with SdkLog macro definition

* Fix formatting

* Move mapping of SdkLog to vLoggingPrintf from logging_stack to config files

* Remove dependency of LIBRARY_LOG_NAME on LIBRARY_METADATA_* macros

* Minor improvements

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
4 years ago
RichardBarry 596b466300
Add code comments on the different requirements for credential constants between evaluation and production systems. (#386)
Only comments have changed.  No code changes.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
4 years ago