Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Networking & Wireless
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Networking & Wireless
Having problems getting connected to the internet or getting your wireless card to work? Ask here.

 
Thread Tools Display Modes
Old June 2nd, 2005   #1
elvis
A Carafe of Ubuntu
 
elvis's Avatar
 
Join Date: Jun 2005
Location: Brisbane, Australia
Beans: 111
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to elvis
Atheros AR5212 Madwifi HowTo

I purchased myself a Netgear WG511T network card based on the recommendation of this page:

http://www.ubuntulinux.org/wiki/Hard...ssNetworkCards

Which incorrectly states it works "out of the box" with Hoary. It does no such thing.

lspci gives me:
Code:
0000:06:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Long story short, Hoary ships with ath_hal 0.9.12.14, which is too old. Hopefully this mini-guide will help others upgrade and get wireless working.

If your wireless isn't working, at a console type "dmesg | less". Scroll around and search for the string starting with "ath_hal". If you see something like:

ath_hal: 0.9.12.14 (AR5210, AR5211, AR5212) HAL status 13

The "HAL Status 13" bit means your card is not supported by the current drivers, and you need to upgrade.

The laptop I was working on was quite old, and had no onboard LAN. So this guide assumes nothing more than the Hoary install CD, and the following files:

1) GNU sharutils - needed for uudecode for the madwifi driver install:
ftp://ftp.gnu.org/gnu/sharutils/REL-...-4.3.80.tar.gz

2) The latest madwifi snapshot:
http://madwifi.otaku42.de/madwifi-cvs-current.tar.gz

I downloaded these on a internet-capable PC, and copied them to my laptop via USB pendrive and "sneakernet".

To build, we need the GNU C Compiler, gcc. At a prompt (represented by "#") I type:

Code:
# sudo su
# apt-get update
# apt-get install make gcc g++
You'll need the Hoary cdrom inserted for the above, and most of the following.

Purists will probably tell me "sudo su" is naughty, but with no web access anyway, it isn't much of a security risk.

You may recieve warnings here that packages cannot be verified. It's safe to ignore these for now.

Madwifi compiles against your currently installed kernel. For this, we also need kernel headers. The command
Code:
# uname -r
tells me the kernel I have installed. For me, that's "2.6.10-5-386". Now to grab the correct headers:

Code:
# apt-get install linux-headers-2.6.10-5-386
APT also installs linux-headers-2.6.10. Note this, because we need to fix a problem this causes later.

So now I untar my two files I downloaded

Code:
# tar xvzf sharutils-4.3.80.tar.gz
# tar xvzf madwifi-cvs-current.tar.gz
First, I build sharutils, which installs the "uudecode" program I need for madwifi

Code:
# cd sharutils-4.3.80
# ./configure
# make
# make install
# cd ..
Once done, I build madwifi. Madwifi incorrectly detects my kernel as "2.6.10" and not "2.6.10-5-386" and will build against the wrong headers. To fix this, we need to export some variables. Again, change these to match your installed kernel (found via the 'uname -r' command).

Code:
# cd madwifi
# export KERNELPATH=/usr/src/linux-2.6.10-5-386
# export KERNELRELEASE=2.6.10-5-386
# make
# make install
The new madwifi drivers should now be built and installed. At this stage, I ejected the Haory CDROM and rebooted my machine.

After reboot, dmesg now says:

Code:
wlan: 0.8.4.5 (EXPERIMENTAL)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413)
Notice the jump to ath_hal 0.9.14.9 from the old 0.9.12.14.

Now I can click System -> Administration -> Networking and my wireless network card appears as "ath0" which I can configure as normal with all my usual ESSID, WEP and IP information.

I'm assuming the next test release of Ubuntu will include the updated Madwifi drivers, but I hope in the short term this helps a few people getting theirs up and running. I see these forums are littered with folks failing to get their wireless working, which is frustrating especially after you've purchased hardware based on an official hardware compatability list, which is supposedly the clever thing to do.
elvis is offline   Reply With Quote
Old June 10th, 2005   #2
jaykay
First Cup of Ubuntu
 
