LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 03-27-2004, 07:46 PM   #1
DigitalVixen
LQ Newbie
 
Registered: Mar 2004
Location: Sweden
Distribution: My own :)
Posts: 14

Rep: Reputation: 0
Simple HOWTO for 2.4.x kernels. (Most cards)


Edit : This is NOT for the 2.6 series kernel! 2.6 handles modules very differently and this how-to will NOT work!!

This is a simple HOWTO to get your wireless card working in Linux.
All commands are given between `` '' and you'll have to edit most of them to suit your system. If you have any questions or adds to this HOW-TO, just post them below.
I should also add, that these drivers support a wide range of cards, and also should work independant on distribution, although things might have to be done slightly different for different distributions.

First off, we need a few programs;
wireless tools - you can download, search freshmeat for ``iwconfig'' and you'll find them.

Download and untar them using ``tar zxvf wireless_tools.26.tar.gz''
Now you can remove the downloaded file, you don't need it anymore ``rm wireless_tools.26.tar.gz''
Change directory to wireless_tools.26, ``cd wireless_tools.26''.
Now compile and install it using ``make && make install''.
If you get any errors, read the INSTALL file in the same directory, if all went well, we can cd out of the dir and delete it ``cd .. && rm -rf wireless_tools.26''.

Next we need to get the drivers, these are best to get from cvs.
If you have cvs installed, this command will download them for you ``cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi''.
CD into the new directory that was made ``cd madwifi''.
Now you need to figure a few things out on your own; what kernel version (KERNELRELEASE) you have and where the sources are (KERNELPATH). You will also have to know wheter your distribution uses /usr/local/bin or just /usr/bin (TOOLPREFIX), and finally you need to know what sort of CPU you are building for (TARGET). If it is x86 then we will use i386-elf. When you know these things do ``export KERNELPATH=/path/to/sources && export KERNELRELEASE=2.4.x && export TOOLPREFIX=/usr/bin/ && export TARGET=i386-elf''. and change everything after the '=' to what you need.
Now it should be safe to build it with make, ``make && make install''.
You may have to copy hal/linux/<your target arch>.opt_ah.h to hal/linux/opt_ah.h
``cp hal/linux/i386-elf.opt_ah.h hal/linux/opt_ah.h && make && make install''.

Now the drivers should be complete and ready to be used, now we test to load the new modules which should be in /lib/modules/<kernel number>/net. If they are modprobe will suffice, else you might have to locate them with ``find / -iname ath_hal.o'' and go to that directory.

Use modprobe first ``modprobe wlan && modprobe ath_hal && modprobe ath_pci''. Note that wlan and ath_hal must be loaded before ath_pci is.

If this doesn't work, change dir as I described above and do ``insmod wlan && insmod ath_hal && ath_pci''.

If they complain about symbolic links, you need to recompile your kernel. Edit the .config file in your kernel source directory and look for the line CONFIG_MODVERSIONS= make sure it says ``n''. If it doesn't, change the ``y'' to ``n'' and recompile your kernel. Note; you only need to remake your image! ``make bzImage''. Copy it to the correct place and reboot Linux.
Now you just might have to redo the wireless drivers, which is why we haven't deleted that directory yet, go back up and redo those steps.
After reboot you can test loading the modules again, if no errors you don't have to recompile your drivers.

Next, get the card up and running.
If you have another ethernet card running, it appears you will need to turn it off ``route del -net default && ifconfig eth0 down''.

There are now two ways to get an IP# to your netcard, either setting it by hand or get it from a DHCP server, i'll describe the latter first.

Bring up the interface first ``ifconfig ath0 up''.
If you want to use anything else than 802.11a, you need to specify a mode with ``iwpriv ath0 mode X''. Find out what you should replace X with by reading the manpages for iwconfig ``man iwconfig'' look for ``mode''.

Set your essid (ssid applys here too) ``iwconfig ath0 essid any''. You can replace ``any'' with your own essid but then you need to use "" around the name ``iwconfig ath0 essied "Digital"''.

If you have a wep key, set it now ``iwconfig ath0 key XXXXX''. Replace XXXXX with your WEP key.

Set the channel you want to use ``iwconfig ath0 channel 5''. Replace 5 with your channel.

If you want to specify bitrate (you do) use ``iwconfig ath0 rate 24MB''. Replace 24 with your bitrate.

Now call dhcp to get route, nameservers and ip# for you ``dhcpcd ath0''. This might take a few.

If all is fine, you can now reach your LAN and internet where that is available.

For static ip#, you do it slightly different.

Bring up the interface first ``ifconfig ath0 up 192.168.0.1''.
Change ``192.168.0.1'' to whatever IP# you want to use.

Find out what your gateways IP# is and set it
``route add default gw 192.168.0.254''. Replace ``192.168.0.254'' with your gateway's IP#.

Find out what your nameservers ip# is and add them to /etc/resolv.conf file.
``echo "nameserver 192.168.0.254" >> /etc/resolv.conf''.

Change 192.168.0.254 to your name servers ip#.

If you want to use anything else than 802.11a, you need to specify a mode with ``iwpriv ath0 mode X''. Find out what you should replace X with by reading the manpages for iwconfig ``man iwconfig'' look for ``mode''.

Set your essid (ssid applys here too) ``iwconfig ath0 essid any''. You can replace ``any'' with your own essid but then you need to use "" around the name ``iwconfig ath0 essied "Digital"''.

If you have a wep key, set it now ``iwconfig ath0 key XXXXX''. Replace XXXXX with your WEP key.

Set the channel you want to use ``iwconfig ath0 channel 5''. Replace 5 with your channel.

If you want to specify bitrate (you do) use ``iwconfig ath0 rate 24MB''. Replace 24 with your bitrate.

Should work, and if it doesn't maybe I've helped you a bit on the way at least :)

Good luck!
P.S Any comments would be nice :)

Last edited by DigitalVixen; 12-11-2004 at 03:01 PM.
 
Old 03-27-2004, 08:48 PM   #2
DigitalVAXen
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
Great!

Thanks for that excellent guide! Now I won't have trouble configuring laptops in the future (maybe I should stop formatting every few weeks or so...) and I don't have to hold someone's hand while they do it. Great work!
 
Old 04-06-2004, 10:47 PM   #3
dethree
LQ Newbie
 
Registered: Mar 2004
Distribution: slack
Posts: 10

Rep: Reputation: 0
i was having a look at your guide and decide to give it a go, but unfortunately i failed on the exporting the KERNELSOURCE PATH part as written on your instruction and got this message:

Code:
bash-2.05b# export KERNELPATH=/usr/src/linux-2.4.22 && export KERNELRELEASE=2.4.22 && export TOOLPREFIX=/usr/bin && export TARGET=i386-elf
bash-2.05b# make && make install 
make: *** No targets specified and no makefile found.  Stop.
so i stop going further and want to seek some advice on how to fix this.
i'm using the default slackware 9.1 with no updates yet and the card is WG311 PCI, P4 1.6.

please help
 
Old 04-15-2004, 07:43 PM   #4
LavaDevil94
LQ Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 47
why dont you write for the tldp? this saved my sanity! after all the junk that had no step-by-step (despite the fact that we know this is linux ), you pop up on a google search, and im connected! nice!
 
Old 04-18-2004, 07:25 PM   #5
DigitalVixen
LQ Newbie
 
Registered: Mar 2004
Location: Sweden
Distribution: My own :)
Posts: 14

Original Poster
Rep: Reputation: 0
Thank you for the kind words LavaDevil, but writting for the TLDP takes better howto's than this

dethree make sure there are a make file in the directory from which you are running make and make install.
 
Old 05-08-2004, 02:43 PM   #6
PhilWills
LQ Newbie
 
Registered: May 2004
Location: London, UK
Distribution: Fedora
Posts: 3

Rep: Reputation: 0
Recently installed fedora release 1 and tried to get this working for my Netgear WG311.

Initially ran into a problem with uudecode, but managed to find the shar utils rpm and install that.

Now however, when I try to make the drivers retrieved from cvs, I get the following error:

make -C /lib/modules/2.4.22-1.2115.nptl/ SUBDIRS=/home/phil/madwifi/ath_hal modules
make[2]: Entering directory `/lib/modules/2.4.22-1.2115.nptl'
make[2]: *** No rule to make target `modules'. Stop.

I specified KERNELRELEASE as 2.4.22, TARGET as TARGET and TOOLPREFIX as /usr/bin

Apologies if this is glaringly obvious. I've been using other people's UNIX systems for a while, but this is the first time I've tried installing my own.
 
Old 05-12-2004, 10:20 AM   #7
DigitalVixen
LQ Newbie
 
Registered: Mar 2004
Location: Sweden
Distribution: My own :)
Posts: 14

Original Poster
Rep: Reputation: 0
Hi Phil!

First off, your TARGET should be defined as I386-elf if your computer is a x86 based computer (Pentium I-4, Athlon, K6 etc.).
The error you recieve is because you are trying to run the make in the wrong directory, where there are no make files.
I suggest you read through the how-to more carefully and try to do it the way it's done there, it should work.
Also make sure that KERNELPATH is the correct path to your KERNEL sources, typically this would be /usr/src/linux or /usr/src/linux-2.4.x. If I recall correctly the kernel sources you can install with RedHat/Fedora appears in a slightly different directory, but you should be able to locate them easily.

Good luck!
 
Old 05-12-2004, 03:53 PM   #8
PhilWills
LQ Newbie
 
Registered: May 2004
Location: London, UK
Distribution: Fedora
Posts: 3

Rep: Reputation: 0
Apologies, my previous post contained a typo, I did correctly, specify the target as i386-elf. The problem I was getting then was actually because of the fact that, stupidly enough, I didn't have the kernel source installed anywhere.

