Re: ESP32 PPP disconnection re-connection issue
Posted: Thu Oct 14, 2021 1:51 pm
Hi David,
seems that I've found the issue:
I was calling the esp_netif_new and esp_modem_netif_setup
Into the esp_modem_setup_ppp() each time I starting a reconnection and the
at the disconnection.
Moving the first at the device init calling it only once and never calling the destroy functions the device seems to work properly. Actually I'm at the 7th disconnectio/reconnection without issue.
Thanks for the support
seems that I've found the issue:
I was calling the esp_netif_new and esp_modem_netif_setup
Code: Select all
esp_netif_config_t cfg = ESP_NETIF_DEFAULT_PPP();
esp_netif = esp_netif_new(&cfg);
assert(esp_netif);
modem_netif_adapter = esp_modem_netif_setup(dte);
esp_modem_netif_set_default_handlers(modem_netif_adapter, esp_netif);
Code: Select all
esp_event_handler_unregister(IP_EVENT, ESP_EVENT_ANY_ID, &on_ip_event);
esp_modem_netif_clear_default_handlers(modem_netif_adapter);
esp_modem_netif_teardown(modem_netif_adapter);
esp_netif_destroy(esp_netif);Moving the first at the device init calling it only once and never calling the destroy functions the device seems to work properly. Actually I'm at the 7th disconnectio/reconnection without issue.
Thanks for the support