-
Notifications
You must be signed in to change notification settings - Fork 140
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
Connect with hostname instead of IP #81
Comments
plapointe6, I wonder if a better name for this enhancement would be: Connect with hostname OR ip address because I am sure it is not intended that this enhancement would be a breaking change for all who want to connect using an IP address. Thanks in advance, githubbuh |
Using a hostname works for me. I have never used IP addresses with this library. |
I confirm that it's working with the hostname. The "myhostname" is not registred on the referenced DNS on the ESP32, perhaps you use different DNS server for the ESP32 and the myhostname server, or the registred computer has another name in the DNS like "myhostname.local", Check the result of the command on the myhostname server and on another computer that is on the same network as the ESP32 : If it's correctly registred on the DNS, you will have a result like :
I think the issue can be closed. |
i want to connect via the hostname instad of the ip. but it only works withe ip if use the hostname in my broser i can reach the pc:/(/
works
client=new EspMQTTClient (con.WifiName,con.WifiPass,"192.168.0.102", "", "", con.Nodename, 1883 );
works not
client=new EspMQTTClient (con.WifiName,con.WifiPass,"myhostname", "", "", con.Nodename, 1883 );
The text was updated successfully, but these errors were encountered: