From 1db1e1508d63c9d03161e3b7785f6cc7a2ac81b8 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 20 Oct 2023 11:54:48 +0200 Subject: [PATCH 1/2] fix(modem): Fix DTE to post fragments to parsers for USB term --- components/esp_modem/src/esp_modem_dte.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_modem/src/esp_modem_dte.cpp b/components/esp_modem/src/esp_modem_dte.cpp index 89cf64af05..e37298889d 100644 --- a/components/esp_modem/src/esp_modem_dte.cpp +++ b/components/esp_modem/src/esp_modem_dte.cpp @@ -78,9 +78,9 @@ void DTE::set_command_callbacks() if (command_cb.process_line(data, 0, len)) { return true; } - // cannot inflate and the processing hasn't finishes in the first iteration -> report a failure - command_cb.give_up(); - return true; + // cannot inflate and the processing hasn't finishes in the first iteration, but continue + // (will post next fragments to the parser, since we might be just missing a last token or OK + return false; #endif } // data == nullptr: Terminals which request users to read current data From edeb936a5d33e4cef4cacf719b93d4925708756a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 20 Oct 2023 12:06:40 +0200 Subject: [PATCH 2/2] fix(modem): Added USB runner with ESP32S2 with A7670 --- .github/workflows/modem__target-test.yml | 8 ++++++++ .../pppos_client/sdkconfig.ci.usb_a7670_s2 | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 diff --git a/.github/workflows/modem__target-test.yml b/.github/workflows/modem__target-test.yml index 7aadb0eb23..f7f5cf7811 100644 --- a/.github/workflows/modem__target-test.yml +++ b/.github/workflows/modem__target-test.yml @@ -16,6 +16,10 @@ jobs: idf_ver: ["latest"] idf_target: ["esp32c3"] test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ] + include: + - idf_ver: "latest" + idf_target: "esp32s2" + test: { app: usb_a7670_s2, path: examples/pppos_client } runs-on: ubuntu-20.04 container: espressif/idf:${{ matrix.idf_ver }} env: @@ -55,6 +59,10 @@ jobs: idf_ver: ["latest"] idf_target: ["esp32c3"] test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ] + include: + - idf_ver: "latest" + idf_target: "esp32s2" + test: { app: usb_a7670_s2, path: examples/pppos_client } needs: build_esp_modem_tests runs-on: - self-hosted 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 new file mode 100644 index 0000000000..665f78517c --- /dev/null +++ b/components/esp_modem/examples/pppos_client/sdkconfig.ci.usb_a7670_s2 @@ -0,0 +1,14 @@ +CONFIG_IDF_TARGET="esp32s2" +# Override some defaults to enable PPP +CONFIG_LWIP_PPP_SUPPORT=y +CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y +CONFIG_LWIP_PPP_PAP_SUPPORT=y +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096 +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