LinuxQuestions.org
Visit Jeremy's Blog.
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-07-2005, 06:34 PM   #1
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Rep: Reputation: 30
another linux newbie vs madwifi


hey gang,

I'm a semi-newbie to linux now, I'm currently using Mandrake 10.0 and been bouncing from distro to distro trying to see which one I like the most. I love all the apps and the feel of mandrake. But I just cant seem to load the madwifi driver into the kernel. I havent done anything with compiling drivers yet (lucky me eh? :P) so this is new terroritory.. I am used to compiling new software for my linux distro though. anyways I'll give you guys the info on what I have done so far..

first thing is that I grabbed the latest madwifi files via cvs.. once i got those files i went into the top directory of my madwifi software.. which consists of

Code:
[ryan450@localhost madwifi]$ dir
ath       COPYRIGHT  hal       Makefile.inc  README     tools
ath_hal   CVS        include   net80211      release.h  wlan
ath_rate  driver     Makefile  patches       symbols
in this directory I typed in make. that went well with no errors of any kind.. then I typed make install, again no errors at all..

then I try modprobe ath_pci and it tells me

Code:
FATAL: Module ath_pci not found.
according to all the info I've been reading, it should have worked by now. I know my card is atheros based and I know that it works well under linux. Having gotten it to work on knoppix (my last distro that I tried out, it managed to auto-detect my card, all i had to do was configure) But I cant get this thing to run on mandrake 10.0.. (note I have the free downloaded one, I wont pay for free linux software thank you) any and all help is greatly appreciated.
 
Old 03-07-2005, 08:33 PM   #2
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
alrighty, after looking around the net a little more I managed to find an rpm of ndiswrapper 1.0 for my mandrake distro.. perfect I'm thinking ..

this is what I did..

ndiswrapper -i net5211.inf

then I typed in

ndiswrapper -l

Code:
Installed ndis drivers:
net5211 driver present, hardware present
perfect I'm thinking, then I typed ndiswrapper -m
that worked well too.

I type modprobe ndiswrapper

then type iwconfig and get

Code:
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.
now this dont make much sense :S.. I used the drivers from the cards website.. its a d-link DWL-G520 wireless card.. the driver installed and it found the hardware.. now why isnt mandrake loading the driver into my kernel like it should be doing?
 
Old 03-07-2005, 08:38 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
When you ran make install, were you root? You get that sort of modprobe error when the module doesn't get placed in /lib/modules/kernelversion directory. I suppose as an alternative, you could use an explicit KERNELPATH variable as part of the make:

make KERNELPATH=/usr/src/linux-2.x.x

Just set the KERNELPATH to wherever the source code resides.
 
Old 03-07-2005, 08:47 PM   #4
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Hangdog42
When you ran make install, were you root? You get that sort of modprobe error when the module doesn't get placed in /lib/modules/kernelversion directory. I suppose as an alternative, you could use an explicit KERNELPATH variable as part of the make:

make KERNELPATH=/usr/src/linux-2.x.x

Just set the KERNELPATH to wherever the source code resides.
ok, tried what you said and this is the output that I got.. notice the last line before my prompt

