Can't start wireless from rc.inet1 on Slackware 12.0
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.
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.
Can't start wireless from rc.inet1 on Slackware 12.0
Hi,
I am running Slackware 12.0 (NOT upgraded to -current). Last night I upgraded my kernel to 2.6.25, and finally the b43 driver supports my wireless chip BCM4312 rev 02. I am now able to connect to the internet with wireless, but I have to do it manually; I can't make the rc.inet1 script work.
First of all, the setup:
I installed firmware version4.150.10.5 using b43-fwcutter-011. This is the version recommended for "bleeding edge" b43 drivers at http://linuxwireless.org, and it should correspond to the 2.6.25 driver (their web page has not been updated for 2.6.25 yet). I'm using rc.inet1.conf to store my wireless settings, and wpa_supplicant.conf to store the WPA key. I read Alien's wiki, and I also followed the discussion in this thread:
This is what I get from wlan0_start (I killed the wpa_supplicant instances before running this):
Code:
root@kutu:~# /etc/rc.d/rc.inet1 wlan0_start
/etc/rc.d/rc.inet1: wlan0 information: 'Fill with your own settings...'
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan0 ; Operation not supported.
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Polling for DHCP server on interface wlan0:
dhcpcd: MAC address = 00:1a:73:66:6b:b9
root@kutu:~#
That error about nickname goes away when I comment out the line
Code:
$IWCOMMAND nick $NICKNAME
in rc.wireless. But doing this does not seem to make any difference in the other symptoms. As you see, I can't get an address from DHCP.
The dmesg output of the action above is as follows:
Code:
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 64-bit DMA initialized
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
b43-phy0 debug: Removing Interface type 2
b43-phy0 debug: Wireless interface stopped
b43-phy0 debug: DMA-64 0x0200 (RX) max used slots: 1/64
b43-phy0 debug: DMA-64 0x0340 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0300 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x02C0 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0280 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0240 (TX) max used slots: 2/128
b43-phy0 debug: DMA-64 0x0200 (TX) max used slots: 0/128
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 64-bit DMA initialized
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:2a:a6:b3:31
wlan0: RX authentication from 00:1a:2a:a6:b3:31 (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:1a:2a:a6:b3:31
wlan0: RX AssocResp from 00:1a:2a:a6:b3:31 (capab=0x71 status=0 aid=2)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:1a:2a:a6:b3:31)
b43-phy0 debug: Removing Interface type 2
b43-phy0 debug: Wireless interface stopped
b43-phy0 debug: DMA-64 0x0200 (RX) max used slots: 1/64
b43-phy0 debug: DMA-64 0x0340 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0300 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x02C0 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0280 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0240 (TX) max used slots: 2/128
b43-phy0 debug: DMA-64 0x0200 (TX) max used slots: 0/128
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 64-bit DMA initialized
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
wlan0: switched to short barker preamble (BSSID=00:1a:2a:a6:b3:31)
b43-phy0 debug: Removing Interface type 2
b43-phy0 debug: Wireless interface stopped
b43-phy0 debug: DMA-64 0x0200 (RX) max used slots: 1/64
b43-phy0 debug: DMA-64 0x0340 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0300 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x02C0 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0280 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0240 (TX) max used slots: 0/128
b43-phy0 debug: DMA-64 0x0200 (TX) max used slots: 0/128
However, if I first do
Code:
root@kutu:~# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Trying to associate with 00:1a:2a:a6:b3:31 (SSID='AIRTIES_RT-205' freq=2462 MHz)
Associated with 00:1a:2a:a6:b3:31
WPA: Key negotiation completed with 00:1a:2a:a6:b3:31 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:1a:2a:a6:b3:31 completed (auth) [id=0 id_str=]
in one terminal (as you see, all looks fine), then I can get an address in another by:
Code:
root@kutu:~# dhcpcd -d wlan0
dhcpcd: MAC address = 00:1a:73:66:6b:b9
dhcpcd: your IP address = 192.168.2.6
and I have a working connection. The dmesg output for this operation is:
Code:
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 64-bit DMA initialized
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:2a:a6:b3:31
wlan0: RX authentication from 00:1a:2a:a6:b3:31 (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:1a:2a:a6:b3:31
wlan0: RX AssocResp from 00:1a:2a:a6:b3:31 (capab=0x71 status=0 aid=2)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:1a:2a:a6:b3:31)
So, the question is: Why doesn't the rc.inet1 work and how can I fix it?
into /etc/rc.d/rc.inet1.conf for our Ralink or Atheros chips.
Here's a working config just for giggles:
Code:
# Config information for ath0:
IFNAME[1]="ath0"
IPADDR[1]="192.168.1.22"
NETMASK[1]="255.255.255.0"
#USE_DHCP[1]="yes"
#DHCP_HOSTNAME[1]=""
WLAN_ESSID[1]="philemon"
WLAN_MODE[1]=Managed
WLAN_RATE[1]="54M auto"
WLAN_CHANNEL[1]="10"
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
# Default gateway IP address:
GATEWAY="192.168.1.1"
# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="yes"
For DHCP you'd just comment the IPADDRESS and NETMASK and uncomment USE_DHCP and GATEWAY.
However, if you need it, so be it. Some potential errors I see:
# See /usr/doc/wpa_supplicant-0.5.8/wpa_supplicant.conf.sample
# for many more options that you can use in this file.
# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="philemon"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=<munged>
}
# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
# You'll need a recent version of wireless-tools for this!
network={
ssid="any"
key_mgmt=NONE
priority=2
}
And I never, ever, touch /etc/rc.d/rc.wireless.conf
Last edited by Bruce Hill; 04-20-2008 at 08:48 AM.
I would definitely stick all ssid configuration in /etc/wpa_supplicant.conf. That's where wpa_cli and wpa_gui are going to save them anyway. Here's a working DHCP version rc.inet1.conf section for wpa_supplicant:
You don't need the WPACONF and WPAOPTS lines as Bruce Hill said (but note that you don't need a space between -c and the file name on the supplicant line).
And a working /etc/wpa_supplicant.conf (I set up a "wireless" user group so I wouldn't have to be root to use wpa_gui):
but it made no difference. Indeed, as I said earlier, it makes no difference whether I comment out the WPAOPTS and WPACONF lines or not. My wpa_supplicant.conf should be fine as I can use it to connect manually from the command line.
My wpa_supplicant.conf should be fine as I can use it to connect manually from the command line.
Since you can connect fine manually, here's something else to try assuming "manually" means you use the wpa_supplicant command (meaning all the connection info is in /etc/wpa_supplicant.conf). I suggest this because this is the only way I could get mine to work. Search in /etc/rc.d/rc.wireless for the line that reads configuration info from rc.wireless.conf and comment out that one line. This will eliminate rc.wireless.conf as the source of any confusion. The line I commented out is:
Thank you for your reply DonnieP (I was typing my second post while you sent your first, I've just noticed your post).
I tried commenting out the line you gave, but the result is the same. Suspecting subtle typos I may have created in the scripts, I downloaded fresh versions of these scripts (inet1* and wireless*), adjusted the parameters and tried again, but it still doesn't work...
(And yes, by "manually" I mean running wpa_supplicant in the command line).
One little update: I never could bring the wireless up using rc.inet1 with parameters wlan0_start or wlan0_restart. Today, once I did "restart" (i.e. restart for all interfaces) and to my surprise I both eth0 and wlan0 successfully received an IP. This happened only once. Since then I'm trying to reproduce this result but I can't.
I was having the same problem that you described in post #8. Have you tried putting a start-up script in /etc/rc.d/rc.local, along with an entry for dhcpd?
I put /etc/rc.d/rc.inet1 wlan0_restart and the internet is available every time now at boot - well, at least 4 times in a row since I did that earlier!
I put /etc/rc.d/rc.inet1 wlan0_restart and the internet is available every time now at boot - well, at least 4 times in a row since I did that earlier!
I put that line in rc.local, but (as expected ), it didn't work. What I'm saying is, doing /etc/rc.d/rc.inet1 wlan0_start or /etc/rc.d/rc.inet1 wlan0_restart never worked. But in one, and only one case
/etc/rc.d/rc.inet1 restart
was able to bring the wireless up, and I can't reproduce this.
It sounds as if the hardware/driver has unstable behaviour but running wpa_supplicant from the command line always works, so I think that's not the problem.
Thanks for the link, I read it. It explains how to use rc.local to automate the process, but that's not my problem, I'm sure I can do the necessary scriptwork for that if needed. I'm trying to find out what prevents rc.inet1 from working properly. Maybe there is a bug, if not, I'd like to learn where my mistake is.
I've never managed to satisfactorily get wireless working using rc.wireless, probably more a limitation of me than rc.wireless. Anyway I just chmod -x rc.wireless and use other tools such as wlassistant for my wireless.
I'm a bit surprised that I'm not alone in this; there are others who also can't succeed with rc.inet1 (or rc.wireless). Maybe there is a bug somewhere. Is there anyone who had this problem in 12.0 and then got it fixed in -current?
If it works for you with manual start, it must work with the Slackware scripts as well.
The first step in troubleshooting would be to change this line in rc.inet1.conf:
Code:
DEBUG_ETH_UP="no"
to
Code:
DEBUG_ETH_UP="yes"
(re-)start your wireless interface and then paste the output of
Code:
tail -500 /var/log/messages | grep logger
here (mask out the WPA key that will be there in plaintext before you paste your results here).
It may be likely that you need to give wpa_supplicant more time to associate. There is an option for that:
Code:
WLAN_WPAWAIT[4]=30
to give it a 30 second association time.
You should not use WPAOPTS[4]=... in your *.conf files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.