tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA,"NewName"); 无效

583876319
Posts: 5
Joined: Mon Sep 07, 2020 6:40 am

tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA,"NewName"); 无效

Postby 583876319 » Mon Sep 07, 2020 6:48 am

tcpip_adapter_init();
tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA,"NewName");
WiFi STA模式,查看路由器设备显示,设备名称并没有更新成 NewName

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA,"NewName"); 无效

Postby ESP_morris » Mon Sep 07, 2020 7:56 am

看一下这个能否解决你的问题? https://github.com/espressif/esp-idf/issues/4737

583876319
Posts: 5
Joined: Mon Sep 07, 2020 6:40 am

Re: tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA,"NewName"); 无效

Postby 583876319 » Tue Sep 08, 2020 10:03 am

没看懂怎么使用 tcpip_adapter_set_hostname
最后,还是自己经过大量尝试,确定 只有在 触发 WIFI_EVENT_STA_START 事件后 才能调用 tcpip_adapter_set_hostname

Who is online

Users browsing this forum: No registered users and 81 guests