From 49d7a6e519c9839fcbf50e6a8745a7e5f16dd1be Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 26 Sep 2023 12:22:04 +0200 Subject: [PATCH] fix(modem): Test what CMUX on SIM800 does --- .../examples/simple_cmux_client/sdkconfig.ci.sim800_cmux | 8 ++++++++ components/esp_modem/src/esp_modem_cmux.cpp | 1 + 2 files changed, 9 insertions(+) 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 index 1c7e2296f1b..18b02189f20 100644 --- a/components/esp_modem/examples/simple_cmux_client/sdkconfig.ci.sim800_cmux +++ b/components/esp_modem/examples/simple_cmux_client/sdkconfig.ci.sim800_cmux @@ -14,3 +14,11 @@ 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_LOG_DEFAULT_LEVEL_DEBUG=y +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=4 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=4 +# CONFIG_LOG_MASTER_LEVEL is not set diff --git a/components/esp_modem/src/esp_modem_cmux.cpp b/components/esp_modem/src/esp_modem_cmux.cpp index 1ce67a61f61..bd618b9ab8d 100644 --- a/components/esp_modem/src/esp_modem_cmux.cpp +++ b/components/esp_modem/src/esp_modem_cmux.cpp @@ -234,6 +234,7 @@ bool CMux::on_header(CMuxFrame &frame) // since CRC could be evaluated after the frame payload gets received if (dlci > MAX_TERMINALS_NUM || (frame_header[1] & 0x01) == 0 || (((type & FT_UIH) != FT_UIH) && type != (FT_UA | PF) ) ) { + ESP_LOGI("CMUX","[1]:%02x [2]:%02x [3]:%02x", frame_header[1], frame_header[2], frame_header[3]); recover_protocol(protocol_mismatch_reason::UNEXPECTED_HEADER); return true; }