'ESP8266 WIFI_AP_STA issue
Im using ESP8266 in mode WIFI_AP_STA...I ave issue for soft AP. Some time , i don't understand why, client (PC o mobile) joint to AP, ping but don't receive data (webpage). I know issue related to single channel ad start AP after ESP8226 station is connected at same channel.
WiFi.mode(WIFI_AP_STA);
WiFi.softAPdisconnect();
WiFi.disconnect();
WiFi.setAutoConnect(false);
delay(1000);
ip.fromString(HostIp.c_str());
mask.fromString(HostSubnetMask.c_str());
WiFi.begin(ClientSSID, ClientPassword);
WiFi.hostname("CV19Archimede");
delay(500);
WiFi.softAPConfig(ip, ip, mask);
WifiRetry = 0;
while((WiFi.status() != WL_CONNECTED) && ( WifiRetry < WIFIRETRY))
{
delay(500);
WifiRetry ++;
if (WifiRetry > WIFIRETRY)
{
WiFi.disconnect();
}
}
if(WiFi.status() == WL_CONNECTED)
{
Wifichannel = WiFi.channel();
}
else
{
Wifichannel = 1;
WiFi.mode(WIFI_AP);
}
//Serial.println(Wifichannel);
// WiFi.softAPConfig(ip, ip, mask);
WiFi.softAP(HostSSID, HostPassword,Wifichannel);
delay(500);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