Code:
[root@localhost madwifi]# make KERNELPATH=/usr/src/linux-2.6.3-7mdk
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/ryan450/madwifi/ath_hal'
make -C /usr/src/linux-2.6.3-7mdk SUBDIRS=/home/ryan450/madwifi/ath_hal MODVERDIR=/home/ryan450/madwifi/ath_hal/../symbols modules
make[2]: Entering directory `/usr/src/linux-2.6.3-7mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
make[1]: Leaving directory `/home/ryan450/madwifi/ath_hal'
make[1]: Entering directory `/home/ryan450/madwifi/ath_rate/onoe'
make -C /usr/src/linux-2.6.3-7mdk SUBDIRS=/home/ryan450/madwifi/ath_rate/onoe MODVERDIR=/home/ryan450/madwifi/ath_rate/onoe/../../symbols modules
make[2]: Entering directory `/usr/src/linux-2.6.3-7mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
make[1]: Leaving directory `/home/ryan450/madwifi/ath_rate/onoe'
make[1]: Entering directory `/home/ryan450/madwifi/net80211'
make -C /usr/src/linux-2.6.3-7mdk SUBDIRS=/home/ryan450/madwifi/net80211 MODVERDIR=/home/ryan450/madwifi/net80211/../symbols  modules
make[2]: Entering directory `/usr/src/linux-2.6.3-7mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
make[1]: Leaving directory `/home/ryan450/madwifi/net80211'
make[1]: Entering directory `/home/ryan450/madwifi/ath'
make -C /usr/src/linux-2.6.3-7mdk SUBDIRS=/home/ryan450/madwifi/ath MODVERDIR=/home/ryan450/madwifi/ath/../symbols modules
make[2]: Entering directory `/usr/src/linux-2.6.3-7mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
make[1]: Leaving directory `/home/ryan450/madwifi/ath'
[root@localhost madwifi]# make install KERNELPATH=/usr/src/linux-2.6.3-7mdk
for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
        (cd $i; make install) || exit 1; \
done
make[1]: Entering directory `/home/ryan450/madwifi/ath_hal'
test -d //lib/modules/2.6.3-7mdkcustom/net || mkdir -p //lib/modules/2.6.3-7mdkcustom/net
strip -S ath_hal.ko
cp ath_hal.ko //lib/modules/2.6.3-7mdkcustom/net
make[1]: Leaving directory `/home/ryan450/madwifi/ath_hal'
make[1]: Entering directory `/home/ryan450/madwifi/ath_rate/onoe'
test -d //lib/modules/2.6.3-7mdkcustom/net || mkdir -p //lib/modules/2.6.3-7mdkcustom/net
strip -S ath_rate_onoe.ko
cp ath_rate_onoe.ko //lib/modules/2.6.3-7mdkcustom/net
make[1]: Leaving directory `/home/ryan450/madwifi/ath_rate/onoe'
make[1]: Entering directory `/home/ryan450/madwifi/net80211'
test -d //lib/modules/2.6.3-7mdkcustom/net || mkdir -p //lib/modules/2.6.3-7mdkcustom/net
for i in wlan.o wlan_wep.o wlan_tkip.o wlan_ccmp.o wlan_acl.o wlan_xauth.o; do \
        f=`basename $i .o`; \
        strip -S $f.ko; \
        cp $f.ko //lib/modules/2.6.3-7mdkcustom/net; \
