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).