Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2>
</tr>
<tr>
<td>
<p class="tooltip">MDNS Name<span class="tooltiptext">DNS Name the device will use on the
<p class="tooltip">Hostname<span class="tooltiptext">DNS Name the device will use on the
network.</span></p>
</td>
<td><input type="text" id="deviceName" name="deviceName" value="loading" />
Expand Down
4 changes: 4 additions & 0 deletions src/HTTP_Server_Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ void startWifi()
{
WiFi.mode(WIFI_STA);
WiFi.setTxPower(WIFI_POWER_19_5dBm);
// Setting the hostname for DNS requires this line before calling "Wifi.begin(...)"
// See: https://github.com/espressif/arduino-esp32/issues/2537#issuecomment-590029109
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.begin(userConfig.getSsid(), userConfig.getPassword());
WiFi.setHostname(userConfig.getDeviceName());
}

while (WiFi.status() != WL_CONNECTED)
Expand Down