Browse Source

ports/esp32: Add initial support for IPV6.

Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
pull/11111/head
Carlosgg 2 years ago
parent
commit
367e100ff7
  1. 3
      ports/esp32/boards/sdkconfig.base
  2. 3
      ports/esp32/network_wlan.c

3
ports/esp32/boards/sdkconfig.base

@ -45,6 +45,9 @@ CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_PAP_SUPPORT=y CONFIG_LWIP_PPP_PAP_SUPPORT=y
CONFIG_LWIP_PPP_CHAP_SUPPORT=y CONFIG_LWIP_PPP_CHAP_SUPPORT=y
# IPV6
CONFIG_LWIP_IPV6_AUTOCONFIG=y
# SSL # SSL
# Use 4kiB output buffer instead of default 16kiB # Use 4kiB output buffer instead of default 16kiB
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y

3
ports/esp32/network_wlan.c

@ -147,6 +147,9 @@ static void network_wlan_ip_event_handler(void *event_handler_arg, esp_event_bas
ESP_LOGI("network", "GOT_IP"); ESP_LOGI("network", "GOT_IP");
wifi_sta_connected = true; wifi_sta_connected = true;
wifi_sta_disconn_reason = 0; // Success so clear error. (in case of new error will be replaced anyway) wifi_sta_disconn_reason = 0; // Success so clear error. (in case of new error will be replaced anyway)
ip_event_got_ip_t *event = (ip_event_got_ip_t *)event_data;
esp_netif_create_ip6_linklocal(event->esp_netif);
#if MICROPY_HW_ENABLE_MDNS_QUERIES || MICROPY_HW_ENABLE_MDNS_RESPONDER #if MICROPY_HW_ENABLE_MDNS_QUERIES || MICROPY_HW_ENABLE_MDNS_RESPONDER
if (!mdns_initialised) { if (!mdns_initialised) {
mdns_init(); mdns_init();

Loading…
Cancel
Save