【Feedback】ESP8266 doesn't connect to WiFi?

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

【Feedback】ESP8266 doesn't connect to WiFi?

Postby Stational » Wed Jul 06, 2016 2:35 pm

Hello forum,

i have the strange problem, that my ESP8266 module doesn't connect to my home wifi, even if it is placed 1 meter around the station it just doesn't work even though it connects flawlessly to a smartphone hotspot and to a TP-Link WiFi. It just tells me that the wifi can't be found. This is my code:

Code: Select all

void ICACHE_FLASH_ATTR
user_set_station_config(void){
    char ssid[32] = "MYSSID";
    char password[64] = "MYPW";
    struct station_config stationConf;

    os_memset(stationConf.ssid,0,32);
    os_memset(stationConf.password,0,64);

    stationConf.bssid_set = 0;

    os_memcpy(&stationConf.ssid,ssid,32);
    os_memcpy(&stationConf.password,password,64);
    wifi_station_set_config(&stationConf);
    wifi_station_connect();
}

void user_init(void)
{
    wifi_set_opmode(STATION_MODE);
    user_set_station_config();
}


(i removed my SSID and PW for obvious reasons).

I copy pasted the SSID and password from my router configuration. This really bothers me even more because I don't understand why this happens (or rather why nothing happens).

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: ESP8266 doesn't connect to WiFi?

Postby ESP_Rubin » Wed Jul 06, 2016 3:00 pm

Hi,
i tried your code, connection is ok with my iphone se works as HotAp, could you share me your UART log?

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby Stational » Wed Jul 06, 2016 9:51 pm

Thanks a lot for your reply,

now i directly went infront of my wlan router and i still get this messages:

no <ssid_name> found, reconnect after 1s
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (19)
f r0,

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby ESP_Rubin » Thu Jul 07, 2016 10:09 am

log shows the SSID never found, could you currect your SSID name, and the best is you can print the SSID with os_printf() to debug the issue. suggest you use a simple SSID like "12345678" during testing.
Fow HW, which module you used? have you confirm the antenna has been plug in

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby Stational » Thu Jul 07, 2016 4:37 pm

Okay, i changed the SSID to '12345678' but nothing has changed. I also made two constants for SSID and password. I went directly in front of the router and still the same messages.
I made a test with the hotspot of my smartphone and it worked perfectly over 8 hours (untill i disconnected it)!

I don't understand what's so different about my router...

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby ESP_Rubin » Fri Jul 08, 2016 9:57 am

how about your router's setting, should it be setting as 5G? our 8266 only support 2.4G

for more debug, you can use the sample code:http://bbs.espressif.com/viewtopic.php?f=31&t=229 to scan all the routers nearby.

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby Stational » Fri Jul 08, 2016 10:05 pm

Router is set to 2.4GHz (otherwise my wlan-stick wouldn't recognize my WLAN).
The scan acutally finds the SSID, lol :o

scandone
(3,"<the ssid name i am looking for>",-78,"d4:21:22:8d:27:23",1)
reconnect


If i use my wifi-connection code, i still get this:

scandone
no <ssid_name> found, reconnect after 1s
reconnect
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (19)

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby ESP_Rubin » Fri Jul 08, 2016 10:27 pm

seems 8266 can't get the SSID of this router, which kind of the TK-Link router?

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby Stational » Sat Jul 09, 2016 12:23 am

What do you mean with TK-Link?
If you meant 'TP-Link': it's not a TP-Link router, it is a router from the german company 'Telekom'.
The strange thing is, that i tried it a few days ago with a TP-Link router and it worked without any problems. I just don't understand whats wrong here: The module is aware of the WiFi but can't connect to it?

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: 【Feedback】ESP8266 doesn't connect to WiFi?

Postby ESP_Rubin » Sat Jul 09, 2016 12:16 pm

could you provie more details of this router, if it uner our test library, i'll reproduce.

Who is online

Users browsing this forum: No registered users and 15 guests