LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't start wireless from rc.inet1 on Slackware 12.0 (https://www.linuxquestions.org/questions/slackware-14/cant-start-wireless-from-rc-inet1-on-slackware-12-0-a-636567/)

Ilgar 04-20-2008 04:44 AM

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:

http://www.linuxquestions.org/questi...ectory-611577/

This is what iconfig gives:
Code:

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0    IEEE 802.11g  ESSID:"AIRTIES_RT-205" 
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated 
          Tx-Power=27 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
          Encryption key:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

Here is my rc.inet1.conf:
Code:

IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
WLAN_ESSID[4]="AIRTIES_RT-205"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
WLAN_WPACONF[4]="/etc/wpa_supplicant.conf"
WPAOPTS[4]="-Dwext -iwlan0 -c/etc/wpa_supplicant.conf"

I added the last two options after reading the thread mentioned above, but it didn't seem to make any difference.

And here's the wpa_supplicant.conf (the relevant part only)

Code:

network={
        ssid="AIRTIES_RT-205"
      #psk="edited"

psk=edited
}

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?

Bruce Hill 04-20-2008 08:41 AM

I've never put these lines:
Code:

WLAN_WPACONF[4]="/etc/wpa_supplicant.conf"
WPAOPTS[4]="-Dwext -iwlan0 -c/etc/wpa_supplicant.conf"

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:
Code:

WPAOPTS[4]="-Dwext -iwlan0 -c/etc/wpa_supplicant.conf"
No space between the -c and /etc ...

And check out a working /etc/wpa_supplicant.conf:
Code:

# 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

DonnieP 04-20-2008 09:55 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:
Code:

IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
WLAN_WPA[4]="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):
Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wireless
update_config=1

network={
        ssid="Apple Network ae4057"
        scan_ssid=1
        psk="whatever"
        proto=WPA
        key_mgmt=WPA-PSK
}

network={
        ssid="any"
        key_mgmt=NONE
}


Ilgar 04-20-2008 10:02 AM

Hi Bruce,

Thanks for your post. I corrected the missing space in the line
Code:

WPAOPTS[4]="-Dwext -iwlan0 -c/etc/wpa_supplicant.conf"
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.

DonnieP 04-20-2008 10:24 AM

Quote:

Originally Posted by Ilgar (Post 3126977)
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:
Code:

[[ -r /etc/rc.d/rc.wireless.conf ]] && . /etc/rc.d/rc.wireless.conf

Ilgar 04-20-2008 12:07 PM

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).

pdw_hu 04-20-2008 01:24 PM

Well I second this situation here too. I've done the mentioned changes also and they don't work for me either.

Ilgar 04-20-2008 01:36 PM

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.

Bazzaah 04-20-2008 04:15 PM

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!

maybe worth a go?

Ilgar 04-20-2008 04:48 PM

Quote:

Originally Posted by Bazzaah (Post 3127296)
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.

Bazzaah 04-20-2008 05:06 PM

Worth a go - shame it was nothing so easy - sorted out a similar problem I was having. hey ho.

You could read through this

http://www.linuxquestions.org/linux/...r_Slackware_11

OK it's for Slackware 11 but might have something you could use there.

Hope you get it sorted.

Ilgar 04-20-2008 05:29 PM

Hi Bazzaah,

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.

wget 04-21-2008 01:25 AM

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.

Ilgar 04-21-2008 12:32 PM

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?

Alien Bob 04-21-2008 01:12 PM

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.

Eric


All times are GMT -5. The time now is 01:57 AM.