done
make[1]: Leaving directory `/home/ryan450/madwifi/net80211'
make[1]: Entering directory `/home/ryan450/madwifi/ath'
test -d //lib/modules/2.6.3-7mdkcustom/net || mkdir -p //lib/modules/2.6.3-7mdkcustom/net
strip -S ath_pci.ko
cp ath_pci.ko //lib/modules/2.6.3-7mdkcustom/net
make[1]: Leaving directory `/home/ryan450/madwifi/ath'
[root@localhost madwifi]# modprobe ath_pci
FATAL: Module ath_pci not found.
[root@localhost madwifi]#
its going in the right place, but modprobe doesnt do anything :S..

and for the modprobe ndiswrapper.. after checking my lsmod I see ndiswrapper being listed as the first one.. so its loaded into my kernel and is ready to go right? but when i type in iwconfig to configure the card i get this..

Code:
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.
doesnt make sense does it?
 
Old 03-07-2005, 09:11 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
That is really an odd result with madwifi.....You're right it looks as if it is going in the right place (although you might have a look in lib/modules/2.6.3-7mdkcustom/net to be sure). If it ISN'T there, you might try copying it by hand from where you compiled it.

The reason I'm pushing madwifi, is that using a native linux driver is almost always a better idea than going with ndiswrapper. I have nothing against ndiswrapper (I use it for my card), but mixing Windows drivers with Linux can be tricky.

Anyway:

Quote:
doesnt make sense does it?
Actually it does. There is a command that a lot of people miss, namely ndiswrapper -m. This command modifies your modprobe.conf file (or modules.conf if you are running a 2.4.x kernel) to include the line [B]alias wlan0 ndiswrapper[B]. If that doesn't get added, then your system has no way of knowing that ndiswrapper is a wireless module. Try running it and see if that doesn't cause wlan0 to show up.
 
Old 03-07-2005, 09:18 PM   #6
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Hangdog42
[B]That is really an odd result with madwifi.....You're right it looks as if it is going in the right place (although you might have a look in lib/modules/2.6.3-7mdkcustom/net to be sure). If it ISN'T there, you might try copying it by hand from where you compiled it.

The reason I'm pushing madwifi, is that using a native linux driver is almost always a better idea than going with ndiswrapper. I have nothing against ndiswrapper (I use it for my card), but mixing Windows drivers with Linux can be tricky.

Anyway:



Actually it does. There is a command that a lot of people miss, namely ndiswrapper -m. This command modifies your modprobe.conf file (or modules.conf if you are running a 2.4.x kernel) to include the line [B]alias wlan0 ndiswrapper. If that doesn't get added, then your system has no way of knowing that ndiswrapper is a wireless module. Try running it and see if that doesn't cause wlan0 to show up.
hehe, actually I already did type in ndiswrapper -m... and when i type it again it states that the line is already in modprobe config.. and still no wlan0..

and when I browse my way to lib/modules/2.6.3-7mdkcustom/net sure enough they are there..

Code:
[ryan450@localhost net]$ dir
ath_hal.ko  ath_rate_onoe.ko  wlan_ccmp.ko  wlan_tkip.ko  wlan_xauth.ko
ath_pci.ko  wlan_acl.ko       wlan.ko       wlan_wep.ko
[ryan450@localhost net]$
 
Old 03-08-2005, 07:22 AM   #7
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
could it be possible that modprobe is looking in the wrong spot? what about rebuilding the kernel/updating it? would it work if I integrated these drivers into my linux kernel and rebuild?
 
Old 03-08-2005, 07:32 AM   #8
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
Have you rebooted since making and installing. There was something that I compiled recently (cant remember what it was, but could well have been madwifi) and after making and installing, I couldnt load the module, same error. Then I rebooted and it did work. I thought it was strange at the time but forgot about it after it worked. Its a long shot, but may also be a bug with the latest release. ( if it was madwifi that did it, I only compiled it about three weeks ago so you may have the same version and it could be a bug maybe. I would tell you the version i'm using but unfortunately i'm having issues with wvdial after a dist-upgrade and it wont work, so am writing this from windows) good luck anyway.

Last edited by short101; 03-08-2005 at 07:34 AM.
 
Old 03-08-2005, 07:40 AM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
could it be possible that modprobe is looking in the wrong spot?
I suppose it is possible, but I haven't run across that before. Just out of curiosity, does your running kernel (use uname -a to find out) match the source code? If they don't match, that might lead to the problems your seeing.

As for ndiswrapper, I had a quick look at the Mandrake specific instructions at the ndiswrapper wiki, and for both 10.0 and 10.1, you need to remove some of the default stuff Mandrake installs before ndiswrapper works. It might be worth a read. Another thing to try is to edit your modprobe.conf file and change wlan0 to eth1 in the alias line. I know some Red Hat tools don't recongnize wlan as a legit network device name and it could be that Mandrake has picked up on that nonsense.
 
Old 03-08-2005, 02:44 PM   #10
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Hangdog42
I suppose it is possible, but I haven't run across that before. Just out of curiosity, does your running kernel (use uname -a to find out) match the source code? If they don't match, that might lead to the problems your seeing.

As for ndiswrapper, I had a quick look at the Mandrake specific instructions at the ndiswrapper wiki, and for both 10.0 and 10.1, you need to remove some of the default stuff Mandrake installs before ndiswrapper works. It might be worth a read. Another thing to try is to edit your modprobe.conf file and change wlan0 to eth1 in the alias line. I know some Red Hat tools don't recongnize wlan as a legit network device name and it could be that Mandrake has picked up on that nonsense.
alrighty, I double checked on the source files and running kernel, both exactly the same number.. no problem there..

I was following the instructions in the mandrake instructions and hit a snag when trying to compile ndiswrapper version 1.1. Here's the error

Code:
[root@localhost ndiswrapper-1.1]# make
make -C driver
make[1]: Entering directory `/home/ryan450/ndiswrapper-1.1/driver'
make -C /lib/modules/2.6.3-7mdk/build SUBDIRS=/home/ryan450/ndiswrapper-1.1/driver \
        NDISWRAPPER_VERSION=1.1 \
        EXTRA_VERSION= modules
make[2]: Entering directory `/usr/src/linux-2.6.3-7mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  CC [M]  /home/ryan450/ndiswrapper-1.1/driver/usb.o
/home/ryan450/ndiswrapper-1.1/driver/usb.c: In function `usb_select_configuration':
/home/ryan450/ndiswrapper-1.1/driver/usb.c:527: error: invalid type argument of `->'
/home/ryan450/ndiswrapper-1.1/driver/usb.c:528: error: invalid type argument of `->'
make[3]: *** [/home/ryan450/ndiswrapper-1.1/driver/usb.o] Error 1
make[2]: *** [/home/ryan450/ndiswrapper-1.1/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.3-7mdk'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/ryan450/ndiswrapper-1.1/driver'
make: *** [all] Error 2
[root@localhost ndiswrapper-1.1]#
now this I am truely stumped.. no idea whats going here :S.

oh btw.. I have tried the reboot... its not an easy fix like that :S..
 
Old 03-08-2005, 03:20 PM   #11
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
As strange as this sounds, dropping back to an earlier version of ndiswrapper may help here. I'd suggest .12, .10 and .7 (in more or less that order). Somwhere around 0.10 (it may have been a version or two later), the ndiswrapper group seems to have added code to accomodate the 2.6.10 kernel. At least on my system (which was running 2.6.7 at the time), those changes caused compiling errors similar to what you are seeing. Since you're running a 2.6.3 kernel, the most recent ndiswrapper may not compile properly.
 
Old 03-08-2005, 04:09 PM   #12
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
ok, i got an older version of ndiswrapper, the 0.10 version.. it compiled nicely without any bitching by the CPU.. this is what I did and got now.,.


Code:
[root@localhost dwlg520_driver_248]# ndiswrapper -i net5211.inf
net5211 is already installed. Use -e to remove it
[root@localhost dwlg520_driver_248]# ndiswrapper -e net5211
[root@localhost dwlg520_driver_248]# ndiswrapper -l
No drivers installed
[root@localhost dwlg520_driver_248]# ndiswrapper -i net5211.inf
Installing net5211
[root@localhost dwlg520_driver_248]# ndiswrapper -l
Installed ndis drivers:
net5211 hardware present
[root@localhost dwlg520_driver_248]# dir
ar52119x.sys  ar5211.sys  net5211.inf  Setup.exe
[root@localhost dwlg520_driver_248]# ndiswrapper
Usage: ndiswrapper OPTION

Manage ndis drivers for ndiswrapper.
-i inffile   Install driver described by inffile
-e driver    Remove driver
-l           List installed drivers
-m           Write configuration for modprobe
[root@localhost dwlg520_driver_248]# ndiswrapper -m
modprobe config already contains alias directive

[root@localhost dwlg520_driver_248]# modprobe ndiswrapper
[root@localhost dwlg520_driver_248]# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

[root@localhost dwlg520_driver_248]#
notice that when I typed in ndiswrapper -m it told me that it already contains an alias directive.. but the result is the exact same problem, no different..

when I checked my lsmod just for kicks, I see ndiswrapper at the top of the list.

Last edited by Ryan450; 03-08-2005 at 04:10 PM.
 
Old 03-08-2005, 08:15 PM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Man, you're killing me here.....


Quote:
[root@localhost dwlg520_driver_248]# ndiswrapper -l
Installed ndis drivers:
net5211 hardware present
This actually bugs me a little bit. What bugs me is the lack of a "driver present" statement on the info returned by ndiswrapper -l. I think this is telling you that the Windows driver may not be the correct one. A little digging on the supported card list of ndiswrapper also suggests you may have the wrong widows driver. If I search on that page for net5211, what I find is that this is a driver for a DWL-G650 and ealier on you said you have a DWL-G520. The bad news is that looking at the entries for the G520 shows that people are having a lot of problems with this card. There are links to some drivers, but if you have a CD that came with this card, I would have a try with those first.
 
Old 03-08-2005, 09:27 PM   #14
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Hangdog42
Man, you're killing me here.....




This actually bugs me a little bit. What bugs me is the lack of a "driver present" statement on the info returned by ndiswrapper -l. I think this is telling you that the Windows driver may not be the correct one. A little digging on the supported card list of ndiswrapper also suggests you may have the wrong widows driver. If I search on that page for net5211, what I find is that this is a driver for a DWL-G650 and ealier on you said you have a DWL-G520. The bad news is that looking at the entries for the G520 shows that people are having a lot of problems with this card. There are links to some drivers, but if you have a CD that came with this card, I would have a try with those first.
ummm... net5211 is the driver for the DWL-G520 card.. I downloaded the latest one from the d-link website, and checking my driver cd that came with the card shows the exact same file name for the driver. I know this card works, I have gotten it to work on knoppix 3.7.. perhaps its mandrake's kernel being out of date? and I tried using the driver from my CD, exact same problem no different.

Last edited by Ryan450; 03-08-2005 at 09:43 PM.
 
Old 03-08-2005, 10:04 PM   #15
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
alrighty, I just booted up knoppix and sure enough it autodetects my card and is ready to go once I configure and bring it up with ifconfig..

it looks like knoppix is using the madwifi drivers, running kernel version

Linux Knoppix 2.4.27 #2 SMP Mo Aug 9 00:39:37 CEST 2004 i686 GNU/Linux

now I know my kernel's version number in mandrake is higher.. could this be a bug in the kernel I'm seeing? I still get module cannot be found by modprobe when I try to modprobe the ath_pci driver... (which is what knoppix is using to start up my wireless card)
 
  


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
PPC Linux and 802.11g Madwifi FunkyRes Linux - Hardware 0 02-21-2005 11:33 PM
Wireless Newbie Problem:Madwifi newinlinux Slackware 2 02-16-2005 06:20 PM
Using madwifi to setup linux router/access point kragbax Linux - Wireless Networking 2 01-10-2005 08:38 PM
Madwifi linux 2.6.7 fedora core 2 install bohlke Linux - Hardware 1 09-14-2004 04:43 PM
{{<SuSE Newbie Madwifi Woes >}] Herb_McNewbie Linux - Wireless Networking 1 03-25-2004 06:01 AM

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

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