-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TW#28251] Some phones can't connect to WPA SoftAP since f874b52f #2915
Comments
Wifi sniff: sniff-old-bad-filter.pcapng.gz |
HI @vkoutny, I think this is a bug caused by the commit you mentioned. Could you help to check whether the patch can fix your issue or not? Steps to get the patch:
We need about 1 week to merge the patch into GitHub. |
Hi @liuzfesp, thanks for quick response - but this repo seems to be empty right now: $ git clone https://github.com/liuzfesp/wifi_patch_for_customer.git |
@vkoutny please try again. |
Unfortunately it still doesn't work - same output as before: V (756) event: exit default callback Is it maybe possible to get a version of libs with more debug logs to see what is happening? |
Hi @vkoutny could you check whether your wifi firmware version is b13bf0b or not? |
yes it is: |
OK, the commit ID looks no problem. @vkoutny, could you help to do a test: |
Disabling AMPDU RX/TX options does help - without these options the phone connects as expected. (it works even without your patched libs, ie, with: wifi firmware version: 6b44342) |
So it a bug related to software BAR handling, we have a fix for it. Will merge it into IDF this week or next week. |
I have |
Hi @mnlipp, could you let me know the phone type and OS version of the phone? |
LG (d802) Android 7.1.2 Lineageos 14.1-20180919. |
Update: I've upgraded to LineageOS 15.1-20190113-NIGHTLY-d802. At first there had been no change. However, I found that there was a notification. Opening it, it presented the option "to keep the connection despite it has no internet connection". After I had checked this, loading of the "welcome" page from the ESP32 AP continued. I cannot tell if this is specific to LineageOS 15.1 or if I have simply overlooked the notification before in LineageOS 14.1. I have only thought of this just now: one of the devices -- a tablet -- where things have worked from the beginning also runs LineageOS 14.1. But this device being a tablet, Android had no better option than to use the WiFi connection, while on the LG phone, Android can prefer the mobile network (with internet access) over the ESP32 AP that does not provide internet access. Actually, I could verify this assumption by switching off the mobile network on the phone. Once I had done this, it connected to the ESP32 AP immediately as expected. So, sorry for the noise. I hadn't been aware of this (my phone's) behavior. |
I have a similar problem with an Android 8.1.0 phone, this is a new error as the code worked perfectly with a copy of the ESP32 core downloaded on 17/12/2018 The error messages are: E (49043) event: mismatch or invalid event, id=63 The webpage on 192.168.4.1 times out. If I logon with a Windows 8.1 PC and open the page with Chrome, then it does load but is very very slow. If I add the following line to the DNS server "dnsServer.start(DNS_PORT, "*", WiFi.softAPIP());" then when I logon with the phone I get a sign in dialogue box with opens the page perfectly but opening 192.168.4.1 from Chrome (or other browsers) times out. I have tried the patch from @liuzfesp https://github.com/liuzfesp/wifi_patch_for_customer.git, it doesn't seem to help. |
I just discovered that turning off mobile data makes the site load properly |
@vkoutny @mnlipp @PureTek-Innovations The issue has been solved. Please update IDF to check it. |
Helo...I am beginer...I bought ESP32 and programed it with Arduino IDE. When I try connect my smartphone to ESP32 I have error on serial monitor Thankyou. |
TimXia, what did you correct? I have the same issue since 2 years with software-AP. With some old Android phone the occurence is less often than new phones. |
I tried to run the example "WifiAccessPoint.ino", without any modification, and as soon as I try to connect, it prints the same error, but without panic and reset. The example finally works as it should. This is the serial output: rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) Configuring access point... |
@berniv We fix some connection issues. Could you please try the latest IDF simple wifi example to check it? |
how to use IDF example??? I am using arduino IDE |
@liuzfesp @TimXia Unfortunately even latest master (abea9e4) still doesn't work - but the behavior is a bit different now: the phone still doesn't get its DHCP lease, but disconnects after a few seconds and then retries:
Changing the AMPDU settings - disabling both RX/TX fixes the problem, disabling just the RX also fixes the problem - but disabling just TX does not fix the issue. |
Happens also on a Samsung Galaxy Note 3 (Android 5.0) and iPhone 6Plus (iOS 12.1.3) |
Thank you very much vkoutny. Though I could connect to esp32 with latest version (today 2019,.02.03)+AMPDU enable, |
@vkoutny @devopsone @infotrino Sorry, I was thinking the fix was already merged into IDF but it hasn't. We will merge it soon. |
What about fix if I use Arduino IDE? I tested several diferent development boards. When I use ESP32 as access point there is a problem with wifi connection on it. Thank you |
@vkoutny @devopsone @infotrino The fix has been merged. Please update the IDF branch to check whether it works for you. |
@svicar Hristo has replied you in the email as follows: This has been fixed in github master. You can install the github of the version by following the steps outlined here: https://github.com/espressif/arduino-esp32#installation-instructions |
I instaled git |
I get the same thing and when it crashes and reboots I also get almost immediately: |
I can comment the original issue is fixed by commit de79835 - tested working on current master (1aa8e8d) as well as when the fix was merged (2c7f603). (Note: this fix is not yet in the 3.2 release branch (8a69ffc) - if you have this issue just stick to master for now.) Thanks for support, closing this issue. |
This is a similar problem to #2273 - with ESP32 in SoftAP-only mode (using examples/wifi/getting_started/softAP), connection from some phones is not possible - the phone is unable to get an IP address from ESP32.
I can reproduce this on current master (577f8d8) as well as v3.2 release, using old Samsung Galaxy Ace 2, running Android 4.1.2; works as expected from several other Android (7/8) phones or a Linux laptop.
The ESP32 console shows this:
I (9546) wifi: ap recv assoc/reassoc request
I (9546) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (9546) wifi: bss=0x3ffb9f1c, resp=16 join
I (9546) wifi: station: 20:d3:90:9e:b4:2a join, AID=1, bgn, 20
I (9556) wifi: join success, ap send assoc response
W (9566) event: unexpected system event 63!
E (9566) event: mismatch or invalid event, id=63
E (9566) event: default event handler failed!
(this is with verbose logging enabled already..)
To compare, a working phone logs:
I (96626) wifi: ap recv assoc/reassoc request
I (96626) wifi: new:<1,0>, old:<1,0>, ap:<1,1>, sta:<255,255>, prof:1
I (96626) wifi: bss=0x3ffbabb0, resp=16 join
I (96626) wifi: station: c8:d7:b0:99:fa:1e join, AID=1, bgn, 20
I (96636) wifi: join success, ap send assoc response
W (96646) event: unexpected system event 63!
E (96646) event: mismatch or invalid event, id=63
E (96646) event: default event handler failed!
D (96676) event: SYSTEM_EVENT_AP_STACONNECTED, mac:c8:d7:b0:99:fa:1e, aid:1
I (96676) wifi softAP: station:c8:d7:b0:99:fa:1e join, AID=1
dhcps: send_offer>>udp_sendto result 0
I (97076) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
D (97076) event: SYSTEM_EVENT_AP_STAIPASSIGNED
ie, SYSTEM_EVENT_AP_STACONNECTED is missing.
Originally I though this is the same issue as #2273, but testing some different git revisions shows it is not the same - in my case, this phone can connect normally even before the fix for #2273; it just stopped working somewhere later.
I was able to git-bisect this issue to this commit:
commit f874b52
Author: Liu Zhi Fu liuzhifu@espressif.com
Date: Wed Nov 21 12:53:04 2018 +0800
The phone can connect normally when switching to WIFI_AUTH_OPEN; WPA/WPA2/WPA+WPA2 modes are all broken.
From the wifi sniff I can see the phone finishes 4-way handshake normally and starts sending DHCP requests; but it looks like ESP32 ignores the 4/4 message from phone for some reason since it re-sends 3/4 every few seconds.
Could you please check what changes introduced in f874b52 could be causing this issue?
The text was updated successfully, but these errors were encountered: