Page 7 of 66 FirstFirst ... 567891757 ... LastLast
Results 61 to 70 of 654

Thread: HOWTO: ipw2200 + wpa

  1. #61
    Join Date
    May 2005
    Beans
    6

    HOWTO: ipw2200 + wpa for newbies

    I am a linux newbie and I had problems to get my Intel PRO/Wireless 2200 card working. My problems were:

    • Getting WPA to work
    • Recovering from the inevitable disconnects without rebooting


    Using the information in this great thread (thank you, luca_linux!), a nice disconnect solution by snop and some info I found in other places on the web I managed to get things working.

    I will put my story here, hoping it will be helpful to some, especially newbies like me .
    Beware: since I am a total newbie I probably have made some rather silly mistakes.
    Hopefully there will some Ubuntu / Linux wizards there to correct me!

    Ok enough talk. Let's get on with it.

    First things first: make sure you meet the following requirements below before proceeding!

    1. You have an Intel PRO/Wireless 2200 card (obviously)
    2. It doesn't work 'out of the box' with Ubuntu (probably why you read this)
    3. Not a requirement but a tip: start with a fresh Ubuntu installation! If you have been messing with your system trying to get Wifi working -like i did the first time- my instructions might not work.
    4. Make sure your system is connected to the internet by using the wired ethernet connection (wireless isn't working, obviously!). This comes in handy for downloadable packages and help.
    5. Make sure you have the Universe repositories enabled so you can download the
    packages needed. What's that? Go to System, Administration, Synaptic Package Manager, Settings, Repositories, Settings, Show disabled software sources, and select the binary software sources marked "Community maintained (Universe)". Do a "reload" in Synaptic Package Manager to make sure all packages show up.
    6. Make sure you perform all commandline actions as "root" (Applications, System Tools, Root Terminal. Just be careful with what you do in there!).
    7. Make sure that the package build-essential is marked installed under "Development" in the Synaptic package manager (it must be checked, unchecked means not installed). If not check it and apply, or do a "apt-get install build-essential" in the Root Terminal.


    Now that is out of the way, let's start with Luca's HowTo:

    Step 1: Install firmware (optional)
    If you need this depends. With my fresh Ubuntu install, the same firmware files were already in: /lib/hotplug/firmware (just with a slightly different filename, ending with the kernel version), so I did not install it in /usr/lib/hotplug/firmware/ like Luca did.

    Code:
    sudo tar xvzf ipw2200-fw-2.2.tgz
    sudo cp ipw-2.2-*.fw /usr/lib/hotplug/firmware/
    Step 2: Install driver
    I did as Luca suggested, but I made sure I did a make uninstall first just to be sure. (You might first want to stop any present ipw2200 driver here by a "modprobe -r ipw2200").

    Code:
    sudo tar xvzf ipw2200-1.0.3.tgz
    cd ipw2200-1.0.3
    make
    make uninstall
    make
    make install
    If there are no errors you are still in business. I had problems doing this with my first, messed-up Ubuntu installation. When I did a fresh install things were fine.

    Step 3: Copy the modules to another location (optional)
    Luca suggests you copy the modules you just made

    from /lib/modules/$(KVER)/drivers/net/wireless/
    to /lib/modules/$(KVER)/kernel/drivers/net/wireless/

    I did not do this and had no problems with it.

    Step 4: Check if the driver works
    The best thing to do first is make sure you have an open network at this time (no WPA, no WEP, no MAC security). Also it might be a good idea to use a static IP. Configure your Wireless connection in the network settings according to your network IP range. Now let's enable the driver.

    Code:
    modprobe ipw2200
    dmesg | grep ipw
    If it works you will see something like this:

    Code:
    ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.3
    ipw2200: Copyright(c) 2003-2004 Intel Corporation
    ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
    Step 5: Install wpasupplicant (only if you need WPA)
    No surprises here, just do as Luca suggests: install it and edit the .conf file.

    Code:
    sudo apt-get install wpasupplicant
    sudo gedit /etc/wpa_supplicant.conf
    Insert these lines of code in the wpa_supplicant.conf file, and make sure you get your ssid and psk right:

    Code:
    network={
           ssid="your_network_name"
           proto=WPA
           scan_ssid=1
           key_mgmt=WPA-PSK
           psk="your_secret_key"
    }
    Now restart the ipw2200 driver and run wpa_supplicant. Make sure that you use the right interface. On my notebook, eth0 is the wireless interface. Luca uses eth1. You can check yours in System, Administration, Networking.

    Code:
    modprobe -r ipw2200
    modprobe ipw2200
    wpa_supplicant -B -i eth0 -c /etc/wpa_supplicant.conf -D ipw -w -dd
    Step 6: Check if WPA is working
    Just remember to restart your accespoint in WPA mode with the right key! If it works: jump, run circles around your Ubuntu CD, get a beer, enjoy! If not, see if you (or I) missed something in the steps above.


    Step 7: Make wpa_supplicant start at boottime
    ...and even better: make sure that if the connection goes down, it will go up again automatically!

    a. Make a python script that does the reconnect thing
    I just made a file with the silly name rewifi.py as shown below and make it executable. This script scans for a disconnected Wifi device and reconnects if needed. Make sure you put the right interface at MYWIRELESSDEVICE.

    Code:
    gedit /usr/local/bin/rewifi.py
    Code:
    #!/usr/bin/env python
    
    from time import sleep
    from os import system
    
    #Check for your wireless device typing iwconfig in a terminal and assign
    #your device here (it can be eth0, eth1, etc...)
    MYWIRELESSDEVICE = 'eth0'
    
    while (1):
    	#Wait for 15s
    	sleep(15)
    	
    	#Reload the module when the connections drops	
    	if system('iwconfig ' + MYWIRELESSDEVICE + ' | grep 00:00:00:00:00:00 > /dev/null') == 0:
    		#Wait for 5 seconds more, just in case our connection comes back (we may be just 
    		#moving our laptop from one place to another)
    		sleep(5)
    		if system('iwconfig ' + MYWIRELESSDEVICE + ' | grep 00:00:00:00:00:00 > /dev/null') == 0:
                            system('killall wpa_supplicant')
    			system('/sbin/rmmod ipw2200')
    			system('/sbin/modprobe ipw2200')
    			system('/etc/init.d/networking restart')
                            system('/usr/sbin/wpa_supplicant -B -i eth0 -c /etc/wpa_supplicant.conf -D ipw -w')
    Code:
    chmod +x /usr/local/bin/rewifi.py
    b. Make a script in /etc/init.d to start rewifi.py on boot
    This goes much the same way as step a.

    Code:
    gedit /etc/init.d/rewifi.sh
    Code:
    #! /bin/sh
    # wifi re-init on disconnect + wpa_supplicant init
    echo " * [Wifi]: Enabling WPA supplicant..."
    if [ -x /usr/sbin/wpa_supplicant ]; then
        /usr/sbin/wpa_supplicant -B -i eth0 -c /etc/wpa_supplicant.conf -D ipw -w
    fi
    
    if ! [ -x /usr/local/bin/rewifi.py ]; then
        exit 0
    fi
    
    echo " * [Wifi]: Enabling script for automatic Wifi re-initialization on disconnect..."
    /usr/local/bin/rewifi.py &
    
    exit 0
    Code:
    chmod +x /etc/init.d/rewifi.sh
    c. Make sure your script is started
    This is done by putting a symlink "S40netwifi" in /etc/rcS.d. Like this it starts just before S40networking. If you want to start it after you can use " S41netwifi" or an even higher number.

    Code:
    ln -s /etc/init.d/rewifi.sh /etc/rcS.d/S40netwifi
    d. Lazy me
    If you are lazy, you can just put these scripts in one place, edit them there and then reinstall them. For example:

    Code:
    #! /bin/sh
    # this script installs auto Wifi re-init on disconnect + WPA support with wpa_supplicant
    cp rewifi.py /usr/local/bin/
    cp rewifi.sh /etc/init.d/
    ln -f -s /etc/init.d/rewifi.sh /etc/rcS.d/S40netwifi
    Well that's about it. It took me some time but seems to work fine for me. Hopefully this will help someone.

  2. #62
    Join Date
    May 2005
    Beans
    10

    Re: HOWTO: ipw2200 + wpa

    question:the wireless network I am connecting to has a hidden ssid. would that make a difference?

  3. #63
    Join Date
    May 2005
    Beans
    20

    Re: HOWTO: ipw2200 + wpa

    Quote Originally Posted by luca_linux
    As said in some previous posts, you have to install the packages: build essentials, kernel hearders.
    Thanks for the straightforward advice. I fired up synaptic and snagged the build essentials and the kernel headers and the drivers installed without a hitch!

    Now its just a matter of finding a way to get the wpasupplicant to my laptop (which doesnt have a net connection until I get the wifi working). Is there a way to download packages manually and xfer them to CD?

    Thanks for the help.

  4. #64
    Join Date
    May 2005
    Beans
    10

    Re: HOWTO: ipw2200 + wpa

    also, we do have mac address filtering on the router, but I can still get on with windows, so I know mine is on there,

  5. #65
    Join Date
    Mar 2005
    Location
    the South
    Beans
    471

    Re: HOWTO: ipw2200 + wpa

    Interesting discussion. I suppose I will have to compile and install the IPW2200 because my wifi gets dropped about every other time I start Linux.

    My output is as follows:

    dmesg | grep ipw
    ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 0.19
    ipw2200: Copyright (c) 2003-2004 Intel Corporation
    ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
    ipw2200: Fatal error
    ipw2200: Start IPW Error Log Dump:
    ipw2200: Status: 0x0000010, Config: 00000142
    ipw2200: Start IPW Event Log Dump:

    Funny thing is my wireless is working as I write this. Also, on bootup, when network services are starting, I see errors sometimes (not always), but the wireless works.

    I know I need the new version of the driver, but I'm a little gunshy right now. I wonder when Ubuntu will upgrade this via apt-get?

  6. #66
    Join Date
    May 2005
    Beans
    20

    Re: HOWTO: ipw2200 + wpa

    Final Follow-up of the battle for n00bs with inspiron 9300's like me who dont have internet capable systems (yet)

    1. Copied wpa_supplicant from the repository found here (Note the newer debian version wasn't compatible with ubuntu, but I had to try)
    2. Burned it to CD
    3. Copied it from CD to the HD of the laptop
    4. From the directory I unpacked (if that's what its called) the file using "dpkg -i [package name]"
    5. Continued on with the wpa_supplicant instructions as found in the original tutorial.

    Thanks to everyone who contributed to this post!

  7. #67
    Join Date
    Apr 2005
    Beans
    514

    Re: HOWTO: ipw2200 + wpa

    Quote Originally Posted by DLM
    question:the wireless network I am connecting to has a hidden ssid. would that make a difference?
    Don't worry about: in wpa_supplicant we set "scan_ssid=1" that's just used to connect to a hidden ssid.

  8. #68
    Join Date
    Apr 2005
    Beans
    514

    Re: HOWTO: ipw2200 + wpa

    Quote Originally Posted by Psquared
    Interesting discussion. I suppose I will have to compile and install the IPW2200 because my wifi gets dropped about every other time I start Linux.

    My output is as follows:

    dmesg | grep ipw
    ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 0.19
    ipw2200: Copyright (c) 2003-2004 Intel Corporation
    ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
    ipw2200: Fatal error
    ipw2200: Start IPW Error Log Dump:
    ipw2200: Status: 0x0000010, Config: 00000142
    ipw2200: Start IPW Event Log Dump:

    Funny thing is my wireless is working as I write this. Also, on bootup, when network services are starting, I see errors sometimes (not always), but the wireless works.

    I know I need the new version of the driver, but I'm a little gunshy right now. I wonder when Ubuntu will upgrade this via apt-get?
    Yes, your problem depends on the old driver.
    I don't know if there will be an updated version soon available in the repositories, but you really should update it manually.

  9. #69
    Join Date
    Apr 2005
    Beans
    514

    Re: HOWTO: ipw2200 + wpa

    @ fulco: the python script is useless since the disconnecting issue has been fixed in 1.0.3 driver version.
    The sh script for booting is really useful, instead. Thanks!

  10. #70
    Join Date
    Apr 2005
    Beans
    514

    Re: HOWTO: ipw2200 + wpa

    I've edited my howto in order to get wpa starting automatically at boot (I edited the sh script provided by fulco).

Page 7 of 66 FirstFirst ... 567891757 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •