LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-09-2006, 10:21 PM   #1
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Rep: Reputation: 30
Wi-Fi Card Installation HowTo


After struggling a long time to get my Wi-Fi card to work and finally getting it to work, I decided to make a HowTo for other people that might have the same problem. I was such a Linux Newbie at the time of trying to install the card the first time that when I go back to the thread where someone helped me to install it I confuse myself! So here is it! If anyone have any questions about it or if you can make a improvement please let me know. Also, if you find this helpful let me know so that I know my effort was not in vain.

System: Dell Inspiron 5150 Laptop
Distro: Debian 3.1 Sarge
Kernel: 2.6.16-2-686
Wi-Fi Card: Belkin Wireless G Notebook Card

Make sure you have module-assistant=0.10.2bpo1 installed and also that your kernel headers are installed. Then run m-a prepare.


1.apt-get install wireless-tools=28-1~bpo.1
2.apt-get install madwifi-source=0.svnr1644.0.9.0-1bpo1
3.apt-get install pump
4.m-a a-i -t -i -f
5.Add to /etc/network/interfaces:
#My Wireless Card
auto ath0
iface ath0 inet dhcp
-pre-up iwconfig ath0 essid “Wireless Network Name”
-pre-up iwconfig ath0 key “Wireless Network Key”

(If there is a current configuration similar to the above put a “#” in front of each line to disable it and then exit the document)

6.iwconfig ath0 essid “Wireless Network Name”
7./bin/bash
8.WIF=ath0
9.iwconfig $WIF key “Wireless Network Key”
10.ifconfig eth0(or whatever you current network is) down
11.iwconfig ath0 channel “Your Network Channel”
12.pump -i ath0

From now on when you start your computer, the wireless card should start automatically.
 
Old 12-10-2006, 03:30 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I did it a bit differently, and I'm sure everyone here has a different way. In any case, here's mine.

1. Install wireless-tools
2. Install madwifi

3. Create new file /etc/network/ath0/ath0.sh:
Code:
#!/bin/sh
/sbin/iwconfig ath0 essid MyEssid channel 8 ap any key MyKey restricted
/sbin/iwconfig ath0 mode Managed txpower auto rate 11M auto sens -80
/sbin/iwpriv ath0 authmode 2
/sbin/ifconfig ath0 up
echo "ath0 configured"
exit 0
Fool with the ath0.sh file until you can reliably connect your wireless card to your access point. You can generally tell when it's connected by running "iwconfig ath0". If the response gives you something besides zeroes in the "Access Point:" field, then it's connected. The biggest impediment I had with my card was not realizing that I had to run the "iwpriv" to allow the card to use a WEP key.

4. Add lines to /etc/network/interfaces:
Code:
auto ath0
iface ath0 inet dhcp
	pre-up sh /etc/network/ath0/ath0.sh
5. Add "| ath0" to /etc/dhcpc/config:
Code:
case ${INTERFACE} in
eth0 | ath0)
6. Added line containing "ath*" to /etc/dhcpc/dhcpcd.exe:
Code:
case ${INTERFACE} in
  eth*) ;;
 wlan*) ;;
  ath*) ;;
     *) logger -s -p local0.err -t dhcpcd.exe "wrong interface name \"${INTERFACE}\""
	exit 1
	;;
esac
The thing about this approach is that everything related to starting the wireless card is encapsulated in ath0.sh. You can run it by itself before you hook it up to the interfaces file, allowing you to get the card actually connected to your access point before trying to hook it into the boot software.
 
Old 12-10-2006, 03:55 PM   #3
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Quakeboy02
You can generally tell when it's connected by running "iwconfig ath0". If the response gives you something besides zeroes in the "Access Point:" field, then it's connected.
If it also returns with nothing its also good. Anything that returns with nothing in Debian means it has been executed successfully.

Quote:
The biggest impediment I had with my card was not realizing that I had to run the "iwpriv" to allow the card to use a WEP key.
Strange... I didn't have to do that. It took me forever to relise that I have to unplug my wireless card before upgrading my kernel, otherwise it doesn't uninstall hotplug completely. Not even if I manually purge it.

