LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-01-2009, 01:26 AM   #1
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Rep: Reputation: 0
How to load a specific device driver


I have a Acer Aspire 5520, I installed Mandriva One 2008.1, every thing worked out of the box. my wirless card is Atheros and was using madwifi driver. wireless connection was somewhat buggy so I made a new connection using windows drivers and ndiswrapper. the widows driver works better but it does not support monitor mode for the card. I need a way to activate either driver as needed.
Any help is apreciated
 
Old 01-01-2009, 02:22 AM   #2
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
Could you please explain why you need the card in Monitor mode? I can think of a specific reason why you would want this and if so that type of behaviour is INAPPROPRIATE FOR THIS FORUM!!
 
Old 01-01-2009, 08:41 AM   #3
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by asymptote View Post
Could you please explain why you need the card in Monitor mode? I can think of a specific reason why you would want this and if so that type of behaviour is INAPPROPRIATE FOR THIS FORUM!!
There are many legitimate and legal reasons for using monitor mode. Network discovery, signal strength and noise analysis, equipment positioning, network traffic monitoring and analysis, intrusion detection to name a few.
I am teaching myself about wireless networking, I am using my own network for that. I am also teaching myself about how Linux works, In windows I can use the device manager to enable or disable a device, change or update the driver and set many parameters for the device.
In Linux (at least in Mandriva) there is nothing like that, I am sure there is a tool or a way to be able to control the device driver but I could not find it. Certainly the easiest thing for me is to install Mandriva again, that would take half an hour instead of the four days I spent searching the web for an answer, however there is no knowledge in that, and still would not be able to change the driver for another device if I need to.
I have tried to explain my self as best as I can, If you still thing the question is inappropriate then by all means you can report it to the forum moderator and he can kill the thread. If not then I would appreciate any useful information you may have.

PS. Happy New Year
 
Old 01-01-2009, 09:22 AM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,244

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
To load a module, as root:
modprobe <module_name>
To unload it, if it's not already in use :
rmmod <module_name>

A usual, man modprobe and man rmmod will tell you more.

About the options available for a specific module, I can't remember right now of a command to print it.

But you can sometime find useful information in the kernel tree. Here is an example where I look for information about my wireless card driver, whose driver name is ipw2000 (found with lsmod if the module is loaded):

Code:
bash-3.1$ find /usr/src/linux-2.6.27.7/ -type f -name "*ipw2200*"
/usr/src/linux-2.6.27.7/drivers/net/wireless/ipw2200.c
/usr/src/linux-2.6.27.7/drivers/net/wireless/ipw2200.h
/usr/src/linux-2.6.27.7/Documentation/networking/README.ipw2200
/usr/src/linux-2.6.27.7/include/config/ipw2200.h
bash-3.1$
So I know I can find information in README.ipw2200.

Sometime you can find that in the driver file itself (in my case, ipw2200.c), provided it's well documented.

HTH
 
Old 01-01-2009, 09:39 AM   #5
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
Quote:
Originally Posted by hasmak View Post
There are many legitimate and legal reasons for using monitor mode.
Oh if you're simply learning for your own enhancement there's nothing wrong with that. Didier is correct on usage of the modprobe tool. Several wireless drivers do this automatically for you like those you can download from linuxwireless.org but if you want to use modprobe then by all means. Happy New Year to you too and thank you for the clarification.
 
Old 01-01-2009, 09:44 AM   #6
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
To load a module, as root:
modprobe <module_name>
To unload it, if it's not already in use :
rmmod <module_name>

HTH
Thanks Didier
I'll try that tonight.
Do I have to unload the windows driver module first before loading the madwifi module?

Will the changed module stay after reboot or will I have to do that every time I want to switch modules?
Thanks again
 
Old 01-01-2009, 09:56 AM   #7
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by asymptote View Post
Oh if you're simply learning for your own enhancement there's nothing wrong with that. Didier is correct on usage of the modprobe tool. Several wireless drivers do this automatically for you like those you can download from linuxwireless.org but if you want to use modprobe then by all means. Happy New Year to you too and thank you for the clarification.
Thanks
To clarify more, I am retired with lots of time on my hands, I have always tinkered with windows and messed it more times than I can remember, but I know my way around windows, can't say the same for Linux :-) Still learning.
Thanks again
 
