最新的RTOS SDK上电自动连接已记录的AP失败
-
- Posts: 25
- Joined: Thu Oct 08, 2015 4:00 pm
最新的RTOS SDK上电自动连接已记录的AP失败
Postby zhangjinliang » Sat Oct 10, 2015 9:31 pm
1、通过调用接口wifi_station_get_auto_connect, 返回1 可以知道该功能已开启
2、通过调用wifi_station_get_ap_info返回1 可知flash中有AP信息
但是问题是上电后,8266没有自动连接存储的AP?
大家有碰到类似的情况吗?怎么解决?
谢谢
2、通过调用wifi_station_get_ap_info返回1 可知flash中有AP信息
但是问题是上电后,8266没有自动连接存储的AP?
大家有碰到类似的情况吗?怎么解决?
谢谢
-
- Posts: 25
- Joined: Thu Oct 08, 2015 4:00 pm
Re: 最新的RTOS SDK上电自动连接已记录的AP失败
Postby zhangjinliang » Tue Oct 13, 2015 2:09 pm
您好:
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);
}
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);
}
Re: 最新的RTOS SDK上电自动连接已记录的AP失败
Postby ESP_Faye » Fri Oct 16, 2015 2:12 pm
您好,
我们测试了您提供的代码,可以正常运行并连接路由器。
测试 log 如下:
如果您的问题仍未解决,麻烦提供完整的测试代码,我们将安排测试复现。
感谢您对 ESP8266 的关注!
我们测试了您提供的代码,可以正常运行并连接路由器。
测试 log 如下:
Code: Select all
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 的关注!
Who is online
Users browsing this forum: No registered users and 27 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.