From 4bdd90cc887d85587f366d9b1cf8d59c39d9ced4 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 26 Mar 2024 14:43:30 +0100 Subject: [PATCH] fix(modem): Fixed UART task to check for buffered data periodically Closes https://github.com/espressif/esp-protocols/issues/536 --- components/esp_modem/src/esp_modem_uart.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/esp_modem/src/esp_modem_uart.cpp b/components/esp_modem/src/esp_modem_uart.cpp index deb84ddf2a..df7b4882bc 100644 --- a/components/esp_modem/src/esp_modem_uart.cpp +++ b/components/esp_modem/src/esp_modem_uart.cpp @@ -160,6 +160,11 @@ void UartTerminal::task() ESP_LOGW(TAG, "unknown uart event type: %d", event.type); break; } + } else { + uart_get_buffered_data_len(uart.port, &len); + if (len && on_read) { + on_read(nullptr, len); + } } } }