IPv6 support by MichaelDvP - #83

This commit is contained in:
proddy
2021-07-05 22:43:08 +02:00
parent 75795ab1e9
commit 05cd96f2be
4 changed files with 697 additions and 562 deletions

View File

@@ -73,6 +73,20 @@ void WebStatusService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) {
EMSESP::system_.ethernet_connected(false);
break;
case SYSTEM_EVENT_STA_CONNECTED:
WiFi.enableIpV6();
break;
case SYSTEM_EVENT_ETH_CONNECTED:
// ETH.enableIpV6(); // TODO this crashes
break;
case SYSTEM_EVENT_GOT_IP6:
#ifndef EMSESP_STANDALONE
EMSESP::logger().info(F("WiFi Connected with IP=%s, hostname=%s"), WiFi.localIPv6().toString().c_str(), WiFi.getHostname());
#endif
break;
default:
break;
}