Wireless

Making wireless work in Linux is non-trivial. Here are steps to make wireless work on Lehigh University's network with PEAP-MSCHAPV2 encryption for broadcom card running on a debian machine.
  1. Make sure you are running a 64-bit OS. Standard 32-bit kernel also works
  2. Install ndiswrapper. On Debian do apt-get update; apt-get install ndiswrapper-common ndiswrapper-utils (or ndiswrapper-utils-1.9, whichever works) ndiswrapper-source
  3. Compile kernel modules for ndiswrapper:
    module-assistant prepare
    module-assistant get ndiswrapper
    module-assistant build ndiswrapper
    dpkg -i /usr/src/ndiswrapper-[version shown after above command]
  4. Next we have to install driver for the card. Get hold of windows driver (64bit for 64 bit kernel, 32 for 32 bit kernel) from somewhere. For my laptop (HP dv5000), I could go to HP website0--> Drivers --> ... --> sp34152.exe. Run this .exe file on a windows machine and extract the files to a directory "foo". "foo" should have files like: bcmwl564.sys, bcmwl5.inf, bcmwl5.sys and many more.
  5. Copy bcmwl564.inf, bcmwl564.sys to your linux machine. If you are using 32-bit kernel, copy bcmwl5.inf and bcmwl5.sys.
  6. Do ndiswrapper -i name_of_inf_file.
  7. "ndiswrapper -l" should show the driver and not throw any errors.
  8. Pressing the wireless button on laptop should turn off/on the wireless light. If not, you may not be using the correct driver.
  9. Now you have to configure your wireless encryption.
  10. apt-get install wpasupplicant
  11. Edit /etc/wpa_supplicant/wpa_supplicant.conf to include something like:
    # wireless for home
    network={
            ssid="graham"
            key_mgmt=NONE
            wep_key0=
            wep_key1=
            wep_tx_keyidx=1
    }
    
    # for lehigh university
    network={
            ssid="lu"
            scan_ssid=1
            key_mgmt=IEEE8021X
            eap=PEAP
            phase2="auth=MSCHAPV2"
            identity="lehigh id"
            password="lehigh password"
    }
    
    # for some hotels you may visit
    network={
            ssid="hsia"
            key_mgmt=NONE
    }
    
  12. Make sure the owner of this file is root and nobody else has any read/write permissions (it has your lehigh password).
  13. edit your /etc/network/interfaces to have something like:
      
         iface wlan0 inet dhcp
         wpa-driver wext
         wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    
    
  14. ifup wlan0 should start your wireless connection.
  15. If your cant find wlan0 your card is not properly detected. Make sure lsmod shows ndiswrapper.
  16. Sometimes eth1 or eth2 is created instead of wlan0. Do "iwconfig" to see the correct device. Use the correct device name in the above steps.
  17. Mail me or post messages on some discussion board for any questions.
Go back to linux.html

This page (wireless.html) is hosted at http://coral.ie.lehigh.edu/~asm4/howtos and was last modified on December 25, 2006.
Home

Research
CV
Publications
Resources for OR
Software

About me
PGP public key
To think about
Bhookay Bhediye

Deviations
Ballycumber
Photography
Astronomy
Linux