Compare commits

...

16 Commits

Author SHA1 Message Date
david-cermak
33a3ec54b6 Merge pull request #865 from david-cermak/fix/eppp_ipv4_only
[eppp]: Support for IPv4-only mode
2025-08-18 12:03:07 +02:00
David Cermak
c91578c827 bump(eppp): 1.0.0 -> 1.0.1
1.0.1
Bug Fixes
- Support for IPv4-only mode (653328ba, #864)
2025-08-18 11:09:33 +02:00
David Cermak
653328ba07 fix(eppp): Support for IPv4-only mode
Closes https://github.com/espressif/esp-protocols/issues/864
2025-08-18 11:03:17 +02:00
david-cermak
f8748e026d Merge pull request #862 from david-cermak/fix/mbedtls_cookie
fix(mbedtls_cxx): Enable mbedtls cookie support
2025-08-13 12:41:48 +02:00
David Cermak
479122b21d fix(mbedtls_cxx): Enable mbedtls cookie support 2025-08-13 12:05:14 +02:00
david-cermak
e8ce8f4739 Merge pull request #861 from david-cermak/fix/minor_links
fix(ci): Use default mqtt public endpoint
2025-08-12 16:23:12 +02:00
David Cermak
03df9ae957 fix(mosq): Make esp-peer build optional 2025-08-12 16:07:02 +02:00
David Cermak
35fa0b1d42 ci(common): Fix the link to CONTRIBUTING guidelines 2025-08-12 14:29:08 +02:00
David Cermak
e9d9b3a8bd fix(modem): Use idf-build-apps for building target tests
Also updates default mqtt broker public endpoint
2025-08-12 14:29:03 +02:00
Euripedes
07e8eddcb6 Merge pull request #856 from david-cermak/fix/mosquitto_build
[mosq]: Fix esp_webRTC-lib deprecation with new FreeRTOS
2025-07-29 08:06:05 +02:00
David Cermak
78ae25598b fix(mosq): Fix esp_webRTC deprecation with new FreeRTOS 2025-07-25 18:55:59 +02:00
david-cermak
ffeee3e87a Merge pull request #852 from david-cermak/fix/mqtt_endpoints
fix(examples): Address MQTT public endpoint availability
2025-07-25 16:04:24 +02:00
David Cermak
6d5411941b fix(modem): Make MQTT public broker endpoint configurable 2025-07-25 11:02:36 +02:00
David Cermak
e71365f835 fix(examples): Use configured public broker for MQTT linux test
Also updated pre-commit hook versions, as some don't work in py3.12
2025-07-25 11:01:53 +02:00
david-cermak
8dbf0e4561 Merge pull request #855 from cosmicKev/mdns-fix-custom-allocator
Fixes case where we create our own malloc/free allocators, therefore … (IDFGH-16053)
2025-07-25 07:48:09 +02:00
kevin filipe
63bf70914b fix(mdns): Fixes case where we create our own malloc/free allocators, therefore we need to call mdns_mem_free and not free 2025-07-24 13:21:55 +02:00
23 changed files with 86 additions and 27 deletions

View File

@@ -59,10 +59,11 @@ jobs:
- name: Build with IDF-${{ matrix.idf_ver }}
shell: bash
run: |
. ${GITHUB_WORKSPACE}/ci/config_env.sh
. ${IDF_PATH}/export.sh
python -m pip install idf-build-apps
python ./ci/build_apps.py examples/mqtt -l -t linux
timeout 5 ./examples/mqtt/build_linux_default/esp_mqtt_demo.elf | tee test.log || true
python ./ci/build_apps.py examples/mqtt -l -t linux -r 'sdkconfig.ci'
timeout 5 ./examples/mqtt/build_linux/esp_mqtt_demo.elf | tee test.log || true
grep 'MQTT_EVENT_DATA' test.log
run_on_target:

View File

@@ -34,18 +34,16 @@ jobs:
IDF_TARGET: ${{ matrix.idf_target }}
SDKCONFIG: sdkconfig.ci.${{ matrix.test.app }}
shell: bash
working-directory: ${{ env.TEST_DIR }}
run: |
. ${GITHUB_WORKSPACE}/ci/config_env.sh
. ${IDF_PATH}/export.sh
rm -rf sdkconfig build
[ -f ${SDKCONFIG} ] && cp ${SDKCONFIG} sdkconfig.defaults
idf.py set-target ${{ matrix.idf_target }}
idf.py build
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh ${GITHUB_WORKSPACE}/${TEST_DIR}/build
python -m pip install idf-build-apps
python ./ci/build_apps.py ${{ env.TEST_DIR }} -t ${{ matrix.idf_target }} -r 'sdkconfig.ci.${{ matrix.test.app }}'
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh ${GITHUB_WORKSPACE}/${TEST_DIR}/build_${{ matrix.idf_target }}
- uses: actions/upload-artifact@v4
with:
name: modem_target_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}
path: ${{ env.TEST_DIR }}/build
path: ${{ env.TEST_DIR }}/build_${{ matrix.idf_target }}
if-no-files-found: error
target_tests_esp_modem:

