ESP8266 Developer Zone The Official ESP8266 Forum 2015-10-16T14:12:37+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1211 2015-10-16T14:12:37+08:00 2015-10-16T14:12:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1211&p=4133#p4133 <![CDATA[Re: 最新的RTOS SDK上电自动连接已记录的AP失败]]>
我们测试了您提供的代码,可以正常运行并连接路由器。

测试 log 如下:

Code:

OS SDK ver: 1.0.4(ec3bd11) compiled @ Jul 31 2015 19:57:47
phy ver: 356, pp ver: 8.8

SDK version:1.0.4(ec3bd11)
Auto connect val = 1
dhcpc_status = 1
reconnect_policy = 1
Saved ap num = 1
ZTE_5560
espressif
bssid_set = 0
mode : sta(18:fe:34:97:d5:73)
add if0
scandone
add 0
aid 8
cnt

connected with ZTE_5560, channel 1
dhcp client start...
ip:192.168.1.101,mask:255.255.255.0,gw:192.168.1.1


如果您的问题仍未解决,麻烦提供完整的测试代码,我们将安排测试复现。

感谢您对 ESP8266 的关注!

Statistics: Posted by ESP_Faye — Fri Oct 16, 2015 2:12 pm


]]>
2015-10-13T14:09:34+08:00 2015-10-13T14:09:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1211&p=4086#p4086 <![CDATA[Re: 最新的RTOS SDK上电自动连接已记录的AP失败]]> 1、我的代码里面没有调用过wifi_station_disconnect
2、通过打印可以看到AP的SSID PASSWORD完全正确

请问:芯片在自动连接AP的过程中,成功或者失败有打印吗?
user_init中用不用加延时?
bssid相关的信息有影响吗

代码如下:
user_init(void)
{
char i = 0;
printf("SDK version:%s\n", system_get_sdk_version());
struct station_config config [5];


wifi_station_ap_number_set(5);
i = wifi_station_get_auto_connect();
printf("Auto connect val = %d\r\n", i);

i = wifi_station_dhcpc_status();
printf("dhcpc_status = %d\r\n", i);


i = wifi_station_get_reconnect_policy();
printf("reconnect_policy = %d\r\n", i);

if (STATION_MODE != wifi_get_opmode())
{
/* need to set opmode before you set config */
if (false == wifi_set_opmode(STATION_MODE))
{
printf("STA mode set faure");
}
printf("STA mode set OK");
}


i = wifi_station_get_ap_info(config);
printf("Saved ap num = %d\r\n", i);
printf("%s\r\n", config[0].ssid);
printf("%s\r\n", config[0].password);
printf("bssid_set = %d\r\n", config[0].bssid_set);
}

Statistics: Posted by zhangjinliang — Tue Oct 13, 2015 2:09 pm


]]>
2015-10-12T15:25:43+08:00 2015-10-12T15:25:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1211&p=4071#p4071 <![CDATA[Re: 最新的RTOS SDK上电自动连接已记录的AP失败]]>
请确认是否调用了 wifi_station_disconnect 断开与 AP 的连接,这将使 ESP8266 不去连接 AP。

或者您可以打印一下查询获取到的 station_config.ssid 和 station_config.password,看是否有异常。

Statistics: Posted by ESP_Faye — Mon Oct 12, 2015 3:25 pm


]]>
2015-10-10T21:31:28+08:00 2015-10-10T21:31:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1211&p=4046#p4046 <![CDATA[最新的RTOS SDK上电自动连接已记录的AP失败]]> 2、通过调用wifi_station_get_ap_info返回1 可知flash中有AP信息

但是问题是上电后,8266没有自动连接存储的AP?
大家有碰到类似的情况吗?怎么解决?

谢谢

Statistics: Posted by zhangjinliang — Sat Oct 10, 2015 9:31 pm


]]>