-
Hello, How to trigger hostname setting properly using WiFi class / station mode? I'm playing with this functionality and getting mixed results. Why i have to call wifi_station_set_hostname to get it working?
Without calling wifi_station_set_hostname or changing the order, it fallbacks to ESP-XXXXX hostname. Looks like something broken recently. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 26 replies
-
Have you checked whether I see that our hostname func might be picky about format. But, it does not depend on interface being up Arduino/cores/esp8266/LwipIntf.cpp Lines 119 to 198 in 39b4137 Using SDK func just goes around that filtering, but you have to enable WiFi before it works (unlike our method) |
Beta Was this translation helpful? Give feedback.
-
Need to debug it, but to do it I need to get a board on my desk. Now the device is mounted. Anyway, yes I've read that code. It worked earlier, but after updating arduino and switching to sdk 3.0.5 the behavior has changed. The name is Raesp in this case, it should work. |
Beta Was this translation helpful? Give feedback.
-
In the past, I have also had this issue. It initially wasn't clear to me what I did that fixed it. I now think these are some additional key components to make it work:
Also for me, it works with SDK v3.0.5. |
Beta Was this translation helpful? Give feedback.
-
Well this is very strange how it behaves. My current implementation:
Then asking for hostname (later):
and it responds Well it says that the setHostname returned true, but when asking for hostname it remains unchanged/default. It looks like some other function overrides that hostname... but what function? Maybe esp sdk? |
Beta Was this translation helpful? Give feedback.
-
I was struggling here too.
I get
But in my router I see
if not explicit set with |
Beta Was this translation helpful? Give feedback.
-
TL;DR
|
Beta Was this translation helpful? Give feedback.
TL;DR