Sunday, November 6, 2011

Clear Channel Assessment and Details on Carrier Sense



Now that we've covered the preamble, you can begin to understand what the term carrier sense would mean in wireless.
The term clear channel assessment (CCA) represents how a radio determines if the air is clear or occupied. Informally, this is referred to as carrier sense. As mentioned previously, transmitters are required to listen before they transmit, to determine whether someone else is also speaking, and thus to help avoid collisions.
When listening, the receiver has a number of tools to help discover if a transmission is under way. The most basic concept is that of energy detection. A radio can figure out whether there is energy in the channel by using a power meter. This power meter is usually the one responsible for determining the power level, often stated as the Receive Signal Strength Indication (RSSI) of a real signal. When applied to an unoccupied channel, the power meter will detect the noise floor, often around 95dBm, depending on the environment. However, when a transmission is starting, the power meter will detect the signal being sent, and the power level measured will jump—let's say, to 70dBm for this example. That difference of 25dB can be used by the radio to clue in that it should attempt to turn on its modem and seek out the preamble. This allows the radio to have its modem off until real signals come by.
Energy detection can be used as a form of carrier sense to trigger the CCA. When done that way, non-802.11 noise that crosses a certain threshold, determined by the radio, will show up as an occupied channel for as long as the noise is present. This allows the radio to avoid transmitting into a channel at the same time as interference is present. In the 2.4GHz band, microwave ovens can often trigger the energy detection thresholds on radios, causing the radios to stop transmitting at that time.
On the other hand, energy detection for CCA has its limitations. If the noise coming in is something that would not interfere with the transmission, but does trip the energy detection threshold, then airtime is being wasted. Therefore, the carrier acquisition portion of CCA comes into play. Radios know to look for specific bit patterns in a transmission, such as the preamble. When they detect these bit patterns, they can assert CCA as well. Or, more importantly, when they detect some energy in the channel but cannot detect these bit patterns, they can conclude that there is no legitimate 802.11 signal and suppress CCA.

Thursday, November 3, 2011

Preambles | Wi-Fi's Approach to Wireless



Because 802.11 allows transmitters to choose from among multiple data rates, a receiver has to have a way of knowing what the data rate a given frame is being transmitted at. This information is conveyed within the preamble (see Figure 1).

 
Figure 1: 802.11 Preambles Illustrated
The preamble is sent in the first few microseconds of transmission for 802.11, and announces to all receivers that a valid 802.11 transmission is under way. The preamble depends on the radio type, but generally follows the principle of having a fixed, well-known pattern, followed by frame-specific information, then followed by the actual frame. The fixed pattern at the beginning lets the receiver train its radio to the incoming transmission. Without it, the radio might not be able to be trained to the signal until it is too late, thus missing the beginning of the frame. The training is required to allow the receiver to know where the divisions between bits are, as well as to adjust its filters to get the best version of the signal, with minimum distortion. The frame-specific information that is included with the preamble (or literally, the Physical Layer Convergence Procedure (PLCP) following the preamble, although the distinction is unnecessary for our purposes) names two very important properties of the frame: the data rate the frame will be sent at, and how long the frame will be.
All preambles are sent at the lowest rate the radio type supports. This ensures that no matter what the data rate of the packet, every radio that would be interfered with by the transmission will know a transmission is coming and how long the transmission will last. It also tells the receiver what data rate it should be looking for when the actual frame begins. All devices within range of the transmitter will hear the preamble, the length field, and the data rate. This range is fixed—because the preamble is sent at the lowest data rate in every case, the range is fixed to be that of the lowest data rate. Note that there is no way to change the data rate at which the preamble is sent. The standard intentionally defines it to be a fixed value—1Mbps for 802.11b, and 6Mbps for everything else.
When a radio hears a preamble with a given data rate mentioned, it will attempt to enable its modem to listen for that data rate only, until the length of the frame, as mentioned in the preamble, has concluded. If the receiver is in range of the transmitter, the modem will be able to properly detect the frame. If, however, the receiver is out of range, the receiver will hear garbage. The garbage will not pass the checksum (also garbage), and so will be discarded.
To prevent radios from interpreting noise as a preamble, and locking to the wrong data rate for a possibly very long length, the frame-specific information has its own checksum bit or bits, depending on the radio type. Only on rare occasions will the checksum bit fail and cause a false reception; thus, there is no concern for real deployments.
In summary, a receiver then works by first setting its radio to the lowest common denominator: the lowest data rate for the radio. If the fixed sequence of a preamble comes in, followed by the data rate and length, then the radio moves its modem up to the data rate of the frame and tries to gather the number of bits it calculates will be sent, from the length given. Once the amount of time necessary for the length of the frame has concluded, the radio then resets back to the lowest data rate and starts attempting to receive again.

