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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey all, I've got my Linksys WUSB11v2.6 working grrreat in slackware (kernel 2.4.26). But, now that it is working, I'm afraid to restart. I want to look and see that the iwconfig settings will reload, and that the ifconfig settings will reload.
Normally, network settings are stored in /etc/rc.d/rc.inet1.conf, but I guess settings for wlan0 aren't in there. And that doesn't say anything about iwconfig settings.
I'm using the sourceforge Atmel driver, and I already know that the module loads at boot time with no problem.
So, where is ifconfig wlan0 pulling its configuration info from? And where is iwconfig wlan0 pullings its configuration from?
You'll have to manually enter in your wireless settings into rc.wireless.conf, then make sure that rc.wireless is executable.
My own method is from the Slackware 9 days before the rc.wireless script was added, using a slightly different script I found somewhere (but it's the same concept):
/etc/rc.d/rc.wlan0
Code:
#!/bin/sh
#
# rc.wlan0
#
CHANNEL=1
ESSID=""
INTERFACE="wlan0"
IPADDR=""
KEY=""
MODE=""
NETMASK=""
# Determine broadcast and network addresses from the IP address and netmask:
BROADCAST=`/bin/ipmask $NETMASK $IPADDR | cut -f 1 -d ' '`
NETWORK=`/bin/ipmask $NETMASK $IPADDR | cut -f 2 -d ' '`
# Set up the WiFi card
echo "Configuring ${INTERFACE}:"
/sbin/ifconfig ${INTERFACE} ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
/sbin/iwconfig ${INTERFACE} essid ${ESSID}
/sbin/iwconfig ${INTERFACE} channel ${CHANNEL}
/sbin/iwconfig ${INTERFACE} mode ${MODE}
sleep 2
/sbin/iwconfig ${INTERFACE} key ${KEY}
Just insert your appropriate settings, chmod +x, then add a call to this at the end of your rc.inet1:
Code:
###################################
### Wireless Card Configuration ###
###################################
if [ -x /etc/rc.d/rc.wlan0 ]; then
echo "configuring wireless card..."
/etc/rc.d/rc.wlan0
fi
# End of /etc/rc.d/rc.inet1
Actually, I still need to go in and make some changes. See, I had rc.inet1 bringing up the wlan0 interface from rc.inet1.conf, but that was giving eth0 and wlan0 the same IP. Easy to fix if I just put the ifconfig line in rc.wireless. Cool.
I restarted and all is well, except the nameservers I put in /etc/resolv.conf didn't stay there. (Oh yeah DHCP no worky with my current setup). So I reentered the nameserver info, made a backup file, and hopefully it'll never happen again, but I'll be ready if it does.
Originally posted by philipacamaniac
I restarted and all is well, except the nameservers I put in /etc/resolv.conf didn't stay there. (Oh yeah DHCP no worky with my current setup). So I reentered the nameserver info, made a backup file, and hopefully it'll never happen again, but I'll be ready if it does.
If you set the essid before dhcp is executed it should work.
Okay, I might try that. But I don't mind having a static IP; it makes it easier to forward ports from the router. Otherwise, how useful is SSH, anyway? ;-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.