… I’ve been a Debian fan for a while and after managing different machines as well as the server on which this blog runs, it’s only natural that I installed Debian on my primary machine now as secondary operating system. Why secondary? Well, it would be foolish to develop Windows software on Linux, wouldn’t it?
Anyway, the reason I write this here is another one, I want to provide the solution to the problem of using the WLAN card built into my machine. It was a problem at first, especially since the recipies vary, but now that I got the bigger picture, I wanted to share my findings.
There are many ways to configure /etc/network/interfaces
including hook-scripts in the interface configuration. Another way is to use the wireless-*
configuration options, which rely on the wireless-tools
package. Another method is to call wpa_supplicant (package wpasupplicant
) from the interface configuration and refer to /etc/wpa_supplicant.conf
. However, what’s strange, this configuration file doesn’t exist by default after installation of the respective package. This was one of the reasons I digged further and found out that there is a second set of options, wpa-*
, that use wpa_supplicant
indirectly through hook-scripts, just as wireless-tools
does for the wireless-*
options. Have a look in /usr/share/doc
under the name of the package, there are plenty of examples for both of them. I went for the version without an /etc/wpa_supplicant.conf
and with wpa-*
options instead. Here’s what it looks like:
auto ethX iface ethX inet dhcp wpa-driver wext wpa-ssid "Name of the network (E)SSID" wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-key-mgmt WPA-PSK wpa-psk "... the passphrase ..."
There are a few things you have to note about this.
- Unlike in
/etc/wpa_supplicant.conf
the options do not take an=
before the value. This is something I got bitten by. - The SSID was not allowed to be in double-quotes on earlier versions of the scripts Debian supplies with
wpa_supplicant
. The version I use allows it, though. - The pre-shared key can be either created from the pass-phrase by invoking
wpa_passphrase
or can be given in the form of the passphrase itself (inside double-quotes then). wpa-driver
can vary, have a look into the man page ofwpa_supplicant
andwpa_supplicant.conf
!
Well, that’s it basically. Although this covers only the simplest WPA and not the WPA2, WEP or other configurations, I hope you spare some time by reading this and not getting bitten by the same problems I was 😉
// Oliver