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

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old December 18th, 2005   #1
Lambert
Fresh Brewed Ubuntu
 
Lambert's Avatar
 
Join Date: Jun 2005
Location: Ashland Virginia (usa)
My beans are hidden!
Send a message via ICQ to Lambert
HOWTO: madwifi-ng from svn snapshot

As every user has options with gnu/linux you can also see this howto. The instructions there will let you keep restricted modules working.
http://ubuntuforums.org/showthread.p...hlight=MADWIFI

This howto will install the latest svn snapshot of the madwifi-ng driver for pci devices based on the atheros chipset. The difference between this and the other howto on madwifi in this section is the other will update to the latest madwifi-old module and this installs madwifi-ng.
The newer features found in the -ng version can be found here.

This update is not necessary unless
1. your pci device is not working with current version that comes with breezy.
2. Or you can use if you removed restricted modules to use latest nvidia/fglrx drivers
3. You build a custom kernel but note these instructions do not include steps to properly make and install when using custom kernel. I can add these later as I'm not sure of all steps and currently don't have a custom kernel to work with. If somebody else wants to post some instructions, I'll edit them into the original post.

Note: madwifi does not currently support USB devices with the atheros chipset and the roadmap shows it will be sometime before USB support is built into the driver(version 2.0). You can watch progress at www.madwifi.org


Warning:
The atheros driver that comes with Breezy is part of the restricted-modules package. This will need to be removed before you can install the latest driver. All modules in this package will be removed and may affect areas such as your graphic driver. If you need to use a module in this package then you will also have to recompile and install that module. There are howtos on the latest nvidia and fglrx in the tips and tricks section.

Here are the modules in the restricted-module package

Currently the following modules are included:
- madwifi (Atheros)
- fglrx (ATI)
- nvidia
- fcdsl, fcdsl2, fcdslsl, fcdslslusb, fcdslusb, fcdslusb2, fcdslusba,
fcpci, fcpcmcia, fcpcmcia_cs, fcusb, fxusb (AVM ISDN)
- ltmodem (Winmodem)

HOWTO: latest fglrx
HOWTO: latest nvidia

.1 Preperation

You will need a working internet connection to complete this howto.
Basic knowledge of moving around in the terminal is required
1. Remove the following package
Code:
sudo apt-get --purge linux-restricted-modules-`uname -r`
2. Install the following packages
Code:
sudo apt-get install build-essential linux-headers-`uname -r` gcc-3.4 subversion sharutils
1.0 Download

Code:
cd /usr/src
Code:
sudo svn checkout http://svn.madwifi.org/trunk madwifi-ng
move into the directory that was created

Code:
cd /usr/src/madwifi-ng
1.1 Build

There is an error that comes up if you don't follow this step first.

Open Makefile.inc

Code:
sudo gedit Makefile.inc
towards the bottom is a line line that needs to be modified.

COPTS+= -Werror

change this line and remove the -Werror part so line now looks like this.

COPTS+=

This will not affect driver in anyway, it's just something in the way ubuntu built the kernel for breezy which will prevent installing the driver.

Note: I and others have been able to build, install, and use this driver with no problems but as provided by marcantonio, see about setting up file to ensure gcc-3.4 is used to build driver in this post.
http://ubuntuforums.org/showpost.php...2&postcount=35

Now

Code:
sudo make
There will be some warnings but you can ignore those. Look for any errors as these will need to be addressed before moving on to next step.

1.2 Install

Code:
sudo make install
You may get this warning

Code:
WARNING:
It seems that there are modules left from previous MadWifi installations.
You should consider removing them before you continue, or else you might
experience problems during operation. Remove old modules?

