From 1bdb05a471e7f140b22fd51ae72834fe2e9d0ebc Mon Sep 17 00:00:00 2001 From: pmantoine Date: Thu, 29 Jun 2023 11:00:14 +0800 Subject: [PATCH] ESP32 now sets hostname to dccex in STA mode --- WifiESP32.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WifiESP32.cpp b/WifiESP32.cpp index bc22d16..6e09aa1 100644 --- a/WifiESP32.cpp +++ b/WifiESP32.cpp @@ -1,4 +1,5 @@ /* + © 2023, Paul M. Antoine © 2021, Harald Barth. This file is part of CommandStation-EX @@ -145,6 +146,7 @@ bool WifiESP::setup(const char *SSid, havePassword = false; if (haveSSID && havePassword) { + WiFi.setHostname(hostname); // Strangely does not work unless we do it HERE! WiFi.mode(WIFI_STA); #ifdef SERIAL_BT_COMMANDS WiFi.setSleep(true);