mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #208] Cannot set hostname or make mDNS work #171
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#171
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kdobrev on GitHub (Aug 4, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/208
My esp8266 seems to always have hostname ESP_something as a name.
My setup is:
Here I use 3 things that according to me should set my hostname, but it is not set and my device is not reachable by hostname on the local network.
in the library itself I cannot find wifi_station_set_hostname
Can I put is somewhere?
@gordonthree commented on GitHub (Aug 13, 2016):
Hostname registration seems hit and miss. A lot of consumer wifi routers use DNSMASQ for dhcp and local dns caching, and it seems picky about registering certain hostnames and ignoring others. I haven't had a chance to dig into the dnsmasq docs, to understand how hostname registration works.
I have the same code running on ten different ESP, exactly the same model. Some of them register as their hostname, some register as ESP_xxxxx and some don't register any hostname at all (show up as * in dnsmasq). I can't figure out why this happens, since it's identical code running on identical model ESP.
The variable "host" in your example, is it char, const char or String?
I've tried invoking WiFI.hostname() before and after WiFiManager, it didn't seem to make a difference.
I guess this puts me in the "me too" category.
@kdobrev commented on GitHub (Aug 18, 2016):
At work I think there is no chance to get a hostname in my corporate network, but at home I get these ESP_xxxxx. What I found out in a threat here was that we need to place wifi_station_set_hostname("KDO"); before any network operation has occurred so my code currenlty is:
I still haven't tested this at home to check if it works.
@gordonthree You say it is up to the router to get a hostname from the ESP and some routers get it and some don't? Or these ESPs you talk about are in one and the same network?
Or you say it is up to every individual ESP chip?