I now have the kernel source installed, but upon my initial attempt to make the drivers in the madwifi directory, I got the following error:

make[1]: Entering directory `/home/phil/madwifi/ath_hal'
make -C /usr/src/linux-2.4 SUBDIRS=/home/phil/madwifi/ath_hal modules
make[2]: Entering directory `/usr/src/linux-2.4.22-1.2188.nptl'

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

------------------------------------------------------------

After cding to my kernel source directory and doing a make config with loadable module support, I then got it to compile, with a few warnings about unused variables, but nothing more worrying than that.

Thanks very much for all the help, DV.

Last edited by PhilWills; 05-13-2004 at 03:00 AM.
 
Old 05-18-2004, 01:20 PM   #9
ZeroPhade
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
Hello,

Im having a problem with the make && make install. I am a NEW user to linux, and i am using mandrake. i get the following error

when i do:

export KERNELPATH=/usr/bin && export KERNELRELEASE=2.6.3 && export TOOLPREFIX=/usr/bin && export TARGET=i386-elf

make && make install

i get this error:

makefile.inc:98: /lib/modules/2.6.3-4mdk/build/.config: no such file in directory

make: *** no rule to make target '/lib/modules/2.6.3-4mdk/build/.config'. stop.

is my KERNELPATH correct? this is all new to me. <--



Please help!
 
Old 05-19-2004, 05:02 AM   #10
icarrasco
LQ Newbie
 
Registered: May 2004
Location: Madrid, Spain
Posts: 2

Rep: Reputation: 0
Hi
First of all your kernel is 2.6.x, so i'm not sure if it will work at all.

Your kernelpath is not that directory. Check if you have a usr/src dir. If you have probably you will have a directory inside that is linux-2.6.3 and a symlink linux.
If you have your kernelpath is /usr/src/linux-2.6.3 and (in the case you have the symlink) /usr/src/linux

I hope this help
 
Old 05-19-2004, 06:37 AM   #11
ZeroPhade
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
Thank you icarrasco for your help!

still gives me the same error. is there anything i can do to get my D-link DWL-g650 to work with my vaio note book. i have spent like 4 days working on this with no luck. and me being new to this linux is really not helping much. hehe, i feel like just to reformat and go back to windows xp atleast its a easyer setup. Again thank you for your help icarrasco! I will give linux a couple more days. heh
 
Old 05-19-2004, 08:22 AM   #12
icarrasco
LQ Newbie
 
Registered: May 2004
Location: Madrid, Spain
Posts: 2

Rep: Reputation: 0
Hi again

By the way, did you check if /lib/modules/2.6.3-4mdk/build/.config exists??? The thing is that i don't know what the hell is looking for a .config file there, since that dir is for the compiled modules...

I was checking out some pages that maybe could help you:

http://www.myselph.de/personal/mynewbox.shtml
http://kurumi.sakura.ne.jp/~chimari/TR2/index-e.html

In any case, if you cannot configure madwifi driver, you could try to use one of these wrappers. With those ones you would use the windows drivers

(This one is free, and was working with my conceptronic before i started to use madwifi)
http://ndiswrapper.sourceforge.net/

(This one isn't free...)
http://www.linuxant.com/driverloader/

I hope this helps.

In any case now i know that VAIO with DWL-g650 should work wth madwifi, since a collegue has it working with SuSE 9.0 (With kernel 2.4.x)
 
Old 05-19-2004, 05:36 PM   #13
ZeroPhade
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
i uninstalled mandrake and Dl'ed the suse, it seems to work fine for now. thanks for all you r help icarrasco! i just have few bugs to work out with suse and the vaio. other then that seems to work great.

Oh btw im using Suse Linux 9.1 Pro.

again thank you!

Last edited by ZeroPhade; 05-19-2004 at 05:38 PM.
 
Old 05-20-2004, 03:40 AM   #14
Taqwus
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
I had the no rule to make target error I just copied the .config file from my /boot to /usr/src and named it .config it got rid of that problem
Also I was using the G650 card and I have to start Linux then insert the card to get it to work
 
Old 05-25-2004, 10:26 AM   #15
futurewizard
LQ Newbie
 
Registered: Mar 2004
Location: Fords
Posts: 11

Rep: Reputation: 0
Does this work for WG311 on ath chip set
 
  


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
simple samba howto? rammstein Linux - Networking 2 09-04-2005 11:54 PM
Howto build (configure) a simple router? carboncopy Slackware 21 03-16-2004 11:44 PM
?simple CVS configuration howto pudhiyavan Linux - Software 0 01-06-2004 03:49 AM
Network boot kernels HOWTO? nilwer Linux - Software 4 09-03-2003 05:45 AM
Looking for simple font howto, slack 9 itsjustme Slackware 12 05-24-2003 03:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 09:01 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