Setting unique hostname with chipID

This commit is contained in:
Sébastien Vallée 2017-12-26 07:26:17 +01:00
parent 3ba1dad518
commit 709706c2d1

View File

@ -17,6 +17,7 @@
#include "d_helper.h"
#include "FS.h"
#define HOSTNAME "LibreMetric-"
//################# DISPLAY CONNECTIONS ################
// LED Matrix Pin -> ESP8266 Pin
@ -66,10 +67,11 @@ void setup() {
}
display_message("Wi-Fi");
WiFiManager wifiManager;
// reset saved settings
// wifiManager.resetSettings();
String hostname(HOSTNAME);
hostname += String(ESP.getChipId(), HEX);
WiFi.hostname(hostname);
if (!MDNS.begin("ESP8266")) {
DEBUG_PRINTLN("Error setting up MDNS responder!");
while(1) {