Cannot find router, connect fail -- 找不到路由,连接失败?

Posts: 1643
Joined: Mon Oct 27, 2014 11:08 am

Cannot find router, connect fail -- 找不到路由,连接失败?

Postby ESP_Faye » Wed Jan 21, 2015 5:59 pm


Q: Why could not ESP8266 find my router and connect to it?

There is a parameter "stationConf.bssid_set" maybe you missed.
"stationConf.bssid_set" needs to be 0 , if you are setting ssid, otherwise it will check bssid which is the mac address..

More details on Espressif BBS

Please refer to the source code below.

问:为什么我设置了路由信息,ESP8266 却找不到路由,无法连上?
可能是您漏掉了一个参数 "stationConf.bssid_set",
当您根据 ssid 查找路由时,请将 "stationConf.bssid_set"设置为 0,否则,它查找时会参考 bssid,也就是路由的 MAC 地址。。

详情参见 Espressif BBS


void wifi_config()
// Wifi configuration
char ssid[32] = SSID;
char password[64] = PASSWORD;
struct station_config stationConf;

//Set station mode
wifi_set_opmode( 0x1 );

stationConf.bssid_set = 0;

//Set ap settings
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);


//Init function
void user_init()

Who is online

Users browsing this forum: No registered users and 1 guest