Quote:
The thing about this approach is that everything related to starting the wireless card is encapsulated in ath0.sh. You can run it by itself before you hook it up to the interfaces file, allowing you to get the card actually connected to your access point before trying to hook it into the boot software.
Very clever actually. Its always nice to see the different ways that it can be done. I see the kernel you using is a bit older than mine. I see it is also 2.6, but does it use udev or hotplug?
 
Old 12-10-2006, 04:36 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
If it also returns with nothing its also good. Anything that returns with nothing in Debian means it has been executed successfully.
Are you sure about this? "iwconfig ath0" returns the status of your card. I would think that things would be severly broken if it didn't return anything. There is one thing that I did notice, though. It takes a fairly long time (in computing terms) before the card is connected. So, don't expect to be able to add "iwconfig ath0" to the script and see anything in the "Access Point:" result.

Quote:
I see it is also 2.6, but does it use udev or hotplug?
I dunno. It's 2.6.8; standard sarge 3.1 or something like that. I've been trying to upgrade to 2.6.19, but I can't get hald to work. I've given up on it for awhile. It's like a !#@$% onion trying to bring up all the pre-req packages. My enthusiasm kinda deflated after I reached the second or third pre-req.
 
Old 12-10-2006, 04:53 PM   #5
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Quakeboy02
Are you sure about this? "iwconfig ath0" returns the status of your card. I would think that things would be severly broken if it didn't return anything.
Sorry. What I meant is with some things in Debian it doesn't give you a output but it gets executed.

Quote:
It takes a fairly long time (in computing terms) before the card is connected. So, don't expect to be able to add "iwconfig ath0" to the script and see anything in the "Access Point:" result.
First off, what do you mean by "Access Point"? And then also, when starting up my card takes about the same time that it takes to connect to the fisical cable.

Quote:
I dunno. It's 2.6.8; standard sarge 3.1 or something like that. I've been trying to upgrade to 2.6.19, but I can't get hald to work. I've given up on it for awhile. It's like a !#@$% onion trying to bring up all the pre-req packages. My enthusiasm kinda deflated after I reached the second or third pre-req.
My standard installation came with 2.4. 2.6.16 is the latest stable kernel for Sarge. So I suggest you try that? I'm fixing to make a HowTo for that too.
 
Old 12-10-2006, 05:07 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
First off, what do you mean by "Access Point"?
As in:
Code:
entry:
/sbin/iwconfig ath0

response:
ath0      IEEE 802.11g  ESSID:"OurHouse"
          Mode:Managed  Frequency:2.447 GHz  Access Point: 00:0F:B5:6E:F4:44
(etc)
Quote:
And then also, when starting up my card takes about the same time that it takes to connect to the fisical cable.
Yes, but there's a difference between being able to type two commands and get the proper response vs having a script do it. It may take only 250ms for the card to connect, but the script line may finish executing before that and not show the connection in its response, because the card hadn't connected yet.

Quote:
My standard installation came with 2.4. 2.6.16 is the latest stable kernel for Sarge. So I suggest you try that? I'm fixing to make a HowTo for that too.
I think that you had to type boot linux26 or something like that to get 2.6.8 from the sarge disk. Does hald work with 2.6.16? Or do you have to manually mount cdroms and stuff? I've tried several different kernels, but what with having to reinstall the nvidia driver as well as madwifi for each try, it gets a bit old after awhile.
 
Old 12-10-2006, 05:14 PM   #7
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Quakeboy02
As in:
I think that you had to type boot linux26 or something like that to get 2.6.8 from the sarge disk. Does hald work with 2.6.16? Or do you have to manually mount cdroms and stuff? I've tried several different kernels, but what with having to reinstall the nvidia driver as well as madwifi for each try, it gets a bit old after awhile.
I tried typing linux26 but it never wanted to finish the installation.

Actually I'm not sure if it used hald or something else. But it does mount automaticly.

It took me forever to install my nVidia driver too, but at the end of the day its like two commands to do that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need driver installation HOWTO aquaboot Debian 5 05-22-2006 10:24 AM
BerkeleyDB installation howto wilu Linux - Software 1 01-30-2005 02:48 PM
xmessage installation and howto x2000koh Linux - General 0 07-30-2003 09:09 PM
Anyone have a installation howto? phishman3579 Slackware 8 06-29-2003 09:00 PM
howto log an installation of redhat? sengchao Linux - Newbie 1 02-03-2003 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration