diff --git a/.github/workflows/modem__target-test.yml b/.github/workflows/modem__target-test.yml index 02d6ed0e4ca..7aadb0eb233 100644 --- a/.github/workflows/modem__target-test.yml +++ b/.github/workflows/modem__target-test.yml @@ -15,7 +15,7 @@ jobs: matrix: idf_ver: ["latest"] idf_target: ["esp32c3"] - test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ] + test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ] runs-on: ubuntu-20.04 container: espressif/idf:${{ matrix.idf_ver }} env: @@ -54,7 +54,7 @@ jobs: matrix: idf_ver: ["latest"] idf_target: ["esp32c3"] - test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client } ] + test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ] needs: build_esp_modem_tests runs-on: - self-hosted diff --git a/README.md b/README.md index 940e8fef818..06ffba689d3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## How to use The [ESP-Protocols](https://github.com/espressif/esp-protocols) repository contains a collection of protocol components for [ESP-IDF](https://github.com/espressif/esp-idf). -Additionally, each component is available in [IDF Component Registry](https://components.espressif.com). +Additionally, each component is available in [IDF Component Registry](https://components.espressif.com). Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf) ## Components diff --git a/components/esp_modem/examples/simple_cmux_client/pytest_cmux.py b/components/esp_modem/examples/simple_cmux_client/pytest_cmux.py new file mode 100644 index 00000000000..2082128382e --- /dev/null +++ b/components/esp_modem/examples/simple_cmux_client/pytest_cmux.py @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Unlicense OR CC0-1.0 +from __future__ import print_function, unicode_literals + + +def test_cmux_connection(dut): + """ + steps: + 1. initializes connection with SIM800 + 2. checks we get an IP + 3. checks for the MQTT events + """ + # Check the sequence of connecting, publishing, disconnecting + dut.expect('Modem has correctly entered multiplexed') + # Check for MQTT connection and the data event + dut.expect('TOPIC: /topic/esp-modem') + dut.expect('DATA: Hello modem') diff --git a/components/esp_modem/examples/simple_cmux_client/sdkconfig.ci.sim800_cmux b/components/esp_modem/examples/simple_cmux_client/sdkconfig.ci.sim800_cmux new file mode 100644 index 00000000000..1c7e2296f1b --- /dev/null +++ b/components/esp_modem/examples/simple_cmux_client/sdkconfig.ci.sim800_cmux @@ -0,0 +1,16 @@ +CONFIG_IDF_TARGET="esp32c3" +# 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_MODEM_UART_TX_PIN=4 +CONFIG_EXAMPLE_MODEM_UART_RX_PIN=5 +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