Browse Source

mDNS txtRecord "name" added

!!!RELEASE CANDITATE!!!
master
gituser 2 weeks ago
parent
commit
c8b43587f1
2 changed files with 5 additions and 1 deletions
  1. 4
    0
      LEDLamp.ino
  2. 1
    1
      sloeber.ino.cpp

+ 4
- 0
LEDLamp.ino View File

@@ -317,11 +317,15 @@ void startSTAWebServer() {
Serial.print(WiFi.localIP());
Serial.println(":81/");

String macAddressStr = WiFi.macAddress();

if (MDNS.begin("LEDLamp")) {
Serial.println("mDNS gestartet");
MDNS.addService("http", "tcp", 80);
MDNS.addService("ws", "tcp", 81);
MDNS.addService("LEDLamp", "tcp", 80);

MDNS.addServiceTxt("LEDLamp", "tcp", "name", "LED Lamp [" + macAddressStr + "]");
}
}


+ 1
- 1
sloeber.ino.cpp View File

@@ -2,7 +2,7 @@
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2026-07-16 22:59:44
//This file has been generated on 2026-07-17 16:31:43

#include "Arduino.h"
#include "Arduino.h"

Loading…
Cancel
Save