LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-20-2008, 04:44 AM   #1
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Rep: Reputation: 92
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?

Last edited by Ilgar; 04-20-2008 at 04:47 AM.
 
Old 04-20-2008, 08:41 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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

Last edited by Bruce Hill; 04-20-2008 at 08:48 AM.
 
Old 04-20-2008, 09:55 AM   #3
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
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
}
 
Old 04-20-2008, 10:02 AM   #4
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
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.
 
Old 04-20-2008, 10:24 AM   #5
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
Quote:
Originally Posted by Ilgar View Post
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
 
Old 04-20-2008, 12:07 PM   #6
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
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).
 
Old 04-20-2008, 01:24 PM   #7
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
Well I second this situation here too. I've done the mentioned changes also and they don't work for me either.
 
Old 04-20-2008, 01:36 PM   #8
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
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.
 
Old 04-20-2008, 04:15 PM   #9
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 324

Rep: Reputation: 49
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?
 
Old 04-20-2008, 04:48 PM   #10
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
Quote:
Originally Posted by Bazzaah View Post
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.
 
Old 04-20-2008, 05:06 PM   #11
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 324

Rep: Reputation: 49
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.
 
Old 04-20-2008, 05:29 PM   #12
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
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.
 
Old 04-21-2008, 01:25 AM   #13
wget
LQ Newbie
 
Registered: Apr 2008
Distribution: Slackware 12.0 Kernel 2.6.25, LFS 2.6.25.1 Kernel
Posts: 25

Rep: Reputation: 15
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.
 
Old 04-21-2008, 12:32 PM   #14
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 921

Original Poster
Rep: Reputation: 92
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?
 
Old 04-21-2008, 01:12 PM   #15
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,235

Rep: Reputation: Disabled
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slow startup because of rc.inet1 / wireless pmdkh Slackware 7 04-02-2008 06:20 PM
configuring rt61 wireless in rc.inet1 Widgeteye Slackware 2 09-26-2007 04:28 AM
How to configure wireless with rc.inet1.conf Murkhadh Linux - Wireless Networking 2 02-17-2007 10:28 AM
Slackware 9.1 Rc.inet1 help Psyman014 Slackware 3 10-03-2003 08:10 AM
rc.inet1 to start PFTPD on sys boot bripage Linux - Networking 0 04-01-2002 03:53 PM


All times are GMT -5. The time now is 05:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration