Chapter 1. Introduction to Wireless

Wireless networks use radio waves to move data without wires and they have been around in one form or another for decades. Teletype, or telex, systems were established worldwide in the early 1920s. These systems used copper lines to connect two or more teletype machines. Government investments in military radios lead to innovations in radio; teletype over radio (TOR), or radioteletype , replaced many teletype systems, particularly in third-world countries that lacked copper-wire infrastructures. In many parts of the world, TOR is still used as the primary communications medium for governments. TOR uses the high frequency (HF) radio band. We’ll cover the types of radio bands later in this chapter.

In 1970, Norm Abramson, a professor of engineering at the University of Hawaii, developed a radio-based communications system known as ALOHANET. This was the world’s first wireless packet-switched network, which allows multiple devices to transmit and receive data simultaneously. The research behind ALOHANET was used by Bob Metcalfe to develop the Ethernet standard for wired networking.

Presently, there are many types of wireless networks in use around the world. The 802.11 protocol set, popularly known as Wi-Fi, includes wireless network standards that allow data transmission up to a theoretical 54 Mbps. The Global Positioning System (GPS) uses a wireless connection from a receiver to a series of satellites to fix a location precisely on the planet. There are several wireless networking standards in the mobile-phone world, including General Packet Radio Service (GPRS) and Code Division Multiple Access (CDMA) 1xRTT (1x Radio Transmission Technology). Subsequent chapters will discuss all of these in detail.

Radio Waves

Radio waves are created when electrically charged particles accelerate with a frequency that lies in the radio frequency (RF) portion of the electromagnetic spectrum. Other emissions that fall outside of the RF spectrum include X-rays, gamma rays, and infrared and ultraviolet light. When a radio wave passes a copper wire or another electrically sensitive device, it produces a moving electric charge, or voltage, which can be transformed into an audio or data signal.

Radio waves can be depicted mathematically as a sinusoidal curve, as shown in Figure 1-1.

A sine wave representing a radio wave
Figure 1-1. A sine wave representing a radio wave

The distance covered by a complete sine wave (a cycle) is known as the wavelength . The height of the wave is called the amplitude . The number of cycles made in a second is known as the frequency . Frequency is measured in Hertz (Hz), also known as cycles per second. So, a 1 Hz signal makes a full cycle once per second. You should be familiar with this unit of measurement: if your new computer’s CPU operates at 2 GHz, the internal clock of your CPU generates signals roughly at two billion cycles per second.

Tip

Note that frequency is inversely proportional to the wavelength: the longer the wavelength, the lower the frequency; the shorter the wavelength, the higher the frequency. The wavelength of a 1 Hz signal is about 30 billion centimeters, which is the distance that light travels in one second. A 1 MHz signal has a wavelength of 300 meters.

Radio Frequency Spectrum

