# The &kwifimanager;-handbook

Stefan
Winter

    mail@stefan-winter.de

&FDLNotice;
2002
Stefan Winter
2003--10-22
1.0.0

The &kwifimanager; suite can be used to configure and monitor wireless &LAN; cards.

KDE
wireless
Wi-Fi
wlan
wlan-ng

## Introduction

The &kwifimanager; suite is a set of tools which allows you to manage your wireless &LAN; PC-Card under the K Desktop Environment. It provides information about your current connection and lets you set up up to four independent configurations which can be loaded automatically when &kde; is started. &kwifimanager; supports every wireless &LAN; card that uses the wireless extensions interface. This includes many cards that are supported by the wlan-ng project.

## Using the &kwifimanager; suite

### The &kwifimanager; application

Purpose of the main &kwifimanager; application is to show the currently set configuration and to display connection quality and access points.

The main application is launched by either typing `kwifimanager` at the command prompt of a console window or via the K Menu, where it is located by default in the Applications group. Finally, a third way to launch &kwifimanager; is by clicking once on the panel applet. The &GUI; elements of the application are explained in the following subsections.

#### Main window

The &kwifimanager; main window consists of four major parts:

##### Signal quality display

Here you can see the quality and type of the active connection. The uppermost icon displays the general state of the wireless network via a set of pictograms:

- a PC-Card with a question tag means that no card was detected

- a single laptop means that a PC-Card is inserted and in Infrastructure mode, but there is no radio signal from access-points. The card is out of range.

- a laptop that is connected to a white box means that a connection to an access point is established.

- two laptops mean that your system is in Ad-Hoc mode without access points

Below these pictograms is a small quality meter. It displays, in a cellular-like manner, the quality level of the current connection. This information is only available in Infrastructure mode. In Ad-Hoc mode, the level is always 0.

This graphical information is supplemented by an integer value below the icon. It shows the signal quality, and is computed in the following way: `signal strength in dBm - noise level in dBm` If your card is out of range, the value is 0; if no card is inserted it will show N/A.

##### Connection speed

A indicator for the current connection speed is shown at the right-hand side of the main window above the configuration info. If the speed settings are set to AUTO, the value will change once in a while as the card adjusts the connection speed according to the signal quality.

##### Current configuration

Here you can find information about your card configuration. It displays the following information:

- the network with which the card is connected / tries to connect (Searching for network: or Connected to network:)

- the MAC address of the access point to which the card is connected.

  If the card is in Infrastructure mode but out of range, the value `44:44:44:44:44:44` is displayed to indicate that no connection is established.

  In Ad-Hoc mode, the field shows an address that is associated with one of the cards in the Ad-Hoc network. It differs from the MAC address of that card in the second digit: it is raised by the value of 2.

  Your card is the first card that enters Ad-Hoc mode. Then all other cards entering Ad-Hoc mode will see your MAC-address, slightly modified: instead of `00:xx:yy:zz:aa:bb` it will show `02:xx:yy:zz:aa:bb`. This behavior is intentional.

- on most cards, the frequency on which the card is transmitting data and the corresponding channel number is displayed.

- your local IP address, if available.

- encryption status (only if you have started &kwifimanager; as root)

##### Access Point information (bottom area)

The last line of the main window shows information about your AccessPoint. This requires that your system administrator provided a list of MAC addresses with a corresponding information. An example for such a list can be found in `$`KDEDIR`/share/apps/kwifimanager/locations/DE_BW_Karlsruhe_University.loc`

If you want to set up a new list, simply copy your file into the folder `$`KDEDIR`/share/apps/kwifimanager/locations/`

It will be automatically parsed at the next start of &kwifimanager; after a successful installation. If you have a list and want to have it included in future releases of &kwifimanager;, simply send it to mail@stefan-winter.de

#### Statistics Viewer

Optionally, by selecting Connection statistics in the File menu, a separate window can be shown which displays the signal level and noise level graphs of the last 240 seconds. The signal level is displayed in blue and the noise level in red. The difference (SIGNAL minus NOISE) is the connection quality which is displayed in the main window.

#### Configuration Editor

By selecting Config Configuration Editor you are taken to the control center module of &kwifimanager;. In case you are not the root user, a window will pop up requesting the root password. This is because the configuration module contains sensitive information such as the encryption key for WEP cryptography.

#### Miscellaneous

There are some minor additional things to be said.

