5 ms·
The way it works is that following: to check if wifi is in range, the only thing you can do is ping 'arthur you there?' to the router and wait for a response.
by asafira 9y ago
The way it works is that following: to check if wifi is in range, the only thing you can do is ping 'arthur you there?' to the router and wait for a response.
That wait time, unfortunately, is long on human timescales. Also, there's the chance your ping was lost, so your phone tries at least a few times before giving up.
- jessriedel 9y agoI still cannot fathom why the wifi handshake process takes more than a millisecond. I have no problem with the idea that wifi signals should be unreliable since the frequencies interact with typical everyday objects like walls, but the connection strength should be known on sub-second timescales. This Quora thread is a good example of the typical non-answers provided to this question. https://www.quora.com/Why-does-it-take-so-long-to-establish-a-Wi-Fi-connection https://www.quora.com/Why-does-it-take-so-long-to-establish-...
- asafira 9y agoI should have mentioned something earlier, but I totally agree, and I'm not sure why these things happen on human timescales. =/. Looks like no one answered with a detailed-enough response to 100% understand it, but maybe that's an opportunity for a good blog post by an expert. (and hackernews karma from me!) Otherwise, I hope things have been going well, btw =).
- derefr 9y agoTime-division multiplexing. The router has to wait for everyone else to stop using the band—and then take that opportunity to tell them to all shut up for a moment—before it can say anything. And it has to finish what it was saying before it does even this, because it has guaranteed its clients it would send packets of certain lengths by certain deadlines. (Plus QOSing: as the person owning a router, you almost always want your established wi-fi connections to take service priority, so that your phone coming gradually into range as you get home doesn't kill your family's downloads.) Add more antennas, and you can say more things on more channels at once. "Enterprise-grade" multi-antenna routers (e.g. routers in conference halls) negotiate new connections much more quickly. Cell towers are essentially a whole bunch of antennas (or a few antennae in highly-MIMO setups, so effectively the same thing) so there's comparatively next to no latency for sending "unexpected" packets to the tower. (Establishing connectivity with a new cell is still hard, though, since it takes a moment for a handset to get the tower's attention when the handset doesn't yet know where precisely the tower is for MIMO-beamforming to kick in. This is ameliorated by many cellular ISPs mirroring connection state between neighbouring cells, so that when you move from one cell to another, the new tower is already "expecting" you.)
- jessriedel 9y agoYou have added to the list of differences between wifi and other standards, but you have not actually shown where the timescale comes from starting from first principles. Why 10s to connect? Why not 10 ms or 10 minutes?
- derefr 9y agoI'm not sure why it's 10s; my point was mostly that, once you figure out exactly what part of the connectivity process eats up the majority of the 10 second delay, it'll be much easier to figure out the why. Since connectivity takes (far) less than 10s on enterprise-grade multi-antenna routers, all that time is being spent in some component that's different between the two classes of hardware. So looking at the difference in BOM between average products of the two classes might be helpful in figuring things out.
- jessriedel 9y agoRight, but there are multiple accounts of this floating around the web, many contradicting each other, and none that I've found that can explain what sets the actual timescale.
- deleted 9y ago[deleted]
- TuringNYC 9y agoMy iPhone tends to remain connected to the downstairs WiFi even when I've gone upstairs and there is a much stronger connection available nearby. I'm not speaking milliseconds, this continues to happen for hours. I usually to turn off and on the wifi to ensure it re-connects optimally. Why isn't this a standard behavior? Forget milliseconds, even a 5-min re-check would be great.
- asafira 9y agoI can't speak for your iPhone or the wifi software version on it, but the problem is kind of tough --- your phone would want to generally avoid hopping around different networks if it can get a decent connection from one, and it's not so clear-cut when you make that decision to check for other networks. (I agree you make it seem pretty clear though, either it is silly or there are more details to be learned...)
- toxik 9y agoWhat you want to do is extend your wifi network so your phone considers it the same network. Then it will switch AP seamlessly.