Join Date: Apr 2005
Location: UK
Beans: 1
Re: Atheros AR5212 Madwifi HowTo

Here is a simple and easy way to get the Netgear Wg511T card up and running in easy steps. In 5 minutes you will be up and running.

1. start up a root console

2.type: iwconfig ( this will give you your card info and network /wireless info)

3. type: iwconfig ath0 channel 6 ( substitute channel 6 for whichever channel your router is transmitting on)

4. Type: iwlist scan ( this may take a minute, this will give you your routers wireless settings.)

5. Type: iwconfig ath0 essid xxxxxx ( replace xxxxxx with your routers essid)

6. Type: iwconfig ath0 ap xx xx xx xx xx xx( this is the six double digit mac address required and is listed in your iwlist scan message as above.)

7. Type: iwconfig ath0 key XXXXXXXXXX ( replace XXXXXXXX with your own hex wep key )

8. type: dhclient ( this gets your dhcp sorted ) you should now be up and running.

All of the information you need is right on the screen, although you will need to make a note of your wep key from your routers settings, as the output above may list it only as a ******** output .

Hope this helps some one.

I have testd this on various linux systems and it appears to work fine including live CDs.

One thing to note if you are using a knoppix system step 8 above will not work but you can replace it with the following command

step 8: type: pump -i ath0

Good Luck

Jaykay
jaykay is offline   Reply With Quote
Old June 16th, 2005   #3
IcemanV9
Gee! These Aren't Roasted!
 
Join Date: May 2005
Beans: 202
Ubuntu 6.06 Dapper
Re: Atheros AR5212 Madwifi HowTo

UPDATED: I realized (uname -r) confused many newbies. So, I changed it to reflect a correct syntax - `uname -r`; so that you can copy and paste.

Your info does help me to resolve the problem with my new cardbus adapter, D-Link DWL-G650.

Here's what I did:

