The principles behind Wi-Fi revealed

Wi-Fi and 4G/5G cellular networks are the two most commonly used access methods when we surf the Internet. These two access methods do not seem to feel any difference when surfing the Internet at ordinary times. However, they are completely different design philosophies. The cellular network takes the base station as the center of the cell, and the base station undertakes the central control, user authorization, and scheduling of the cell.


Taking 5G as an example, the base station broadcasts the synchronization signal block SSB in each frame. The SSB includes parameters such as the PCI (Physical Cell Identifier) ​​of the cell, the synchronization time information of the base station, air interface information, and access control.


After confirming the synchronization signal, the mobile phone sends the access preamble sequence Preamble through the random access channel PRACH, so as to obtain the authorized access of the base station. Different users are distinguished by different ZC orthogonal sequences.


After access, the uplink and downlink time slots are allocated to the wireless channel (here, the TDD network is specifically referred to), and the base station and all terminals transmit or receive data within a fixed period of time. This design concept takes the base station as the center of the cell and adopts the design philosophy of central planning.


Wi-Fi networks are different


When designing Wi-Fi, the AP access point (where the function of the AP is equivalent to the base station in 5G) and the user terminal are considered in the same position. APs and terminals based on the 802.11 protocol use the carrier sense multiple access/collision avoidance (CSMA/CA) method to compete equally to occupy the wireless channel.


Between the AP and the terminal, and between the terminal and the terminal, wireless channel listening is performed first when accessing the network. Access the network while ensuring that the channel is not occupied. There is no hierarchy between devices, but the mode of self-coordinated competition for access is adopted to access the network.


In a sense, Wi-Fi networking is a decentralized design philosophy. These two design philosophies have their own merits.


The focus of cellular network consideration is the capacity and efficiency when multiple devices are connected. For Wi-Fi, due to its use of unlicensed spectrum and cost considerations, the design focuses more on features such as anti-interference and low cost.


Both schemes allow the channel to be fully utilized. Referring to the test results released by Aruba Networks, it can be seen that the spectrum utilization efficiency of LTE and Wi-Fi 6 at the MAC level is very close. In the case of single-stream and 256QAM, the spectrum utilization efficiency of more than 5Mbps/Hz can be achieved.

Comparison of spectrum efficiency between LTE and Wi-Fi
Comparison of spectrum efficiency between LTE and Wi-Fi

Access process and roaming


So, how does the Wi-Fi without central control cooperate to access it? The first step is to find a Wi-Fi network. Since the AP in the Wi-Fi network has no broadcast function, it is impossible for the terminal to know in advance whether there are available network resources and AP parameters. Here, the terminal uses an active probe method to make requests.


The endpoint will send a sequence of probes on the first 20MHz channel of the Wi-Fi and wait for the AP to respond. If the AP does not respond after 20ms, the terminal will switch to the next 20MHz channel and repeat the above actions until it receives the AP's response and confirms the AP's working frequency band and access parameters before it can access the network.

The process of the mobile phone actively scanning the probe to search for the channel
The process of the mobile phone actively scanning the probe to search for the channel

Writing here, you may think that if there are multiple Wi-Fi APs in the room when the user is moving and the terminal switches from one AP to another, does the above AP search process need to be repeated?


Each channel is 20ms. It takes a long time to search for a channel to get down. Will the connection be interrupted? Then how to ensure the communication quality of video conference or WeChat voice?


In today's offices and even many home wireless LANs, multi-AP mesh networking is used to improve network coverage performance.


It will be very inefficient if the above-mentioned active probe search channel process is repeated every time the terminal switches APs. Fortunately, the 802.11 working group took into account the issue of cell handover and developed the "Neighbor Report" protocol in 802.11k.


After the device is connected to the AP, the AP will send the BSSID and channel information of the nearby APs to the user. This way, users don't have to scan the channel again when they need to switch to another AP.


The advantage of this is that the switching time is greatly saved and the communication is not interrupted. The second is to save power for the user equipment, and the equipment no longer needs to send probes one by one. Third, the wireless channel has also been used more effectively, and the AP does not need to occupy the wireless channel frequently to continuously respond to the terminal's request.

The AP responds to the terminal equipment's neighboring AP information through the 802.11k protocol
The AP responds to the terminal equipment's neighboring AP information through the 802.11k protocol

Self-coordination, channel competition access, avoid collision


After accessing the network, APs and terminals begin to compete for the use of wireless channels. In the Wi-Fi system, the air interface time of the terminal and AP is uniformly divided into idle (Idle) and transmission opportunity (TXOP) periods. When there is no data, the device is idle and will not send any information.


When the device receives a data transmission request, the device begins to enter the "Arbitration" process of competing for the wireless channel. Without a central scheduler, all devices use a "fair race" mode to win channel arbitration according to data priority. The device that wins the channel will get a 6ms window of opportunity to send and then enter the next arbitration period.

Air interface time allocation in 802.11
Air interface time allocation in 802.11

The Wi-Fi device entering the arbitration process first turns on the channel listening mode, and the RF receiver monitors the 802.11 signal in the wireless channel (Signal Detection). If the detected signal strength is lower than its SD threshold (the Cisco solution in the figure below is an example, the threshold is -82dBm), the device determines that no other Wi-Fi device is currently using the channel.

Since the frequency band used by Wi-Fi is an unlicensed frequency band, it needs to be shared with non-802.11 devices, such as Bluetooth, remote control, microwave ovens, etc. Then, when judging the channel occupancy, it is not only necessary to monitor the signal of its own 802.11 protocol, but also to detect the power of the unknown communication protocol.


This leads to the second detection mechanism - Energy Detection.


The function of ED is to judge that the wireless channel is not occupied by other non-Wi-Fi devices and prevent the useful Wi-Fi signal sent from being drowned in noise. Usually, the threshold of ED is 20dB higher than that of SD.

SD, ED settings for Cisco wireless devices
SD, ED settings for Cisco wireless devices

Careful users may find that when the network environment is not good, the sound is often heard but the image is stuck during video calls. This is actually a transmission optimization measure of Wi-Fi to ensure the most basic services.


Wi-Fi classifies data into four different priorities, from top to bottom, Voice (VO), Video (VI), Best Effort (BE), and Background (BK). For each level, a different AIFS value is attached. The lower the AIFS value, the higher the sending priority.


After the AIFS time expires, the device enters the contention window (CW), the device starts to listen to the wireless channel, and at the same time starts the countdown to prepare for transmission.


When the CW countdown ends, if the device finds that the channel is occupied, the device will automatically enter the next arbitration period. If the device finds that the channel is idle, it starts to occupy the channel and sends data.


In the example shown in the figure below, in the first arbitration period, the CW time of the IPad is the shortest, the contention for the channel is successful, and the transmission right is obtained. After the IPad data is sent, a new round of arbitration begins. After the CW ends, the mobile phone finds that the channel is not occupied and obtains the right to send. In the end, the wireless AP wins the third round of arbitration and gets the right to send.

Multi-device channel competition process
Multi-device channel competition process

After reading this, you may find that the efficiency of this competitive process will be significantly reduced when the number of devices increases and the waiting time for each device to send will be much longer.


In actual experience, you may have noticed that in public environments with many Wi-Fi devices, such as shopping malls and schools, it often takes a long time to send or receive data.


Well, there's a good chance that the network hasn't been upgraded to the latest Wi-Fi 6.


Wi-Fi 6 is arguably the biggest revolution in the Wi-Fi industry over the past decade or so. What new features does Wi-Fi 6 use to solve the problem of network congestion under multiple devices? We will discuss it in the next article.

4 views0 comments

Recent Posts

See All