Old 01-01-2009, 10:29 AM   #8
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,244

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
Quote:
Originally Posted by hasmak View Post
Do I have to unload the windows driver module first before loading the madwifi module?
Better so I guess, as you could run into problems with two drivers claiming the same device.

Would it occur that the madwifi driver works but the Windows one be automatically loaded at boot time, you may prevent this behavior in blacklisting the Windows module. As I don't have Mandriva I can't tell you exactly how-to do that though.

Last edited by Didier Spaier; 01-01-2009 at 10:30 AM. Reason: Typos
 
Old 01-01-2009, 11:14 AM   #9
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
Better so I guess, as you could run into problems with two drivers claiming the same device.

Would it occur that the madwifi driver works but the Windows one be automatically loaded at boot time, you may prevent this behavior in blacklisting the Windows module. As I don't have Mandriva I can't tell you exactly how-to do that though.
Thanks Didier
I thought about blacklisting the module but I don't want to do that since I'll need to load it again.
There must be some thing that tells the OS what module to load at boot (like the windows registry) If I can figure out what it is I can edit it to load the madwifi, better still if there is a tool to change the driver at runtime (wishful thinking :-)

Thanks
H.
 
Old 01-01-2009, 12:08 PM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,244

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
If I am right, blacklisting a module forbids the kernel to load it automatically at boot time, but doesn't prevent you to load it manually using the modprobe command.

And in your distribution there should be a file that you may edit where you list modules that you want to be loaded after booting. This is useful when for some reason a module is not automatically loaded by the kernel at boot time (or when you insert it or plug it in, in case of a removable device).

e.g. for Slackware 12.2 which I use:
- to blacklist a module I edit the file /etc/modprobe.d/blacklist and add a line such as:
Code:
blacklist <module_name>
- make sure a module be loaded after booting I edit the file /etc/rc.d/rc.modules-<kernel_version> and add (or uncomment if it was already there) a line such as:
Code:
/sbin/modprobe <module_name>
May be a Mandriver will tell you how-to do that with Mandriva ?

As a reminder, to check which modules are actually loaded you can type:
Code:
lsmod
You don't have to be root to do that.

Last edited by Didier Spaier; 01-01-2009 at 12:10 PM.
 
Old 01-02-2009, 10:28 AM   #11
hasmak
LQ Newbie
 
Registered: Jan 2009
Location: Egypt
Distribution: Mandriva 2008.1, Win XP, Win XP 64
Posts: 11

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Didier Spaier View Post
If I am right, blacklisting a module forbids the kernel to load it automatically at boot time, but doesn't prevent you to load it manually using the modprobe command.
.
I blacklisted ndiswrapper but it still loads at boot ??
there is another complication, it appears that ndiswrapper trashed the madwifi module, it is nowhere to be found :-(
I gues I'll have to install it from scratch
 
Old 01-02-2009, 01:07 PM   #12
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,244

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
Quote:
Originally Posted by hasmak View Post
I blacklisted ndiswrapper but it still loads at boot ??
there is another complication, it appears that ndiswrapper trashed the madwifi module, it is nowhere to be found :-(
Sorry, I can't help you in that case, because I don't know how init scripts work in Mandriva
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Alter video card device id to load nv driver keithmcd Linux - Distributions 16 01-26-2009 07:23 AM
Installing Device Specific driver? Zangai Linux - Wireless Networking 1 05-03-2008 09:29 PM
Is it possible to load a device driver into an offline kernel? thehobster Linux - Newbie 2 03-24-2008 06:50 PM
Character Device driver: How to load it automatically ? shendeswanand Linux - Software 0 02-09-2006 09:59 PM
USB device is recognized, but wount access it's specific driver. Lechium Linux - Software 2 08-05-2004 01:26 PM


All times are GMT -5. The time now is 11:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration