From 11477ae68f20b4f76c49429db9e0779997f37e47 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Mon, 29 Jun 2026 00:28:24 +0200 Subject: [PATCH] Extend hostname buffer and WiFiManager param length to DNS max (63) --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0b91b05..bc2250c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,10 +28,10 @@ struct AuthConfig { char pass[32] = ""; }; -static char hostname[32] = HOSTNAME_DEFAULT; +static char hostname[64] = HOSTNAME_DEFAULT; static MqttConfig mqttCfg; static AuthConfig authCfg; -static WiFiManagerParameter hostnameParam("hostname", "Device hostname", hostname, 32); +static WiFiManagerParameter hostnameParam("hostname", "Device hostname", hostname, 63); static WebServer server(80); static WiFiClient wifiClient; static PubSubClient mqttClient(wifiClient); @@ -304,7 +304,7 @@ static void handleRoot() { html += "
Hostname" + String(hostname) + "
"; html += "
IP" + WiFi.localIP().toString() + "
"; html += "
"; - html += ""; + html += ""; html += authSection; html += mqttSection; html += "
";