-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Invalid wifi hostname #4415
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
Comments
This is a workaround:
This changes the hostname to ESP-123456, which is a valid hostname. |
@leifnel when you opened the issue, you were presented with a template requesting specific info. You ignored it its entirety. Please edit your post and fill it in. |
@leifnel Will you be providing the info requested in the issue template? At the very least an example sketch is needed. |
The relevant code is simply
The hostname is in the format ESP_123456, where 123456 is the last 6 characters of the macaddress. |
This looks like an SDK bug, but we can work around it somewhere in WiFi.begin. |
A better place would be in ESP8266WiFiGenericClass::enableSTA() as it is common to the at least three paths to configure and setup WiFi. |
This recently came to my attention (I had searched for this before, it was too hidden):
RFCs: Hostnames are set in lwIP interfaces ( For that reason, a fixing check should be done in lwip2 (when setting up network interfaces), and also in |
An (unrelated) comment on this: some nameservers (or GUI's) incorrectly prevent entries, which are not hostnames, to have names like _sip.example.org. |
Reference: |
The hostname sent in the dhcp request contains an underscore; ESP_123456
This causes DDNS updates to fail, as underscore is not legal in hostname (except as first character)
dhcpd[32702]: Unable to add forward map from ESP_123456.lan. to 192.168.1.152: REFUSED
Solution: Just omit the underscore.
The text was updated successfully, but these errors were encountered: