From b68b8791e9bc790db4daa425279911b385c0cd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20Ma=CC=88ntyharju?= Date: Sun, 29 Dec 2024 09:22:04 +0200 Subject: [PATCH] Set hostname before starting wifi to properly identify to DHCP server --- ESP-Serial-Bridge.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/ESP-Serial-Bridge.ino b/ESP-Serial-Bridge.ino index 20f8814..2563d3a 100644 --- a/ESP-Serial-Bridge.ino +++ b/ESP-Serial-Bridge.ino @@ -141,6 +141,7 @@ void WiFiStationDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) { #ifdef MODE_STA debug.println("Open ESP Station Mode"); + WiFi.setHostname(HOSTNAME); WiFi.mode(WIFI_STA); #ifdef ESP32 WiFi.onEvent(WiFiStationDisconnected,