Page 1 of 1
change the name of the device in STA mode
Posted: Wed Jan 30, 2019 12:23 am
by brp80000
How can I change the device name in STA mode. I see the name "espressif" now.
- ddd.jpg (29.06 KiB) Viewed 16749 times
Re: change the name of the device in STA mode
Posted: Wed Jan 30, 2019 2:13 am
by chillophil
Hey,
it's not quite clear what your screenshot is showing and I don't know the exact issue. I guess it's showing physical devices currently connected to your AP?
In that case, the shown device names probably rather identify your devices
manufacturers (by MAC address OUI) than hostnames and you won't be able to change that. MAC addresses starting with OUI (organizationally unique identifier)
30:A8:DB are owned by
Sony, those starting with OUI
30:AE:A4 are owned by
Espressif - you can easily look that up for your own if you want to.
But if it shows hostnames (by DHCP), maybe give
tcpip_adapter_set_hostname(...)Code: Select all
esp_err_t tcpip_adapter_set_hostname(tcpip_adapter_if_t tcpip_if, const char *hostname);
a try
Re: change the name of the device in STA mode
Posted: Thu Jan 31, 2019 5:51 am
by brp80000
its don`t work
ESP_ERROR_CHECK(tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA, "ULA"));
device name still "Espressif "
Re: change the name of the device in STA mode
Posted: Thu Jan 31, 2019 7:18 am
by ESP_Sprite
Sounds like the thing shows the owner of the MAC address (the default hostname for Espressif devices is ESP-xxxx, not Espressif). No way to change that, apart from perhaps getting your own OUI from the IEEE so you can give out your own MAC addresses...
Re: change the name of the device in STA mode
Posted: Thu Jan 31, 2019 8:07 am
by brp80000
How to change?
- ddd.jpg (71.97 KiB) Viewed 16665 times
Re: change the name of the device in STA mode
Posted: Fri Feb 01, 2019 2:52 am
by ESP_Sprite
Hmm, seems it's indeed not MAC-related. In that case, tcpip_adapter_set_hostname should change the id. No idea what else the name could come from, perhaps you can ask your router manufacturer?
Re: change the name of the device in STA mode
Posted: Fri Aug 23, 2019 8:42 pm
by jiapei100
Same question here... I actually tried to connect multiple esp32-cams with the router, but
EVERY unit is named as
espressif, which seems to be problematic:
The
FIRST device connected in will block the rest with the
Destination Host Unreachable message.
What's your symptom?
And have you solved this by rename the device name ? For instance:
- expressif1
- espressif2
- espressif3
- etc.
Re: change the name of the device in STA mode
Posted: Sat Jun 13, 2020 5:01 pm
by Rainwater
Have you tried changing the `Local netif hostname` in the `menuconfig` option?
"idf.py menuconfig"
Found in the "Component config" -> "LWIP"
Re: change the name of the device in STA mode
Posted: Sun Sep 01, 2024 3:12 pm
by some esp dev guy
after
Code: Select all
esp_netif_init();
esp_netif_t *sta_netif = esp_netif_create_default_wifi_sta();
you can change hostname
Code: Select all
esp_netif_set_hostname(sta_netif, "my tiny daemon");