wget http://otaku42.de/madwifi/madwifi-cvs-current.tar.gz
sudo apt-get install build-essential (only if you don't have it)
sudo apt-get install linux-headers-`uname -r` (again, only if you don't have it)
sudo apt-get install sharutils

tar xvzf madwifi-cvs-current.tar.gz
cd madwifi
KERNELPATH=/usr/src/linux-headers-`uname -r`; export KERNELPATH
KERNELRELEASE=`uname -r`; export KERNELRELEASE
sudo make
sudo make install

sudo mv /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_rate/onoe/ath_rate_onoe.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_rate/onoe/ath_rate_onoe.ko.orig
sudo mv /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_hal/ath_hal.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_hal/ath_hal.ko.orig
sudo mv /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath/ath_pci.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath/ath_pci.ko.orig

sudo cp /lib/modules/2.6.10-5-686/net/ath_rate_onoe.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_rate/onoe/ath_rate_onoe.ko
sudo cp /lib/modules/2.6.10-5-686/net/ath_hal.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath_hal/ath_hal.ko
sudo cp /lib/modules/2.6.10-5-686/net/ath_pci.ko /lib/modules/2.6.10-5-686/kernel/drivers/net/wireless/ath/ath_pci.ko

reboot (leave your cardbus in the slot)

when boot up, it will recongize the cardbus adapter (without an error message)!

To TEST ath0, I just used some commands from jaykay's instruction. AND, it works great.

Last edited by IcemanV9; July 16th, 2005 at 11:27 PM..
IcemanV9 is offline   Reply With Quote
Old June 18th, 2005   #4
rlklee
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 29
Unhappy Re: Atheros AR5212 Madwifi HowTo

When following the instructions given by Elvis, I get this repeated error on the "make" command for madwifi:


#make
Checking if all requirements are met,,, ok.
mkdir -p ./symbols
for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
(cd $i; make) | | exit 1; \
done
make[1]: Entering directory '/home/rlklee/Desktop/madwifi/ath_hal'
make -C /usr/src/linux-headers-2.6.10-5-386 SUBDIRS=/home/rlklee/Desktop/madwifi/ath_hal MODVERDIR=/home/rlklee/Desktop/madwifi/ath_hal../symbols modules
make[2]: Entering directory '/usr/src/linux-headers-2.6.10-5-386'
Building modules, stage 2
MODPOST
Warning: could not find /home/rlklee/Desktop/madwifi/ath_hal/.hal.o.cmd for /home/rlklee/Desktop/madwifi/ath_hal/hal.o


It then continues to reiterate in this same warning pattern till the end... I'm new to the game, any help would be greatly appreciated.
rlklee is offline   Reply With Quote
Old June 18th, 2005   #5
elvis
A Carafe of Ubuntu
 
elvis's Avatar
 
Join Date: Jun 2005
Location: Brisbane, Australia
Beans: 111
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to elvis
Re: Atheros AR5212 Madwifi HowTo

Quote:
Originally Posted by rlklee
When following the instructions given by Elvis, I get this repeated error on the "make" command for madwifi
It looks like the build part is OK, but the scripts inside the madwifi source is giving you issues.

Perhaps try getting either a newer or older CVS snapshot and trying again. Maybe the snapshot you have has something broken in it?
elvis is offline   Reply With Quote
Old June 21st, 2005   #6
rlklee
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 29
Re: Atheros AR5212 Madwifi HowTo

Fixed the problem:

Everyone following Elvis' instructions (which are tip-top) should make sure to uninstall the linux-restricted madwifi package (using synaptic; just seach for linux-restricted, it should be the only one to pop up). All should be well.

Cheers,
rlklee is offline   Reply With Quote
Old June 21st, 2005   #7
DagaZ
First Cup of Ubuntu
 
Join Date: Jan 2005
Location: Sweden
Beans: 8
Ubuntu 6.10 Edgy
Send a message via ICQ to DagaZ Send a message via AIM to DagaZ
Re: Atheros AR5212 Madwifi HowTo

Using the guide of IcemanV9 I got my Netgear WG311T up and running in no-time. My bridged firewall works great!
__________________
Geeks always use a tux
DagaZ is offline   Reply With Quote
Old June 21st, 2005   #8
doans
Just Give Me the Beans!
 
Join Date: Nov 2004
Location: Austin, TX
Beans: 42
The Feisty Fawn Testing
Re: Atheros AR5212 Madwifi HowTo

Quote:
Originally Posted by DagaZ
Using the guide of IcemanV9 I got my Netgear WG311T up and running in no-time. My bridged firewall works great!
Yes, I also got my WG311T up and running using IcemanV9 post in no time. FYI The first post did not work for me.
doans is offline   Reply With Quote
Old June 24th, 2005   #9
elvis
A Carafe of Ubuntu
 
elvis's Avatar
 
Join Date: Jun 2005
Location: Brisbane, Australia
Beans: 111
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to elvis
Re: Atheros AR5212 Madwifi HowTo

Quote:
Originally Posted by doans
Yes, I also got my WG311T up and running using IcemanV9 post in no time. FYI The first post did not work for me.
It looks like my post is specific to people using the "-386" kernels. People using "-686" kernels need to follow IcemanV9's instructions instead.

Again, "uname -r" will tell you which kernel you have installed.
elvis is offline   Reply With Quote
Old June 24th, 2005   #10
doans
Just Give Me the Beans!
 
Join Date: Nov 2004
Location: Austin, TX
Beans: 42
The Feisty Fawn Testing
Re: Atheros AR5212 Madwifi HowTo

Quote:
Originally Posted by elvis
It looks like my post is specific to people using the "-386" kernels. People using "-686" kernels need to follow IcemanV9's instructions instead.

Again, "uname -r" will tell you which kernel you have installed.
FYI I am using the k7 kernel version. Just had to change all entries from -686 to -k7. Other than that no problems.
doans is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:05 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry