Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am now trying to switch to linux from Windows. So far, my experience has been great, except for my wirless adapter.
Specs:
Microsoft
802.11b
MN-510
USB
Prism2/2.5/3
I have Mandrake 9.2 and I downloaded "linux-wlan-ng-0.1.16-pre9.tar" driver and ran the config file to install the drivers, which went well, untill I got to the question about the directory my linux source. I have nothing in the default folder and I am hoping I can get some assistance to maybe where to find the files I need for the folder. I think I am looking for the kernel-source RPM and gcc compiler. I actually searched for the gcc compiler on my software program thing, and installed a couple of those.
Last edited by Rnastyracer; 02-04-2004 at 04:15 PM.
Somewhere on your install CDs is the "kernel source" or maybe "kernel headers" (almost as good). Look for this and install with rpm or however you would use. Then do, as root, "ldconfig" and it should work. You might possibly have to reboot but I don't think so.
I looked on the Mandrake site at the download mirrors and there is a directory called "Mandrake" and in it are subdirectories of "RPMS", "RPMS2", and "RPMS3". In RPMS2 there are source files for the various kernels. Pick which kernel you used and get the appropriate source code. This may be on another installation CD- I don't use Mandrake- but most distros will give you the source (usually on another CD).
Sources are usually in the second or the third installation cd, depending on
your distribution. After you install the source from a rpm, chdir to /usr/src/linux where all the source files get copied.
Okay, I am getting somewhere. I downloaded a source file from a site and I extracted it to the folder. When I try to install my wlan driver, at the end (where it asks for the dir of the source code) it reads "the kernel header files are present, but not the whole source code."
My usr/src/linux folder has the files from the file I downloaded and includes sub folders. Should I extract the files from those sub folders, to the main linux folder?
What was the file called? Was it "something kernel-sources something.rpm"?If so, then that should be it after you install it. It looks from the message that the program wants all the kernel source. Usually this is going to be in the 30 Meg size (compressed) and 150 Meg uncompressed.
Did you use "tar jxvf filename.bz" to decompress the file? And where did you decompress it? If you had installed it via rpm then it will be where it belongs for routine use. Usually this is /usr/src/. If you had problems with your compile, check "configure --help" and read where the program expects things to be and if the source code is elsewhere, you can pass the appropriate option during the configure process.
Actually I used the command: tar xjf /here/is/file
What happen was, that it created the files in a folder, inside of my created linux folder and when I tried installing my drivers with it like that, it couldn't find it at all. I guess I could have told it to go to that folder, but thats not the point I took the files and subfolders and put it in the linux folder and when I tried to install it then, that when I got that message. I will maybe run it via rpm and see what happens. Do I need to make a config file for this to work?
This actually sounds OK. Do a "configure --help" and read what it says about where it expects the kernel source files. It will be something like "./configure --src_dir=/your/path/to/source" and then hit "enter". Hopefully the driver will compile OK and all will be well. Usually you run tar in the directory where you want to untar the files, so if you want it in /usr/src you would do:
cd /usr/src <enter>
tar xjvf something.tar.bz2 <enter>
unzips here in /usr/src --> now you have /usr/src/something/.
If that doesn't work then try the rpm as that should go to the default location and create any necessary symbolic links automatically.
Thanks for the feedback. I actually got my driver to install by giving the dir of the main config file. However, there were errors. Maybe you can spot some problems with it below. I also ran some other commands, that maybe can help the situation. I will post those next.
Install:
Code:
[root@localhost root]# cd /root/linux-wlan-ng-0.2.1-pre9
[root@localhost linux-wlan-ng-0.2.1-pre9]# ./Configure
-------------- Linux WLAN Configuration Script -------------
The default responses are correct for most users.
Build Prism2.x PCMCIA Card Services (_cs) driver? (y/n) [n]:
Build Prism2 PLX9052 based PCI (_plx) adapter driver? (y/n) [n]:
Build Prism2.5 native PCI (_pci) driver? (y/n) [n]:
Build Prism2.5 USB (_usb) driver? (y/n) [y]:
Linux source directory [cp /boot/config /usr/src/linux/.config]:
./Configure: line 299: [: too many arguments
/bin/sh: line 1: [: too many arguments
/bin/sh: line 1: [: too many arguments
cc: /usr/src/linux/.config/include: No such file or directory
make: *** [get_version] Error 1
./Configure: line 311: scripts/make.opts: No such file or directory
grep: cp: No such file or directory
grep: /usr/src/linux/.config/include/linux/version.h: No such file or directory
The kernel source tree is version .
./Configure: line 327: [: -lt: unary operator expected
./Configure: line 332: [: -gt: unary operator expected
WARNING: the current running kernel is actually version 2.4.22-10mdk.
./Configure: line 343: [: too many arguments
The current kernel build date is Thu Sep 18 12:30:58 2003.
./Configure: line 360: [: too many arguments
./Configure: line 403: scripts/make.opts: No such file or directory
Alternate target install root directory on host []:
Module install directory [/lib/modules/]:
It looks like you have a System V init file setup.
Prefix for build host compiler? (rarely needed) []:
Build for debugging (see doc/config.debug) (y/n) [n]:
Configuration successful.
[root@localhost linux-wlan-ng-0.2.1-pre9]# make all
set -e; for d in src doc man etc; do make -C $d ; done
make[1]: Entering directory `/root/linux-wlan-ng-0.2.1-pre9/src'
set -e; for d in mkmeta p80211 prism2 shared wlanctl wland nwepgen wlancfg; do make -C $d ; done
make[2]: Entering directory `/root/linux-wlan-ng-0.2.1-pre9/src/mkmeta'
gcc -E -M -I../include -Icp /boot/config /usr/src/linux/.config/include -D__LINUX_WLAN__ ../shared/p80211types.c ../shared/p80211metamsg.c ../shared/p80211metamib.c ../shared/p80211meta.c mkmetadef.c ../shared/p80211types.c ../shared/p80211metamsg.c ../shared/p80211metamib.c ../shared/p80211meta.c mkmetastruct.c > .depend
gcc: /usr/src/linux/.config/include: No such file or directory
make[2]: *** [.depend] Error 1
make[2]: Leaving directory `/root/linux-wlan-ng-0.2.1-pre9/src/mkmeta'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/linux-wlan-ng-0.2.1-pre9/src'
make: *** [all] Error 2
[root@localhost linux-wlan-ng-0.2.1-pre9]# make install
find . -name .depend -exec rm {} \;
set -e; for d in src doc man etc; do make -C $d install ; done
make[1]: Entering directory `/root/linux-wlan-ng-0.2.1-pre9/src'
set -e; for d in p80211 prism2 shared wlanctl wland nwepgen mkmeta wlancfg; do make -C $d install ; done
make[2]: Entering directory `/root/linux-wlan-ng-0.2.1-pre9/src/p80211'
gcc -c -D__KERNEL__ -Icp /boot/config /usr/src/linux/.config/include -I../include -DEXPORT_SYMTAB p80211mod.c -o p80211mod.o
gcc: cannot specify -o with -c or -S and multiple compilations
make[2]: *** [p80211mod.o] Error 1
make[2]: Leaving directory `/root/linux-wlan-ng-0.2.1-pre9/src/p80211'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/linux-wlan-ng-0.2.1-pre9/src'
make: *** [install] Error 2
Well the first thing is look at the line about 1/3 way down in the configure output where it says
The kernel source tree is version .
./Configure: line 327: [: -lt: unary operator expected
./Configure: line 332: [: -gt: unary operator expected
WARNING: the current running kernel is actually version 2.4.22-10mdk.
In order for this to compile properly you need to have the actual source code for your running kernel-you can't just have any source code. That's one of the problems with most distros, they compile custom kernels and it is harder to make other apps against (because you can't just get the source from www.kernel.org). You need to recheck your installation CDs or else the Mandrake site to get the proper version of the source. You can do "uname -r" to get your kernel release and then match that to the mandrake source.
That said, it looks like it compiled as you have the module loaded. Have you tried to initialize the card? I don't know how Mandrake does it but I do
"iwconfig wlan0 192.168.1.10"
"iwconfig wlan0 mode Managed essid XXXXXX channel 6 key restricted XXXXXXXXXXX (X=my info for essid and WEP)
"route add default gw 192.168.1.1" and it all works. If the module is not built properly it probably won't work but it doesn't hurt to try.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.