当终端客户需要手工设置ip地址时,需要停止dhcp,跟踪到源代码tcpip_adapter_lwip.c,
tcpip_adapter_dhcps_stop函数,
esp_err_t tcpip_adapter_dhcps_stop(tcpip_adapter_if_t tcpip_if)
{
/* only support ap now */
if (tcpip_if != TCPIP_ADAPTER_IF_AP || tcpip_if >= TCPIP_ADAPTER_IF_MAX) {
ESP_LOGD(TAG, "dhcp server invalid if=%d", tcpip_if);
return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
}
.......
}
源代码判断如果wifi模块不是ap模式的话,就不支持stop dhcp,不知道,这个是什么原因?
因为很多无线网卡都支持静态ip地址设置,还是我的理解有错误?Statistics: Posted by Guest — Wed Dec 11, 2019 10:36 am
]]>