1. Current Location: Home >  Router Encyclopedia >  The router registers every 0.1 seconds, and the WiFi list is obtained from the phone

The router registers every 0.1 seconds, and the WiFi list is obtained from the phone

WiFi list scanning principle: router beacon frame broadcast and mobile probe active scanning comparison, beacon frame field decomposition and 13-channel jump timeline

Last month, while on a business trip and staying at a hotel, the receptionist quickly listed her WiFi name. I took out my phone and turned on the WLAN switch, and after just over a second, five or six names popped up in the list. At that moment, a man next to me was waiting and muttering: Where did this thing come from?

On the way back, I caught a quick look and realized that the list wasn't just a one-way 'search' by the phone, but a coordinated performance between the phone and the router: the router kept announcing the home door in the background, and the phone asked for every channel one by one in those one or two seconds. Both sides are doing half the work, and if you're missing one, you can't get a list.

Let me clarify first: that list was 'listened to' and 'asked

.' There

are only two ways to discover WiFi: textbooks call it passive scanning and active scanning, which translates to 'listen' and 'ask.'

Passive scanning is purely listening. As long as the router is powered on, it broadcasts a small packet into the air about every 0.1 seconds, called a beacon frame, which is called a beacon frame. If you don't give this package to others, then send it to everyone and to no one—whoever receives it will know. The phone lies motionless on a channel, waiting to receive the package. Once received, it means you know there's a router called ChinaNet-xxyy on this channel.

Active scanning means actively asking. The phone switched to a channel and shouted into the air, "Who's on this channel?" This packet called a probe request is called a probe request. Nearby routers hear this and reply, "I'm here, my name is something, I support certain speeds," and this response is called probe response. Answering every question is much faster than waiting to listen.

During the first

or two seconds your phone opens the list, it basically scan the path actively. So strictly speaking, the WiFi list isn't found by 'searching'—it's the phone knocking door to door to ask for it. The beacon frames broadcast by routers are mostly backup backup for devices that 'wait for a rabbit.'

The router's shout: the household registration book with WiFi inside the beacon frame

The

default interval for router broadcast beacon frames is 100 TU. TU is the unit of time in the WiFi standard; 1 TU equals 1024 microseconds, so 100 TU equals about 102.4 milliseconds. In other words, the router shouts "My name is this" into the air about 10 times per second, which is over 860,000 voices per day, year-round.

The thing in that voice is basically the WiFi household registration book

What phenomenon do the ? the WiFi name list, channel band to. . When . . Enter page, the small print Does it have a Mesh and . Is the temporary storage packet for the still receiving messages
you see infield
Name SSID, the line in
and frequency, which channel is operating onThe phone knows which channel to connect
Supported speeds range from low to highsignal is bad, know how low it can drop
Encryption method: WPA2 or WPA3the password
capability infoIs it WiFi 6?list? The 6 icon next to the name
the power-saving marksleeping devicepromptly after locking the screen
?

There's another thing it manages: the number of signal bars in the list. The router calls every 0.1 seconds, and the phone can always measure the signal strength when the packet arrives. The measured dBm reading is several dozen times negative, with the bars just converted to four or five bars. In my previous article about signaling, I mentioned that you can use anything below -60, but don't fantasize about anything beyond -70. That string of raw data is all packet counts from the beacon frame. If there's a corner of the house with weak signal, you can walk around with your phone. The actual method is 'collecting signal frames while walking' measurement. I wrote about this method in the blind spot self-check.

What was the phone busy with during those two seconds? Skipping through twenty or so channels one by

one

Active scanning sounds fast, but you still need to channel one channel at a time. 2. There are 13 channels in the 4G band, and about 13 commonly used 5G bands domestically, totaling over twenty. You can't scan all channels on your phone at once; you have to skip and scan: switch to channel 1, shout out loud, listen to the answer, switch to channel 6, shout again, listen again, and keep skipping.

How long you stay on each channel is important. The standard provides two numbers: the shortest wait time is about 10 to 20 milliseconds, and the maximum wait is about 100 milliseconds. After the phone shouted, press the shortest to wait. During this period, it was quiet with no response, indicating there was no router on the channel. Turning around, you just turned and left, not even a millisecond; If someone responds first, wait as long as possible and collect all the answers from all routers on this channel before leaving.

Once you do the math, it becomes clear: when there are many air channels, scanning is fast; when routers are dense, scanning is slow. The floor next to the hotel where I stayed is a shopping mall. Almost every 13 2.4G channels are occupied, and each channel takes about 100 milliseconds to fill up. Just the 2.4G cycle alone takes over a second, and with the dozen or so 5G channels, it's normal for the list to refresh in two seconds. If you live in an old neighborhood where your neighbor's router is packed with 2.4G, you can check out my post Bluetooth and WiFi squeeze 2.4G—the scene is like a dozen routers shouting ten times a second, and the air is quite lively.

By the way, why do 5G bands appear later in the list and sometimes can't be searched all? That's also the reason. The 5G channel number is similar to 2.4G, but 5G signals attenuate quickly. The voices from many routers separated by two walls are so weak that it's hard to hear clearly, and the phone needs multiple rounds to confirm. I've tested the differences in frequency bands in this article, How to choose between 2.4G and 5G, so I won't repeat it here.

Why can't hidden WiFi stop people: No name revealed, but if asked correctly, it still answers

This brings up an

old problem: routers hiding their SSID still send beacon frames every 0.1 seconds, but the name field is left blank. Scanning the phone list, you get a packet saying "There's WiFi but I don't know what it's called," which naturally doesn't show up in the list.

But the proactive scanning left a door. You can include your name in the detection request sent by your phone and ask: "Are you here, XXX?" The hidden router would answer as soon as it heard its name was asked. So the manual addition feature to hide WiFi is essentially the phone's code shouting the correct code for you. That's why I say hidden cameras can't stop experts. The bag-catching tool stays nearby, and when any connected device calls out its name, the bottom is exposed. If you really want it clean, changing the password to a longer password is much more useful than hiding it. I calculated this in the article hiding WiFi.

Beacon also helps save power on phones: DTIM is a large or small number

There's another inconspicuous category in the beacon frame: it controls the power consumption after the phone locks the screen, called DTIM. After connecting to WiFi, the phone doesn't keep listening intently. After locking the screen, it dozes off and wakes up every so often to check if the router's latest beacon frame contains any messages temporarily stored for you. The wake-up cycle is DTIM. Most routers default to 1 or 3, meaning waking up every 1 or 3 beacon cycles.

With this number increased, the phone sleeps more deeply and saves power. Some older routers can switch from 1 to 3, allowing the phone to last half a day longer in standby. But there is a cost: the multicast packets temporarily stored on the router have to wait until the phone wakes up before sending them. Casting and automatic printer detection—tasks that rely on multicast can become sluggish or even malfunctioning. What is multicast for? I've written about the principle of multicast > The

beacon interval itself can also be adjusted—from 100 milliseconds to 200 milliseconds, halving the overhead of the air, saving the router's own power, but the phone discovers new networks are slower and its roaming switching is sluggish. Unless your channel's channel is overcrowded, don't change either of these parameters.

Knowing this mechanism, you can judge three practical problems yourself

First: The list is blank, and you can't find a single WiFi device. Don't suspect your phone is broken. Android phones are bound to scanning WiFi and reading WiFi information, which has been restricted to location-related permissions. Without enabling location tracking, the system simply lets the scan return empty results. This pitfall is the same logic as enabling positioning in smart device network configurations. I wrote about this in detail in the article network setup. After activating the location and refreshing, most of them will appear.

Second: The list can't refresh with new names. The system cuts against app abuse scanning. If a front-end app repeatedly requests scanning in a short period, the system will directly reject it. Older versions of Android only scanned you four times in two minutes. Manually turning the WLAN switch off or off in Settings is a system action and is not restricted by this. Therefore, turning the "List Not Updated" switch on once is more effective than repeatedly pulling down.

Third: You see all the names in the list, but after connecting, you can't get online while spinning. That's a different matter. The phone's determination of "internet access" relies on secretly accessing a probe URL, which has nothing to do with scanning the list. I've broken down this detection mechanism, and in this post, connected to WiFi, it says internet access is unavailable.

Here's a checklist at the end:

: , scanning disabled, then turned off. The more it. . .
Where is the root cause of the problem? First action
list completely blanklocation permission blocked,WLAN
list takes one or two seconds to completethan twenty channels, asking questions one by one, normal Don't worry about
Sometimes a WiFi has no signal. Hang around the available edge to check the dBm reading. Don't linger over -70
Hidden WiFi can't find beacon frames without names, manually add them. Enter the correct name
Message delay after lockscreen If the power-saving cycle doesn't match the multicast DTIM, don't turn it up; reset to default

Behind a WiFi list are the router's ten door-to-door calls per second and the more than twenty phone channels knocking door-to-door. Next time I wait for the list to refresh at the hotel, my phone is busy for those two seconds, so wait a bit for it.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《The router registers every 0.1 seconds, and the WiFi list is obtained from the phone》
Article URL: https://www.shunot.com/en/lybk/1250.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow