diff --git a/components/esp_modem/src/esp_modem_dce.cpp b/components/esp_modem/src/esp_modem_dce.cpp index 0a0ca14ac..f10551632 100644 --- a/components/esp_modem/src/esp_modem_dce.cpp +++ b/components/esp_modem/src/esp_modem_dce.cpp @@ -328,12 +328,19 @@ modem_mode DCE_Mode::guess_unsafe(DTE *dte, bool with_cmux) if (reply_pos >= sizeof(probe::ppp::lcp_echo_reply_head)) { // check for initial 2 bytes auto *ptr = static_cast(memmem(reply, reply_pos, probe::ppp::lcp_echo_reply_head.data(), 2)); - // and check the other two bytes for protocol ID: LCP + // and check the other two bytes for protocol ID: + // * either LCP reply if (ptr && ptr[3] == probe::ppp::lcp_echo_reply_head[3] && ptr[4] == probe::ppp::lcp_echo_reply_head[4]) { if (auto signal = weak_signal.lock()) { signal->set(probe::ppp::mode); } } + // * or LCP conf request + if (ptr && ptr[3] == probe::ppp::lcp_echo_request[3] && ptr[4] == probe::ppp::lcp_echo_request[4]) { + if (auto signal = weak_signal.lock()) { + signal->set(probe::ppp::mode); + } + } } if (reply_pos >= 4 && memmem(reply, reply_pos, probe::cmd::reply, sizeof(probe::cmd::reply))) { if (reply[0] != 0xf9) { // double check that the reply is not wrapped in CMUX headers