First, there is a feature named Acoustic Scanning. If this option is enabled, the connection quality is converted into an acoustic signal. A higher signal quality leads to a higher frequency of the beep output and to a more rapid beeping. If you've ever seen the Star Trek(tm) series you will see some parallels to their tricorders

A second feature is silent logging. It just means that &kwifimanager; will log the name of the network you are connecting to every time your network changes. This option is most useful when searching for the special network name ANY. In this mode, the card will log into any network it finds. The logfile's position is `$`HOME`/.wireless-log`

The third thing is just a note: In the File menu, there is an entry Disable radio. This option is not implemented. The problem is in the kernel drivers for Wi-Fi cards. The driver simply doesn't support it at this time.

### The panel applet

The panel applet is the second part of the &kwifimanager; suite. It can dock" into &kde;'s panel (&kicker;). It only displays the signal quality as icon and as text (see 3.1.1.1 for details).

With it's light-weight size it is best suitable for continuous use. If you don't want the &kwifimanager; main application on your screen all the time, just use the applet.

#### Launching the applet

The panel applet can be added to your panel by &RMB; clicking on the panel and selecting AddApplet KWiFiManager applet. Another way to start the applet is to click on its desktop file, which can be found on your disk in the folder `$`KDEDIR`/share/apps/kicker/applets`. That way it will not dock into the panel but free-float on your desktop. However, the first method is easier and should be preferred.

The panel applet can be minimally configured: it can optionally flash in yellow, orange and red colors when the signal quality level is very low. To enable or disable this feature, &RMB; click on the applet's handle beside the icon and select Personal Settings.

#### Tooltip information

If you hover above the applet for a few seconds, you will be shown a tooltip with a few additional information, namely:

- your local IP address

- the network name, if one is set

#### Starting &kwifimanager; main application from the panel applet

A single click on the applet launches (either with &LMB; or &RMB; click, as you prefer) the &kwifimanager; main application.

### The Control Center module

The configuration module in the &kcontrolcenter; is perhaps the most useful part of the &kwifimanager; suite. Here you can actually change the basic settings of your wireless &LAN; card. The module can manage up to four independent configurations for the card, and it can even automatically set your card up whenever you log into &kde;. Since establishing a network connection is a possible security hazard, any changes to the configuration can only be done by root.

#### The Configuration Tabs

The upper part of the control center module consists of four tabs labelled Config 1 through Config 4. Each of these tabs can hold a configuration for your WLAN card.

The most important settings are always visible, the cryptography and power management options are only shown when activated. The perhaps most important element in each configuration tab is the field Network name. Here you can specify which network you would like to log into. You can either specify the name of your network directly, or you can try a scan on all available networks by setting the network name to `ANY`.

In addition to the network name, you have to specify the type of network to log into. That's the purpose of the button group Operation mode. The option Infrastructure means that the network consists of designated base station, so-called access points or residential gateways. This is the most common operation mode for company networks. The second option, peer-to-peer means that your network is just a direct connection between computers, without access points.

Yu can optionally set the connection speed for your connection. The setting auto should do for most uses, since the card will determine the appropriate speed itself. However, if you find that the speed changes every few seconds, for example when you have a weak connection, you can set the speed manually.

Below these configuration items you will find a field named Execute script on connect:. Here you can enter the name of a script to execute. It will be executed whenever you hit the Activate configuration button and, optionally, automatically when you start the Control Center module. The script will have root rights. This may lead to problems if you want to start an X application in the script and the X server belongs to someone else than root. You can make such scripts work correctly if you execute the X application via ``kdesu` `-u` USERNAME `-c` COMMAND`.

The lower part of each configuration tab holds the cryptography settings. These settings are only shown if you check the box Use cryptography?. If shown, you are presented with numerous options:

Key to use:

  You can define up to four secret keys for each configuration, in this field you can set which one you actually want to use to encrypt network traffic

Crypto mode:

  When encryption is activated, there are two ways to deal with incoming non-encrypted packets: discard or allow. When you set your card for Open mode, the card will also listen to non-encrypted packets. Restricted mode will only allow encrypted network packets, any other packets are discarded.

Crytpo keys:

  This box lets you specify the secret keys to use for cryptography. The small box String? sets whether the key you enter to right is either a string like `MY_CRYPTO`, or, if not checked, a hex value like `0A2FEE91`. To protect your passwords, only asterisks will be shown when you enter a password.

Be aware that the built-in cryptography support (named WEP for Wireless Equivalent Privacy) is not very safe at all. See for details.

The last configuration element that remains to be described is the power management. When checking the box Enable Power Management you will be presented some options that can help you save energy. The first two input fields named Sleep duration (ms) and Awaken time (ms) describe the periodicity of network scans for your wireless &LAN; card. The card will turn the radio antenna off for the time period in milliseconds specified in Sleep duration. Afterwards it will be active for Awaken time and will in that time scan for a network connection. If no network connection is found, it will go to sleep again and the cycle begins again. The box named Receive packets below lets you specify which packets the card should listen to when awaken. You can either select Unicast only (which will only let your card listen to packets sent specifically to your card), Multi/Broadcast only (will only listen to packets sent to multiple machines and discard packets directed to your card) or Both. Most people should select the default value Both.

#### Auto-configuration on &kcontrolcenter; Module startup

If you wish, you can make &kwifimanager; initialize your wireless &LAN; card whenever you start the &kcontrolcenter;Module. To do so, check the box Load preset configuration on Control Center Module startup and select the number of the configuration you want to use in the listbox below. If you want to set the card to these settings at once, push the button Activate configuration.

#### Autodetecting your device

&kwifimanager; needs to know the interface name of your wireless &LAN; card to change any settings. You can either enter the information (&eg; `eth1` or `wlan0`) manually in the input field right of Settings apply to interface:, or let &kwifimanager; auto-detect the interface. To do so, push the button Autodetect interface. This will perform a scan on all interfaces listed in `/proc/net/dev` to find your card. The result of the scan will show up in the input field beside the button. If the field remains empty, no card was found. Please note that &kwifimanager; uses the wireless extensions to detect cards. If you use a card controlled by the wlan-ng package, &kwifimanager; only shows correct results if your driver has a compatibility layer for the wireless extensions built-in.

## License and contributors

Documentation and application copyright © Stefan Winter mail@stefan-winter.de.

&underFDL; &underGPL;

## Further Information

This appendix contains some extra information of items concerning wireless &LAN; that are not directly related to &kwifimanager;.

### Notes on the MAC address display in Ad-hoc mode

At first glance, the MAC address in the field Access Point seems to be wrong in Ad-hoc mode because it changes the first two bytes of the MAC address to `02`. But actually, this is a hardcoded feature in wireless &LAN; cards.

Usually a card is connected to a real" access point. Then the correct MAC address is shown. If you change to Ad-hoc (or Peer-to-peer) mode, one of the computers must act as a server for the other computers. The first computer that enters a network, will set itself as server. So, all other computers connecting to the same Ad-hoc network will see that first computer as network server. But since this computer is not a real server (that is, it is not a permanently available access point), clients should be aware that the network they are connecting to is not a permanent one. IEEE standards for MAC addresses have a place reserved for such occasions: MAC addresses that are not globally valid have 02 as the first two bytes (these addresses are called locally administered addresses).

You can compare this to the non-global IP addresses like 192.168.*.*.

So, the implementors of wireless networking agreed to give these virtual network servers a MAC address that is within the locally administered scope. To keep this virtual MAC address unique, they used a little trick: they only changed the first two bytes of the MAC address of the wireless &LAN; card, and since the remaining ten bytes are still unique in the world, they have a unique address to use as network server.

### Security considerations on WEP cryptography

WEP cryptography is not very secure at all. A recent paper from cryptography analysts called the encryption algorithm kindergarten cryptography. Actually, software exists that exploits a huge security hole in the encryption standard. This software listens to the encrypted network traffic, analyzes it, and after only a few hours it reveals the password to enter the network in clear text. The more traffic on the network, the easier it is to find out the password.

If you are truly concerned about your security, do not use WEP. If you are just setting up a two-computer home network, well, then I guess WEP should do.

There are many alternatives to WEP encryption. You could only use SSH to communicate over the network. SSH is a program suite that encrypts data with its own algorithm, which is very secure. Another option is to use PPTP, the Point-to-Point-Tunneling protocol. However, even PPTP seems to be a bit leaky concerning encryption security. And finally, you could set up an IPSec tunnel for your encrypted connections. As of yet, this encryption seems to be very safe and flexible.

## Compilation and Installation

&install.intro.documentation; &install.compile.documentation;

&documentation.index;