6. Wi-Fi Fundamentals: MAC Medium Sensing

 

6. Wi-Fi Fundamentals: MAC Medium Sensing



17.12.2018

Wi-Fi Fundamentals: MAC Medium Sensing – Video: Register for Course


Wi-Fi Fundamentals: MAC Medium Sensing – Transcript:

What will you learn

802.11 Scheme

[Priority in this slide does not refer necessairly to the QoS priority, but rather to the user/control traffic, in case of which control has higher priority (CTS, ACK). Of course in case of QoS the same rule is applied – longer delay =  lower prority]

Carrier Sensing

Since we know that Wi-Fi MAC layer is based on avoiding collisions we must know if medium is idle. To know that we must perform some kind of carrier sensing mechanism. There are two groups of mechanisms CCA and NAV. CCA have two variants – ED and CS.

CCA Energy

CCA-ED measures power of the EM wave reaching the antenna. If the power exceeds some predefined threshold medium is considered as busy. Otherwise it is indicated as idle. This means that medium can be busy by any kind of transmission, not only Wi-Fi like, or interference. This means that nearby working microwave can make our medium busy.

CCA Carrier SEnse

Carrier sense is a little more complex method. It not only receives signal but also analyzes it. Received symbols are changed to bits and decoded. PLCP Header contains different control fields. Among tchem there is a LENGTH field, which indicates the lengths of the message . From this we know for how long, measured in ms, the medium will be busy. This field is filled by the transmitter, since it knows how much data it must send and what settings it uses (modulation, data rate etc). From all these informations it can caluclate time required for sending current set of bits. Different devices after reading this field might go in the „sleep” mode and not perform carrier sensing for the next X ms, as they are sure, the medium will be busy.

Clear Channel

Why do we need another method?

Battery savings in mobile devices.

CCA-CS seems like an answer to this issue, but it is vulnerable to different problem, namely hidden node.

Let’s imagine a following scenario:

There are two STAs and an AP. STA1 and STA2 can hear AP and vice versa. What is important is that STA1 does not hear STA2, and STA2 does not hear STA1.

If STA1 transmits the data to the AP, STA2 doesn’t hear it, so from the channel sensing it can deduce, that channel is idle. If it starts the transmission, the reception of both signals from STA1 and STA2 will fail in AP.

Network Allocation Vector

CCA-ED measures power of the EM wave reaching the antenna. If the power exceeds some predefined threshold medium is considered as busy. Otherwise it is indicated as idle. This means that medium can be busy by any kind of transmission, not only Wi-Fi like, or interference. This means that nearby working microwave can make our medium busy.

Medium Sensing

To better understand what is NAV lets compare it with CS. CS operates on PHY layer and indicates duration of single frame. NAV on the other hand is MAC layer mechanism, that shows duration of whole sequence.

Take a look on the exemplary frame exchange between two devices. First the devices can exchange some control messages to agree on some transmission parameters or ask for a permission to transmit. The CCA-CS shows busy time only during the transmission of particuar frame. So if the device performs CCA during first control message it must repeat it shortly after it ends, because it does not have information about what will be transmitted next. NAV however indicates duration of the whole sequence. So  from reading NAV duration field, device knows that the transmission will last until the ACK is received, which will take eg. 100 ms.

Additionally if the device hears only destination, but not source, channel might seem idle while the data is transmitted. Using NAV from control message it knows that the medium is busy, even if it cannot hear that transmission itself.

Clear Channel Assesment

There is also another challenge in CCA. So called exposed node problem. Imaginge two STA and two AP. They have different SSIDs, and each STA is connected to one AP. So AP1 and STA1 are mutually in range, STA2 and AP2 are also mutually in range. If they would be far away they could easily coexist. But, if there is an ufortunate case, where STA1 and STA2 are also mutually in range, following scenario can happen:

STA1 transmits to the AP1 – just regular transmission between STA and AP. What is unlucky here is STA2 also hears this transmission. Performing ED or CS indicates medium busy, so the STA2 delays its transmission. But the medium between STA2 and AP2 is available (idle), so the transmission is possible from this point of view. This decreases the performance of the system, as the medium is not utilized as efficently, as it could be. This can be prevented by analyzing the Source and Destination fiels in headers, but in practeice it is not performed.

RTS CTS

Earlier we showed that before actual data transmission, some control messages can be exchaned. These are RTS/CTS pair. This mechanism allows to quickly exchange short messages in order to agree for a longer transmission of a large chunk of data. Moreover it helps to deal with hidden node problem, because both RTS and CTS contain information about whole frame exchange duration.

Carrier Sensing Nav

All three methods are used in Wi-Fi to determine if the medium is idle or busy. As Wi-Fi is a „good neighbor” it cannot disturb other systems, so it cannot rely solely on preambles decoding and information contained in 802.11 headers. Therefor simple Energy detection is used. This however would require constant sensing, which is power consuming. To answer this issue there are two predictive techniques (which show that medium will be busy for specific time in the feature). This provides possibility to „disable” Energy detection during that time.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code


 

Newsletter