5 ms·
I don't understand though how a "network scan" (I assume sending a broadcast packet and receiving a response) can raise ping time from 3 to 150 ms.
by codedokode 4y ago
I don't understand though how a "network scan" (I assume sending a broadcast packet and receiving a response) can raise ping time from 3 to 150 ms.
- saltcured 4y agoIf you understand how TV used to be (before streaming), a network scan is more like you are trying to watch a program but your annoying brother has the remote and periodically cycles through all the channels to see if there is something more interesting to watch. He often does it during a commercial break but sometimes does not get back before the break ends and sometimes he just does it in the middle of a part of your program that he doesn't understand or thinks is boring.
- Nextgrid 4y agoA Wi-Fi network scan involves listening for beacons on all Wi-Fi channels which involves a frequency change. Thus during the operation the Wi-Fi card essentially leaves your current frequency (and stops being able to transmit/receive packets) and scans all the other ones.
- NavinF 4y agoAs weird as it sounds, $3000 machines still only come with one radio so it can only tune to one frequency at a time. Similar latency spikes happen when roaming between access points. WiFi is a mess and will be for the foreseeable future. Personally I just use a 10G ethernet card and some cheap optics.
- stefan_ 4y agoApple is really big into custom proprietary WiFi protocols (see also: AirDrop). So while AirPlay was originally limited to the local network, it now also apparently works over WiFi direct - and presumably that requires some sort of WiFi scan, in turn requiring the radio to switch channels which causes latency to tank.
- bscphil 4y agoThis is a good question but I don't think any of the other four replies have understood it. Judging by the original article, this problem appears when AirPlay devices are on the same network and the same subnet as you. All that should be required to scan for devices on your network is sending a broadcast packet, as you have indicated. What others are claiming effectively amounts to saying that the Macbook needs to disconnect from your network, scan for access points, and then reconnect to the network. Which would certainly cause latency issues, that much is true, but that's surely not the kind of scanning that is actually being done here? Why would a scan for access points be necessary?
- saltcured 4y agoI am not a Mac user, but as I understand the topic, it is using the radio for location and proximal device detection. It is not a LAN feature that would work via broadcast in the current WiFi LAN nor would it work if using only a wired LAN with WiFi disabled. It puts the radio into a different mode to listen for nearby devices, whether to talk to them or to use them as landmarks for location sensing. This requires scanning radio channels, not just continuing to listen to the channel where you expect to receive further packets from an associated access point.
- bscphil 4y agoThat certainly seems like a plausible thing that could be happening, but the specific claim of the article is that this is an issue with Airplay, which to my understanding involves devices that are connected to your router / access point, not free standing devices with their own access points that have to be scanned for. There might very well be latency issues involved with the WiFi radio scan modes on Macs, for all I know, but I don't think they could be related to this specific issue with AirPlay?
- saltcured 4y agoThe problem seems to be that they bundle all these features into AirPlay with the intention of making it easy to use. It uses device discovery that is not bound to the current LAN. See https://support.apple.com/guide/deployment/use-airplay-dep9151c4ace/web https://support.apple.com/guide/deployment/use-airplay-dep91... "When looking for other devices, an Apple device broadcasts a very small Bluetooth advertisement indicating that it’s looking for peer-to-peer services. When any peer-to-peer-capable device hears this BTLE packet, it creates or joins a peer-to-peer network directly between the devices. The devices concurrently switch between this temporary network and any infrastructure networks they were on before in order to deliver both the AirPlay video stream and provide existing internet service. The temporary network typically operates on Wi-Fi channel 149+1, but depending on the hardware involved, may also include channel 6, or channel 149,80. The devices follow the same frequency use rules on the temporary network as they do with any other Wi-Fi connection to avoid disrupting any existing infrastructure networks that might already be using those channels."
- pvtmert 4y agorule 1: medium "air" shared with everyone else rule 2: it can use wifi direct, eg: doesn't have to be in the same network rule 3: your wifi card may have single antenna for a given band (2.4 or 5 GHz). Such that, you can only transmit or receive. rule 4: interference causes packetloss (eg: 2 people pressing talk in a radio) given those rules and wifi 2.4 band having 14, 5GHz band having 190 or more channels. I would say having been able to send things back and fort is still pretty damn good :)
- pvtmert 4y agoside note: each channel may have different width (20, 40 or 80mhz) frames may have other phsical properties that need to match. so, too many options and just a physical limitation...