Code: Select all
f 0, scandone
no AP1 found, reconnect after 1s
reconnect
f 0, scandone
no AP1 found, reconnect after 1s
reconnect
f -180, scandone
Note: AP1 is the AP name
I used the scan APIs to specifically search for this SSID, and strangely it does see the AP
Code: Select all
add if0
f 0, scandone
f 0, scandone
DEBUG: (3,"AP1",-52,"12:34:56:78:90:ab",1)
f -180, reconnect
scandone
f 0, scandone
no AP1 found, reconnect after 1s
reconnect
I have previously connected to the same AP, using the same code (although I had used several other firmwares on the same chip). I even tried the AT firmware, and I am able to scan for and connect to this particular AP.
Code: Select all
void user_init(void) {
// Configure the UART
uart_init(BIT_RATE_115200, BIT_RATE_115200);
os_printf("\r\nDEBUG: SDK version:%s\n", system_get_sdk_version());
os_printf("DEBUG: Autoconnect: %u\n", wifi_station_get_auto_connect());
char ssid[32] = SSID;
char password[64] = SSID_PASSWORD;
struct station_config stationConf;
//Set station mode
wifi_set_opmode(STATION_MODE);
//Set ap settings
os_memcpy(&stationConf.ssid, ssid, 32);
os_memcpy(&stationConf.password, password, 64);
stationConf.bssid_set = 0;
wifi_station_set_config(&stationConf);
system_init_done_cb(user_scan);
}
The user_scan function is same as the second listing in http://bbs.espressif.com/viewtopic.php?f=21&t=229
WiFi status returned by wifi_station_get_connect_status() is STATION_NO_AP_FOUND
The serial output when it used to connect successfully is as follows (I am putting it here assuming that it might help Espressif guys)
Code: Select all
f 0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
pm open phy_2,type:2 0 0
cnt
connected with AP1, channel 1
dhcp client start...
ip:192.168.0.101,mask:255.255.255.0,gw:192.168.0.1
Mon Aug 31 16:33:15 2015
Any help will be useful