To regulate the use of the various radio frequencies, the Federal Communications Commission (FCC) in the United States determines the allocation of frequencies for various uses. Table 1-1 shows some of the bands defined by the FCC (see http://www.fcc.gov/oet/spectrum/table/fcctable.pdf).

Table 1-1. Range of frequencies defined for the various bands

Frequency

Band

10 kHz to 30 kHz

Very Low Frequency (VLF)

30 kHz to 300 kHz

Low Frequency (LF)

300 kHz to 3 MHz

Medium Frequency (MF)

3 MHz to 30 MHz

High Frequency (HF)

30 MHz to 328.6 MHz

Very High Frequency (VHF)

328.6 MHz to 2.9 GHz

Ultra High Frequency (UHF)

2.9 GHz to 30 GHz

Super High Frequency (SHF)

30 GHz and higher

Extremely High Frequency (EHF)

You can get a more detailed frequency allocation chart from http://www.ntia.doc.gov/osmhome/allochrt.pdf. The following conversion list should help you understand this chart:

  • 1 kilohertz (kHz) = 1,000 Hz

  • 1 megahertz (MHz) = 1,000 kHz

  • 1 gigahertz (GHz) = 1,000 MHz

Wireless networks use a variety of radio frequencies. Table 1-2 shows some common wireless network protocols and the corresponding radio frequencies.

Table 1-2. Frequencies used by various wireless networks

Frequency range

Wireless network

2.4 to 2.483 GHz

Bluetooth

2.4 to 2.483 GHz

802.11, 802.11b, 802.11g

5.180 GHz to 5.805 GHz

802.11a

1.2276 and 1.57542 GHz

GPS

Radio Wave Behavior

Radio waves, similar to light waves, exhibit certain characteristics when coming into contact with objects.

Reflection occurs when a radio wave hits an object that is larger than the wavelength of the radio wave (see Figure 1-2). The radio wave is then reflected off the surface.

Reflection of a radio wave
Figure 1-2. Reflection of a radio wave

Refraction occurs when a radio wave hits an object of a higher density than its current medium (see Figure 1-3). The radio wave now travels at a different angle—for example, waves propagating through clouds.

Refraction of a radio wave
Figure 1-3. Refraction of a radio wave

Scattering occurs when a radio wave hits an object of irregular shape, usually an object with a rough surface area (see Figure 1-4), and the radio wave bounces off in multiple directions.

Scattering of a radio wave
Figure 1-4. Scattering of a radio wave

Absorption occurs when a radio wave hits an object but is not reflected, refracted, or scattered. Rather, the radio wave is absorbed by the object and is then lost (see Figure 1-5).

Absorption of a radio wave
Figure 1-5. Absorption of a radio wave

Diffraction occurs when objects block a radio wave’s path. In this case, the radio wave breaks up and bends around the corners of the object (see Figure 1-6). This property allows radio waves to operate without a visual line of sight.

Diffraction of radio waves
Figure 1-6. Diffraction of radio waves

Connections Without Wires

There are many types of wireless networks, such as Cellular (wide-area wireless networking), Wi-Fi (local and wide area wireless networking), and Bluetooth (cable-replacement and short-range wireless networking). All of these networks run with Linux. Here is a list of tasks you can complete with Linux and wireless networks:

  • Build your own wireless access point. At home, use a Linux box as your wireless access point and secure firewall for a broadband connection, and use a Linux notebook as a wireless client. To control who uses your access point, build a captive portal. It’s also possible that your broadband connection is wireless and uses a point-to-point directional wireless network.

  • Synchronize your contacts. At the office, keep your contacts list from your Linux desktop synchronized with your cell phone using Bluetooth or an infrared port.

  • Use a cellular network and GPS for the ultimate road warrior experience. On the road, use your Linux-powered PDA to check email from a wireless hotspot. Connect your cell phone and laptop, and use a high-speed data network where there is a digital cell signal. Hook a GPS receiver to your laptop and find that out-of-the-way hotel.

Wireless Alphabet Soup

While it is not the sole focus of this book, there are several chapters that deal entirely with “Wi-Fi,” or Wireless Fidelity . This phrase is trademarked by the Wi-Fi Alliance, a group that consists of nearly all 802.11 manufacturers. The Wi-Fi Alliance does product testing and certification for interoperability.

802.11 was defined as a protocol by the Institute of Electrical and Electronics Engineers (IEEE) in 1997. This protocol specification allowed for 1 and 2 Mbps transfer rates using the 2.4 GHz ISM (Industrial, Scientific, and Medical) band, which is open to unlicensed public use. Prior to the adoption of this standard, there were various wireless network vendors manufacturing proprietary equipment using both the 2.4 GHz and the 900 MHz bands. The early adopters of the proprietary technologies and 802.11 were primarily the manufacturing and health care industries, which rapidly benefited from their employees’ mobile access to data. The 802.11 standard uses spread spectrum modulation to achieve high data rates. Two types of modulation were specified: Frequency Hopping and Direct Sequence. 802.11 also uses the Carrier Sense Multiple Access (CSMA), which was developed for Ethernet in 1975 with the addition of Collision Avoidance (CA)—referred to as CSMA-CA.

In 1999, the IEEE adopted two supplements to the 802.11 standard: 802.11a and 802.11b. The 802.11b standard is also referred to as High Rate DS and is an extension of the Direct Sequence Spread Spectrum type of modulation specified in 802.11. 802.11b uses 14 overlapping, staggered channels, each channel occupying 22 MHz of the spectrum. This standard’s primary benefit is that it offers data rates of 5.5 and 11 Mbps in addition to the 12 megabits provided by 802.11. 802.11b has been widely adopted around the world, and its products have been readily available since 1999.

However, 802.11a products did not begin shipping until 2001. 802.11a utilizes a range in the 5 GHz frequency and operates with a theoretical maximum throughput of 54 Mbps. It provides for 12 nonoverlapping channels. Products based on this protocol have not seen the adoption rate of 802.11b products for several reasons. At higher frequencies, more power is needed to transmit. The power of 802.11 radio types is limited; therefore, 802.11 and 802.11b have longer range transmission and reception characteristics than 802.11a. Because of its higher frequency, 802.11a is absorbed more readily by obstacles, reducing range and throughput.

In June of 2003, the IEEE ratified a third supplement to the 802.11 standard: 802.11g. This standard continues to operate in the 2.4 GHz band with backward compatibility to 802.11b, but it raises the theoretical maximum throughput to 54 Mbps. In early 2003, there were many products released prior to the ratification of the standard. The standard was delayed several times as the subcommittees in the IEEE worked out interoperability issues between 802.11b and 802.11g.

Operating Modes

There are two main client operating modes in the 802.11 family of standards: Infrastructure and Ad-Hoc. Two additional modes, Master and Monitor, are discussed in later chapters.

Infrastructure Mode requires the use of a wireless access point. At a minimum, this is a device with a radio that operates in Infrastructure Mode and has a connection to a wired network. This is also known as the Basic Service Set (BSS). There is also an Extended Service Set (ESS) for use with multiple access points.

A typical 802.11b access point consists of a radio, external antenna, and at least one Ethernet port. There are many variations on this theme, with models sporting 4-port Ethernet switches, connectors for other external antennas, and higher-power radios.

When operating in Infrastructure Mode, an access point is the master of any client radios that are associated with the access point. The client radios are also operating in Infrastructure Mode, in a different sub-mode. The access point is programmed with a Service Set Identifier (SSID); this is the network name for the access point. The access point broadcasts the SSID as an advertisement of the network name.

Clients operating in Infrastructure Mode identify an access point by these SSID broadcast frames. Once a client is associated with an access point, the access point manages all communication over the radio link. When multiple clients are associated with a single access point, the access point has a set of algorithms for controlling traffic to and from the access point radio.

Ad-Hoc Mode , or peer-to-peer mode, is designed specifically for client-to-client communication. To use Ad-Hoc Mode, you need at least two radio clients. In this example, let’s say we have two Linux notebooks with PCMCIA radio cards. Both cards are configured to work in Ad-Hoc Mode, and both clients must use the same SSID. Ad-Hoc clients do not advertise themselves with the same broadcast frames used by an access point.

While Ad-Hoc Mode is very useful for client-to-client communication, it introduces a difficult situation known as the Hidden Node problem. Ad-Hoc Mode does not provide an access point to control communications between other client machines, so any client using Ad-Hoc Mode may decide to transmit data on its own rather than being told when it is clear to transmit. Figure 1-7 illustrates the problem.

A Hidden Node problem with three clients in Ad-Hoc Mode
Figure 1-7. A Hidden Node problem with three clients in Ad-Hoc Mode

As shown, node A can hear node B, but it cannot hear node C. Node C can also hear node B, but it cannot hear node A. Because 802.11 is a shared-access physical medium, only one device can transmit at any given time. The Hidden Node problem is that node A and node C cannot hear each other, and neither node will detect a collision. Hidden Node issues reduce throughput in this example by at least 50%.

Wi-Fi Hardware

As discussed previously, to make a Wi-Fi network, you need a minimum of two radios, whether you operate in Ad-Hoc or Infrastructure Mode. For PC hardware, there are three physical types of radio interface cards available: PC Card, PCI, and MiniPCI.

Of the three, the PC Card is by far the most common, because notebook PCs are widely deployed, and most have at least one card slot; notebook users are the most common users of 802.11 networks.

MiniPCI cards are the up-and-coming form factor. Many notebook manufacturers have built MiniPCI cards into their motherboards, which enables you to install network cards without using a PC Card slot.

At one time, PCI cards were not as common as the other types of radios, but they are staging a comeback with new offerings from Linksys and D-Link. Many manufacturers, such as Linksys and D-Link, produce some PCI cards now, which actually consist of a MiniPCI or PCMCIA card on a larger PCI card.

There is a fourth option for a growing number of notebook and PDA users: built-in Wi-Fi. Intel is marketing their Centrino chipset that integrates an 802.11b radio on the motherboard, and most notebook manufacturers offer Centrino notebooks. Similarly, other CPU manufacturers such as Via will be integrating wireless into their chipsets. Finally, there are a number of notebook and PDA models that feature built-in radios. Sony, for example, sells a Vaio notebook with an Orinoco radio built in and also sells the Clie handheld PDAs with optional Wi-Fi.

As of this writing, more and more dual- and tri-mode cards are available. These cards allow you to access 802.11a/b/g networks with a single radio. The maker of a radio chipset decides the level of support—as of this writing, support for these cards is still in flux under Linux. We’ll cover this in more detail in the next chapter.

Wireless access points are also available now in dual- and tri-mode. There is a wide range of access points on the market, which range from units geared specifically for home users with built-in firewalls, 4-port switches, and web-based configuration to models aimed at the corporate market with support for authentication protocols such as RADIUS and LDAP, the ability to run via Power Over Ethernet (POE), and connectors for external antennas.

Another category of access point is the "hotspot in a box.” With the rising popularity of Wi-Fi hotspots in cafes, hotels, and airports, many manufacturers have developed access points that are an all-in-one solution. These boxes provide the radio and Ethernet of a normal access point, but also have some form of authentication and payment system, which range from a web-based login to a printed coupon that the store clerk delivers to the customer.

Antennas

Although a discussion of the physics of antennas is beyond the scope of this book, antennas are obviously a very important part of any radio. Depending on the type of antenna, radio coverage is narrowly focused or widely distributed, which makes a great deal of difference when building or connecting to 802.11 networks.

Briefly, antennas are transducers that convert radio frequency electric currents to electromagnetic waves that are then radiated into space. Antennas are polarized according to the plane of the electric field radiating from the antenna. A vertically polarized antenna has an electric field that is perpendicular to the Earth’s surface. Likewise, the electric field of a horizontally polarized antenna is parallel with the Earth’s surface.

There are several types of antennas used for Wi-Fi networks. The most common antenna is the integrated antenna, followed by omnidirectional and directional antennas

Integrated antennas

Most PC Card radios have integrated antennas inside the enclosure of the card. A typical integrated antenna design has two very small antennas—really just a solder trace or small piece of foil—located at right angles to each other for diversity. Diversity antennas are designed so that one antenna or the other is used to transmit and receive, but never at the same time. The card switches automatically between antennas to choose the stronger signal. The antennas are horizontally polarized, and this layout produces an antenna that has a somewhat omnidirectional pattern in a horizontal beam.

Omnidirectional antennas

If you have a radio card or access point with a single external antenna attached, you are likely looking at an omnidirectional, or omni, antenna. Omnidirectional antennas, as the name implies, are designed to send and receive signals 360 degrees around the antenna. Figure 1-8, which is a sample antenna gain pattern for a commercially produced omnidirectional antenna, shows that the 360-degree pattern is not circular at all. Notice that the antenna has pronounced gain at 0 and 180 degrees, but hardly any gain at 90 and 270 degrees.

A sample omnidirectional antenna gain pattern
Figure 1-8. A sample omnidirectional antenna gain pattern

While the theoretical beamwidth of an omnidirectional antenna is 360 degrees horizontally, the vertical beamwidth of most omni antennas is less than 8 degrees. See Figure 1-9 for a side view of a typical omni antenna. Notice that if the antenna were mounted high enough, someone directly under the antenna itself would have very poor signal quality.

A side view of an omnidirectional antenna beamwidth
Figure 1-9. A side view of an omnidirectional antenna beamwidth

Most omnidirectional antennas are of the “rubber ducky” type—a rubber- covered antenna, which ranges from a few inches long for a low-gain model to several feet for high-gain types.

Directional antennas

Although patch antennas are similar to sector antennas, they are considered directional antennas. Patch antennas generally have horizontal and vertical beamwidths that are similar. An example shown in Figure 1-10 shows the gain patterns for a patch antenna.

A sample patch antenna gain pattern
Figure 1-10. A sample patch antenna gain pattern

Yagi antennas are also directional antennas and are designed for highly directional applications. They typically have a beamwidth of less than 30 degrees; most of them look like a PVC pipe or a “Christmas tree” pointed at its target.

Finally, parabolic dish, or grid, antennas are the most highly directional antennas used in the 802.11 world. If you’ve seen a satellite dish, you’ve seen a parabolic dish antenna. These antenna types are suited for sending wireless network signals over several miles. As shown in Figure 1-11, the gain pattern is very tight.

A sample parabolic dish antenna gain pattern
Figure 1-11. A sample parabolic dish antenna gain pattern

Another antenna type widely used in outdoor applications is a sector antenna. These antennas are generally available with horizontal polarization and antenna patterns from 90 to 180 degrees. They are rectangular with a flat profile.

Bluetooth

Bluetooth is a low-power radio technology aimed at replacing cables for connecting devices. It was originally developed by the Swedish telecommunications manufacturer Ericsson and then formalized by an industry consortium. The name is taken from a Danish king, Harald Bluetooth, who ruled Denmark and Norway in A.D. 936.

The standards for Bluetooth define a low-power radio with a maximum range of 300 feet. The radios are actually on a transceiver microchip to keep size and power consumption to a minimum. Bluetooth uses the 2.45 GHz band of the ISM radio spectrum and divides the band into 79 channels. To further reduce any crosstalk into other ISM bands, Bluetooth devices can change channels up to 1,600 times per second.

Bluetooth is becoming widely available on mobile phones and PDAs, and one of its “killer” applications is hands-free wireless headsets for mobile phones. Bluetooth is also a popular way to “tether” a notebook computer to a cellular phone, which allows you to connect to the Internet even when an 802.11 network is not available (because current cellular data speeds are much slower than Bluetooth, Bluetooth’s relatively slow speeds are not the limiting factor). Bluetooth adapters are available for PDAs, desktops, and notebooks. There are some printers and keyboards available that use Bluetooth to communicate with the host device as well.

Compared to Wi-Fi, Bluetooth speeds are not impressive, but they are quite useful for transferring small amounts of data. Download speeds can max out at 720 kbps with a simultaneous upload speed of 56 kbps. Every Bluetooth device can simultaneously maintain up to seven connections, making a personal Bluetooth LAN a real possibility.

Cellular Data

With the rise of digital cellular phone networks, it became possible to use these networks to transfer data rather than just voice. There are several differing and competing technologies available.

Cellular Digital Packet Data (CDPD) was one of the first data networking technologies available for mobile phones. CDPD utilizes unused bandwidth in the 800-900 MHz range normally used by mobile phones. Data transfer rates max out at a theoretical 19.2 kbps. Today, CDPD is obsolete, and cellular carriers are actively trying to phase it out.

General Packet Radio Service (GPRS) is an add-on technology to existing Time Division Multiple Access (TDMA)-based GSM mobile phone networks. Timeslots in the GSM network are normally allocated to create a circuit-switched voice connection. With a GPRS-enabled network, the timeslots are used for packet data as needed. This by design creates a very slow data network with high latency and, theoretically, the speed of a 56 kbps modem. AT&T Wireless, T-Mobile, and Cingular Wireless use this technology. In 2003, an enhancement to GPRS, Enhanced Data Rates for Global Evolution (EDGE), was partially rolled out in the United States by AT&T Wireless and Cingular. In theory, EDGE can triple the data rate of GPRS, but you need an EDGE-capable handset, such as the Nokia 6200, to use it.

1xRTT stands for Single Carrier Radio Transmission Technology and is part of the CDMA2000 family of protocols, which includes successors to 1xRTT such as Single Carrier Evolution Data Only (1xEV-DO). It is built on top of the CDMA-based mobile phone networks and allows for ISDN-like data transfer speeds up to 144 kbps (1xEV-DO is capable of much higher speeds). Sprint’s PCS Vision and Verizon’s Express Network use this technology. As of this writing, Verizon Wireless is experimenting with 1xEV-DO in two U.S. markets, with testers obtaining data rates between 500 and 800 kbps.

Infrared

The electromagnetic (EM) spectrum contains many different wavelengths of which the RF spectrum is a small part. Another part of the EM spectrum is infrared light. This light has a longer wavelength than visible light, but a much shorter wavelength than radio or microwave radiation. Infrared is usually linked to body or mechanical heat, as many objects above room temperature emit infrared radiation. These emissions can be seen by night vision equipment.

Infrared is used in television remote controls, because the signal does not interfere with the TV transmission. Remote controls and Infrared Data (IrDA) equipment utilize light-emitting diodes to emit infrared radiation that is then focused by a lens into a narrow beam. The beam is modulated on and off to encode the data transmission.

The IrDA Association publishes specifications that are used by PDA, notebook, and mobile phone device manufacturers for the infrared ports on their devices. IrDA devices typically have a maximum throughput of 4 Mbps. While most mobile devices still have IrDA, many manufacturers are replacing these with Bluetooth.

Get Linux Unwired now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.