[l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ?
You should remove with option r

If all goes well your last few lines should look like this.

Code:
(export MODULEPATH=/lib/modules/2.6.15-8-686/net; depmod -ae)
echo "KERNELRELEASE=2.6.15-8-686" > ./install.log
echo "DESTDIR=" >> ./install.log
1.3 Insert module

Code:
sudo modprobe ath_pci
1.4 Create the interface

Code:
wlanconfig ath0 create wlandev wifi0 wlanmode sta
You should now have the latest madwifi driver working. Just configure your network and connect.

If it does not then try to restart your network

Code:
sudo /etc/init.d/networking restart
or reboot after completing the next step.

2.0 Configure for boot

Edit Feb 4th: With latest driver, this part is no longer needed. Kept in howto for historical reference.

When you reboot the interface will not be set up. Add a line like this for the interface in the /etc/network/interfaces

pre-up wlanconfig ath0 create wlandev wifi0 wlanmode sta

Example

iface ath0 inet dhcp
pre-up wlanconfig ath0 create wlandev wifi0wlanmode sta
wireless-essid xxxx
wireless-key xxxx


3.0 Uninstall

If you want to uninstall this module just move back to the directory

Code:
cd /usr/src/madwifi-ng
and

Code:
 sudo make uninstall
Notes
If you want to use wpa encryption with -ng driver you will need latest wpasupplicant. See instructions here.

Last edited by Lambert; February 5th, 2006 at 12:32 AM..
Lambert is offline   Reply With Quote
Old December 23rd, 2005   #2
pugs
5 Cups of Ubuntu
 
Join Date: Dec 2005
Beans: 32
Re: HOWTO: Latest madwifi svn snapshot

Gave this a shot earlier....Had some errors though and not sure how to correct them. This is what it spits out at the end:

make[3]: *** [/usr/src/madwifi-ng/net80211/if_media.o] Error 1
make[2]: *** [_module_/usr/src/madwifi-ng/net80211] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/madwifi-ng/net80211'
make: *** [modules] Error 1

I dont see anything above it about errors, besides this line:

cc1: warnings being treated as errors

Any help would be greatly appreciated.
pugs is offline   Reply With Quote
Old December 23rd, 2005   #3
Lambert
Fresh Brewed Ubuntu
 
Lambert's Avatar
 
Join Date: Jun 2005
Location: Ashland Virginia (usa)
My beans are hidden!
Send a message via ICQ to Lambert
Re: HOWTO: Latest madwifi svn snapshot

It may not have anything about errors above this but there is more information needed above this. Can you post the entire output after running the command.
Lambert is offline   Reply With Quote
Old December 23rd, 2005   #4
pugs
5 Cups of Ubuntu
 
Join Date: Dec 2005
Beans: 32
Re: HOWTO: Latest madwifi svn snapshot

Yah, I think I see the problems, but have no idea how to fix them:

root@BigLaptop:/usr/src/madwifi-ng# make
Checking requirements... ok.
Checking kernel configuration... ok.
mkdir -p ./symbols
for i in ./ath_hal ./net80211 ath_rate/sample ./ath; do \
make -C $i || exit 1; \
done
make[1]: Entering directory `/usr/src/madwifi-ng/ath_hal'
cp -f ./../hal/public/i386-elf.opt_ah.h opt_ah.h
cp -f ./../hal/linux/ah_osdep.c ah_osdep.c
/usr/bin/uudecode ./../hal/public/i386-elf.hal.o.uu
make -C /usr/src/linux-headers-2.6.12-10-686 SUBDIRS=/usr/src/madwifi-ng/ath_hal MODVERDIR=/usr/src/madwifi-ng/ath_hal/../symbols modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.12-10-686'
CC [M] /usr/src/madwifi-ng/ath_hal/ah_osdep.o
LD [M] /usr/src/madwifi-ng/ath_hal/ath_hal.o
Building modules, stage 2.
MODPOST
Warning: could not find /usr/src/madwifi-ng/ath_hal/.hal.o.cmd for /usr/src/madwifi-ng/ath_hal/hal.o
CC /usr/src/madwifi-ng/ath_hal/ath_hal.mod.o
LD [M] /usr/src/madwifi-ng/ath_hal/ath_hal.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
make[1]: Leaving directory `/usr/src/madwifi-ng/ath_hal'
make[1]: Entering directory `/usr/src/madwifi-ng/net80211'
make -C /usr/src/linux-headers-2.6.12-10-686 SUBDIRS=/usr/src/madwifi-ng/net80211 MODVERDIR=/usr/src/madwifi-ng/net80211/../symbols modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.12-10-686'
CC [M] /usr/src/madwifi-ng/net80211/if_media.o
cc1: warnings being treated as errors
In file included from include/linux/if_ether.h:107,
from include/linux/netdevice.h:29,
from /usr/src/madwifi-ng/net80211/if_media.c:60:
include/linux/skbuff.h: In function 'skb_add_data':
include/linux/skbuff.h:1067: warning: pointer targets in passing argument 1 of 'csum_and_copy_from_user' differ in signedness
make[3]: *** [/usr/src/madwifi-ng/net80211/if_media.o] Error 1
make[2]: *** [_module_/usr/src/madwifi-ng/net80211] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-10-686'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/madwifi-ng/net80211'
make: *** [modules] Error 1
pugs is offline   Reply With Quote
Old December 23rd, 2005   #5
Lambert
Fresh Brewed Ubuntu
 
Lambert's Avatar
 
Join Date: Jun 2005
Location: Ashland Virginia (usa)
My beans are hidden!
Send a message via ICQ to Lambert
Re: HOWTO: Latest madwifi svn snapshot

Ok, do this

in user /usr/src/madwifi-ng

open up Makefile.inc

sudo gedit Makefile.inc

towards the bottom you'll see a line COPT -Werror

erase the -Werror part and save the file.

then sudo make again

You'll see a bunch of warnings in the output but should complete and you can go onto the make install step.
Lambert is offline   Reply With Quote
Old December 23rd, 2005   #6
Rob2687
Way Too Much Ubuntu
 
Rob2687's Avatar
 
Join Date: Apr 2005
Location: Markham, Ontario
Beans: 233
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Latest madwifi svn snapshot

couple of problems

Code:
robert@linux:~$ sudo apt-get purge linux-restricted-modules-`uname -r`
E: Invalid operation purge
robert@linux:~$
Code:
robert@linux:~$ sudo apt-get install build-essentials linux-headers-`uname -r` gcc-3.4 subversion
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package build-essentials
robert@linux:~$
Code:
robert@linux:/usr/src/madwifi-ng$ sudo make
Checking requirements... FAILED
The 'uudecode' tool was not found on your system. Please make sure
it is installed in your PATH, then try again.
make: *** [sanitycheck] Error 1
Rob2687 is offline   Reply With Quote
Old December 29th, 2005   #7
Vetto
Just Give Me the Beans!
 
Vetto's Avatar
 
Join Date: Jul 2005
Location: USA East Coast
Beans: 66
Kubuntu 7.10 Gutsy Gibbon
Send a message via Yahoo to Vetto
Re: HOWTO: madwifi-ng from svn snapshot

Quote:
Originally Posted by Lambert
2.0 Configure for boot
When you reboot the interface will not be set up. Add a line like this for the interface in the /etc/network/interfaces

pre-up wlanconfig ath0 create wlandev wifi0 wlanmode sta

Example

iface ath0 inet dhcp
pre-up wlanconfig ath0 create wlandev wifi0wlanmode sta
wireless-essid xxxx
wireless-key xxxx
This got my Netgear WG511T pccard working finally, but upon bootup it hangs at "configuring network interfaces"... eventually reports OK then FAILS at "Waiting for network interfaces to come up"

All I have to do to get it up is press the "activate" button in kcmwifi (KDE3.5) once the system is loaded. ANy ideas?
Vetto is offline   Reply With Quote
Old December 29th, 2005   #8
Lambert
Fresh Brewed Ubuntu
 
Lambert's Avatar
 
Join Date: Jun 2005
Location: Ashland Virginia (usa)
My beans are hidden!
Send a message via ICQ to Lambert
Re: HOWTO: Latest madwifi svn snapshot

Post your interfaces file here minus the personal data.

I also see a typo in my example. there should be a space between wifi0 wlanmode

I'm not sure if your earlier question was answered.
wifi0 is actually a base interface on top of the driver. This interface doesn't connect to anything except an interface that is created. The command you use builds a station interface on top of that so you can connect to your ap. The design of the madwifi driver allows you to build multiple interfaces and run the wireless device in multiple modes and ways at the same time. For a typical home user, nothing important, the command gives you an interface to connect to your home router. For more complex networking enviroments, lots of flexibility to ensure connection and productivity.
Lambert is offline   Reply With Quote
Old December 29th, 2005   #9
Vetto
Just Give Me the Beans!
 
Vetto's Avatar
 
Join Date: Jul 2005
Location: USA East Coast
Beans: 66
Kubuntu 7.10 Gutsy Gibbon
Send a message via Yahoo to Vetto
Re: HOWTO: Latest madwifi svn snapshot

Hereis my interfaces file:

Code:
# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
	script grep
	map eth0

iface ath0 inet dhcp
pre-up wlanconfig ath0 create wlandev wifi0 wlanmode sta
wireless-essid AcmeRockets
wireless-key **********

auto ath0
I have to hit "activate" in kde's applet and also "dhclient ath0" to get online every time.
Vetto is offline   Reply With Quote
Old December 29th, 2005   #10
Lambert
Fresh Brewed Ubuntu
 
Lambert's Avatar
 
Join Date: Jun 2005
Location: Ashland Virginia (usa)
My beans are hidden!
Send a message via ICQ to Lambert
Re: HOWTO: Latest madwifi svn snapshot

Try this

remove the auto ath0 line from the file

and underneath the map eth0 add

map ath0
Lambert 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 08:28 AM.


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