From d6f66465ffdb12e801546ad7f04a360fd46d983b Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 23 Mar 2021 19:37:56 +0100 Subject: [PATCH 1/3] lwip: Made LCP ECHO bool for better user experience --- components/lwip/Kconfig | 41 +++++++++++-------- components/lwip/port/esp32/include/lwipopts.h | 7 ++-- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 057fba2256..0293e7e415 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -708,6 +708,29 @@ menu "LWIP" help Enable Microsoft Point-to-Point Encryption (MPPE) support + config LWIP_ENABLE_LCP_ECHO + bool "Enable LCP ECHO" + depends on LWIP_PPP_SUPPORT + default n + help + Enable LCP echo keepalive requests + + config LWIP_LCP_ECHOINTERVAL + int "Echo interval (s)" + range 0 1000000 + depends on LWIP_ENABLE_LCP_ECHO + default 3 + help + Interval in seconds between keepalive LCP echo requests, 0 to disable. + + config LWIP_LCP_MAXECHOFAILS + int "Maximum echo failures" + range 0 100000 + depends on LWIP_ENABLE_LCP_ECHO + default 3 + help + Number of consecutive unanswered echo requests before failure is indicated. + config LWIP_PPP_DEBUG_ON bool "Enable PPP debug log output" depends on LWIP_PPP_SUPPORT @@ -777,24 +800,6 @@ menu "LWIP" endmenu # SNTP - menu "LCP" - - config LCP_ECHOINTERVAL - int "Echo interval (s)" - range 0 1000000 - default 0 - help - Interval in seconds between keepalive LCP echo requests, 0 to disable. - - config LCP_MAXECHOFAILS - int "Maximum echo failures" - range 0 100000 - default 3 - help - Number of consecutive unanswered echo requests before failure is indicated. - - endmenu # LCP - config LWIP_ESP_LWIP_ASSERT bool "Enable LWIP ASSERT checks" default y diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 442bf0e98e..35600cbbb6 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -745,16 +745,17 @@ --------- LCP Echo options --------- ------------------------------------ */ +#if CONFIG_LWIP_ENABLE_LCP_ECHO /** * LCP_ECHOINTERVAL: Interval in seconds between keepalive LCP echo requests, 0 to disable. */ -#define LCP_ECHOINTERVAL CONFIG_LCP_ECHOINTERVAL +#define LCP_ECHOINTERVAL CONFIG_LWIP_LCP_ECHOINTERVAL /** * LCP_MAXECHOFAILS: Number of consecutive unanswered echo requests before failure is indicated. */ -#define LCP_MAXECHOFAILS CONFIG_LCP_MAXECHOFAILS - +#define LCP_MAXECHOFAILS CONFIG_LWIP_LCP_MAXECHOFAILS +#endif /* CONFIG_LWIP_ENABLE_LCP_ECHO */ /* -------------------------------------- From 37b694559f6b5c6f2a0e05cc9f5faedd418b797a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 23 Mar 2021 19:39:37 +0100 Subject: [PATCH 2/3] esp_modem: Add option to support for LCP keepalive Closes https://github.com/espressif/esp-idf/issues/6562 --- examples/protocols/pppos_client/main/Kconfig.projbuild | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/protocols/pppos_client/main/Kconfig.projbuild b/examples/protocols/pppos_client/main/Kconfig.projbuild index f0237c6d98..aa8848b7fe 100644 --- a/examples/protocols/pppos_client/main/Kconfig.projbuild +++ b/examples/protocols/pppos_client/main/Kconfig.projbuild @@ -54,6 +54,14 @@ menu "Example Configuration" Enter the peer phone number that you want to send message to. endif + config EXAMPLE_LCP_ECHO + bool "Enable LCP ECHO" + default n + select LWIP_ENABLE_LCP_ECHO + help + Enable this option to make use of LCP keepalive using + LCP_ECHO_INTERVAL and LCP_MAXECHOFAILS to default values + menu "UART Configuration" config EXAMPLE_MODEM_UART_TX_PIN int "TXD Pin Number" From b6f0b9ae2aab863590cc236f599c802cfcee3a1a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 30 Mar 2021 16:38:22 +0200 Subject: [PATCH 3/3] esp_modem: Add option which enables UART_ISR_IN_IRAM to support OTA Closes https://github.com/espressif/esp-idf/issues/4582 --- examples/protocols/pppos_client/main/Kconfig.projbuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/protocols/pppos_client/main/Kconfig.projbuild b/examples/protocols/pppos_client/main/Kconfig.projbuild index aa8848b7fe..a7f45c7bd0 100644 --- a/examples/protocols/pppos_client/main/Kconfig.projbuild +++ b/examples/protocols/pppos_client/main/Kconfig.projbuild @@ -54,6 +54,15 @@ menu "Example Configuration" Enter the peer phone number that you want to send message to. endif + config EXAMPLE_UART_ISR_IN_RAM + bool "Use UART ISR in RAM" + default n + select UART_ISR_IN_IRAM + help + Enable placing UART ISR to IRAM. + This options is useful if PPPoS client needs to perform + flash operations (e.g. OTA) while keeping the network operational. + config EXAMPLE_LCP_ECHO bool "Enable LCP ECHO" default n