From 26b3859cfb4a31a03400aeb67346c4aba1bedbe1 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 11:30:49 +0200 Subject: [PATCH 01/10] fix(modem): Fix driver dependency issue on v6.0 --- components/esp_modem/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/esp_modem/CMakeLists.txt b/components/esp_modem/CMakeLists.txt index fbede40264..c205e8b855 100644 --- a/components/esp_modem/CMakeLists.txt +++ b/components/esp_modem/CMakeLists.txt @@ -11,7 +11,12 @@ else() src/esp_modem_uart.cpp src/esp_modem_term_uart.cpp src/esp_modem_netif.cpp) - set(dependencies driver esp_event esp_netif) + set(dependencies esp_event esp_netif) + if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "5.3") + list(APPEND dependencies esp_driver_uart) + else() + list(APPEND dependencies driver) + endif() endif() From 5179f55202d142a1ee43f92591debd9a3fd03bc5 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 11:34:44 +0200 Subject: [PATCH 02/10] fix(ci): Add modem release branch to publish jobs --- .github/workflows/publish-docs-component.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-docs-component.yml b/.github/workflows/publish-docs-component.yml index 601c3700d5..37c853c76a 100644 --- a/.github/workflows/publish-docs-component.yml +++ b/.github/workflows/publish-docs-component.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - release-modem-v1.4 env: DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_DEPLOY_URL_BASE }} From b45206608775921c8b7c724e42a3fe090cc544ed Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 15:07:54 +0200 Subject: [PATCH 03/10] fix(modem): Address build issues --- .../examples/ap_to_pppos/main/ap_to_pppos.c | 12 ++++++------ .../esp_modem/port/linux/esp_netif_linux/lwipopts.h | 2 +- .../esp_modem/port/linux/esp_netif_linux/tun_io.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/esp_modem/examples/ap_to_pppos/main/ap_to_pppos.c b/components/esp_modem/examples/ap_to_pppos/main/ap_to_pppos.c index a6ac822d48..d8ba315674 100644 --- a/components/esp_modem/examples/ap_to_pppos/main/ap_to_pppos.c +++ b/components/esp_modem/examples/ap_to_pppos/main/ap_to_pppos.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -100,10 +100,10 @@ void wifi_init_softap(void) ESP_ERROR_CHECK(esp_wifi_init(&cfg)); ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, - ESP_EVENT_ANY_ID, - &wifi_event_handler, - NULL, - NULL)); + ESP_EVENT_ANY_ID, + &wifi_event_handler, + NULL, + NULL)); wifi_config_t wifi_config = { .ap = { @@ -120,7 +120,7 @@ void wifi_init_softap(void) } ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); - ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); + ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config)); ESP_ERROR_CHECK(esp_wifi_start()); ESP_LOGI(TAG, "wifi_init_softap finished. SSID:%s password:%s channel:%d", diff --git a/components/esp_modem/port/linux/esp_netif_linux/lwipopts.h b/components/esp_modem/port/linux/esp_netif_linux/lwipopts.h index edeed034e3..b77fce4329 100644 --- a/components/esp_modem/port/linux/esp_netif_linux/lwipopts.h +++ b/components/esp_modem/port/linux/esp_netif_linux/lwipopts.h @@ -89,7 +89,7 @@ #define MPPE_SUPPORT 0 -#define PPP_MAXIDLEFLAG 0 +#define PPP_MAXIDLEFLAG 100 #define PRINTPKT_SUPPORT 1 #define PPP_PROTOCOLNAME 1 diff --git a/components/esp_modem/port/linux/esp_netif_linux/tun_io.c b/components/esp_modem/port/linux/esp_netif_linux/tun_io.c index 16f57e7138..4ad4a5b1df 100644 --- a/components/esp_modem/port/linux/esp_netif_linux/tun_io.c +++ b/components/esp_modem/port/linux/esp_netif_linux/tun_io.c @@ -104,7 +104,7 @@ static void ppp_link_status_cb(ppp_pcb *pcb, int err_code, void *ctx) } } -static u32_t ppp_output_cb(struct ppp_pcb_s *pcb, const void *data, u32_t len, void *ctx) +static u32_t ppp_output_cb(struct ppp_pcb_s *pcb, u8_t *data, u32_t len, void *ctx) { esp_netif_t *netif = (esp_netif_t *)ctx; if (netif->transmit) { From 6a8aeb6c9b68b6daf34a211d0e849fa8811ea2d6 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 15:11:54 +0200 Subject: [PATCH 04/10] fix(common): Build and deploy only docs for tagged components --- .github/workflows/publish-docs-component.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/publish-docs-component.yml b/.github/workflows/publish-docs-component.yml index 37c853c76a..78a382c33e 100644 --- a/.github/workflows/publish-docs-component.yml +++ b/.github/workflows/publish-docs-component.yml @@ -56,9 +56,6 @@ jobs: if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})" ./generate_docs ${{ env.BUMP_VERSION }} - else - echo "Building latest version of ${comp}" - ./generate_docs fi fi done @@ -68,16 +65,6 @@ jobs: source $GITHUB_WORKSPACE/docs/utils.sh add_doc_server_ssh_keys $DOCS_DEPLOY_KEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER export GIT_VER=$(git describe --always) - export GITHUB_REF_NAME=latest - for comp in `ls components`; do - if [[ -d $GITHUB_WORKSPACE/docs/${comp} ]]; then - echo "Deploying latest of ${comp}" - export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp} - export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp} - cd $GITHUB_WORKSPACE/docs/${comp} - deploy-docs - fi - done; # Deploy docs with version path if [[ "${{ env.BUMP_VERSION }}" != "" ]] && [[ -d $GITHUB_WORKSPACE/docs/${{ env.BUMP_COMPONENT }} ]]; then echo "Deploying specific version of ${{ env.BUMP_COMPONENT }} (${{ env.BUMP_VERSION }})" From 8b58f03a2b56329890e822514e0aeac1efd74eb3 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 15:42:54 +0200 Subject: [PATCH 05/10] fix(modem): Remove pre-commit check on release branch --- .github/workflows/pre_commit_check.yml | 45 -------------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/pre_commit_check.yml diff --git a/.github/workflows/pre_commit_check.yml b/.github/workflows/pre_commit_check.yml deleted file mode 100644 index c91d51c021..0000000000 --- a/.github/workflows/pre_commit_check.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Check pre-commit rules - -on: - pull_request: - types: [opened, reopened, synchronize] - -permissions: - contents: read - -jobs: - pre_commit_check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.base_ref }} - fetch-depth: 20 - - name: Fetch head and base refs - # This is necessary for pre-commit to check the changes in the PR branch (and to set origin/HEAD and HEAD refs) - run: | - git fetch origin ${{ github.event.pull_request.head.sha }}:pr_ref - git checkout pr_ref - git remote set-head origin --auto - git merge-base origin/HEAD HEAD || ( echo "Your PR is far behind origin/HEAD, please rebase" && exit 1 ) - - name: Set up Python environment - uses: actions/setup-python@master - with: - python-version: v3.8 - - name: Install python packages - run: | - pip install pre-commit - pre-commit install-hooks - - name: Run pre-commit and check for any changes - run: | - echo "Commits being checked:" - git log --oneline --no-decorate origin/HEAD..HEAD - echo "" - 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 "" - exit 1 - fi From d65f8f6986ce629e8a024274aac34c8d17fc374b Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 2 Sep 2025 12:56:05 +0200 Subject: [PATCH 06/10] fix(modem): Fix CI build issues with IDFv6.0 * Fix C++ console struct init in examples * VFS deprecation in tests * Add conditional defines over wakeup-cause --- .../modem_console/main/console_helper.cpp | 13 ++++++------- .../modem_console/main/modem_console_main.cpp | 11 +++++++++-- .../esp_modem/test/target_ota/main/ota_test.cpp | 15 +++++++++++++-- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/components/esp_modem/examples/modem_console/main/console_helper.cpp b/components/esp_modem/examples/modem_console/main/console_helper.cpp index be8d369c69..ae0391cb34 100644 --- a/components/esp_modem/examples/modem_console/main/console_helper.cpp +++ b/components/esp_modem/examples/modem_console/main/console_helper.cpp @@ -63,13 +63,12 @@ void ConsoleCommand::RegisterCommand(const char *command, const char *help, cons arg_type end = { .end = arg_end(1) }; arg_table.emplace_back(end); - const esp_console_cmd_t command_def = { - .command = command, - .help = help, - .hint = nullptr, - .func = command_func_pts[last_command], - .argtable = &arg_table[0] - }; + esp_console_cmd_t command_def = { }; + command_def.command = command; + command_def.help = help; + command_def.hint = nullptr; + command_def.func = command_func_pts[last_command]; + command_def.argtable = &arg_table[0]; ESP_ERROR_CHECK(esp_console_cmd_register(&command_def)); last_command++; console_commands.emplace_back(this); diff --git a/components/esp_modem/examples/modem_console/main/modem_console_main.cpp b/components/esp_modem/examples/modem_console/main/modem_console_main.cpp index 3c3184f5a9..2c8d62486e 100644 --- a/components/esp_modem/examples/modem_console/main/modem_console_main.cpp +++ b/components/esp_modem/examples/modem_console/main/modem_console_main.cpp @@ -21,6 +21,7 @@ #include "cxx_include/esp_modem_dte.hpp" #include "esp_modem_config.h" #include "cxx_include/esp_modem_api.hpp" +#include "esp_idf_version.h" #if defined(CONFIG_EXAMPLE_SERIAL_CONFIG_USB) #include "esp_modem_usb_config.h" #include "cxx_include/esp_modem_usb_api.hpp" @@ -29,6 +30,12 @@ #include "console_helper.hpp" #include "my_module_dce.hpp" +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0) +#define GET_WAKEUP_CAUSE() esp_sleep_get_wakeup_causes() +#else +#define GET_WAKEUP_CAUSE() esp_sleep_get_wakeup_cause() +#endif + #if defined(CONFIG_EXAMPLE_FLOW_CONTROL_NONE) #define EXAMPLE_FLOW_CONTROL ESP_MODEM_FLOW_CONTROL_NONE #elif defined(CONFIG_EXAMPLE_FLOW_CONTROL_SW) @@ -208,7 +215,7 @@ extern "C" void app_main(void) esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT(); ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &s_repl)); - switch (esp_sleep_get_wakeup_cause()) { + switch (GET_WAKEUP_CAUSE()) { case ESP_SLEEP_WAKEUP_TIMER: if (esp_modem::modem_mode::CMUX_MODE == mode_rtc) { ESP_LOGI(TAG, "Deep sleep reset\n"); @@ -427,7 +434,7 @@ extern "C" void app_main(void) const ConsoleCommand SetDeepSleep("set_deep_sleep", "Put esp32 to deep sleep", &deep_sleep_args, sizeof(deep_sleep_args), [&](ConsoleCommand * c) { int tout = c->get_int_of(&DeepSleepArgs::timeout); ESP_LOGI(TAG, "Entering deep sleep for %d sec", tout); - ESP_LOGI(TAG, "Wakeup Cause: %d ", esp_sleep_get_wakeup_cause()); + ESP_LOGI(TAG, "Wakeup Cause: %d ", GET_WAKEUP_CAUSE()); esp_deep_sleep(tout * 1000000); return 0; }); diff --git a/components/esp_modem/test/target_ota/main/ota_test.cpp b/components/esp_modem/test/target_ota/main/ota_test.cpp index 8eeb6c3c00..2f39856736 100644 --- a/components/esp_modem/test/target_ota/main/ota_test.cpp +++ b/components/esp_modem/test/target_ota/main/ota_test.cpp @@ -14,11 +14,17 @@ #include "cxx_include/esp_modem_dte.hpp" #include "esp_modem_config.h" #include "cxx_include/esp_modem_api.hpp" -#include "esp_vfs_dev.h" // For optional VFS support -#include "vfs_resource/vfs_create.hpp" +#include "esp_idf_version.h" #include "network_dce.hpp" #include "manual_ota.hpp" #include "mqtt_client.h" +// For optional VFS support +#include "vfs_resource/vfs_create.hpp" +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0) +#include "driver/uart_vfs.h" +#else +#include "esp_vfs_dev.h" +#endif using namespace esp_modem; @@ -189,7 +195,12 @@ extern "C" void app_main(void) assert(vfs_create_uart(&uart_config, &dte_config.vfs_config) == true); auto dte = create_vfs_dte(&dte_config); +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0) + uart_vfs_dev_use_driver(uart_config.uart.port_num); +#else esp_vfs_dev_uart_use_driver(uart_config.uart.port_num); +#endif + #else auto dte = create_uart_dte(&dte_config); #endif // CONFIG_TEST_USE_VFS_TERM From 0d17f19f8db3ea84655f3c93f844b4619a5412bc Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 15:58:55 +0200 Subject: [PATCH 07/10] fix(modem): Fix modem console dependencies --- components/esp_modem/examples/modem_console/main/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/components/esp_modem/examples/modem_console/main/CMakeLists.txt b/components/esp_modem/examples/modem_console/main/CMakeLists.txt index 2465c0aec4..8c3157d99d 100644 --- a/components/esp_modem/examples/modem_console/main/CMakeLists.txt +++ b/components/esp_modem/examples/modem_console/main/CMakeLists.txt @@ -3,5 +3,4 @@ idf_component_register(SRCS "modem_console_main.cpp" "my_module_dce.cpp" "httpget_handle.c" "ping_handle.c" - REQUIRES console esp_http_client nvs_flash INCLUDE_DIRS ".") From aa94e168d88605250254c257497b2e7862ada5fd Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 16:02:48 +0200 Subject: [PATCH 08/10] fix(modem): Ignore more build warnings --- .github/workflows/modem__build-host-tests.yml | 9 ++------- ci/build_apps.py | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/modem__build-host-tests.yml b/.github/workflows/modem__build-host-tests.yml index 7e9bbafd52..8731088c25 100644 --- a/.github/workflows/modem__build-host-tests.yml +++ b/.github/workflows/modem__build-host-tests.yml @@ -15,11 +15,6 @@ jobs: matrix: idf_ver: ["latest", "release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"] example: ["pppos_client", "modem_console", "modem_tcp_client", "ap_to_pppos", "simple_cmux_client"] - include: - - idf_ver: "release-v5.0" - example: "simple_cmux_client" - warning: "Warning: The smallest app partition is nearly full" - runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: @@ -30,9 +25,9 @@ jobs: - if: ${{ matrix.skip_config }} run: rm -f $GITHUB_WORKSPACE/protocols/components/esp_modem/examples/${{ matrix.example }}/sdkconfig.ci.${{ matrix.skip_config }}* - name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} - env: - EXPECTED_WARNING: ${{ matrix.warning }} shell: bash + env: + EXPECTED_WARNING: "Warning: The smallest app partition is nearly full\nwarning: unknown kconfig symbol 'ESP32_PANIC_PRINT_HALT'" run: | . ${IDF_PATH}/export.sh python -m pip install idf-build-apps diff --git a/ci/build_apps.py b/ci/build_apps.py index f36399af8f..1dc680d390 100644 --- a/ci/build_apps.py +++ b/ci/build_apps.py @@ -56,7 +56,7 @@ build_dir='build_@t_@w', config_rules_str=args.rules, build_log_filename='build_log.txt', - size_json_filename='size.json' if not args.linux else None, + size_json_filename=None, check_warnings=True, manifest_files=args.manifests, default_build_targets=SUPPORTED_TARGETS, @@ -65,6 +65,7 @@ sys.exit( build_apps(apps, + verbose=2, dry_run=False, keep_going=False, no_preserve=args.delete, From 97194507784fd21a3823483b99590db373e128a6 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 10 Oct 2025 18:02:22 +0200 Subject: [PATCH 09/10] fix(modem): Remove unused kconfig --- .../esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 | 1 - 1 file changed, 1 deletion(-) diff --git a/components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 b/components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 index 665f78517c..59e1345b6f 100644 --- a/components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 +++ b/components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 @@ -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 From 07be98ebc313a98ea70237d3f5ac964314d03892 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 13 Oct 2025 09:54:28 +0200 Subject: [PATCH 10/10] bump(modem): 1.4.0 -> 1.4.1 1.4.1 Bug Fixes - Remove unused kconfig (97194507) - Fix modem console dependencies (0d17f19f) - Fix CI build issues with IDFv6.0 (d65f8f69) - Address build issues (b4520660) - Fix driver dependency issue on v6.0 (26b3859c) --- components/esp_modem/.cz.yaml | 2 +- components/esp_modem/CHANGELOG.md | 10 ++++++++++ components/esp_modem/idf_component.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/esp_modem/.cz.yaml b/components/esp_modem/.cz.yaml index 736d036f0c..6536e03e98 100644 --- a/components/esp_modem/.cz.yaml +++ b/components/esp_modem/.cz.yaml @@ -3,6 +3,6 @@ commitizen: bump_message: 'bump(modem): $current_version -> $new_version' pre_bump_hooks: python ../../ci/changelog.py esp_modem tag_format: modem-v$version - version: 1.4.0 + version: 1.4.1 version_files: - idf_component.yml diff --git a/components/esp_modem/CHANGELOG.md b/components/esp_modem/CHANGELOG.md index c899cd309a..dd73b0609f 100644 --- a/components/esp_modem/CHANGELOG.md +++ b/components/esp_modem/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.4.1](https://github.com/espressif/esp-protocols/commits/modem-v1.4.1) + +### Bug Fixes + +- Remove unused kconfig ([97194507](https://github.com/espressif/esp-protocols/commit/97194507)) +- Fix modem console dependencies ([0d17f19f](https://github.com/espressif/esp-protocols/commit/0d17f19f)) +- Fix CI build issues with IDFv6.0 ([d65f8f69](https://github.com/espressif/esp-protocols/commit/d65f8f69)) +- Address build issues ([b4520660](https://github.com/espressif/esp-protocols/commit/b4520660)) +- Fix driver dependency issue on v6.0 ([26b3859c](https://github.com/espressif/esp-protocols/commit/26b3859c)) + ## [1.4.0](https://github.com/espressif/esp-protocols/commits/modem-v1.4.0) ### Features diff --git a/components/esp_modem/idf_component.yml b/components/esp_modem/idf_component.yml index 9eeac66702..1dfd55d298 100644 --- a/components/esp_modem/idf_component.yml +++ b/components/esp_modem/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.4.0" +version: "1.4.1" description: Library for communicating with cellular modems in command and data modes url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem issues: https://github.com/espressif/esp-protocols/issues