mirror of
https://github.com/esphome/esphome.git
synced 2025-11-17 15:26:01 +00:00
Enable IPv6 for ESP32 Arduino, wifi and ethernet (#4865)
This commit is contained in:
@@ -485,6 +485,9 @@ void WiFiComponent::wifi_event_callback_(esphome_wifi_event_id_t event, esphome_
|
||||
buf[it.ssid_len] = '\0';
|
||||
ESP_LOGV(TAG, "Event: Connected ssid='%s' bssid=" LOG_SECRET("%s") " channel=%u, authmode=%s", buf,
|
||||
format_mac_addr(it.bssid).c_str(), it.channel, get_auth_mode_str(it.authmode));
|
||||
#if LWIP_IPV6
|
||||
WiFi.enableIpV6();
|
||||
#endif /* LWIP_IPV6 */
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -547,6 +550,13 @@ void WiFiComponent::wifi_event_callback_(esphome_wifi_event_id_t event, esphome_
|
||||
s_sta_connecting = false;
|
||||
break;
|
||||
}
|
||||
#if LWIP_IPV6
|
||||
case ESPHOME_EVENT_ID_WIFI_STA_GOT_IP6: {
|
||||
auto it = info.got_ip6.ip6_info;
|
||||
ESP_LOGV(TAG, "Got IPv6 address=" IPV6STR, IPV62STR(it.ip));
|
||||
break;
|
||||
}
|
||||
#endif /* LWIP_IPV6 */
|
||||
case ESPHOME_EVENT_ID_WIFI_STA_LOST_IP: {
|
||||
ESP_LOGV(TAG, "Event: Lost IP");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user