diff --git a/examples/protocols/pppos_client/components/modem/include/esp_modem_dce.h b/examples/protocols/pppos_client/components/modem/include/esp_modem_dce.h index a0633cb86a7..7c180b42146 100644 --- a/examples/protocols/pppos_client/components/modem/include/esp_modem_dce.h +++ b/examples/protocols/pppos_client/components/modem/include/esp_modem_dce.h @@ -52,7 +52,7 @@ typedef struct modem_dte modem_dte_t; */ #define MODEM_COMMAND_TIMEOUT_DEFAULT (500) /*!< Default timeout value for most commands */ #define MODEM_COMMAND_TIMEOUT_OPERATOR (75000) /*!< Timeout value for getting operator status */ -#define MODEM_COMMAND_TIMEOUT_MODE_CHANGE (3000) /*!< Timeout value for changing working mode */ +#define MODEM_COMMAND_TIMEOUT_MODE_CHANGE (5000) /*!< Timeout value for changing working mode */ #define MODEM_COMMAND_TIMEOUT_HANG_UP (90000) /*!< Timeout value for hang up */ #define MODEM_COMMAND_TIMEOUT_POWEROFF (1000) /*!< Timeout value for power down */ diff --git a/examples/protocols/pppos_client/components/modem/src/esp_modem.c b/examples/protocols/pppos_client/components/modem/src/esp_modem.c index 2134e387cdc..89f50fa3b9a 100644 --- a/examples/protocols/pppos_client/components/modem/src/esp_modem.c +++ b/examples/protocols/pppos_client/components/modem/src/esp_modem.c @@ -387,6 +387,8 @@ modem_dte_t *esp_modem_dte_init(const esp_modem_dte_config_t *config) res = uart_driver_install(esp_dte->uart_port, CONFIG_EXAMPLE_UART_RX_BUFFER_SIZE, CONFIG_EXAMPLE_UART_TX_BUFFER_SIZE, CONFIG_EXAMPLE_UART_EVENT_QUEUE_SIZE, &(esp_dte->event_queue), 0); MODEM_CHECK(res == ESP_OK, "install uart driver failed", err_uart_config); + res = uart_set_rx_timeout(esp_dte->uart_port, 1); + MODEM_CHECK(res == ESP_OK, "set rx timeout failed", err_uart_config); MODEM_CHECK(uart_param_config(esp_dte->uart_port, &uart_config) == ESP_OK, "config uart parameter failed", err_uart_config); if (config->flow_control == MODEM_FLOW_CONTROL_HW) {