-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
Basic Infos
- [Y] This issue complies with the issue POLICY doc.
- [Y] I have read the documentation at readthedocs and the issue is not addressed there.
- [Y] I have tested that the issue is present in current master branch (aka latest git).
- [Y] I have searched the issue tracker for a similar issue.
- [N/A ] If there is a stack dump, I have decoded it.
- [Y ] I have filled out all fields below.
Platform
- Hardware: ESP8266 D1 mini's (the original versions, not the newer v3 versions)
- Core Version: github.com/esp8266/Arduino as of 16Mar22
- Development Env: Arduino IDE v1.8.19
- Operating System: Windows
Settings in IDE
- Module: [ESP8266 Lolin(Wemos) D1 r2 and mini]
- Flash Mode: [?default?]
- Flash Size: [4MB]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [?default?]
- Flash Frequency: [?default?]]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [921600]
Problem Description
I have for several years now been using both Wemos D1mini’s (with “AI-Thinker WiFi” badged cover) and also anonymous D1mini (with “Sqiggle-Symbol WiFi” badged covers), and had no issues connecting them together (ie. one configured as “WiFi.mode(WIFI_STA)” connecting to another configured as “WiFi.mode(WIFI_AP)”.
However, the recent batch of anonymous “Sqiggle-Symbol WiFi” D1mini’s” although looking identical (all saying “ESP8266MOD”), have issues connecting with many (but not all) of my older Wemos D1mini’s (the photo below shows these new D1mini's).
Specifically, the “WIFI_STA” ESP8266 does not appear to see the “WIFI_AP” ESP8266 (returning the error message “no SSID-1234 found, reconnect after 1s”).
This above error messages is the same even if I reverse the STA and AP software/units.
Note that my phone can in all cases see and connect to the “SSID-1234” wifi signal from the AP-ESP8266. Similarly the STA-ESP8266 can see and connect to my phone’s hotspot fine, it is just that the STA-ESP8266 can’t SEE the SSID of the AP-ESP8266.
Also, if you load the example SSID-scan sketch on the STA-ESP8266, it can see all the other nearby SSIDs, but NOT the SSID from the AP-ESP8266.
I have tried “Erase Flash: All Flash Contents” and “Erase Flash: Sketch + WiFi settings”, and it makes no difference.
On enabling “Debug Port: Serial” & “Debug Level: Wifi” the failing STA-ESP8266 reports:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00044d30 ** same as 1 other **
~ld
SDK:2.2.2-dev(38a443e)/Core:3.1.0-dev=30100000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-58-g450bb63/BearSSL:6105635
MAC=A0:20:A6:19:57:26 *** This is an old “Wemos / AI-Thinker WiFi” badged cover ***
fpm close 3
mode : sta(a0:20:a6:19:57:26)
add if0
wifi evt: 8
Trying to connect to SSID-1234......scandone
no SSID-1234 found, reconnect after 1s
wifi evt: 1
STA disconnect: 201
reconnect
......scandone
no SSID-1234 found, reconnect after 1s
wifi evt: 1
STA disconnect: 201
reconnect
......scandone
no SSID-1234 found, reconnect after 1s
wifi evt: 1
STA disconnect: 201
reconnect
Although I occasionally get:
..reconnect
......scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
....................pm open,type:2 0
state: 5 -> 0 (2)
rm 0
pm close 7
reconnect
wifi evt: 1
STA disconnect: 204
scandone
wifi evt: 1
STA disconnect: 201
..reconnect
......scandone
wifi evt: 1
STA disconnect: 201
In addition during these unsuccessful connect attempt, I note that the AP-ESP8266 reports:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00045610 ** different **
~ld
SDK:2.2.2-dev(38a443e)/Core:3.1.0-dev=30100000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-58-g450bb63/BearSSL:6105635
MAC=BC:FF:4D:18:BE:B1 *** This is the NEW “Sqiggle-Symbol WiFi” badged cover ***
Configuring access point...fpm close 3
mode : softAP(be:ff:4d:18:be:b1)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
wifi evt: 8
bcn 0
del if1
usl
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
AP IP address: 192.168.4.1
wifi evt: 7
add 1
aid 1
station: a0:20:a6:19:57:26 join, AID = 1 *** this is appears to be a join attempt from the STA ***
wifi evt: 5
wifi evt: 7
wifi evt: 7
wifi evt: 7
station: a0:20:a6:19:57:26 leave, AID = 1… ……*** this is appears to the failure point ***
rm 1
wifi evt: 6
add 1
aid 1
station: a0:20:a6:19:57:26 join, AID = 1
wifi evt: 5
station: a0:20:a6:19:57:26 leave, AID = 1
rm 1
wifi evt: 6
However, if I load the same software on TWO of the new ESP8266s, or on TWO of my old ESP8266s, or one a new ESP8266 with an old ESP8266 which works I get the following SUCCESSFUL connection messages on the STA-ESP8266:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00044d30 ** same as 1 other **
~ld
SDK:2.2.2-dev(38a443e)/Core:3.1.0-dev=30100000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-58-g450bb63/BearSSL:6105635
MAC=5C:CF:7F:D0:C4:D5 *** This is an old working “AI Thinker WiFi” badged cover ***
fpm close 3
mode : sta(5c:cf:7f:d0:c4:d5)
add if0
wifi evt: 8
Trying to connect to SSID-1234.wifi evt: 2
.....scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
connected with SSID-1234, channel 1
dhcp client start...
wifi evt: 0
ip:192.168.4.2,mask:255.255.255.0,gw:192.168.4.1
wifi evt: 3
WiFi connected, IP address: 192.168.4.2
pm open,type:2 0
In addition during this SUCCESSFUL connect, I note that the AP-ESP8266 reports:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00045610 ** different **
~ld
SDK:2.2.2-dev(38a443e)/Core:3.1.0-dev=30100000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-58-g450bb63/BearSSL:6105635
MAC=BC:FF:4D:18:BE:B1 *** This is the NEW “Sqiggle-Symbol WiFi” badged cover ***
Configuring access point...fpm close 3
mode : softAP(be:ff:4d:18:be:b1)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
wifi evt: 8
bcn 0
del if1
usl
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
Awifi evt: 7
wifi evt: 7
P IP address: 192.168.4.1
wifi evt: 7
wifi evt: 7
add 1
aid 1
station: 5c:cf:7f:d0:c4:d5 join, AID = 1 *** this is appears to be a join attempt from the STA ***
wifi evt: 5
wifi evt: 9 *** ??? success ??? ***
wifi evt: 7
wifi evt: 7
(*** and no …leave ***)
The sketch I used for the above is:
#include <ESP8266WiFi.h>
const char *ssid = "SSID-1234";
const char *password = "pw123456";
// #define AP_NOT_STA true // use to swap to AP
#define AP_NOT_STA false // use to swap to STA
#if (AP_NOT_STA) // *****************************************************************************
void setup() {
Serial.begin(74880);
delay(2000);
Serial.print("\nMAC="); Serial.println(WiFi.macAddress());
Serial.print("\nConfiguring access point...");
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
}
void loop() {}
#else // if (!AP_NOT_STA) // *****************************************************************
void setup() {
Serial.begin(74880);
delay(2000);
Serial.print("\nMAC="); Serial.println(WiFi.macAddress()); // MAC=A0:20:A6:19:57:26
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.print("\nTrying to connect to "); Serial.print(ssid);
while (WiFi.status()!=WL_CONNECTED) {Serial.print("."); delay(500);}
Serial.print("\nWiFi connected, IP address: "); Serial.println(WiFi.localIP());
delay(500);
}
void loop() {}
#endif // *****************************************************************************
I would be interested if anyone else has come across this issue, or if there are any suggestions?