By Jonathan Corbet
December 21, 2010
In the US, at least, the term "radar detection" is usually associated with
devices designed to warn heavy-footed drivers about police officers lurking
in the vicinity. As far as your editor knows, none of those devices run
Linux. Radar detection may become important for Linux in another context,
though: wireless networking - especially in a base station mode - will
require it. Some early work is now afoot to give that capability to the
Linux kernel.
Most wireless networking happens in the 2.4 GHz frequency band; as many
users will have noticed, that band tends to get crowded and noisy in
places. For this reason, both 802.11a and 802.11n specify a number of
channels in the 5GHz band as well. The relative lack of traffic at 5GHz
makes it attractive for this use, even though the effective range of an
access point is reduced somewhat. Pushing more wireless traffic to 5GHz
will greatly increase the total bandwidth available.
Naturally, there is a catch. While other uses of that frequency range are
few, among them are counted air traffic control and weather radars.
Interfering with these radars will be frowned upon by regulators who
have strange notions about how aviation safety should take priority
over that post-lunch Twitter update. These regulators typically show a
distinct lack of humor toward anybody who doesn't pay attention to their
rules; once again we see how wireless networking often tends to be the
leading edge of encounters between Linux and the regulatory environment.
To make the 5GHz band available for wireless networking in a safe manner,
various agencies have laid out specifications for how a wireless device
selects an operating channel. This scheme, called "dynamic frequency
selection" (DFS), requires that a "master" station listen to a channel for
a minimum period of time to ensure that no radars are operating there
before transmitting. Thereafter, the station must continue to listen for
radars; should one happen to move into the neighborhood, the station must
shut down all communications and move to a different channel. In essence,
wireless devices operating in the 5GHz band must actively avoid
transmitting on channels where radars are operating.
Most Linux systems will not have to concern themselves directly with radar
detection. A "slave" device, as might be found in a typical laptop, need
only follow the master device's instructions with regard to where it can
transmit. But any device which wants to function as a master - including
access points and anything running in ad hoc mode - must notice radars and
react accordingly.
Wireless adapters, having radio receivers tuned to the frequency range of
interest, can help with this process. Should a blast of RF energy hit the
antenna, the adapter can return an error to the host system indicating that
a radar-like patch of interference was encountered. It's not quite that
simple, though: random interference is far from unknown in the wireless
world. If a wireless
device bailed out of a channel every time it received some unexpected
interference, communication would be painful at best. So something a
little smarter needs to be done.
That something, of course, is to look for the specific patterns of
interference that will be generated by a radar. Radars emit short bursts
of RF radiation, followed by longer periods of listening for the returns.
The good news is that these patterns are fairly well defined in terms of
the radar's pulse width, pulse repetition interval, and frequency. The bad
news is that these parameters vary from one regulatory domain to the next.
So while the US has specified a specific set of patterns that a device must
recognize, the European Union has defined something different, and Japan
has a variant of its own. So radar detection must be specific to the
environment in which the device is operating.
A group of developers, mostly representing wireless hardware companies has
started a project to
implement DFS for Linux. A preliminary
patch set has been posted by Zefir Kurtisi to how how DFS might be
done. These patches add a simple function to the ieee80211 API:
void ieee80211_add_radar_pulse(u16 freq, u64 ts, u8 rssi, u8 width);
The hardware driver can use this function to inform the 802.11 core
whenever the interface reports the detection of a radar pulse. These
events will be tracked; if, over time, they match the pattern for radars
defined by the regulatory environment, the code will conclude that a radar
is operating and that evasive action is called for. If the hardware can do
full radar detection directly, the driver can report the existence of a
radar with:
void ieee80211_radar_detected(u16 freq);
The current patch is only able to detect one variety of European radar; it
is meant as a sort of proof of concept. The means by which parameters will
be loaded to describe radars in different jurisdictions is yet to be worked
out; one assumes that the existing regulatory compliance mechanism will be
used, but alternatives are being considered. One way or the other, Linux
should be able to coexist with radars in the 5GHz band in the near future.
A version which helps in the avoidance of speeding tickets may take a
little longer.
(
Log in to post comments)