Bug in wifi_station_get_connect_status() and static ip
Posted: Sun Dec 21, 2014 3:04 am
The esp8266 is in STATION mode and dhcp client off.
in user_init() I have the following code:
After restart it successfully connects to the ap with given static ip-address, and
wifi_station_get_connect_status(); returns 5 (STATION_GOT_IP).
Then I restart my ap.
The esp8266 again successfully connects to the ap, begins to reply to the ping,
and I see it in ap's client list.
But wifi_station_get_connect_status(); always returns 3 (STATION_NO_AP_FOUND).
This bug is alive in both SDK 0.9.3, 0.9.4, and only with static ip-address.
When dhcp client is on, all work ok.
in user_init() I have the following code:
Code: Select all
wifi_station_dhcpc_stop();
os_memset(&info, 0x0, sizeof(info));
info.ip.addr = ipaddr_addr("192.168.1.25");
info.netmask.addr = ipaddr_addr("255.255.255.0");
info.gw.addr = ipaddr_addr("192.168.1.100");
wifi_set_ip_info(STATION_IF, &info);
After restart it successfully connects to the ap with given static ip-address, and
wifi_station_get_connect_status(); returns 5 (STATION_GOT_IP).
Then I restart my ap.
The esp8266 again successfully connects to the ap, begins to reply to the ping,
and I see it in ap's client list.
But wifi_station_get_connect_status(); always returns 3 (STATION_NO_AP_FOUND).
This bug is alive in both SDK 0.9.3, 0.9.4, and only with static ip-address.
When dhcp client is on, all work ok.