Skip to content

Hostname and DNS #1259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
404-baitnotfound opened this issue Mar 25, 2018 · 2 comments
Closed

Hostname and DNS #1259

404-baitnotfound opened this issue Mar 25, 2018 · 2 comments

Comments

@404-baitnotfound
Copy link

Description:

I would like to conect to my esp32 via Browser not by entering its IP Adresse nur by using the hostname.
My router does the DHCP and DNS and the same ist working with my printer.
I already used WIFI.setHostname(NAME) and my router does see the esp32 with its correct name. However I can't find it with ping NAME .
Also I tryed to add MDNS service with MDNS.setHostname and IT didn't Work.
Am I doing something wrong or is this a problem with my router?
I will post my code when I am back at my PC.

@polygontwist
Copy link

WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); WiFi.setHostname(HOSTNAME); while (WiFi.waitForConnectResult() != WL_CONNECTED) { Serial.println("Connection Failed! Rebooting..."); delay(5000); ESP.restart(); }
it works for me. set the setHostname() after begin().

@404-baitnotfound
Copy link
Author

404-baitnotfound commented Mar 25, 2018

ok found the error: using "ping -a <esp_IP>" I got the real hostname under which the esp is prodcasting.

So it was "< hostname >.home"

Would be nice if this was mentioned in the lib........

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants