现在想实现一个功能,wifi模块是处在station模式,ip地址通过dhcp从路由器分配,
当终端客户需要手工设置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地址设置,还是我的理解有错误?
ESP8266 SDK 支持WiFi模块设置静态ip地址
Who is online
Users browsing this forum: No registered users and 180 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.