Skip to content

Commit

Permalink
Update WifiConnection.cpp (#9)
Browse files Browse the repository at this point in the history
Setting Hostname did not work in my setup with Fritzbox 5590.
Did a bit of research and found that calling "WiFi.mode(WIFI_MODE_NULL);" might be necessary for setHostname to be sucessfull.

Worked for me.
  • Loading branch information
ep092 authored Jan 18, 2025
1 parent bc5bc0f commit c20eaf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/WiFi/WifiConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace WifiConnection

// Set host name
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.mode(WIFI_MODE_NULL);
WiFi.setHostname("HeidelBridge");

// Register WiFi events
Expand All @@ -51,4 +52,4 @@ namespace WifiConnection
WiFi.begin(Credentials::WiFi::SSID, Credentials::WiFi::Password);
gStatistics.NumWifiDisconnects = 0;
}
};
};

0 comments on commit c20eaf6

Please sign in to comment.