-
Notifications
You must be signed in to change notification settings - Fork 197
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
Drivers that scan available WiFi networks in chunks #451
Comments
Hi @2m I have many adapters that cover most of the chipsets that are available. I am willing to test and provide you with results if you provide me with a checklist (a list of commands) of exactly what to do and what you need to see. There is also the option to craft a well done report and provide it to the Mediatek devs... or someone in the community could take a look and possibly submit a patch. |
Thank you for a quick response. Currently I test my adapter by running
Here it shows that scan takes 8 seconds. This is with BZ reg domain, without changing reg domain, it takes 20 seconds. And parallel to that I am running ping from another machine to the one running the wifi adapter.
Here, with a shorter scan duration of 8 seconds, it does not look that bad. In fact it seems that traffic is still processed (albeit with a delay) during the scan. During longer scans it would start dropping packets. Its a bit of a convoluted test, but currently I have not figured anything better. |
Here is the initial test. It is using a EDUP EP-AX1672 which is shown in the Plug and Play List. Why did I use it? It just happened to be what was connected to my test system. It uses the in-kernel mt7921u driver. My country code is US. $ sudo iw event | ts I have an Alfa ACM. Would you like for me to post the result so as to compare? What driver do you want me to test next? |
Oh wow, that is a big number of channels scanned and in a very short time. Did you notice any connectivity interruptions during the scan? It would be great if you could try the adapter I have next - ALFA Network AWUS036ACM that uses mt76x2u driver - to compare the results. |
No. I ran I will test the Alfa ACM next. FYI: Test system runs Debian 12 with kernel 6.7. It is an x86_64 system.
It is a tri-band adapter similar to the Alfa AXM. Both use the same chip. |
Ahh, very interesting what results you will see with AWUS036ACM. If they will be better, then my quite outdated OpenMower kernel might need an upgrade.
|
Test with Alfa ACM: $ sudo iw event | ts I was running 64 bytes from 192.168.1.1: icmp_seq=126 ttl=64 time=0.630 ms Nothing even close to what I would call an interruption. The test time did jump from 5 seconds to 6 in this test. FYI: I am not running a flame throwing machine. It is an 11 year old Dell Vostro with an i7 quad core cpu and 12 gb of RAM. I think it is fast but some people might think it is an antique. |
Computers are veeeery fast. Its just that we tend to throw not that fast software at them. :) Thank you very much for these tests. I think now it is quite clear that there have been improvements to this driver during the last 6 versions. I need to upgrade my kernel and pick it up from there. |
That likely will not hurt as it seems to me that around kernel 6.6 is a sweet spot for stability for now. It appears that as you get on up to around kernel 6.8 and later we are seeing some issues due to the very large amount of patches coming in to support WiFi 7. I'm not just talking about drivers but the entire Linux wifi stack. I posted an issue about this here yesterday. It will pass but for now sticking with a system like Debian 12 and kernel 6.6 (which Debian has available for installation) is really good. I was trying to think if I am doing something different than you and something just popped into my head. Here is the Alfa ACM interface as shown on my system currently:
Note that it is not connected to an AP and it was not connected while doing the tests. I usually have multiple adapters/cards on this system at any one time and it is even has an ethernet connection. I use different ways of connecting and different setups depending on what I am doing, I would not do scan tests on a wifi interface that is connected to an AP as you can see the results you are seeing or worse. Sorry about not thinking of this earlier but maybe it can help you find a solution to what you are trying to accomplish. |
Ahh, that makes sense and is most probably the reason of faster scan times and no interruptions to pings. On my setup the OpenMower is moving in the yard and is constantly scanning (every 5 minutes when the signal is not too bad) for surrounding BSSIDs. I am using Network Manager with wpa_supplicant backend for connection management. Would you mind making a test when the card is connected to the network? |
Test with Alfa ACM with the ACM connect to an AP... $ sudo iw event | ts $ iw dev 64 bytes from 192.168.1.1: icmp_seq=60 ttl=64 time=0.863 ms Well, that was not what I expected. Connecting the adapter seemed to supercharge it. Ping were going through the ACM. Nevertheless, I have seen various products where using 2 usb modules or adapters was what was needed but I don't understand enough about your project to make any recommendations right now. |
Really interesting results!
I was actually also thinking about a very similar setup: use one wifi adapter for connection, and another for background scan. Then background scan information from the second adapter should be fed to first adapter roaming choices. AFAIK wpa_supplicant is responsible for initiating scans and roaming choices. Have you seen such Linux setups before? |
I do some consulting on the side and using two adapters for more or less what you are describing is fairly common in some products. Often those doing it use usb modules instead of usb adapters but some do use adapters... however both are usb and use the same drivers. |
I am trying to find information on wifi drivers for Linux that scan for surrounding WiFi networks in chunks thus allowing to handle pending traffic.
I have found this mentioned vaguely in https://blogs.gnome.org/dcbw/2016/05/16/networkmanager-and-wifi-scans/ and was wondering maybe there is something that could indicate whether a driver supports such functionality or not.
The reason I am looking for this is that I need quite a stable connection for https://openmower.de/. It gets NTRIP data from a nearby GPS base station every second to get a GPS RTK lock. And I noticed that with ALFA Network AWUS036ACM network scan takes 20 seconds and during that time WiFi connection is not responsive.
I was able to shorten scan times to 8 seconds by changing the regulatory domain to BZ (
iw reg set BZ
) but that still causes some interruption for the GPS RTK signal.The text was updated successfully, but these errors were encountered: