ESP8266 Developer Zone The Official ESP8266 Forum 2019-12-26T16:56:46+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=52683 2019-12-26T16:56:46+08:00 2019-12-26T16:56:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=52683&p=70755#p70755 <![CDATA[Re: ESP8266 SDK 支持WiFi模块设置静态ip地址]]> Statistics: Posted by Her Mary — Thu Dec 26, 2019 4:56 pm


]]>
2019-12-11T10:36:04+08:00 2019-12-11T10:36:04+08:00 https://bbs.espressif.com:443/viewtopic.php?t=52683&p=69830#p69830 <![CDATA[ESP8266 SDK 支持WiFi模块设置静态ip地址]]> 当终端客户需要手工设置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


]]>