Saturday, October 29, 2011

Data Rates | Wi-Fi's Approach to Wireless



A data rate, in 802.11, is the rate of transmission, in megabits per second (Mbps) of the 802.11 header and body. The 802.11 MAC header, the body, and the checksum (but not the physical layer header) are transmitted at the same data rate within each frame.
A data rate represents a particular encoding scheme, or way of sending bits over the air. Each data rate can be thought of as coming from its own modem, designed just for that data rate. An 802.11 radio, then, can be thought of has having a number of different modems to chose from, one for each data rate. (In practice, modern radios use digital signal processing to do the modulation and demodulation, and therefore the choice of a modem is just the choice of an algorithm in microcode on the radio or software used to design the radio itself.)
Each data rate has its own tradeoff. The lowest data rates are very slow, but are designed with the highest robustness in mind, thus allowing the signal to be correctly received even if the channel is noisy or if the signal is weak or distorted. These data rates are very inefficient, in both time and spectrum. Packets sent at the lowest data rates can cause network disruption, as they occupy the air for many milliseconds at a time. Although one millisecond sounds like a short amount of time, if each packet were, say, ten milliseconds long, then the highest throughput an access point could get would be less than 1.2Mbps for 1500-byte packets.
The higher data rates trade robustness for speed, allowing them to achieve hundreds of megabits per second. The description of the 802.11 radio types will walk through the principles involved in packing more data in. Occasionally, someone may mention that this effect is related to Shannon's Law. Shannon's Law states that the maximum amount of information that can be transmitted in a channel increases logarithmically with the signal-to-noise ratio. The stronger the signal is than the noise floor, the faster the radio can transmit bits. Lower data rates do not take advantage of high SNRs as well as higher data rates do. As data rates go higher, the radios become increasingly optimistic about the channel conditions, trying to pack more bits by making use of the higher fidelity that is possible. That higher fidelity is held to a smaller distance from the radio, and so higher data rates travel less far. (But note that 802.11 uses a concept to ensure that every device within the longest range knows of a transmission, no matter what the data rate is.) Think of it as saying that the amount of available "space" in a channel is determined by the SNR. More SNR means that more bits can be packed, by reducing the "space" between bits. Of course, the smaller the "space" between bits, the harder it becomes to tell the bits apart.

Wednesday, October 26, 2011

RF Planning | RF Primer



