AP: Limited or no Connectivity.
Posted: Mon May 01, 2023 6:22 am
Hello,
I made several projects using one ESP8266 as AP (access point), and another as STAs (stations). Sometimes I also use PC as another STA.
As PC are used rarely here, so I missed some strange issue.
"Slave" ESPs connects to ESP AP without problems. And, for example, exchange UDP packets successfully.
My main PC also connects to this WiFi network without problems:
But I recently discovered, that some another PCs, have issue with connection:
I have to go to network setting, an manually attach IP address:
Then connection works fine.
But this is very inconvenient in use, because when I want to back to main internet WiFi connection, I have to restore this settings to previous state (automatic IP setup).
This PCs never have issues with connects to "normal" access points (routers).
I can connect them to any network without problems.
Only connection to ESP8266 AP give my that issue.
I know that some sources of this issue may be correlated to these PCs, but also it must be something on ESP settings, due to fact that these PCs connects successfully to normal WiFi networks (from TP-Link, etc.).
ESP8266 code is very simple:
I also tried another IP settings on ESP.
For example, classic ESP8266 IP:
192.168.4.1
Unfortunately without success.
So my question is, if somebody has similar issue and have any solution?
Or any hints what I have to check to find out what exactly triggers this error?
Best regards
I made several projects using one ESP8266 as AP (access point), and another as STAs (stations). Sometimes I also use PC as another STA.
As PC are used rarely here, so I missed some strange issue.
"Slave" ESPs connects to ESP AP without problems. And, for example, exchange UDP packets successfully.
My main PC also connects to this WiFi network without problems:
But I recently discovered, that some another PCs, have issue with connection:
I have to go to network setting, an manually attach IP address:
Then connection works fine.
But this is very inconvenient in use, because when I want to back to main internet WiFi connection, I have to restore this settings to previous state (automatic IP setup).
This PCs never have issues with connects to "normal" access points (routers).
I can connect them to any network without problems.
Only connection to ESP8266 AP give my that issue.
I know that some sources of this issue may be correlated to these PCs, but also it must be something on ESP settings, due to fact that these PCs connects successfully to normal WiFi networks (from TP-Link, etc.).
ESP8266 code is very simple:
Code: Select all
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
const char* ssid = "ESP8266_WiFi_0";
const char* password = "1234ABCD";
const int AP_Channel = 4;
const int AP_Max_Connection = 4;
IPAddress local_IP(192,168,1,1);
IPAddress gateway(192,168,1,200);
IPAddress subnet(255,255,255,0);
WiFiUDP UDP1;
uint8_t UDP_RX[2048];
void setup()
{
Serial.begin(115200);
Serial.println("Setting AP");
Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed");
Serial.println("Setting AP");
Serial.println(WiFi.softAP(ssid, password, AP_Channel, false, AP_Max_Connection) ? "Ready" :
"Failed");
Serial.print("AP address: ");
Serial.println(WiFi.softAPIP());
UDP1.begin(1000);
}
void loop()
{
uint8_t i;
UDP_RX_packet_size = UDP1.parsePacket();
if (UDP_RX_packet_size > 0)
{
UDP1.read((uint8_t*)UDP_RX, UDP_RX_packet_size);
for (i = 0; i < DP_RX_packet_size; i++)
Serial.write(UDP_RX[i]);
}
}
I also tried another IP settings on ESP.
For example, classic ESP8266 IP:
192.168.4.1
Unfortunately without success.
So my question is, if somebody has similar issue and have any solution?
Or any hints what I have to check to find out what exactly triggers this error?
Best regards