Closed gbhug5a closed 4 years ago
You said:
[x] I have tested that the issue is present in current master branch (aka latest git).
and
the problem happens ... with ESP8266 cores 2.5.2, 2.4.2 and 2.3.0
so which is it? Please make sure to test with latest git before reporting an issue. Install instructions are in readthedocs.
Sorry, I thought v2.5.2 was the latest. I'm not an engineer, and have no experience with Git or Python, and based on the instructions, installing the latest Git version would be well beyond me. If that means the problem can't be address, I will certainly understand.
I tried additional changes to the router's setup, and finally found one that works - enabling 802.11b. It's basically a "g" router, and what I've read about the ESP8266 is that it will handle B, G and N. But for some reason, for this router the Mini only works on B. So this solves my problem. Sorry to have bothered you.
Not a bother, just trying to clarify. Several points here:
Reference (methods for WiFi):
void setOutputPower(float dBm);
bool setPhyMode(WiFiPhyMode_t mode);
WiFiPhyMode_t getPhyMode();
typedef enum WiFiPhyMode
{
WIFI_PHY_MODE_11B = 1, WIFI_PHY_MODE_11G = 2, WIFI_PHY_MODE_11N = 3
} WiFiPhyMode_t;
I'd try something like this:
if(!WiFi.setPhyMode(WIFI_PHY_MODE_11G))
Serial.println("Wifi phy mode change failed");
WiFi.setOutputPower(15.0);
//now start wifi normally
if(!WiFi.mode(WIFI_STA))
Serial.println("Wifi mode failed");
WiFi.begin(ssid, password);
...
I just read:
Lolin(Wemos) D1 R2 & mini
I use these boards a lot, have something like 100 in action, and I don't have a problem with any of B/G/N. That means:
Basic Infos
Platform
Settings in IDE
Problem Description
A basic client example sketch flashes fine, but is not able to connect to an 802.11g router. Other devices connect to the router with no problem. SSID and password are confirmed correct. The problem happens with Arduino IDE v1.8.8, and with ESP8266 cores 2.5.2, 2.4.2 and 2.3.0. This is a genuine, new Lolin D1 Mini v3.1.0 from their store. When the sketch runs, it never gets out of the connect While loop.
It appears the Mini finds the SSID, but something goes wrong and it disconnects. See debug output below. The router's log shows the attempted connections by the Mini's MAC address, but the log entry is a repeating:
2019/10/28 12:18:00 | WIRELESS | wl0: 11g : DeAuthentication (rcvd. station leaving) User - 2c:f4:32:4a:5f:4
It appears the router is kicking the Mini off the network. Not sure about that. The router is an old Buffalo WHR-HP-G54 802.11g model. Security is shown in the router setup as "AES WPA-PSK". Other options not selected are "TKIP" and "WEP". The "SSL Support" board option is set to "All SSL ciphers (most compitible)".
I don't have another Mini or another router to test.
Does "state: 3 -> 0 (19)" actually mean a "pairwise_cypher" problem? If so, what is going wrong. Emphasize that many other devices connect successfully to this router.
MCVE Sketch
Debug Messages