-
Notifications
You must be signed in to change notification settings - Fork 33
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
2.4.1 doesn't connect to Wifi anymore #108
Comments
I have a Unifi Lite and two Unifi AC Pro's here with no issues but read on the tweakers forum that for someone the 2.4.1 version tried to connect to the most distant AP and kept trying that. |
I honestly dont know how to check to which AP it tries to connect to. I have 5 AP’s around the house, and when I hit ‘scan’ I Always select the one with the most bars. The AP’s are running the latest RC version which is 6.2.39.
I’ll try the beta1 tonight when I’m home again.
Thanks!
Verzonden vanuit Mail<https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows
Van: Arjen ***@***.***>
Verzonden: dinsdag 27 september 2022 22:27
Aan: ***@***.***>
CC: Martijn ***@***.***>; ***@***.***>
Onderwerp: Re: [arjenhiemstra/ithowifi] 2.4.1 doesn't connect to Wifi anymore (Issue #108)
I have a Unifi Lite and two Unifi AC Pro's here with no issues but read on the tweakers forum that for someone the 2.4.1 version tried to connect to the most distant AP and kept trying that.
In version 2.4.2-beta1 I explicitly reset the wifi storage on board of the MCU, maybe this helps.
Also, which firmware version is running on your AP devices?
—
Reply to this email directly, view it on GitHub<#108 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIZQWDU7N26S7UYWPALEMADWANKDFANCNFSM6AAAAAAQXCU7IM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
For some weird reason the downstairs CVE has connected to my Wifi again. The upstairs CVE still doesn't want to connect. Have tried formating the board too. Made it powerless a couple of times, nothing works. I updated to 2.4.2b1. It finds the wifi networks but doesn't connect. |
I now have experienced also a few connection issues. It seems that for some users these changes solved their wifi issues, for some others it created them. So two things to do I think to rule out 1 and/or 2, first I will build the latest firmware with the older ESP32 lib. Second I will roll back the wifi changes and build it with the old and new ESP32. I hope you can help testing the different iterations. |
I'm having connectivity issues with Ubiquiti AP's as well, both on 2.3.5 and 2.4.x (Tweakers guy checking in 😊). The issue mainly appears to be connecting; once it's connected, I find it to be pretty stable. But getting it to connect is a nightmare. I played around a bit this evening, tried switching AP's, changes 2.4GHz channels, disabled band steering, ... Didn't do a thing. Ended up compiling my own firmware(s) with some changes:
Not a 100% success rate, but I was also updating AP firmware & Unifi controllers in between so that may have caused the failure to connect, I'm not sure. I didn't check the AP debug logs, I might end up doing that one of the next days. TL;DR: the connect-disconnect-connect trick from the issue linked above seems to help. BTW I'm also willing to test some beta firmwares to help resolve this issue 👍 |
On some access points which are either running WiFi mesh, or at least capable of doing so, it might also help to force the ESP to connect in 802.11b or 802.11g mode only. (by the way, Tweakers user too, with the same alias :) ) |
Yes I really want to help get this sorted! No problem. I was already looking for a new beta, but I guess you are busy with it.
I reverted the AP back to the latest official FW (6.2.35) because of some stability with Shelly’s. That seems to work better now, but the ITHO wifi board upstairs still doesn’t want to connect.
ps. Tweakers.net users here too, but not very active ;-)
|
Fix: possible fix for WiFi connect issues #108 with input of @vandenberghev, thanks! Fix: Replace strcpy by strlcpy for buffer overflow protection
I've added the changes of @vandenberghev to the beta2 release. I've had a better experience connecting to wifi compared to the 2.4.1 release. |
Maybe I'm doing something wrong, but it keeps saying beta1 firmware is installed. Could you validate the links i'm using is correct? : https://github.com/arjenhiemstra/ithowifi/raw/master/compiled_firmware_files/hardware_rev_2/nrgitho-hw2-v2.4.2-beta2.bin |
Yes, I downloaded via that link and flashed my devices with it. Correctly says it's on beta2. |
the beta2 installed fine after using the /update url. It unfortunately still doesn't want to connect. It keeps coming back to the AP mode. It finds 27 SSIDs |
I just downgraded to 2.3.5 and it connects immediately. This just to validate ;-) And update to 2.4.2b2 fails to connect again. |
Ok thats a pity but thanks for the feedback! This version is feature wise a version 2.4.2 build but with the old wifi init code and older core libs. Could you try this one to set a baseline? If this works I will generate different build pulling in the other changes one by one until it fails. |
The test version updated without problems, immidiately connected to STA, so no problems. |
and you were having issues, or did the 2.4.1 FW connect too? |
An nog log entry with "WiFi: status != WL_DISCONNECTED, reinit setup"? |
Ok, then this build. It is with the latest arduino core (5.2.0 in this case) but with mostly the old wifi init code. Mostly because 1 statement of that code is for sure causing issues in combination with 5.2.0 so I removed that one but otherwise it is the same. ithowifi/software/NRG_itho_wifi/src/task_syscontrol.cpp Lines 475 to 505 in 2bb1eff
(minus line 490) plus ithowifi/software/NRG_itho_wifi/src/task_syscontrol.cpp Lines 563 to 608 in 2bb1eff
in case of DHCP on. (minus 582-597) |
If that last one works, the puzzle would become a whole lot smaller.... |
For ESP32 I do this when explicitly disconnecting:
|
nrgitho-dev-v2.4.2-wifitest2.bin also connects immediately, no issues in debug log |
As of 2.4.2 fw I had problems with the wifi connection: the add-on started on AP mode and was difficult to get into STA. |
does the wifitest2 have a 'new' build name with the update page? If I update with this build it still says beta2. // scratch that it now shows wifitest2, but still doesn't connect. |
quick question; If I scan wifi, it shows all AP's separately. My SSID is called 'Apparaten-2G', It shows 5 of them all with a couple of bars. When selecting a AP does it actually connect to that specific AP or does it try to connect to the 'best' AP with a SSID. I could try and kill a couple of AP's to see if roaming is the issue, would that be helpful? |
The WiFi connection is started with only an SSID and password, there is no BSSID given. Whatever happens after that, is black box magic 😋 (well, to me at least). |
@ Everyone testing: make sure you perform your test multiple times to see if the behavior is consistent. |
@TD-er Do you mean a setting on the ESP itself, or in Unifi? [EDIT] [/EDIT] Connecting in |
@vandenberghev have you also tested nrgitho-dev-v2.4.2-wifitest1.bin.zip? |
Repeated nrgitho-dev-v2.4.2-wifitest2 successfully. |
Not yet, I'll try either tonight or tomorrow. |
Yes, I am and so is @arjenhiemstra himself I believe. I downgraded to the latest official release because of some wireless issues I was having with some Shelly's (not all). The current version I'm running is 6.2.35 where the latest RC version is 6.2.39. I however do not have any issues with FW 2.3.5 connecting to my SSID based on the same FW versions of my Unifi AP's. |
Ok, so by default |
Is see the documentation in the WiFiSTA.cpp code is quite descriptive: on setScanMethod()
So I believe that with the code that currently is active for the add-on, the |
If you have multple APs with the same SSID, you may also be facing the issue where an AP may disconnect you if it thinks you should connect to another one. One way to overcome this is to force connecting using the 802.11g protocol instead of the 802.11n About the fast scan... |
So I see that one could call WiFi.begin() with just the SSID/PWD combo (which is what I'm using) or also with an BSSID specified. The BSSID info is currently not used (so it doesn't matter which AP you select after a wifi scan on the web interface if multiple AP have the same name). I've added:
To the wifi init code The observed behaviour is completely different. Now it seems (at least here) that the add-on connects to the strongest AP every time. If I switch floors here at my house the add-on immediately connects to the correct (=closest) AP every time. Please test with attached file if this is also the case for you. |
For the ones reading along, the shared firmware files in this issue are only for the CVE hw rev2 version of the add-on. |
Updated twice, first time connected after a few seconds (scanning?), second time immediately. |
updated the firmware and direct replies from my ping. So connected. |
Can confirm, 5/5 successful connections on boot with 2.4.2-wifitest3 👍 (whereas previously maybe 1/20 succeeded) |
So it might be that we are getting somewhere..... |
Pretty much :) |
A few reasons could be (not checked though)
|
That's one statement which can be stated with the "could also have" replaced by "does have". |
For testing purposes! Changes since 2.4.1: Fix: connection issues were multiple APs have same SSID name and add-on connects to first AP to react and not AP with best signal #108 Feat: added extra wifi logging; which BSSID is connected and what is the signal strength Feat: update to latest ESP32 arduino core (5.2.0) for PIO
They make great devices (at least compared to the apple APs I had before, wifi experience in general is much better) but on multiple accounts I felt forced to downgrade a firmware because strange issues.... apparently they are no better than me :P |
Well at least you can downgrade firmware without messing up settings. |
I really love my unifi devices, but they are making a lot of mistakes lately. Constantly I'm missing my sonos devices in my overviews and with the latest couple of builds some of my shelly devices won't connect. Very irritating. Back on topic; @arjenhiemstra wifitest3 works great. I updated and downgraded a couple of times and overtime it connect without a problem. I assume you renamed wifitest3 to beta3. What's the next step. Are you going to close this issue or should I? |
No, I always recompile towards beta and final (it's mostly an automated process) but the result should be the same. |
Great, I’ll update to stable when it has been released. And gl with your next issues 💪💪 |
Warning: the remotes config file will be reset if you upgrade from version 2.3.5. Be sure to backup valuable information before the upgrade. Changes since 2.4.1: Fix: connection issues were multiple APs have same SSID name and add-on connects to first AP to react and not AP with best signal #108 Fix: disable storage and usage of wifi parameters on ESP32 NVS partition Fix: Replace strcpy by strlcpy for buffer overflow protection Feat: added extra wifi logging; which BSSID is connected and what is the signal strength Feat: update to latest ESP32 arduino core (5.2.0) for PIO
Thanks everybody for all your effort and support! Without it would have been a whole lot more difficult! 💪 |
mmm.. toen ik dus thuis kwam was de ventilatie beneden verbonden met mijn wifi. Waar hij dus gisteren totaal niet wilde verbinden was hij nu ineens verbonden. Na een reboot was hij ook direct weer verbonden met de wifi. Heb uiteindelijk wel 2.4.2b1 geinstalleerd en ook toen was hij direct weer verbonden.
De variant boven was echter nog steeds offline. Deze heb ik via de wifi ap bijgewerkt naar 2.4.2b1, maar deze blijft disconnected. Uiteindelijk ook hier maar besloten om een format te doen, immers was dit het enige verschil nog tussen de beide omgevingen. Maar hij blijft offline.
Kan ik iets van logging oid naar je sturen?
Verzonden vanuit Mail<https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows
Van: Arjen ***@***.***>
Verzonden: dinsdag 27 september 2022 22:27
Aan: ***@***.***>
CC: Martijn ***@***.***>; ***@***.***>
Onderwerp: Re: [arjenhiemstra/ithowifi] 2.4.1 doesn't connect to Wifi anymore (Issue #108)
I have a Unifi Lite and two Unifi AC Pro's here with no issues but read on the tweakers forum that for someone the 2.4.1 version tried to connect to the most distant AP and kept trying that.
In version 2.4.2-beta1 I explicitly reset the wifi storage on board of the MCU, maybe this helps.
Also, which firmware version is running on your AP devices?
—
Reply to this email directly, view it on GitHub<#108 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIZQWDU7N26S7UYWPALEMADWANKDFANCNFSM6AAAAAAQXCU7IM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Are you using 2.4.2b1 or 2.4.2? |
I'm using 2.4.2 works great. |
Ok, then I think I cannot place the earlier comment of you today :) Could you clarify? |
uhhhhh... don't know either (didn't even notice i've send this).. i guess it was a mail in my outbox which hasn't been send yet.. don't worry everything is working great. I'm closing ticket again. |
Pfffw :) |
Describe the bug
Have two CVE boards, both I tried updating from 2.3.5 to 2.4.1 tonight. Both are offline. They show up with their AP booted up. I can connect to the AP of the board and scan the WIFI, my WIFI to which it has always been connected for at least a year or maybe even more. After the update all settings are maintained and in the config if connected to the app.
I first did a normal reset, then a format of the filesystem. Both didn't work.
To Reproduce
Update from 2.3.5, did this on two devices.
Expected behaviour
to connect to wifi
Screenshots
not applicable
Device information
Debug logging
Please provide debug logging from the debug page if possible:
logfile0.current.log
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: