* Updated the git submodule pointer for Mbed TLS to point to v2.16.8.
* Updated the .gitmodules file to have the matching tag.
* No changes to the config file were required.
This PR simply follows changes from PR #271: It copies changes from the plaintext demo and implements retries for the MQTT lightweight, keep alive, and mutual auth demos.
If a connect or subscribe attempt fails, vTaskDelay is called to make the task sleep for some bounded backoff period that doubles on each retry. In addition, SUBACK status codes are updated to support multiple topic filters. This way, if a SUBSCRIBE is sent for multiple topic filters and the broker returns 0x80 (a failure) for any of them, a SUBSCRIBE will attempt to be resent.
This implements retries for FreeRTOS IoT Beta2 libraries, initializing the backoff to some value returned by the PRNG: uxRand(). If an attempt (connect or subscribe) fails, vTaskDelay is called to make the task sleep for some backoff period that doubles on each retry but is bounded.
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
The MQTT keep-alive demo is similar to the plaintext demo with QoS0. The only difference is that it creates an auto-reload timer that invokes a callback responsible for sending a PINGREQ packet. The timer is reset whenever a control packet is sent. Because the keep-alive mechanism is handled by the application, MQTT_ReceiveLoop is used in place of MQTT_ProcessLoop.
* Add keep alive demo (no timer thread yet)
* feat: Add software timer that uses mutex for MQTT context (bad approach)
* feat: Serialize PINGREQ in separate buffer to avoid use of mutex
* fix: Use hungarian notation instead of _ for private vars
* fix: Remove unnecessary comment
* Address PR comments
* Reduce ulPingRespTimeoutMs to be as much as the timer interval
* Add wrapper function to check xWaitingForPingResp before resetting the timer
* Ported PKCS #11 Mutual Auth Demo To Latest MQTT LTS Demo
* created freertos + mbed tls transport layer implementation using PKCS #11
* Added folder to beta 2 for PKCS #11
* Rename transport files ported to use PKCS #11 to make it clear that they are different to the regular implementation.
* Update submodule pointer to be on v2.16.7 of Mbed TLS
* Update config file licenses
* Update readme.txt to include information on what Mbed TLS license the repo uses
* Remove uncrustify config for assignment operator alignment to match aws/aws-iot-embedded-c-device-sdk and aws/amazon-freertos configs; re-format files
* Rename both Demo/FreeRTOS-IoT-Libraries and Source/FreeRTOS_IoT_Libraries directories to FreeRTOS-IoT-Libraries-LTS-Beta1
* Rename directories within IDE project and source files
* Remove backup files pushed to remote accidentally
* Remaining directory name replacements in file texts
* Sync OTA library from AFR 202006.00 release
* Support suspend and resume in OTA demo
* Sync OTA library from AFR 202007.00 release
* Update OTA config files for other projects
* In OTA demo, block thread if fail to activate image
* Disable downgrade in OTA by default
* Update OTA demo config to match from AFR
* Add an idle hook to OTA demo to prevent 100% CPU
* Fix OTA config format and a mistake from last commit
LTS development changes have Source, Demo, and dependencies added for FreeRTOS-IoT-Libraries. These libraries are using FreeRTOS kernel, FreeRTOS-Plus-TCP, and FreeRTOS-Plus-Trace of V10.3.0 tag. FreeRTOS_Plus_TCP and FreeRTOS_Plus_Trace are as used as is, but a few changes are made to FreeRTOS as listed below.
Removed FreeRTOS/Demo.
Updated FreeRTOS/readme.txt to remove mentions about the demos.
Removed FreeRTOS/links_to_doc_pages_for_the_demo_projects.url file as there are no demos present.