SlackwareThis Forum is for the discussion of Slackware 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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well... one thing to remark on is that Slackware does not use dhclient... it uses dhcpcd. Try if you can get the same results with dhcpcd instead of dhclient.
The short answer is yes, it works with dhcpcd. I am using it now to send this and have eth0 cable disconnected.
rc.inet1 restart --> kills wpa_supplicant connection such that it needs to be restarted.
After wpa_supplicant is freshly running, dhcpcd wlan0, provides wlan0 an IP address.
I had a long post as to why I feel this way but it was too long and probably not really of value. I will say I learned that if you delete /var/state/dhcp lease files, dhcpcd will not work. Empty files with proper names can be touched to resolve. Deleting the .pid files in /etc/dhcpc seems to cause some hiccups also.
By the way, I'm trying this out with kernel 2.6.25.16, because that is version I compiled b43 modules for, and my system doesn't seem to run rc.inet1 automatically for this kernel, I don't know why. I'm using stock slackware 12.1 with security patches/updates. I routinely run 2.6.25.11 but don't have b43 files for it or they don't work. Also have 2.6.26.3, I think that has built in b43. Running gigabyte 780g board with integrated graphics. Wireless card is ASUS WL-138G V2.
I'm trying this card out before putting in friends machine (gigabyte 690g). I want the script method to work so my friend doesn't have to really do anything for wireless to work. She wants to use for print server and file server so X might not be running.
Is your /etc/rc.d/rc.wireless script executable at all? I see no reason why "rc.inet1 restart" would not get you connected. Yes, the restart kills your wpa_supplicant but then it should start it again as well - this happens in the rc.wireless script which is called by the rc.inet1 script (do not try tu run it on it's own).
Very good question. How did you know that? You must be an alien.
rc.wireless was executable until I replaced it with your newer version. I replaced the file this morning so the similar observations would have applied to previous version.
Making it executable gives:
Code:
bash-3.1# sh /etc/rc.d/rc.inet1 restart
/etc/rc.d/rc.wireless.conf: line 7: syntax error near unexpected token `newline'
/etc/rc.d/rc.wireless.conf: line 7: ` ESSID=""'
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Polling for DHCP server on interface wlan0:
Here it just hangs. I remember in past you said most config data could be in rc.inet1.conf so I never put anything in rc.wireless.conf. I'll try again shortly with rc.wireless.conf gone and if that doesn't work with some values in it.
Last edited by forum1793; 08-31-2008 at 05:38 PM.
Reason: spelling
Indeed, it looks like /etc/rc.d/rc.wireless.conf has some junk inside. Just delete that whole file and see what happens.
You can also restart just your wireless interface by the way:
bash-3.1# sh /etc/rc.d/rc.inet1 restart
Polling for DHCP server on interface eth0:
No carrier detected on eth0. Reducing DHCP timeout to 3 seconds.
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Polling for DHCP server on interface wlan0:
When I ran the original conf from the script download, it gives the same error along with some nickname error.
Edit: running rc.wireless.conf with some appropriate values in fields gives same error with nickname error. Note I had to leave ssid and key in wpa_supplicant.conf so never tried with them in rc.wireless.
What does the wpa_ctrl_open error mean?
That shows up in /usr/sbin/wpa_cli.
I don't understand why it doesn't work
In rc.wireless: the line
${SUPPATH}/wpa_supplicant -Bw -c${WPACONF} ${WPA_OPTIONS} -i$INTERFACE
equates to:
/usr/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
and this works. I echoed to stdout and verified. Not sure where logger is.
This hangs because eth0 is down or cable missing so wlan0 never is probed. I've done this few times where it seems like it took wlan0 down but I could not reproduce in the last few tries.
I'm not sure killing wpa_supplicant is required.
I'm also not sure the sleeps are needed.
But this works.
With this in place, eth0 is started by rc.inet1 and wlan0 is started by rc.local. I don't seem to have the stop functions that are in rc.inet1 or rc.wireless but this is working so far.
Edit: but the rc.inet1 stop should kill these so that is not problem. Its the restart that will not reinitialize wlan0 but my end user will not know to type the restart anyway.
I wasn't familiar DHCP_TIMEOUT. This led me back to orig rc.inet1.conf where I saw this:
Code:
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").
So I set my rc.inet1.conf to:
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Default gateway IP address:
GATEWAY=""
# Change this to "yes" for debugging output to stdout.
DEBUG_ETH_UP="NO"
IFNAME[4]="wlan0"
USE_DHCP[4]=""
DHCP_HOSTNAME[4]=""
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
WLAN_WPAWAIT[4]=30
I verified rc.wireless.conf was deleted.
I ran sh rc.inet1 restart... and it worked. Got an IP address for the wireless. Thinking it was solved I remarked all of rc.local out and rebooted to confirm.
Upon reboot it is does bring wlan0 up, but does not supply an IP address. For the initial test above, the previous IP address must have been kept. This is sometimes case and these are stored for some amount of time in /etc/dhcpc/*wlan0*pid. (* is wildcard).
Just for grins I tried adding DHCP_TIMEOUT after WLAN...30 in the conf. If just this you get error. If you do DHCP_TIMEOUT=30, no noticeable error but no IP address. If DHCP_TIMEOUT[4]=30, no noticeable error but no IP. Am I using this right?
Did I make any progress?
Since no IP but wlan0 is up, try dhcpcd wlan0 but it just hangs. Running the previous rc.local with lines uncommented still works.
Have confirmed observation.
If USE_DHCP[4]="" restart allows wlan0 up but no IP.
If USE_DHCP[4]="yes" restart ultimately does not bring up wlan0, and it polls for probably for a minute or two.
Tried changing 4's to 1's since only one ethX. Didn't make a difference.
Current rc.inet1.conf is:
Code:
# Config information for eth0:
USE_DHCP[0]="yes"
# Change this to "yes" for debugging output to stdout.
DEBUG_ETH_UP="NO"
IFNAME[1]="wlan0"
USE_DHCP[1]="yes"
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
WLAN_WPAWAIT[1]=30
I have a BCM 4312 Rev02 and it was the DHCP_TIMEOUT that solved my problem eventually (the story is in this thread, you can see the last post for solution). Here is my inet1.conf:
By the way, I also remember running into a problem in wpa_supplicant.conf. There instead of editing the default values, I had just appended a "network" section for my ESSID above. So the original section
Code:
# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="your_essid_here"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=your_psk_here
}
remained. But wpa did not work (was giving error) unless I added quotes in the psk line:
Code:
psk="your_psk_here"
This is probably not your problem,, but I wanted to mention it anyway in case someone might run into the same thing.
Also, you can look at the dmesg output (i.e. /var/log/messages) and /var/log/syslog files to see what's happening. You can use tail to see the ends of the files, e.g.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.