Lily’s Blog, Dragon Absconded!
Baking Until I Drop

Quotation of the moment:

Wednesday 2nd, August 2006

Wireless on Powerbook G4 with Airport Extreme with Linux: Instructions

As I said before, I got my wireless card on my powerbook working. I have a few sources, which I shall list…and some of this is cobbled together from their instructions and from help on the Linux Chix IRC channel (warthog9 mostly). Maybe other people have done this better, but this is what I’ve done successfully and need to learn/remember for when I install Linux and not use a live distro (or for each time I use that live Linux).

I did this all on a live Edubuntu CD (6.06 LTS) thus no rebooting necessary. It’s not the distro I wish to use…it’s just what I had at the moment.

This should hopefully work on any Linux distribution (Lantern Torch said something about having kernel >= 2.6.15). And maybe if you don’t have internet access (aside from that pesky wireless card), saving stuff (binaries, firmware, instructions) on a disc or drive that you’re sure that your Linux distro and computer will be able to access is a good idea.

Also, my wireless router is a bit junky and sometimes I had to keep messing with the Networking (IP addresses etc) because DHCP was either not working well or I didn’t have it set up well or I disabled it. I hate my router.

Things needed:

  1. A Linux distro
  2. An ethernet port on your computer
  3. An ethernet cable
  4. Internet access of some sort
  5. Some computer with an Airport Extreme wireless card, for example, my PowerBook G4, running Mac OS X

Instructions:

  1. Before booting into Linux, I “borrowed” the firmware code from Apple. It’s usually located at /System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort21.
  2. I uploaded AppleAirPort2 to some easily accessible location on the ‘net.
  3. Then, I booted into Edubuntu with the ethernet cable plugged in.
  4. When I was sure the wired net was working correctly, I downloaded AppleAirPort2 and saved it to my home directory.
  5. I launched a terminal window. I needed to use apt-get to get some packages.
  6. Edit the sources; since I was on a live CD, I had gedit and had to use that. If you have emacs or kedit or vi and prefer that, use it! So:

    sudo gedit /etc/apt/sources.list

    I uncommented out the universal repository stuff which they tell you is unsupported by Edubuntu, that is, remove the # from in front of two of the lines. Then save this.

  7. Now, we need to get stuff. First off, update the software database. At the terminal,

    sudo apt-get update

  8. Now you need bcm43xx-fwcutter to extract stuff from the firmware, wpasupplicant if you need some sort of WPA security for your Wireless Network, wpagui for a supposedly nice easy way to add a WPA network to your list without using configuration files. I also got X-Chat because I didn’t feel like using irssi or gaim to communicate on IRC with my … lifelines! So, at the terminal, after the updating is done:

    sudo apt-get install bcm43xx-fwcutter wpasupplicant wpagui

  9. Now, I need to extract the firmware and install it. I can’t remember the exact path on Edubuntu but just remember the location of your saved AppleAirPort2 file and at the terminal do:2

    sudo bcm43xx-fwcutter -w /lib/firmware ~/AppleAirPort2

  10. Now to use the driver, insert the module:

    sudo modprobe bcm43xx

  11. Now, I eventually got this working with an unsecured wireless network by myself. I had to remember to disable the ethernet so that it wouldn’t get confused. So, the instructions will sort of diverge for the two routes.
    1. If the network is unsecured you should do the following (my wireless network was eth1 and the channel was 6 and the SID for the network was default so you change yours as appropriate):


      sudo ifconfig eth1 up
      sudo iwlist eth1 scan
      sudo iwconfig eth1 channel 6
      sudo iwconfig eth1 essid "default"


      And voilà, your internet *should* be working!
    2. Now, I didn’t try WEP but if your network is WEP secured, according to the gentoo forums, this should work (slight modification of above where XXXX-XXXX-XX is your WEP key):


      sudo ifconfig eth1 up
      sudo iwlist eth1 scan
      sudo iwconfig eth1 channel 6
      sudo iwconfigh eth1 enc XXXX-XXXX-XX
      sudo iwconfig eth1 essid "default"
    3. Now, my network has a WPA-PSK key so I needed wpa_supplicant. I got confused as the apt repositories called it wpasupplicant and wpagui yet when it was installed you needed to call it by wpa_supplicant and wpa_gui. From here I was a bit lost because I’d tried using wpa_supplicant by myself and thankfully warthog93 came back online and helped me…great birthday present! :)
      1. Did I say no configuration file? what a mistake!

        sudo gedit /etc/wpa_supplicant.conf

        Inside this file, I put:

        ctrl_interface=/var/run/wpa_supplicant

        network={
        ssid="any"
        key_mgmt=NONE
        }

      2. Then back to the terminal and:

        sudo ifconfig eth1 up
        sudo wpa_supplicant -B -i eth1 -D wext -c /etc/wpa_supplicant.conf


        Your wireless card should now be active and wpa_supplicant should now be running!
      3. Now, use wpa_gui to configure all the network details:

        sudo wpa_gui

        And then when launched, go File->Add Network. You’ll get a little dialog box in which to enter youer network’s SSID, type of authentication (WPA-PSK for me!), set TKIP or CCMP (I used TKIP because I recognised those letters on my wireless router but don’t know what they’re all about!) and enter the PSK (pre-shared key).
        Hit add!
        It should all start working now. Try disabling your ethernet…

Footnotes:

  1. Thanks to Lantern Torch
  2. Here, Lantern Torch directed to the gentoo forums and I used their instructions about extracting the files and getting it working.
  3. On, Linux Chix’s IRC channel.

Simpler instructions for wpa?
maco found these!

1 Comment »

  1. [...] So, I fixed it by by following my old instructions, I really need to save the config files somewhere because my memory sucks. Will post them to the blog soon. [...]

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You may use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>