View previous topic :: View next topic |
Author |
Message |
red2 n00b
Joined: 03 Jun 2002 Posts: 57
|
Posted: Thu Mar 04, 2004 10:14 pm Post subject: SOLVED start network when plugging in usb wireless ma101 |
|
|
Hi all, I've got my Netgear ma101 b wireless card working with 2.6.4rc kernel (using the berlios driver).
But....I have to do the following things to make it work:
1 plug it in
2 load the modprobe (ie modprobe at76c503a )
3 call my script to start the device (/etc/init.d/net.wlan0 restart)
I would like to automate the last two steps.
I assume I need to install hotplug. What else should I do?
Any help is appreciated greatly.
Last edited by red2 on Mon Mar 08, 2004 7:34 am; edited 1 time in total |
|
Back to top |
|
|
RJNFC n00b
Joined: 07 Dec 2002 Posts: 19
|
Posted: Sun Mar 07, 2004 8:13 pm Post subject: possibly- |
|
|
You may just have to put the module name in /etc/modules.autoload and do 'rc-update add net.wlan0 default' to make it startup. That's assuming everything else is setup. Should work. |
|
Back to top |
|
|
RJNFC n00b
Joined: 07 Dec 2002 Posts: 19
|
Posted: Sun Mar 07, 2004 9:34 pm Post subject: er |
|
|
Sorry, that will work only if you have it plugged in when you boot, I think. |
|
Back to top |
|
|
red2 n00b
Joined: 03 Jun 2002 Posts: 57
|
Posted: Mon Mar 08, 2004 7:33 am Post subject: got it working |
|
|
I had to emerge hotplug (which takes care of modprobing the appropriate modules for you when you plug it in).
Hotplug also has the ability to run scripts for you, which is what I wanted to do. But I had to edit the /etc/hotplug/net.agent script to make it connect to the wireless network.
I commented out these lines
Code: | # if [ ! -f /var/lock/subsys/network ]; then
# exit 0
# fi
|
and added this in the case $ACTION case $INTERFACE statement:
Code: | wlan*)
Hopefully this helps someone
echo "wlan restart please...">>/tmp/hotplug.log
debug_mesg invoke "$script" --quiet restart
exec "$script" --quiet restart
;;
|
note that the difference is the restart instead of start (if I unplugged it after starting it wouldn't restart the network correctly).
This link from the hotplug page is what helped me (well explained a little about hotplug works for network interfaces)
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/HOTPLUG.txt |
|
Back to top |
|
|
|