Adding mDNS
This commit is contained in:
parent
622637ba0b
commit
3ba1dad518
@ -5,6 +5,7 @@
|
||||
//################# LIBRARIES ##########################
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
|
||||
#include <DNSServer.h>
|
||||
#include <SPI.h>
|
||||
@ -69,6 +70,14 @@ void setup() {
|
||||
WiFiManager wifiManager;
|
||||
// reset saved settings
|
||||
// wifiManager.resetSettings();
|
||||
if (!MDNS.begin("ESP8266")) {
|
||||
DEBUG_PRINTLN("Error setting up MDNS responder!");
|
||||
while(1) {
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
DEBUG_PRINTLN("mDNS responder started");
|
||||
MDNS.addService("http", "tcp", 80);
|
||||
|
||||
#ifndef DEBUG_WifiM
|
||||
wifiManager.setDebugOutput(false); // no debug
|
||||
|
Loading…
x
Reference in New Issue
Block a user