mDNS und wifi stuff

This commit is contained in:
Carsten Graf
2025-06-05 17:38:34 +02:00
parent bc2218942a
commit fd17e92404
3 changed files with 125 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
#include <PrettyOTA.h>
#include <esp_now.h>
#include <WiFi.h>
#include <ESPmDNS.h> // <-- mDNS hinzufügen
#include "master.h"
#include "licenceing.h"
@@ -36,7 +37,13 @@ void setupWifi() {
Serial.print("IP Adresse: ");
Serial.println(WiFi.softAPIP());
Serial.println("PrettyOTA can be accessed at: http://" + WiFi.softAPIP().toString() + "/update");
// mDNS starten
if (MDNS.begin("aquacross-timer")) { // z.B. http://aquacross-timer.local/
Serial.println("mDNS responder gestartet: http://aquacross-timer.local/");
} else {
Serial.println("Fehler beim Starten von mDNS!");
}
}
void setupOTA(AsyncWebServer *server) {
@@ -56,4 +63,3 @@ void setupOTA(AsyncWebServer *server) {
// WiFi als Access Point