-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
WiFi connection fails on some ESP8266 nodes if Do Not Start AP: option is enabled #4337
Comments
@TD-er Could be the change of the used SDK. |
@Jason2866 Also for ESP8266 builds? |
@ghtester I really don't know what may have made the settings incompatible. The settings are kept as much backwards compatible as possible. |
@TD-er Only for esp8266. The change of the used SDK you did. |
Hmm I wasn't aware I did change something significant for the ESP8266. Edit: |
Yes! You opened the esp8266 pandoras box by doing this ;-) |
Why does Pandora leave these boxes laying around... |
I don't know, maybe my custom build uses some unusual settings / directives in Custom.h or a plugin combinations... Or a HW issue of affected ESP node (it's permanently running for about 4 years so may be it's a bit dying)? |
I will look into the SDK change. |
Can you please re-test using the current 'mega' branch code? |
Thanks a lot, I have just recompiled the firmware from current sources, in the evening I'll try to upgrade the node again and share the feedback. |
OK, some news - the same issue on the same node with fresh Vagrant custom build, right after the update & reboot it did not work properly anymore. LCD display was initialized but rules did not work, WiFi LED changing light intensity after several seconds., no connection to WiFi AP. |
I may have a similar problem (or maybe it is not related at all ;-), I'm not an expert. currently my free time is somehow limited, but if any further data is useful I'll try to provide it. |
Maybe it's HW related... ESP BoardESP Chip ID: | 3523742 (0x35C49E) Working firmware: FirmwareBuild:⋄ | 20220829 - Mega BTW. I have the AP mode disabled on this node. Maybe I could enable it, reflash to "bad" firmware and test what happens. Serial port & logging now enabled. |
I'm thinking about the following idea: The SDK now used for ESP8266 builds is |
@ghtester Maybe you can already test with the current "alt WiFi" PIO env? |
I am not sure how the configuration option should look like exactly to use "alt WiFi". For me it's important to have the IR related plugins compiled and I am not sure if there's any possible conflict / missing plugins or not. |
OK, thanks for the details, missing IR is a trouble for me. INIT : Booting version: ESP_Easy_mega_20221108_custom_IR_ESP8266_4M1M, (Vagrant) My Build: Nov 8 2022 15:03:09 (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(c0eb301), LWIP: 2.1.2 PUYA support) Build changed! |
BTW. when I entered the WifiAPMode command to serial console, the node connected to AP and started working. :-) To be analyzed a bit... |
hmm can you set it to " force B/G"? |
By the way, this does look like a big clue to me. |
See the log:
OK I think B/G won't help as I have enabled it right before the issue was encountered first time. I'll try reboot |
Another thing changed with AP enabled is that the WiFi radio never sleeps. For example by setting it to 7 dBm, you already reduce the TX power (in Watt) considerably and "7" is probably still enough given your AP is seen at an RSSI of -51. |
Yes I can confirm forcing B/G mode does not help. Edit - decreased max TX power to 7 , rebooted - the same issue. Edit2 - checked the Force WiFi No Sleep: option, rebooted - the same issue. Edit3 - unchecked the Do Not Start AP: option, rebooted - and it helped! The node connected to AP succesfully (but it took a bit longer than with earlier firmware). Edit4 - checked the Do Not Start AP: option again, rebooted - and issue is back... The bad thing is I would like keep this option checked... For now I'll uncheck it and keep the 20221108 firmware running. |
BTW. this is the log after unchecked Do Not Start AP: option: load 0x4010f000, len 3584, room 16 INIT : Booting version: ESP_Easy_mega_20221108_custom_IR_ESP8266_4M1M, (Vagrant) My Build: Nov 8 2022 15:03:09 (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(c0eb301), LWIP: 2.1.2 PUYA support) |
FYI the second mentioned ESP node which I upgraded from 20220829 to 20221108 without issue (a different configuration & plugins used but connected to the same AP and with the Do Not Start AP: option checked) : ESP BoardESP Chip ID: | 5859987 (0x596A93) FirmwareBuild:⋄ | 20221108 - Mega |
This part is a bit strange... |
Can you try the invite link from above? I should see you than. |
tried new mega-20221224 build, worked for some time but now 2 of my devices are "down", will revert to https://github.com/letscontrolit/ESPEasy/releases/tag/mega-20220809 |
Can you elaborate on that, like with logs captured from USB serial? (Assuming you have the serial output enabled) |
@tonhuisman: I think it will be the same problem as stated above, but I'll double-check tomorrow (both devices are not so easy reachable) |
I observe similar issues with latest builds - 20221105 and 20221224. Signal around -62 dBm, but with latest build ping avg. 35 ms, sometimes 5 ms, usually 50-150 ms. |
Did you also power cycle the ESP since you flashed it? |
Tried once again - power cycle done (approx. 1 minute power unplugged) - still the same. |
@tonhuisman: I'm still testing. I reinstalled 20221224 and my "faulty" device is still up and running for 6 hours now. Log shows nothing unusual up until now |
@tonhuisman: 2 of my 3 "faulty" devices are offline. Unfortunately, I didn't catch the output when they went out. Never happened before 20221105. One of the devices is still on 20221224 and running. Still a mystery, maybe some sort of buffer issue. I'll again try to capture a USB output during failure |
This time the device failed after a few minutes, output attached
|
Is this with build 20221224?????? This is very strange as I really really hoped it was finally fixed in the most recent build, but it seems like it is just as bad as with the 20221105 build. I am really starting to HATE this WiFi garbage from Espressif! |
We all would have been so happy if you had found a solution out of this mess. |
@Jason2866 I really can't believe why this node used by @cybermcm keeps on getting stuck on the WL_IDLE_STATUS. |
Is this with build 20221224?????? It seems it is never actually connecting. Have you checked to use 802.11g? And "reset WiFi on disconnect"? And "Send with max TX power" ? This is very strange as I really really hoped it was finally fixed in the most recent build, but it seems like it is just as bad as with the 20221105 build. |
Can you enable this checkbox please? |
even without this checkbox my device is running since 2 hours ;-) |
@TD-er: Force Wifi b/g didn't help but I noticed that the "faulty" devices had "Extra WiFi scan loops" set to 2 (maybe during troubleshooting with the last ESPEasy version). |
Hmm that's an interesting finding. Thanks for reporting back! |
Just a quick update, the "faulty" devices are still running with 20221224 and the "Extra WiFi scan loops" set to zero! |
@ghtester @cybermcm It's been a while... This issue is possibly/probably fixed by #4875, please run a test with this Actions run build (once it's completed). |
thx @tonhuisman! I'll try this new build and set "Extra WiFi scan loops" to 2 again to check if it is stable |
The current advice is to leave that setting at 0, since a huge revamp of the WiFi code in the July/August time-frame fixed a lot of issues in that area. |
@tonhuisman: device not pingable after some time with Extra WiFi scan loops set to 2; I can't reproduce the initial error otherwise |
I'm working on this too, as there seems to be a massive memory leak when you initially setup the ESP8266, which is causing all kinds of issues. |
From my perspective the original issue was already fixed, most likely even before #4785 so I am closing it. Thanks for your great work. |
I have upgraded one ESP Easy node (8266) from custom firmware 20220829 to custom 20221031 as it started disappearing from WiFi network.
After the upgrade and node reboot it seemed to be working fine but after several hours it disappeared again.
Then I tried to edit some WiFi settings but after the reboot the node did not boot properly anymore. The WiFi status LED was just changing the light intensity from low to medium after several seconds and that was all.
Repeated connecting to serial console showed just some garbage characters or even nothing.
Then I decided to reflash with empty bin, reflashed again with custom 20221031 which was working again with default configuration.
As soon as I restored the earlier config, the described issue returned... Then I reflashed with custom 20220829 firmware which is so far working fine with the restored config.
The question is what could make the config incompatible with latest firmware release?
Another question is - could we make a feature for exporting all configuration parameters in text form from ESP node?
Also a simple viewer or config exporter could be useful (I mean an app or a script ) to be used with already existing binary config files. Maybe I could perhaps try to do some work on it if somebody reminds me with the current config binary file structure.
The text was updated successfully, but these errors were encountered: