-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Windows 10 PC can't access AP Mode. #2910
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
Comments
Same here, Ap mode seems to be broken!!
Ap mode seems to broken, I already tried normal webserver and AsyncWebServer, both are not working properly, they just stop working from about 90 seconds after you connect with AP. I can connect with my phone no problem, but after 90 seconds, AP just breaks and I have to disconnect and reconnect the WiFI. |
That's just great ! EDIT: I have tried with another Windows 10 Laptop PC and it still does not work. |
Could this be related to #2899? |
@atanisoft , well I did the test with heap memory and I can confirm the free heap memory size drops when the problem starts like mentioned on the issue you commented! So Yes I do believe its related... So the solution might be just change the sdkconfigs on esp-idf , build and replace the libesp32.a to make it work? |
@DarvosBR yes, that should work to test. I suspect there may be a few other LwIP settings which would be useful to adjust slightly to increase stability in the arduino-esp32 builds. |
Probably. So you are saying that this should be a work-around:
Also, I've seen you mentioning a possible solution to the AsyncTCP freeze. That would be something extraordinary indeed. |
@GeorgeFlorian I haven't tested the proposed rebuild but I don't think the steps outlined above will work since this is all pre-compiled into libesp32.a. The only solution I know of is to setup an esp-idf build (cmake or similar) with the arduino-esp32 sdkconfig, build and copy the libs over to the tools/sdk tree where they are today. I'm not certain it will fix the async code but there may be a small chance that they are related. |
That sounds like nothing I have done. I've never used esp-idf and it sounds tricky to use. As I am now, my best bet is to wait for a stable arduino-core 1.03 in which hopefully somebody will fix have fixed this issue. |
@GeorgeFlorin Don't worry, I'm gonna try both solutions and have a return for you, independent of which solution works (if any do), I will tell you how and event provide file if needed! I got your back George! |
so you have nothing to back your opinion up with, but you "think" it's garbage.. OK 😁 I can only say that it worked for me - fixing the stack freeze issue #2899 (with empirical evidence to back that up). Those buffer parameters are not a fixed part of the pre-compiled core. You can easily check it by increasing the static buffer values and watch your free heap drop as a result. And to also say something on-topic of #2910 - I don't see how it could be directly related, but who knows. Easy enough to try, right? 😜 |
Just experience from how the build process works in the environments I've used. Anything that is part of IDF is precompiled before any of the arduino-esp32 stack is compiled. Changes to sdkconfig (or sdkconfig.h) will usually require a recompilation of the IDF pieces for the changes to take effect. This is not an issue if you are using arduino as an IDF component though.
How is this possible, these are used only on the IDF side and IDF code is not recompiled inside Arduino IDE or in PIO when using the arduino framework option. |
That is great to hear, man ! Thank you @DarvosBR ! But I don't think that #2899 is related. You and me both experience issues when trying to connect to the ESP while it's in AP Mode and that is all. We aren't sending large enough UDP Packets, if we send any at all, so that the Network Stack should crash. Also, my ESP can stay in AP Mode indefinitely if I made a stable connection or no connection at all. I can connect and disconnect using my phone all day long and it will still work. It will "block" connections only when a failed connection happens. So if I try to connect using my PC and it doesn't work, this will make the ESP not able to accept further connection. The strange thing is that the PC says that it is connected to the respective AP Network, but the server is inaccessible. |
🙄
Have you checked whether the DHCP gives you a correct IP address/subnet etc. when that happens? |
@r1dd1ck unfortunately the sdkconfig.h solution did not work. I'm gonna try the esp-idf, but I do agree this method should work. @GeorgeFlorian The whole code works just fine when I access the board by the STA IP. |
There is no need to be rude about this. In all other cases of IDF sdkconfig it will require a recompilation of the IDF code for the config change to take effect. This however is one case where a recompilation is not necessary ONLY because the WiFi lib is calling esp_wifi_init with a locally created wifi_init_config_t (https://github.com/lbernstone/arduino-esp32/blob/master/libraries/WiFi/src/WiFiGeneric.cpp#L114) which the WIFI_INIT_CONFIG_DEFAULT expands to use the sdkconfig.h entries (https://github.com/espressif/esp-idf/blob/e7f85f1987aa9479c2dbab638ca83bcaef99be00/components/esp_wifi/include/esp_wifi.h#L193-L213). This is not typically the case. @GeorgeFlorian give it a shot and see if it fixes it, if it does then #2912 should fix your issues when it has been merged and included in the next release. |
well at least I have something new to share with you guys: New error msg:
This send_offer msg had never appear before, at least not that I had noticed. |
That's not being rude, that's just stating a fact. I'm sorry, but I go through the effort to provide a working solution, and then someone persistently keeps writing that it's garbage without even bothering to actually try once.. 😐
Glad you have finally checked, and acknowledge now 👍 Have a nice sunny day 🙂 |
Oh guys this is exciting, we are getting somewhere here!! CORRUPT HEAP: Bad head at 0x3ffcf4a4. Expected 0xabba1234 got 0x3ffcf574 Backtrace: 0x4008cbac:0x3ffb3c60 0x4008cddd:0x3ffb3c80 0x400dd8a7:0x3ffb3ca0 0x4008c821:0x3ffb3cd0 0x40084f16:0x3ffb3cf0 0x400864bd:0x3ffb3d10 0x4000bec7:0x3ffb3d30 0x400f61c3:0x3ffb3d50 0x400f6223:0x3ffb3d70 0x400f626b:0x3ffb3d90 0x400f895a:0x3ffb3db0 0x400f89c2:0x3ffb3dd0 0x400d6ba1:0x3ffb3df0 0x400f5724:0x3ffb3e10 0x40088b49:0x3ffb3e40 Rebooting... The new error issue I got! so just a few extra informations, I just did a Fresh 1.0.2 instalation of the arduino-esp32 using the board manager from arduino IDE and the only thing I modify was the this:
And yes I did try recompiling libesp32.a on idf on the last attempts, but this one was the original comp |
Well, so far it only got you to a point where you will need to do a full manual clean-up & re-install 😋 because that heap corruption is very likely caused by some old files not being properly removed/replaced in the process 💩 Or if not, then maybe forcing a full rebuild will help - the caching algorithm sometimes acts silly 🙄 |
I agree with @r1dd1ck on the cleanup/rerun. But, it would be good to decode the stacktrace before cleanup/rerun. If this is from AsyncUDP there was this merge on master that is not on 1.0.2: e9389e3 |
Coming back with some updates of my own: Without changing the code I know get Here are the
As you can see: What is happening ? I am using Platformio IDE and here is how the
As you can see from |
@GeorgeFlorian yep same issue here, let me ask you something about this George (and I want to to know currently working to solve this problem my own, as soon as I get success I will let you know). My question is: when you do connect with your phone, you have a stable connection even when that thing appears on your serial monitor (the DHCPS thing)? for me, no matter what I do, after 30 seconds connection freezes and I can refresh the page for example, until I quit the Wifi connection and reconnect. Can you please try this for me ? connect it to your phone, refresh like 3 times with a 20 seconds interval and see if you can successfully do a fourth refresh! Thank you very much |
Refresh what ? If I connect to the ESP's AP using the phone, the connection is stable for an undefined period of time. |
Refresh I meant if you are using a web server, but just now it hit me, maybe that's not your case! |
Actually it is. I am using ESPAsyncWebServer. And it does not crash in AP, even after 4 refreshes. |
than I must recheck my hardware, i'm using ESPAsyncwebserver myself to read the value of a simple sensor and after a while AP freezes. Thank you George, this piece of information is valuable |
I haven't changed the code. Here is a little update: I am now able to connect to the ESP32's AP using an Asus G771JM Laptop, that has Intel Dual Band Wireless-AC 7260. It seems pretty stable. Also, regarding the
Closing the browers and trying again seems to fix it. While in STATION mode, it works fairly fine for an undefined period of time, even after multiple refreshes. The only thing that I do not like in this situation is the fact that it's slow and after long-ish period of times in which a web-page was left open in the browser, upon refreshing the page or clicking a submit button, it sends either one of the following warnings or both:
After an hour of letting the ESP32 in STA Mode and a web-page open in the browser I got a Guru Meditation Error:
The issue with this is that after the reboot, the code that's on the ESP32 does NOT work. The serial monitor doesn't say a thing. I have to manually reset the ESP by pressing the on-board reset button. Here is an issue that I've just opened on ESPAsyncWebServer's github detailing more of the slow-downs I experience : me-no-dev/ESPAsyncWebServer#535 |
Any luck with this ? I still can't connect all the time using a laptop or a PC.
but there is no
|
I don't think that the Also, check this: #3037 |
Thanks, made the same, i cross my fingers it's seems to work... |
Hi! troubles back again #3037 (comment) |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
@GeorgeFlorian did you get this issue resolved? Win10 + AP mode? |
has anyone fix that issue? |
Board: ESP32 DevKit V4 with Wrover-B
OS: Windows 10
platform = https://github.com/platformio/platform-espressif32.git
I'm having a peculiar issue here. I can't access the WebServer when I am connected to the ESP32 AP Mode using Windows 10. But I can access the WebServer when I am connected to the AP using my Galaxy Note 9.
#and
After the PC fails to access the WebServer , when trying to connect with the phone to the AP it doesn't work. It seems like I am limited to one connection to the AP. It just doesn't work. No debug message, no nothing. Not even the phone returns an error. Which is rather strange I'd say...
This is how I set up AP Mode.
Nothing strange until now.
This is the
-DCORE_DEBUG_LEVEL=5
akaVerbose
:See the
dhcps: send_offer>>udp_sendto result 0
?I don't get that when I use the phone first and try to access the AP.
And that is all. No other verbose message.
EDIT: I have tried with another Windows 10 Laptop PC and it still does not work.
The text was updated successfully, but these errors were encountered: