Skip navigation.

powerful wireless with debian

| | | | |

One of the great difficulties I had was getting the wireless configured on my new setup. There are many links and howtos scattered around the internet, but actually not one of them was what I needed - or really explained the nitty-gritty details: they all just skimmed over a few bits, presumably assuming that if you're clever enough to get debian running, you must know how to get the networking sorted. Or, maybe I just missed the ones that could have really helped me.

The result is, I've decided to write some brief notes about what I did to get stuff working. It should also be noted that I'm prompted to do this not only by dkg but also cos I'm trying to clean up my homedir a little bit, and I had some old notes lying around that would otherwise get lost and forgotten.

Installing the tools

Lots of info on the web stating that powerbooks required the bcm43xx drivers. And lots more congratulatory posts celebrating the fact that it's now included in the stock debian kernel, as of 2.6.17. In fact, this is not entirely correct: the capabilities are there, but you still need to install some extra tools. Prime amongst them is the bcm43xx-fwcutter package - this is a firmware cutting tool, and is required to chop the actual driver out of the manufacturer's (proprietary) firmware. Then, the linux kernel is able to use it. This is me doing it (note I had already tried to download the package when I was in a location with wireless and then install it using 'dpkg -i'; however, as I didn't have wired access to the net in that location, it wasn't able to finish the job):

0 orion@evasion:~$ sudo apt-get install bcm43xx-fwcutter
Reading package lists... Done
Building dependency tree... Done
bcm43xx-fwcutter is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used
Setting up bcm43xx-fwcutter (006-1) ...
--11:34:38--  http://boredklink.googlepages.com/wl_apsta.o
           => `wl_apsta.o'
Resolving boredklink.googlepages.com... 72.14.207.93,
Connecting to boredklink.googlepages.com|72.14.207.93
HTTP request sent, awaiting response... 200 OK
Length: 652,866 (638K) [application/octet-stream]

100%[=======================================================]

11:34:40 (396.72 KB/s) - `wl_apsta.o' saved [652866/652866KB]


  filename   :  wl_apsta.o
  version    :  3.130.20.0
  MD5        :  e08665c5c5b66beb9c3b2dd54aa80cb3
  microcodes :  2 4 5 11 
  pcms       :  4 5 

  microcode  :  2
  revision   :  0x0127
  patchlevel :  0x000e
  date       :  2005-04-18
  time       :  02:36:27

  microcode  :  4
  revision   :  0x0127
  patchlevel :  0x000e
  date       :  2005-04-18
  time       :  02:36:27

  microcode  :  5
  revision   :  0x0127
  patchlevel :  0x000e
  date       :  2005-04-18
  time       :  02:36:27

  microcode  :  11
  revision   :  0x0127
  patchlevel :  0x000e
  date       :  2005-04-18
  time       :  02:36:27

extracting bcm43xx_microcode2.fw ...
extracting bcm43xx_microcode4.fw ...
extracting bcm43xx_microcode5.fw ...
extracting bcm43xx_microcode11.fw ...
extracting bcm43xx_pcm4.fw ...
extracting bcm43xx_pcm5.fw ...
extracting bcm43xx_initval01.fw ...
extracting bcm43xx_initval02.fw ...
extracting bcm43xx_initval03.fw ...
extracting bcm43xx_initval04.fw ...
extracting bcm43xx_initval05.fw ...
extracting bcm43xx_initval06.fw ...
extracting bcm43xx_initval07.fw ...
extracting bcm43xx_initval08.fw ...
extracting bcm43xx_initval09.fw ...
extracting bcm43xx_initval10.fw ...

OK! We're getting there! Now I can get wireless signal - I can tell, as it keeps on sending DHCP requests but not getting any offers back...

0 orion@evasion:~$ sudo ifup eth2
Password:
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth2/00:0d:93:8b:d7:4d
Sending on   LPF/eth2/00:0d:93:8b:d7:4d
Sending on   Socket/fallback
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
0 orion@evasion:~$ 

Configuration

And at this point, I went round and round the bend, continually banging my head against a brick wall. There were many different opinions on which configuration files to set up, and how, but I couldn't get any of them to work. I'd followed the instructions from the debian-administration article (Network profiles for a laptop) and,even more so, from the original article that they'd referred to, as well as another article in French (yes, I do speak French). However, none of them quite got me there. Was I trying to be too clever to start off with - by getting the pluggable stuff going, when in actuality I had none of it going, yet? I had, as well, RTFM'ed all the man pages that seemed to be relevant - and quite a number that were irrelevant, too, I think.

So, I decided to simplify things. First step was to reassess what packages I needed: wpa-supplicant and resolvconf both seemed useful, ifplugd and guessnet less so. Thus, I concentrated on getting config files correct for the first two.

wpa-supplicant

This wasn't so difficult: most of the sites seemed to be in agreement. You need to create /etc/wpa_supplicant.conf - which I duly did - and then edit it to look like this:

# /etc/wpa_supplicant.conf
#
# this first part is essential, according to all documentation
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

# This part is where you configure individual networks.
# Priorities can be assigned here.

network={
        ssid="home"
#       id_str="home"
        key_mgmt=WPA-PSK
        psk="my_pass_phrase"
        priority=5
}


# connect to any public network
network={
        ssid=""
        key_mgmt=NONE
        priority=0
}

You'll notice that in my 'high-priority', home network, I have the id_str line commented out. I think that this is just an internal identity string that is not required by the wireless protocol, instead is just for human ease of use on the local computer. With this configuration, I managed to connect to quite a number of different public networks.

networking

Having got the wireless configuration correct, it's important to tell your computer to use the wireless! This is done in the /etc/network/interfaces file. Mine looks like this:

# /etc/network/interfaces
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The wired interface
auto eth1
iface eth1 inet dhcp

# The wireless interface
auto eth2
iface eth2 inet dhcp
      wpa-driver wext
      wpa-conf /etc/wpa_supplicant.conf

# This interface is to catch unidentified Wireless networks
# and is of course the default map for eth0
iface default inet dhcp

There's quite a bit of extra detail that is show on the other help pages I listed above - using any of that stuff, the wireless simply did not work for me. I don't know if it was the public internet I was trying to use that was flaky, but others were definitely online, and when I tried to get online using the dual boot osx software I have, it worked fine. So I do suspect my configuration.

Current problems

Perhaps a misnamed subsection, as I do not have any problems at the moment with the wireless/wired networks I am using (and I've now used a few different open networks without problem). That said, I am still having to stop/start everything automatically myself if I switch between a wired and wireless network, or even when booting up on occasion (e.g. if I can't be bothered to sit around waiting for the wired network to time out before the wireless is configured). However, these are minor considerations compared to the overall aim of getting online, so I'm very happy to tolerate them for the timebeing...

Links

The following links were all of use in some ways, although none of them held the overall answer: