change the name of the device in STA mode
change the name of the device in STA mode
How can I change the device name in STA mode. I see the name "espressif" now.
-
- Posts: 4
- Joined: Tue Jan 29, 2019 6:05 am
Re: change the name of the device in STA mode
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(...)
a try
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);
Re: change the name of the device in STA mode
its don`t work
ESP_ERROR_CHECK(tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA, "ULA"));
device name still "Espressif "
ESP_ERROR_CHECK(tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA, "ULA"));
device name still "Espressif "
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: change the name of the device in STA mode
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
How to change?
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: change the name of the device in STA mode
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
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:
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.
Longer Vision Technology
Re: change the name of the device in STA mode
Have you tried changing the `Local netif hostname` in the `menuconfig` option?
"idf.py menuconfig"
Found in the "Component config" -> "LWIP"
"idf.py menuconfig"
Found in the "Component config" -> "LWIP"
-
- Posts: 2
- Joined: Wed Aug 21, 2024 12:08 pm
Re: change the name of the device in STA mode
after
you can change hostname
Code: Select all
esp_netif_init();
esp_netif_t *sta_netif = esp_netif_create_default_wifi_sta();
Code: Select all
esp_netif_set_hostname(sta_netif, "my tiny daemon");
Who is online
Users browsing this forum: gamename and 79 guests