mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1400] Cannot ping or connect to the ESP32 (via socket) using the hostname #1199
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#1199
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 @MythicalForce on GitHub (Apr 25, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1400
Basic Infos
Hardware
WiFimanager Branch/Release: v2.0.10-beta+sha.b7ca079
Esp8266/Esp32:
Hardware: ESP32-WROOM-32UE
Description
I cant get the
hostnameto work with the wifimanager it reports back the right hostname in the output but i cannot ping my ESP32 nor connect to it via socket using the hostname (this works fine using default WiFi.h lib for ESP32)Settings in IDE
platformio.ini
Sketch
Debug Messages
@tablatronix commented on GitHub (Apr 25, 2022):
// #define WM_MDNS // includes MDNS, also set MDNS with sethostname
It is not enabled by default
wifi hostname is different than mdns
MDNS will only work if your network allows mdns broadcasts across network, otherwise it will only resolve on the same wifi
@MythicalForce commented on GitHub (Apr 25, 2022):
oh i need to enable MDNS?
Do i set it befor or after
#include <WiFiManager.h>?@tablatronix commented on GitHub (Apr 25, 2022):
See edit caveats above,
@tablatronix commented on GitHub (Apr 25, 2022):
you cannot set it in your sketch, you can do it in your environment or boards file or modify the wm.h file
@tablatronix commented on GitHub (Apr 25, 2022):
if you use ota, on esp32 this is automatically handled I think
@MythicalForce commented on GitHub (Apr 25, 2022):
yea i plan to use OTA but yea i wanted to fix this hostname issue
@MythicalForce commented on GitHub (Apr 25, 2022):
so i uncommented
#define WM_MDNS // includes MDNS, also set MDNS with sethostnameis there anything else i would need to set or do?
@MythicalForce commented on GitHub (Apr 25, 2022):
added this also
but still not working
@tablatronix commented on GitHub (Apr 25, 2022):
hmmm
@MythicalForce commented on GitHub (Apr 25, 2022):
i realy wanna use WifiManager but if the hostname does not work :/ i need to find other if any
@tablatronix commented on GitHub (Apr 25, 2022):
I tried testing this but my router was messed up, ill try again. Last time I checked it worked fine though.
@MythicalForce commented on GitHub (Apr 25, 2022):
https://cdn.discordapp.com/attachments/537365760008257569/967822241456849096/278949010_699082621339260_3346299735419732370_n.jpg
cause i can see ny ESP32 on my router with the hostname "testmachine"...
@tablatronix commented on GitHub (Apr 25, 2022):
ok then are you on the same network when you try to find it?
testmachine.local or whatever?
MDNS is only valid on same vlan unless you have a router that has multicast forwarding on
Also you are calling autoconnect right?
@MythicalForce commented on GitHub (Apr 25, 2022):
Yes
@tablatronix commented on GitHub (Apr 25, 2022):
ok not a mdns problem probably, I was confused for a second and assumed it was not DNS, Since hostname gets set in autoconnect, its possible that its broken when saving from configportal, workaround would be to restart after save.
Since we only set hostname in autoconnect, it might not be still set on save connect which used a different code
Can you confirm that it only is broken when saving? or is it never working?
cause mine does


@tablatronix commented on GitHub (Apr 25, 2022):
ok nope mine works on save also, let me check blocking
@tablatronix commented on GitHub (Apr 25, 2022):
Nope works fine for me.. even without MDNS enabled
@tablatronix commented on GitHub (Apr 25, 2022):
Maybe string is broken?
try harcoding char?
@tablatronix commented on GitHub (Apr 25, 2022):
what esp version ?
Try the SUPER/ondemand example?
@MythicalForce commented on GitHub (Apr 26, 2022):
Never working
Tried and not working
Do you mean software version or hardware?
HW : ESP32-WROOM-32UE
SW : v4.4-dev-3569-g6a7d83af19-dirty
@tablatronix commented on GitHub (Apr 26, 2022):
Ok let me try 4.4
@MythicalForce commented on GitHub (Apr 27, 2022):
did you get any results?
@tablatronix commented on GitHub (Apr 27, 2022):
not tested yet
@tablatronix commented on GitHub (Apr 28, 2022):
Yeah just tested works fine also, must be something else going on
*wm:[1] ESP SDK version: v4.4-beta1-308-gf3e0c8bc41
@MythicalForce commented on GitHub (Apr 28, 2022):
@tablatronix hmmm weeeeird!
My Entire code as of now using
wm.setHostname( "testmachine" );but yea not working :S
@MythicalForce commented on GitHub (Apr 29, 2022):
@tablatronix i found out the problem in the end.... the router in my apartment "TP-Link Deco M5" does not support hostname resolve -.- .... annoying AF!!!