RF planning is designed to address the two problems of multicellular networks. The first problem is to ensure that the coverage levels within the network are high enough that the expected data rates, based on the minimum required signal to noise ration, can be achieved at every useful square foot of the building or campus environment. The second problem is to avoid the intercell interference which results from multiple devices transmitting on the air without mitigation.
Proper RF planning is an expensive, time-consuming process. The basics of RF planning are for the installers to predict what the signal propagation properties will be in the expected environment. This sort of activity always requires using sophisticated RF prediction tools. RF prediction tools operate by requiring the operator to designate the locations and RF properties—attenuation, mostly—of each physical element in the building, the furniture, the walls, the floors, and the heavy machinery. Clearly a laborious process, the operator must copy in the location of these elements one at a time. Some tools are intelligent enough to take CAD drawings or floor-plan maps and estimate where the walls are, but an operator is required to verify that the guesses are not far from reality. RF planning tools then use RF calculations, based on electromagnetic principles, to determine how much the signal is diminished or attenuated by the environment. The planning tools need to know the transmit power capabilities and antenna gains of all of the access points that will be deployed in the network.
RF planning can be used this way to assist in determining where access points ought to be located, to maximize coverage given the particular SNR requirements. Because RF planning uses exact equations to predict the effects of the environment, it can be only as good as the information it is given. Operators must enter the exact RF and physical properties of the building to have a high likelihood of getting an accurate answer. For this reason, RF planning suffers from the garbage-in-garbage-out problem. If the operator has uncertainty about the makeup of the materials in the building, then the results of the RF plan share the same uncertainty.
Furthermore, RF planning cannot predict the effects of multipath. Multipath is more crucial than ever in wireless networking, because the latest Wi-Fi radios take advantage of that multipath to provide services and increase the data rate. Not being able to predict multipath places a burden on RF planning exercises, and requires RF planners to look for the worst-case scenarios.
Using RF planning tools to determine what power levels or channel settings each access point takes, then, is not likely to be a successful proposition as the network usage increases. Unfortunately, Wi-Fi self noise is a problem that does not show itself until the network is being heavily used, at which point it shows with vigor. Until then, as the network is just getting going, self noise will not be present at high levels and will not occupy 100% of the airtime. Thus, network administrators will see early successes with almost any positioning of Wi-Fi equipment, and can gain a false sense of security. (It is important to note that this is a property of trying to predict how RF propagates. Tools or infrastructure that constantly monitor and self-tune suffer the same problems, but with the added wrinkle that the self-tuning is disruptive, and yet will be triggered when the noise increases and the network needs to be disrupted the least.)
The one place where RF planning shows strength is in determining a rough approximation of the number and position of access points that are needed to cover a building. This does not require the sort of accuracy as complete RF plan, and tends to work well because of the fact that Wi-Fi networks are planned for a much higher minimum SNR than is necessary to cover the building. That higher SNR is required, however, to establish a solid data rate, and so what appears to be padding or overprovisioning from a coverage point of view can be lost capacity from a data rate point of view. Nonetheless, determining the rough number of access points needed for large deployments is a task that can do with some automation, and RF planning tools used only to plan for coverage (and not for interference), can be reasonably effective—even more so if the infrastructure that is deployed is able to tolerate the co-channel interference that is generated.

Monday, October 24, 2011

Channels | RF Primer



One Wi-Fi radio does not occupy the entire unlicensed spectrum, unlike frequency-hopping technologies such as Bluetooth. 802.11 divides up the spectrum into a number of different channels. Channels are named with whole numbers, assigned by a formula to specific center frequencies for the channels. The idea behind small number of discreet channels is to carve up the spectrum, helping pack in as many devices as possible and avoiding requiring clients to have to tune in across a wide range of frequencies, the way that analog car radios must.
The channel numbers are somewhat arbitrary, and are arranged to let you know what band they occupy. Different 802.11 radio types allow for different channel selections.
The two key properties that define how the 802.11 radio uses the spectrum are its center frequency and bandwidth. The center frequency is the one the radio uses to determine where to look for the transmissions. This concept is similar to car radios: FM channel 97.3 means that the radio tunes its center frequency to 97.3MHz. Unfortunately, Wi-Fi channels do not convert as neatly to their center frequencies. Because of this, many people and tools will either interchangeably use the center frequency or the channel number to describe the channel. Wi-Fi uses center frequencies that are always in the gigahertz range. The bandwidth tells which other frequencies are occupied by a transmission. 802.11 radios used for mobility primarily have 20MHz bandwidth, except for 802.11n radios, which can also use 40MHz bandwidths. The channel and bandwidth together show which part of the spectrum the radio occupies. Although the different 802.11 radio types may fill the carved-out part of the spectrum differently, the amount that is carved out is roughly the same for the same bandwidth. Figure 1 sketches the general concept.

 
Figure 1: Shape of 802.11 Frequency Occupation
Table 1 lists the channels and what radio types can use them.
Table1: 802.11 Channels 
Channel
Frequency
US Band
11b, 11g
11a
11n
Notes
1
2.412GHz
ISM 2.4
 
