>== Wireless tools for Linux ==
The Linux Wireless Extension and the Wireless Tools are an Open Source project sponsored by Hewlett Packard (through my contribution) since 1996, and build with the contribution of many Linux users all over the world.
The Wireless Extension (WE) is a generic API allowing a driver to expose to the user space configuration and statistics specific to common Wireless LANs. The beauty of it is that a single set of tool can support all the variations of Wireless LANs, regardless of their type (as long as the driver support Wireless Extension). Another advantage is these parameters may be changed on the fly without restarting the driver (or Linux).
The Wireless Tools (WT) is a set of tools allowing to manipulate the Wireless Extensions. They use a textual interface and are rather crude, but aim to support the full Wireless Extension. There are many other tools you can use with Wireless Extensions, however Wireless Tools is the reference implementation.
- iwconfig manipulate the basic wireless parameters
- iwlist allow to initiate scanning and list frequencies, bit-rates, encryption keys...
- iwspy allow to get per node link quality
- iwpriv allow to manipulate the Wireless Extensions specific to a driver (private)
- ifrename allow to name interfaces based on various static criteria
Most Linux distributions also have integrated Wireless Extensions support in their networking initialisation scripts, for easier boot-time configuration of wireless interfaces. They also include Wireless Tools as part of their standard packages.
Wireless configuration can also be done using the Hotplug or uDev scripts and distribution specific support, this enable the proper support of any removable wireless interface (Pcmcia, CardBus, USB...).
Any versions of the Pcmcia package offer the possibility to do wireless configuration of Pcmcia and Cardbus card through thefile wireless.opts. This allow to fully integrate wireless settings in the Pcmcia scheme mechansism. However, this method is now deprecated in favor of distribution specific methods.
Please note that the Wireless Tools (starting with version 19) supports fully IEEE 802.11 parameters and devices, support older style of devices and most proprietary protocols, and are prepared to handle HiperLan as well. More recent versions of course adds more 802.11 support. But, unfortunately not all drivers support all these features...
ifrename allows to rename wireless network interfaces based on various static criteria to assign a consistent name to each interface.
By default, interface names are dynamic, and each network adapter is assigned the first available name (eth0, eth1...) while the order network interfaces are created may vary. Now ifrename allows the user to decide what name a network interface will have. It can use a variety of selectors to match interface names to the network interfaces on the system, the most common selector is the interface MAC address.
ifrename must be run before interfaces are brought up, which is why it's mostly useful in various scripts (init, hotplug) but is seldom used directly by the user. By default it renames all present system interfaces using mappings defined in /etc/iftab.
iwconfig is used to display and change the parameters of the network interface which are specific to the wireless operation (e.g. interface name, frequency, SSID). It may also be used to display the wireless statistics (extracted from /proc/net/wireless).
In the free Berkeley Software Distribution UNIX operating systems, the role of iwconfig is performed by an expanded ifconfig command.
iwevent displays wireless events generated by drivers and setting changes that are received through the RTNetlink socket. Each line displays the specific wireless event which describes what has happened on the specified wireless interface. It doesn't take any arguments.
iwgetid reports the ESSID, NWID or access point/cell address of the wireless network that is currently used. By default it will print the ESSID of the device, and if it doesn't have any it will print its NWID instead. The information reported is the same as the one shown by iwconfig, but iwgetid is easier to integrate in various scripts.
iwlist is used to scan for available wireless networks and display additional information about them that is not displayed by iwconfig. The main argument is used to select a category of information, iwlist displays in detailed form all information related to this category, including information already shown by iwconfig.
The command is primarily used to generate a list of nearby wireless access points and their MAC addresses and SSIDs.
It is used to manipulate parameters and setting of the Wireless Extension specific to each driver (as opposed to iwconfig which deals with generic ones).
Without any argument, iwpriv lists the available private commands available on each interface, and the parameters that they require. Using this information, the user may apply those interface specific commands on the specified interface.
iwspy is used to monitor a set list of nodes and record the link quality of each of them.
The information gathered is the same as that available in /proc/net/wireless: quality of the link, signal strength and noise level. This information is updated each time a new packet is received, so each address of the list adds some overhead in the driver. Note that this functionality works only for nodes part of the current wireless cell, you can not monitor access points you are not associated with (you can use Scanning for that) and nodes in other cells. In Managed mode, in most case packets are relayed by the access point, in this case you will get the signal strength of the access point. For those reasons this functionality is mostly useful in ad hoc and master mode.