From 58a0b57e122e0691a16ee49849c71633125d887f Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 6 Jun 2022 21:08:41 +0200 Subject: [PATCH] fix(esp_modem): Update CMUX example to use CMUX mode automatically --- .../simple_cmux_client/main/simple_cmux_client_main.cpp | 4 ++-- components/esp_modem/include/cxx_include/esp_modem_cmux.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp b/components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp index 89337ce92..e5513080c 100644 --- a/components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp +++ b/components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp @@ -87,10 +87,10 @@ extern "C" void app_main(void) } #endif - if (dce->set_mode(esp_modem::modem_mode::CMUX_MODE) && dce->set_mode(esp_modem::modem_mode::DATA_MODE)) { + if (dce->set_mode(esp_modem::modem_mode::CMUX_MODE)) { std::cout << "Modem has correctly entered multiplexed command/data mode" << std::endl; } else { - ESP_LOGE(TAG, "Failed to configure desired mode... exiting"); + ESP_LOGE(TAG, "Failed to configure multiplexed command mode... exiting"); return; } diff --git a/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp b/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp index d3bac0933..8065c4459 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp @@ -94,7 +94,7 @@ private: void send_disc(size_t i); /*!< Sending closing request for each virtual terminal */ void close_down(); /*!< Close up the control terminla (term=0) */ bool exit_cmux_protocol(); /*!< Sequence of exit of all virtual terms and control term */ - bool on_cmux(uint8_t *data, size_t len); /*!< Called from terminal layer when raw CMUX protocol data available */ + bool on_cmux_data(uint8_t *data, size_t len); /*!< Called from terminal layer when raw CMUX protocol data available */ struct CMuxFrame; /*!< Forward declare the Frame struct, used in protocol decoders */ /**