From 9783fca1fc2f06c99656a2dd2bc266a8282725a2 Mon Sep 17 00:00:00 2001 From: Xavier horwood <39760456+Xavierhorwood@users.noreply.github.com> Date: Sat, 14 Jun 2025 08:08:18 +1000 Subject: [PATCH] add log message for arduino 3.0.0 and above and enable ipv6 by default --- src/mesh/Default.h | 2 +- src/mesh/NodeDB.cpp | 2 +- src/mesh/wifi/WiFiAPClient.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesh/Default.h b/src/mesh/Default.h index 3fcbe50c7..1329f8bd2 100644 --- a/src/mesh/Default.h +++ b/src/mesh/Default.h @@ -22,7 +22,7 @@ #define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour #define min_neighbor_info_broadcast_secs 4 * 60 * 60 #define default_map_publish_interval_secs 60 * 60 -#define default_network_ipv6_enabled false +#define default_network_ipv6_enabled true #define default_mqtt_address "mqtt.meshtastic.org" #define default_mqtt_username "meshdev" diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 9490603d1..6c1521c7d 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -654,7 +654,7 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) strncpy(config.network.wifi_psk, USERPREFS_NETWORK_WIFI_PSK, sizeof(config.network.wifi_psk)); #endif -#if defined(ARCH_ESP32) && defined(USERPREFS_NETWORK_IPV6_ENABLED) +#if defined(USERPREFS_NETWORK_IPV6_ENABLED) config.network.ipv6_enabled = USERPREFS_NETWORK_IPV6_ENABLED; #else config.network.ipv6_enabled = default_network_ipv6_enabled; diff --git a/src/mesh/wifi/WiFiAPClient.cpp b/src/mesh/wifi/WiFiAPClient.cpp index e336f8766..9add18aae 100644 --- a/src/mesh/wifi/WiFiAPClient.cpp +++ b/src/mesh/wifi/WiFiAPClient.cpp @@ -347,7 +347,9 @@ static void WiFiEvent(WiFiEvent_t event) LOG_INFO("Connected to access point"); if (config.network.ipv6_enabled) { #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) - WiFi.enableIPv6(); + if (!WiFi.enableIPv6()) { + LOG_WARN("Failed to enable IPv6"); + } #else if (!WiFi.enableIpV6()) { LOG_WARN("Failed to enable IPv6");