Skip to content

Commit 58a0b57

Browse files
committed
fix(esp_modem): Update CMUX example to use CMUX mode automatically
1 parent 3fd4391 commit 58a0b57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/esp_modem/examples/simple_cmux_client/main/simple_cmux_client_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ extern "C" void app_main(void)
8787
}
8888
#endif
8989

90-
if (dce->set_mode(esp_modem::modem_mode::CMUX_MODE) && dce->set_mode(esp_modem::modem_mode::DATA_MODE)) {
90+
if (dce->set_mode(esp_modem::modem_mode::CMUX_MODE)) {
9191
std::cout << "Modem has correctly entered multiplexed command/data mode" << std::endl;
9292
} else {
93-
ESP_LOGE(TAG, "Failed to configure desired mode... exiting");
93+
ESP_LOGE(TAG, "Failed to configure multiplexed command mode... exiting");
9494
return;
9595
}
9696

components/esp_modem/include/cxx_include/esp_modem_cmux.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class CMux {
9494
void send_disc(size_t i); /*!< Sending closing request for each virtual terminal */
9595
void close_down(); /*!< Close up the control terminla (term=0) */
9696
bool exit_cmux_protocol(); /*!< Sequence of exit of all virtual terms and control term */
97-
bool on_cmux(uint8_t *data, size_t len); /*!< Called from terminal layer when raw CMUX protocol data available */
97+
bool on_cmux_data(uint8_t *data, size_t len); /*!< Called from terminal layer when raw CMUX protocol data available */
9898

9999
struct CMuxFrame; /*!< Forward declare the Frame struct, used in protocol decoders */
100100
/**

0 commit comments

Comments
 (0)