View File

@@ -18,6 +18,10 @@ jobs:
exclude:
- idf_ver: "release-v5.1"
example: "serverless_mqtt" # serverless_mqtt is not supported due to esp-peer
include:
- idf_ver: "latest"
example: "serverless_mqtt"
warning: "'octal_mode' is deprecated"
runs-on: ubuntu-22.04
container: espressif/idf:${{ matrix.idf_ver }}
@@ -31,6 +35,8 @@ jobs:
with:
submodules: recursive
- name: Build with IDF-${{ matrix.idf_ver }}
env:
EXPECTED_WARNING: ${{ matrix.warning }}
shell: bash
run: |
. ${IDF_PATH}/export.sh

View File

@@ -39,7 +39,7 @@ jobs:
if ! pre-commit run --from-ref origin/HEAD --to-ref HEAD --hook-stage manual --show-diff-on-failure ; then
echo ""
echo "::notice::It looks like the commits in this PR have been made without having pre-commit hooks installed."
echo "::notice::Please see https://github.com/espressif/esp-protocols/CONTRIBUTING.md for instructions."
echo "::notice::Please see https://github.com/espressif/esp-protocols/blob/master/CONTRIBUTING.md for instructions."
echo ""
exit 1
fi

View File

@@ -25,6 +25,9 @@ jobs:
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }}
shell: bash
run: |
if [[ "${{ matrix.idf_ver }}" != "latest" ]]; then
export EXPECTED_WARNING="unknown kconfig symbol 'MBEDTLS_SSL_COOKIE_C'"
fi
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
python ./ci/build_apps.py ./components/mbedtls_cxx/${{ matrix.test.path }} -vv --preserve-all

View File

@@ -25,12 +25,8 @@ repos:
(?x)^(
.*.py
)$
- repo: https://github.com/myint/unify
rev: v0.5
hooks:
- id: unify
- repo: https://github.com/pre-commit/mirrors-yapf
rev: "v0.32.0"
- repo: https://github.com/google/yapf
rev: "v0.43.0"
hooks:
- id: yapf
args: ['style={based_on_style: google, column_limit: 160, indent_width: 4}']
@@ -39,7 +35,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/myint/eradicate/
rev: v2.1.0
rev: 3.0.0
hooks:
- id: eradicate
- repo: https://github.com/espressif/check-copyright/

View File

