Hacker News new | past | comments | ask | show | jobs | submit login

This is normal across all wifi clients; they can't scan for networks and transfer data simultaneously so there will always be increased latency during that event. You can test this yourself by doing a low-interval ping and clicking the wifi icon to show you nearby networks - you'll notice a brief latency spike.

I agree that it's not a good default to have an app doing this, though.




This may not always be the case, fortunately! I recall the Broadcom Wi-Fi 7 chipset announcement[0] in April mentioned a dedicated scan core which may well offload the network searches to a separate part of the chip, freeing the AP connectivity core(s) from having to do other tasks for a second or two each minute.

Here's hoping it works as I understand it and other chipsets start doing similar things!

[0] https://news.ycombinator.com/item?id=31060452


Supporting 802.11g means scans are send at 1Mbit. 802.11a bumps it to 6Mb/s, so not much better. This means that every time you want to send a beacon you have a pause equal to the duration it takes to send a packed at 1-6Mbit, not to mention scanning all the channels.


To do passive scanning you need to "be quiet" for sufficiently long to pick up beacons from other stations, so that is unlikely to help.


Because wifi is shared via time slicing don't you have to be quiet part of the time anyways?


Surely you can’t use the same antennae for two different operations at the same time…

The noise would be unsalvageable and you would lose packets, surely.


On different bands you can with basic filters. On the same band it would admittedly be tough (unless the band is super wide like the 6E band). It is done by radio repeaters for example but they do need big bulky filters, that kind of thing would not work on a laptop. But it is possible to transmit and receive on the same antenna at the same time, it's not a technical limitation. You just need a good enough filter.


I mean background scanning only has to be a read operation, shouldn't that make it simpler?

Also things these days often have multiple antennas.

Also for 2.4ghz I believe Bluetooth shares the same channels. I've noticed that my BT headphones reach longer in no-wifi/few wifi locations.


Solution for Windows (replace interface name as needed):

    netsh wlan set autoconfig enabled=no interface="Wireless Network Connection"
Caveat: you need to turn this back on if you need to re-connect or scan networks.


Still have two .bat scripts (on/off) on my desktop from a time when I only had wifi. And it still baffles me that such measures can be necessary.


I used to have constant ping spike at regular interval and had to do that bat script thing, which fixed it but it was really annoying. Eventually I figured out it was because of a Qt bug in the Qt lib that an application running in the background is using, and there is a system property to disable that behavior.

https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-...


Is there a way to configure Windows to only scan for networks when it isn't connected to one?


or change how often it scans


Thank you, this solved a problem I was having with Citrix Workspace. Every ten seconds I would get a ping spike. It reliably destroyed video calls and made typing in the workplace a pain.

My old Mac does not have this problem. Makes no sense to me that Windows allows any random program to trigger wifi scans. It’s a performance issue and privacy issue too.


If you have an Intel WiFi card, there's a driver setting "Global BG Scan Blocking" to never scan if you already have a good signal. Works great


I always try to have Intel nics of all kinds, so thanks.


It’s good to know. I suppose the unintuitive part is that “location” means “Wi-Fi scan”. Makes sense for a laptop when you think about it but I wouldn’t have thought of this as the first thing to check.


It's kind of a weird situation we're in with this. Facebook and Google track your location by default and you can go back and look where you've been on a map. I used it to figure out the details of an automated traffic ticket I got on a trip to Europe a couple of years back, so it's not totally useless from a consumer perspective, but it's still creepy. So you opt out, but "location services" keeps tracking you and sending your location data (as represented by the SSIDs and signal strength around you) but not telling you you're being tracked. So you opt out of that, and all the sudden you're subject to a bunch of dark patterns insisting you need to enable it again, even though it's perfectly capable of just using the GPS and keeping everything on the client. I'm glad my life isn't interesting enough for it to matter, I guess.


> the unintuitive part is that “location” means “Wi-Fi scan”

I was under the impression that this has been SOP for mobile device location forever: get rough location via WiFi and/or tower multilateration while GPS is...I don't know the proper terminology here, bootstrapping? That's why your dot tends to start somewhere nearby-ish and then quicky jump to your exact location.

It's possible that I'm way off base or my understanding is outdated, though.


> I don't know the proper terminology here, bootstrapping?

There is the term "Time to first fix" Maybe "getting first fix" could be derived from that.

Wikipedia lists a set of interesting situations with what the device is actually doing that causes the delay https://en.wikipedia.org/wiki/Time_to_first_fix


I'm thinking that my devices could have an offline list of known WiFi mac-addresses from when it's checked GPS before and return those for very accurate results without scanning anything.


But if the laptop is currently connected to a WiFi network with a known location, what's the point of scanning for networks to locate it? You already know that you're within range of a known spot.


Roaming. Although a desktop might not usually be moving while it's on, a laptop user might move around the house, conference room, or lecture hall, and switching APs could result in a stronger signal. It's better to switch before your signal gets weak/drops to minimize disruptions during BSS transitions.

On an unrelated note, in my experience Apple devices are consistently the most frustrating devices when it comes to wifi. They are insanely picky about what networks they will connect to, and they are never consistent.


„Within range of one network“ doesn‘t give you as much information as „all these networks are visible and here‘s how strong they look from where you are“


True, but is that precision worth the hit to latency... especially if you're trying to do a voice and/or video call? I doubt it's worth the tradeoff most of the time.


How often are folks in meetings, connected to WiFi, and opening up the WiFi connections list to hunt for other networks?

I'm frankly surprised that the author of these tweets encountered this at all, much less was so annoyed by it as to troubleshoot.


> opening up the WiFi connections list to hunt for other networks?

That's not the trigger. The trigger is location services scanning for networks in the background. So, if you have that enabled then it happens automatically while you're on a call.


All the time.


Not just within range, connected to. Meaning you're close enough to have a strong signal. If it isn't a strong signal this can be detected and the system could scan in that case, looking for a better one.


What helped me was not using a hidden SSID. Apparently, with hidden networks, the computer has to actively probe for the network, but passive probes don't affect latency as much.


Passive scans would be possible.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: