zhouhan0126 / WIFIMANAGER-ESP32

wifimanager-esp32
MIT License
401 stars 135 forks source link

Cant set hostname #14

Open Viniciusvalenca opened 5 years ago

Viniciusvalenca commented 5 years ago

Hello, thanks for this great work!! On my project i tried to set the hostname, but it wont work, on others issues opened about this same subject a user posted that he solved the problem by adding the setHostName after wifi.begin, but when we use the Wifimanager, we dont have this "wifi.begin()", of course this is behind the WifiManager, but maybe need to create a sethostname on this lib? i dont know....

Here is the link about what i said above:

https://github.com/espressif/arduino-esp32/issues/806

Just to confirm, i change the WifiClient example to look like this WiFi.begin(ssid, password); WiFi.setHostname("test");

And upload the code, the setHostname is working right, so i guess is some conflict with this lib

luisgcu commented 5 years ago

I have the same problem..

MHz000 commented 5 years ago

using
wifiMulti.addAP(ssid, pass);
I run into the same problem. Any hint?

Viniciusvalenca commented 5 years ago

Nothing....the creator of the plugin did not answer =/ My solution was, don't use this plugin because this dont work right

miguelcsouza commented 3 years ago

I use the wifimanager library and define my hostname with the command WiFi.hostname("Test");inside void setup() before even calling any WifiManager function and it works perfectly well