lokale IP per mDNS annoncieren (http://rdzsonde.local/)

This commit is contained in:
Hansi, dl9rdz 2019-05-03 07:53:21 +02:00
parent 1732f17cce
commit 2eaba4fe7e
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include <U8g2lib.h>
#include <SPI.h>
#include <Update.h>
#include <ESPmDNS.h>
#include <SX1278FSK.h>
#include <Sonde.h>
@ -919,10 +920,13 @@ String translateEncryptionType(wifi_auth_mode_t encryptionType) {
void enableNetwork(bool enable) {
if (enable) {
MDNS.begin("rdzsonde");
SetupAsyncServer();
udp.begin(WiFi.localIP(), LOCALUDPPORT);
MDNS.addService("http", "tcp", 80);
connected = true;
} else {
MDNS.end();
connected = false;
}
}