From 4d5429f99037e45cf820aed93d7da0ddfd524460 Mon Sep 17 00:00:00 2001 From: drjones Date: Fri, 3 Apr 2026 09:45:57 -0700 Subject: [PATCH] =?UTF-8?q?Remove=20captive=20portal=20DNS=20=E2=80=94=20s?= =?UTF-8?q?erve=20site=20normally=20at=20192.168.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- src/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 92c6eec..56e7d23 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include "driver/gpio.h" @@ -36,7 +35,6 @@ CC1101 radio1(&mod1); CC1101 radio2(&mod2); static WebServer server(WEB_PORT); -static DNSServer dnsServer; static Preferences preferences; // CC1101 valid discrete power levels in dBm (RadioLib only accepts these exact values) @@ -2544,8 +2542,7 @@ static void handleCaptureWave() { } static void handleNotFound() { - server.sendHeader("Location", "http://192.168.4.1/"); - server.send(302, "text/plain", "Redirect"); + server.send(404, "text/plain", "404: Not found"); } static void handleSelfTest() { @@ -2718,9 +2715,6 @@ void setup() { server.onNotFound(handleNotFound); server.begin(); - dnsServer.start(53, "*", WiFi.softAPIP()); - logLine("[DNS] Captive portal DNS on *:53 → " + WiFi.softAPIP().toString()); - // OTA firmware updates over WiFi (connect to 'killer' AP, upload via PlatformIO OTA) ArduinoOTA.setHostname("killer"); ArduinoOTA.setPassword("killerpw"); @@ -2746,7 +2740,6 @@ void setup() { } void loop() { - dnsServer.processNextRequest(); espNowTick(); ArduinoOTA.handle(); server.handleClient();