-
Notifications
You must be signed in to change notification settings - Fork 343
Support for Espressif chipsets via ESP-IDF #2142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
vikramdattu
wants to merge
25
commits into
awslabs:develop
Choose a base branch
from
vikramdattu:esp_amazon_kvs_sdk_c
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+144,998
−212
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bsockets - This way, one could write a new CMakeLists.txt, with ApiCalls using different websocket implementation - One should simply remove existing Signaling.c and LwsApiCalls.c from compilation and add their own
- mbedtls 2.8.x is getting out of support: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-2.28.10 - Clone mbedtls 3.6.x instead of 2.8.x via CMake dependencies - Add related code to mbedtls usage keeping the 2.8.x support intact under mbedtls version macros
- This release handles mbedtls_3.x version support and has some fixes - Cleanup: removed libwebsocket patches as they are not needed anymore
- New API tlsSessionStartWithHostname can receive optional hostname and set the same - It is recommened to set the hostname and is on by default for mbedtls v3.6.3 and above - Since we receive ICE server credentials via secure API and anyway are use DTLS as WebRTC standard, we could skip this, but let's follow the recommendation as precaution
- Newer(3.6.x) mbedtls versions does not test builds on GCC versions as old as 4.4 - We keep this test for older mbedtls version (2.28.x)
- Since, we only use a single ICE server config anyway. To save space we might want to set the value to say 1 - The received list may have more than one entries. We gracefully drop the remaining entries and continue.
- Handle partial writes by sending data in multiple iterations - Use retries when message send fails - Track and handle message receive if in parts using `receiveMessage` var
- Retries increased from 3 to 10 - Consider ENOMEM or PBUF errors also for retries These changes help to retain sockets longer for embedded devices
- Added ifaddr altenate for ESP-IDF - Created abstracted API for IDF_CMAKE platform to query local IP - Do not treat SO_SNDBUF not available as fatal
- Use custom thread implementation for receiveLwsMessageWrapper - Custom thread implementation for connectionListener
- Cleanly added the support under esp_port directory - Added ESP specific components, submodules and an webrtc_classic example - Also added `app_common` needed as a common functionality for webrtc example/s. - Also added network_adapter example: Needed when we want to use the webrtc_classic on P4+C6 board
- Added esp_websocket_client over libwebsockets for ESP-IDF - Using this as default for ESP port as it provides better flexibility for ESP-IDF
a2a10df
to
d9ab49b
Compare
- Also moved AWS config options from examples to app_common Kconfig
- Setting env variable is not an elegant solution to pass credentials - Pass these in config structure instead
d9ab49b
to
b3e9d05
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*** This is a placeholder PR: Not to be merged ****
This PR is meant to showcase the work which will bring the support for ESP-IDF build support and hence the Espressif chipsets.
Structure:
esp_port
directory.Setup ESP-IDF
Setup ESP_IDF with release/v5.4 branch: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html
BUILD
Flash the code on chip and run monitor
The work is under progress, will keep rebasing as and when common functionality code keeps getting into main repository.
@sirknightj @unicornss
We have two options:
esp_port
maintained by Espressif with some suitable name under espressif/ organisation. It will useamazon-kinesis-video-sdk-c
as a submodule or need developer to set path of cloned repo.We can keep this PR for discussion ground continue discussion on other aspects of how best we can go about this. I prefer the option 1, simply because it remains maintained under single roof without needing to constant rebasing.