1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

ESP32 now sets hostname to dccex in STA mode

This commit is contained in:
pmantoine 2023-06-29 11:00:14 +08:00
parent c2fa76c76a
commit 1bdb05a471

View File

@ -1,4 +1,5 @@
/* /*
© 2023, Paul M. Antoine
© 2021, Harald Barth. © 2021, Harald Barth.
This file is part of CommandStation-EX This file is part of CommandStation-EX
@ -145,6 +146,7 @@ bool WifiESP::setup(const char *SSid,
havePassword = false; havePassword = false;
if (haveSSID && havePassword) { if (haveSSID && havePassword) {
WiFi.setHostname(hostname); // Strangely does not work unless we do it HERE!
WiFi.mode(WIFI_STA); WiFi.mode(WIFI_STA);
#ifdef SERIAL_BT_COMMANDS #ifdef SERIAL_BT_COMMANDS
WiFi.setSleep(true); WiFi.setSleep(true);