diff --git a/data/src/js/script.ts b/data/src/js/script.ts
index 0952e77..1125f9b 100644
--- a/data/src/js/script.ts
+++ b/data/src/js/script.ts
@@ -76,7 +76,6 @@ fetch('/api/settings', {
document.getElementById('fullRefreshMin').value = jsonData.fullRefreshMin;
document.getElementById('wpTimeout').value = jsonData.wpTimeout;
document.getElementById('mempoolInstance').value = jsonData.mempoolInstance;
- document.getElementById('hostnamePrefix').value = jsonData.hostnamePrefix;
if (jsonData.gitRev)
document.getElementById('gitRev').innerHTML = "Version: " + jsonData.gitRev;
diff --git a/doc/Rev.B/IMG_3310.jpeg b/doc/Rev.B/IMG_3310.jpeg
deleted file mode 100644
index 9cd98b4..0000000
Binary files a/doc/Rev.B/IMG_3310.jpeg and /dev/null differ
diff --git a/doc/Rev.B/IMG_3313.jpeg b/doc/Rev.B/IMG_3313.jpeg
deleted file mode 100644
index 1c20403..0000000
Binary files a/doc/Rev.B/IMG_3313.jpeg and /dev/null differ
diff --git a/doc/Rev.B/IMG_3314.jpeg b/doc/Rev.B/IMG_3314.jpeg
deleted file mode 100644
index f26ddf4..0000000
Binary files a/doc/Rev.B/IMG_3314.jpeg and /dev/null differ
diff --git a/doc/Rev.B/IMG_3317.jpeg b/doc/Rev.B/IMG_3317.jpeg
deleted file mode 100644
index 777777b..0000000
Binary files a/doc/Rev.B/IMG_3317.jpeg and /dev/null differ
diff --git a/src/lib/functions.cpp b/src/lib/functions.cpp
index 78d2d33..0e6cd4e 100644
--- a/src/lib/functions.cpp
+++ b/src/lib/functions.cpp
@@ -36,8 +36,8 @@ void setupSoftAP()
{
byte mac[6];
WiFi.macAddress(mac);
- softAP_SSID = getMyHostname().c_str();
- WiFi.setHostname(getMyHostname().c_str());
+ softAP_SSID = String("BTClock" + String(mac[5], 16) + String(mac[1], 16));
+ WiFi.setHostname(softAP_SSID.c_str());
softAP_password = base64::encode(String(mac[2], 16) + String(mac[4], 16) + String(mac[5], 16) + String(mac[1], 16)).substring(2, 10);
}
diff --git a/src/lib/functions.hpp b/src/lib/functions.hpp
index d4d939d..95177b4 100644
--- a/src/lib/functions.hpp
+++ b/src/lib/functions.hpp
@@ -5,7 +5,6 @@
//#include
#include "config.h"
-#include "utils.hpp"
#include "shared.hpp"
#include "Adafruit_GFX.h"
#include "lib/epd.hpp"
diff --git a/src/lib/utils.cpp b/src/lib/utils.cpp
index 480ca6a..245d4b5 100644
--- a/src/lib/utils.cpp
+++ b/src/lib/utils.cpp
@@ -41,14 +41,3 @@ std::string formatNumberWithSuffix(int64_t num) {
return std::to_string(num);
}
}
-
-String getMyHostname() {
- uint8_t mac[6];
- //WiFi.macAddress(mac);
- esp_efuse_mac_get_default(mac);
- char hostname[15];
- String hostnamePrefix = preferences.getString("hostnamePrefix", "btclock");
- snprintf(hostname, sizeof(hostname), "%s-%02x%02x%02x",
- hostnamePrefix, mac[3], mac[4], mac[5]);
- return hostname;
-}
\ No newline at end of file
diff --git a/src/lib/utils.hpp b/src/lib/utils.hpp
index 32f2a6d..c0ffac7 100644
--- a/src/lib/utils.hpp
+++ b/src/lib/utils.hpp
@@ -3,5 +3,4 @@
#include "shared.hpp"
double getSupplyAtBlock(uint blockNr);
-std::string formatNumberWithSuffix(int64_t num);
-String getMyHostname();
+std::string formatNumberWithSuffix(int64_t num);
\ No newline at end of file
diff --git a/src/lib/webserver.cpp b/src/lib/webserver.cpp
index 0f96454..4a3b4f2 100644
--- a/src/lib/webserver.cpp
+++ b/src/lib/webserver.cpp
@@ -52,7 +52,7 @@ void setupWebserver()
// Start server
server.begin();
- if (!MDNS.begin(getMyHostname()))
+ if (!MDNS.begin(HOSTNAME))
{
Serial.println(F("Error setting up MDNS responder!"));
while (1)
@@ -61,9 +61,6 @@ void setupWebserver()
}
}
MDNS.addService("http", "tcp", 80);
- MDNS.addServiceTxt("http", "tcp", "model", "BTClock");
- MDNS.addServiceTxt("http", "tcp", "version", "2.0");
- MDNS.addServiceTxt("http", "tcp", "rev", GIT_REV);
Serial.println(F("Webserver should be running"));
}
@@ -187,9 +184,7 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
root["rpcUser"] = preferences.getString("rpcUser", BITCOIND_RPC_USER);
root["rpcHost"] = preferences.getString("rpcHost", BITCOIND_HOST);
root["mempoolInstance"] = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE);
- root["hostnamePrefix"] = preferences.getString("hostnamePrefix", "btclock");
- root["hostname"] = getMyHostname();
-
+
#ifdef IS_BW
root["epdColors"] = 2;
#else
@@ -295,14 +290,6 @@ void onApiSettingsPost(AsyncWebServerRequest *request)
settingsChanged = true;
}
- if (request->hasParam("hostnamePrefix", true))
- {
- AsyncWebParameter *hostnamePrefix = request->getParam("hostnamePrefix", true);
-
- preferences.putString("hostnamePrefix", hostnamePrefix->value().c_str());
- settingsChanged = true;
- }
-
if (request->hasParam("ledBrightness", true))
{
AsyncWebParameter *ledBrightness = request->getParam("ledBrightness", true);