Skip to content

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
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2be2ca
Refactor Signaling sources to make `Include_i.h` independent of libwe…
vikramdattu May 22, 2025
363802c
crypto/mbedtls: Add support for mbedtls 3.x
vikramdattu Dec 10, 2024
b07b6cb
Modify mbedtls tests to consider private members in 3.6.x versions
vikramdattu May 15, 2025
9097235
Update libwebsockets to the latest release
vikramdattu May 15, 2025
dbe4732
mbedtls: suppress false-positive array bound error from Mac gcc14
vikramdattu May 16, 2025
df67cef
mbedtls: Set hostname for TURN connections
vikramdattu May 19, 2025
cfcb7dd
CI: gcc4.4 mbedtls test for older mbedtls versions
vikramdattu May 20, 2025
e9b049e
Handle small MAX_ICE_CONFIG_COUNT gracefully
vikramdattu May 15, 2025
cf1b845
Increase robustness of LwsApiCall implementation
vikramdattu May 14, 2025
c73ac09
Increase socket connection resilience to memory errors
vikramdattu Dec 10, 2024
2756c34
Support dynamically allocated signaling payload
vikramdattu May 13, 2025
2f0d74e
bugfix/connectionlistner: kicksockets are not available on ESP
vikramdattu Dec 10, 2024
6da78ef
Network.c: Changes to support ESP-IDF
vikramdattu Dec 10, 2024
085ba4a
ESP32 specific change for memory fix
vikramdattu Dec 10, 2024
f26865b
Timeout increase tests for ESP
vikramdattu Dec 10, 2024
2929e1a
Use custom thread implementation for ESP platforms to save memory
vikramdattu Dec 10, 2024
dc9a35c
Created esp_port directory to contain ESP-IDF ported components and e…
vikramdattu May 23, 2025
3954d29
Added esp_hosted and network_coprocessor components
vikramdattu May 23, 2025
9c5f117
Added media_stream component which would be used to record/play audio…
vikramdattu May 23, 2025
edf35e5
ESP port: Added needed components and examples
vikramdattu Apr 28, 2025
b9c22be
ESP port: Use esp_websocket_client as an alternate implementation
vikramdattu May 14, 2025
93e3327
netio.c: Read certs using readFile before passing with mbedtls APIs
vikramdattu May 6, 2025
5203636
Use dynamically allocated WSS URL
vikramdattu May 19, 2025
987d770
IOT credential: Make it configurable via Kconfig
vikramdattu May 26, 2025
b3e9d05
Pass AWS credentials via structure pointer
vikramdattu May 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ jobs:
export CXX="clang++"
fi
echo "Using CC: $CC and CXX: $CXX"

mkdir -p build
cd build

if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
# Skip building the tests for Mac with GCC
# https://github.com/awslabs/aws-crt-cpp/issues/605
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON -DBUILD_OLD_MBEDTLS_VERSION=ON
make -j

- name: Configure AWS Credentials
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ tags
CMakeLists.txt.user
*.vscode
*.swp

sdkconfig
sdkconfig.old
dependencies.lock
10 changes: 8 additions & 2 deletions CMake/Dependencies/libmbedtls-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ project(libmbedtls-download NONE)

include(ExternalProject)

if (BUILD_OLD_MBEDTLS_VERSION)
SET(MBEDTLS_GIT_TAG "v2.28.8")
else()
SET(MBEDTLS_GIT_TAG "v3.6.3")
endif()

if (BUILD_STATIC_LIBS)
set(BUILD_SHARED 0)
else()
Expand All @@ -21,7 +27,7 @@ message(STATUS "C flags here are ${CMAKE_C_FLAGS}")
ExternalProject_Add(
project_libmbedtls
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls.git
GIT_TAG v2.28.8
GIT_TAG ${MBEDTLS_GIT_TAG}
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
Expand All @@ -32,6 +38,6 @@ ExternalProject_Add(
-DCMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -Wno-array-bounds"
BUILD_ALWAYS TRUE
TEST_COMMAND "")
7 changes: 2 additions & 5 deletions CMake/Dependencies/libwebsockets-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.6.3)

project(libwebsocket-download NONE)

SET(PATCH_COMMAND git apply --verbose --ignore-whitespace ${CMAKE_CURRENT_LIST_DIR}/libwebsockets-old-gcc-fix-cast-cmakelists.patch)

include(ExternalProject)
if (BUILD_STATIC_LIBS)
set(LWS_WITH_SHARED 0)
Expand All @@ -30,10 +28,9 @@ endif()

ExternalProject_Add(project_libwebsockets
GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git
GIT_TAG v4.3.3
GIT_TAG v4.3.5
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
PATCH_COMMAND ${PATCH_COMMAND}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
LIST_SEPARATOR |
CMAKE_ARGS
Expand All @@ -58,7 +55,7 @@ ExternalProject_Add(project_libwebsockets
-DLWS_MBEDTLS_LIBRARIES=${LWS_MBEDTLS_LIBRARIES}
-DLWS_MBEDTLS_INCLUDE_DIRS=${LWS_MBEDTLS_INCLUDE_DIRS}
-DLWS_WITH_MINIMAL_EXAMPLES=1
-DLWS_HAVE_PTHREAD_H=1
-DLWS_HAVE_PTHREAD_H=1
-DLWS_WITH_THREADPOOL=${LWS_WITH_THREADPOOL}
-DLWS_WITH_ZLIB=0
-DLWS_HAVE_EVENTFD=0
Expand Down
36 changes: 0 additions & 36 deletions CMake/Dependencies/libwebsockets-leak-pipe-fix.patch

This file was deleted.

32 changes: 0 additions & 32 deletions CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch

This file was deleted.

4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ option(ENABLE_KVS_THREADPOOL "Enable support for KVS thread pool in signaling" O
option(INSTRUMENTED_ALLOCATORS "Enable memory instrumentation" OFF)
option(ENABLE_AWS_SDK_IN_TESTS "Enable support for compiling AWS SDKs for tests" ON)
option(ENABLE_STATS_CALCULATION_CONTROL "Enable support for runtime control of ice agent stat calculations." OFF)
option(BUILD_OLD_MBEDTLS_VERSION "Use MbedTLS version 2.28.8." OFF)

# Developer Flags
option(BUILD_TEST "Build the testing tree." OFF)
Expand Down Expand Up @@ -182,6 +183,7 @@ if(BUILD_DEPENDENCIES)
elseif(USE_MBEDTLS)
set(BUILD_ARGS -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBUILD_OLD_MBEDTLS_VERSION=${BUILD_OLD_MBEDTLS_VERSION}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -std=c99")
build_dependency(mbedtls ${BUILD_ARGS})
endif()
Expand Down Expand Up @@ -446,7 +448,7 @@ target_link_libraries(
kvsWebrtcSignalingClient
PUBLIC
kvsCommonLws
${LIBWEBSOCKETS_LIBRARIES}
${LIBWEBSOCKETS_LIBRARIES}
PRIVATE kvspicUtils
kvspicState
${CMAKE_THREAD_LIBS_INIT}
Expand Down
Loading