-
Notifications
You must be signed in to change notification settings - Fork 143
setting hostname issue #174
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
Yes. I know, that there are some tricks for ESP8266 and other tricks for ESP32. |
I just tried it before iotWebConf.init(); and it did not work. Only works after. |
Can you please try and add following line to checkWifiConnection method before
|
Tried, nope, doesn't work. Using these three lines at 806 however does fix it:
|
After a bit of googling and experimenting with ESP8266 and ESP32, I found out that:
As far as I can tell, those changes ( https://github.com/prampec/IotWebConf/compare/master...EricDuminil:fix/set_hostname?expand=1 ) allow to reliably set the hostname on ESP8266 and ESP32. @prampec I'll prepare a pull-request if you're interested. Sadly, it doesn't mean that mDNS will work reliably. This technology apparently depends on the client, the router, and moon phases. |
Had trouble setting the hostname; it was only displaying 'espressif'. This caused an issue when having more than one ESP32 connected on the same router.
Others also had the problem, but you weren't able to solve it at the time.
I managed to solve it with a dirty hack (I'm a weak programmer, forgive me!).
In setup(), right after
server.onNotFound({ iotWebConf.handleNotFound(); });
I added this code:
This is the info that helped me do this:
https://stackoverflow.com/questions/57570586/how-to-correctly-set-the-hostname-for-the-tcp-ip-adapter-on-the-esp32
espressif/arduino-esp32#806 (comment)
espressif/arduino-esp32#2537 (comment)
The text was updated successfully, but these errors were encountered: