Remove captive portal DNS — serve site normally at 192.168.4.1
Made-with: Cursor
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include <RadioLib.h>
|
||||
#include <WiFi.h>
|
||||
#include <WebServer.h>
|
||||
#include <DNSServer.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <ArduinoOTA.h>
|
||||
#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();
|
||||
|
||||
Reference in New Issue
Block a user