Nonoverlapping
High power: 1 W maximum.
2
2.417GHz
 
 
  
3
2.422GHz
 
 
  
4
2.427GHz
 
 
  
5
2.432GHz
 
 
  
6
2.437GHz
 
 
Nonoverlapping
 
7
2.442GHz
 
 
  
8
2.447GHz
 
 
  
9
2.452GHz
 
 
  
10
2.457GHz
 
 
  
11
2.462GHz
 
 
Nonoverlapping
 
12
2.467GHz
 
 
Europe, Japan, Australia. No U.S. or Canada
 
13
2.472GHz
 
 
  
14
2.484GHz
 
11b only
  
Japan only. Channel 14 does not follow the channel to frequency formula.
 
36
5.18GHz
U-NII 2 Lower
 
Indoor use only. Low power: 40 mW maximum
 
40
5.20GHz
  
  
44
5.22GHz
  
  
48
5.24GHz
  
  
52
5.26GHz
U-NII 2 Upper
 
Non-DFS for equipment before July 2007
Radar detection and dynamic frequency selection (DFS) required
56
5.28GHz
  
  
60
5.30GHz
  
  
64
5.32GHz
  
  
100
5.50GHz
U-NII 2 Extended
 
  
104
5.52GHz
  
  
108
5.54GHz
  
  
112
5.56GHz
  
  
116
5.58GHz
  
  
120
5.60GHz
  
U.S., Europe, and Japan. No Canada, because of weather radar.
 
124
5.62GHz
  
  
128
5.64GHz
  
  
132
5.66GHz
  
  
136
5.68GHz
  
  
140
5.70GHz
  
  
149
5.745GHz
U-NII 3
 
U.S, Canada and Europe. No Japan
High power
153
5.765GHz
  
  
157
5.785GHz
  
  
161
5.805GHz
  
  
165
5.825GHz
ISM 5.8
 
U.S., Canada and Europe. No Japan.
High power
The formula for the channels to frequencies is 2.407GHz + 0.5GHz * channel for the 2.4GHz band, and the simpler to remember 5GHz + 0.5GHz * channel for the 5GHz band. The only channels that are in the 2.4GHz band are channels 1-14. Everything else is in the 5GHz band. Therefore, channel 36 is 5.18GHz, and channel 100 is 5.50GHz.
The total number of channels is large, but many factors reduce the number that can be practically used. First to note is that the 2.4GHz band, where 802.11b and 802.11g run, only has three nonoverlapping channels (four in Japan) to choose from. Unfortunately, the eleven channel numbers available in the United States gives the false impression of 11 independent channels, and to this day there exist some Wi-Fi deployments that mistakenly use all 11 channels, causing an RF nightmare. To avoid overlapping channels, adjacent channel selections need to be four channel numbers apart. Therefore, channels 1 and 5 do not overlap. In the 2.4GHz band, custom usually spreads the channels out even a bit further, and using only channels 1, 6, and 11 is recommended. The authors of the standard recognized the problem the overlap causes, and, for the 5GHz band, disallowed overlap by preventing devices from using the intermediate channels. Therefore, no channels in the 5GHz band overlap, when it comes to 20MHz channels.
The unlicensed spectrum was originally designed for, and still is allocated to, other uses besides Wi-Fi. The 2.4GHz band was created to allow, in part, for microwave ovens to emit radio noise as they operate, as it is impractical to completely block their radio emissions. Because that noise prevented being able to provide the protections from interference that licensed bands have, the regulatory agencies allowed inventors to experiment providing other services in this band. And so began 802.11. The 5GHz band is, in theory, more set aside from radiation. Except for the top 5.8GHz ISM band, the 5GHz range was designed for communications devices. However, interference still exists. One primary source, and the one important from a regulatory point of view, is radar. Radars operate in the same 5GHz band. Because the radars are given priority, Wi-Fi devices in much of the 5 GHz band are required to either be used indoors only, or to detect when a radar is present and shut down or change channels. This last ability is known asdynamic frequency selection (DFS). This is not a feature or benefit, per se, but a requirement from the various governments. DFS complicates the handoff process significantly