@@ -65,6 +65,7 @@ if __name__ == '__main__':
sys.exit(
build_apps(apps,
verbose=2,
dry_run=False,
keep_going=False,
no_preserve=args.delete,

7
ci/config_env.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# This script is used to set some common variables for the CI pipeline.
set -e
# MQTT public broker URI
export CI_MQTT_BROKER_URI="test.mosquitto.org"

View File

@@ -3,6 +3,6 @@ commitizen:
bump_message: 'bump(eppp): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py eppp_link
tag_format: eppp-v$version
version: 1.0.0
version: 1.0.1
version_files:
- idf_component.yml

View File

@@ -1,5 +1,11 @@
# Changelog
## [1.0.1](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.1)
### Bug Fixes
- Support for IPv4-only mode ([653328ba](https://github.com/espressif/esp-protocols/commit/653328ba), [#864](https://github.com/espressif/esp-protocols/issues/864))
## [1.0.0](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.0)
### Features

View File

@@ -65,12 +65,13 @@ static err_t tun_output_v4(struct netif *netif, struct pbuf *p, const ip4_addr_t
LWIP_UNUSED_ARG(ipaddr);
return tun_output(netif, p);
}
#if LWIP_IPV6
static err_t tun_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr)
{
LWIP_UNUSED_ARG(ipaddr);
return tun_output(netif, p);
}
#endif
static err_t tun_init(struct netif *netif)
{
if (netif == NULL) {
@@ -151,9 +152,12 @@ static void cmd_ping_on_ping_end(esp_ping_handle_t hdl, void *args)
}
if (IP_IS_V4(&target_addr)) {
ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet_ntoa(*ip_2_ip4(&target_addr)));
} else {
}
#if LWIP_IPV6
else {
ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet6_ntoa(*ip_2_ip6(&target_addr)));
}
#endif
ESP_LOGI(TAG, "%" PRIu32 " packets transmitted, %" PRIu32 " received, %" PRIu32 "%% packet loss, time %" PRIu32 "ms\n",
transmitted, received, loss, total_time_ms);
esp_ping_delete_session(hdl);
@@ -168,7 +172,11 @@ esp_err_t eppp_check_connection(esp_netif_t *netif)
ip_addr_t target_addr = {0};
esp_netif_ip_info_t ip;
esp_netif_get_ip_info(netif, &ip);
#if LWIP_IPV6
target_addr.u_addr.ip4.addr = ip.gw.addr;
#else
target_addr.addr = ip.gw.addr;
#endif
config.target_addr = target_addr;
esp_ping_callbacks_t cbs = {
.cb_args = netif,

View File

@@ -0,0 +1 @@
CONFIG_LWIP_IPV6=n

View File

@@ -1,4 +1,4 @@
version: 1.0.0
version: 1.0.1
url: https://github.com/espressif/esp-protocols/tree/master/components/eppp_link
description: The component provides a general purpose PPP connectivity, typically used as WiFi-PPP router
dependencies:

View File

@@ -13,5 +13,5 @@ CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
CONFIG_EXAMPLE_MQTT_TEST_TOPIC="/ci/esp-modem/pppos-client"
CONFIG_EXAMPLE_PAUSE_NETIF_TO_CHECK_SIGNAL=y
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP32_PANIC_PRINT_HALT=y
CONFIG_EXAMPLE_DETECT_MODE_BEFORE_CONNECT=y
CONFIG_EXAMPLE_MQTT_BROKER_URI="mqtt://${CI_MQTT_BROKER_URI}"

View File

@@ -8,7 +8,6 @@ CONFIG_LWIP_PPP_ENABLE_IPV6=n
CONFIG_EXAMPLE_SERIAL_CONFIG_USB=y
CONFIG_EXAMPLE_MODEM_DEVICE_A7670=y
CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
CONFIG_EXAMPLE_MODEM_PPP_AUTH_NONE=y
CONFIG_EXAMPLE_MQTT_TEST_TOPIC="/ci/esp-modem/pppos-client"
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP32_PANIC_PRINT_HALT=y
CONFIG_EXAMPLE_MQTT_BROKER_URI="mqtt://${CI_MQTT_BROKER_URI}"

View File

@@ -11,9 +11,8 @@ CONFIG_EXAMPLE_MODEM_DEVICE_SIM800=y
CONFIG_EXAMPLE_MODEM_DEVICE_BG96=n
CONFIG_EXAMPLE_MODEM_PPP_APN="lpwa.vodafone.com"
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP32_PANIC_PRINT_HALT=y
CONFIG_COMPILER_CXX_EXCEPTIONS=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
CONFIG_EXAMPLE_CLOSE_CMUX_AT_END=y
CONFIG_EXAMPLE_MQTT_TEST_TOPIC="/ci/esp-modem/pppos-client"
CONFIG_BROKER_URI="mqtt://test.mosquitto.org"
CONFIG_BROKER_URI="mqtt://${CI_MQTT_BROKER_URI}"

View File

@@ -1,2 +1,3 @@
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
CONFIG_MBEDTLS_SSL_COOKIE_C=y
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=8192

View File

@@ -1,3 +1,4 @@
CONFIG_IDF_TARGET="esp32"
CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
CONFIG_MBEDTLS_SSL_COOKIE_C=y
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=8192

View File

@@ -154,7 +154,7 @@
} \
}
#define queueFree(type, queue) while (queue) { type * _q = queue; queue = queue->next; free(_q); }
#define queueFree(type, queue) while (queue) { type * _q = queue; queue = queue->next; mdns_mem_free(_q); }
#define PCB_STATE_IS_PROBING(s) (s->state > PCB_OFF && s->state < PCB_ANNOUNCE_1)
#define PCB_STATE_IS_ANNOUNCING(s) (s->state > PCB_PROBE_3 && s->state < PCB_RUNNING)

View File

@@ -0,0 +1,28 @@
From 600c9baaa622cd0885697829bcc5e22fa0a79e68 Mon Sep 17 00:00:00 2001
From: David Cermak <cermak@espressif.com>
Date: Fri, 25 Jul 2025 17:20:10 +0200
Subject: [PATCH] fix(media_lib): Remove deprecated API for get_stack_frame API
---
components/media_lib_sal/port/media_lib_os_freertos.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/components/media_lib_sal/port/media_lib_os_freertos.c b/components/media_lib_sal/port/media_lib_os_freertos.c
index d248d59..1117926 100644
--- a/components/media_lib_sal/port/media_lib_os_freertos.c
+++ b/components/media_lib_sal/port/media_lib_os_freertos.c
@@ -369,7 +369,11 @@ static int _get_stack_frame(void** addr, int n)
TaskSnapshot_t snap_shot;
TaskHandle_t cur_task = xTaskGetCurrentTaskHandle();
vTaskGetSnapshot(cur_task, &snap_shot);
- snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);;
+#if (ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 5, 0))
+ snap_shot.pxTopOfStack = xTaskGetStackStart(cur_task);
+#else
+ snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);
+#endif
esp_backtrace_get_start(&(frame.pc), &(frame.sp), &(frame.next_pc));
for (int i = 0; i < n; i++) {
--
2.43.0

View File

@@ -14,6 +14,7 @@ COMPONENTS_SRC="${EXTRACTED_DIR}/components"
COMPONENTS_DST="${ESP_PEER_DIR}/components"
PATCH_FILE_1="${THIS_DIR}/Remove-deprecated-freeRTOS-header.patch"
PATCH_FILE_2="${THIS_DIR}/libpeer-Add-direct-dependency-to-libsrtp.patch"
PATCH_FILE_3="${THIS_DIR}/Remove-deprecated-API-for-get_stack_fr.patch"
# Download if not exists
if [ ! -d "$EXTRACTED_DIR" ]; then
@@ -22,6 +23,7 @@ if [ ! -d "$EXTRACTED_DIR" ]; then
unzip -o "$ZIP_PATH" -d "$ESP_PEER_DIR"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_1"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_2"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_3"
mv ${EXTRACTED_DIR}/components ${ESP_PEER_DIR}
mv ${ESP_PEER_DIR}/components/esp_webrtc/impl/peer_default ${ESP_PEER_DIR}/components
fi

View File

@@ -0,0 +1,2 @@
# CONFIG_ESP_EVENT_POST_FROM_ISR is not set
CONFIG_BROKER_URL="mqtt://${CI_MQTT_BROKER_URI}"