LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-31-2008, 02:31 PM   #46
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34

A few observations.

If networking is off I can make some connection manually.

Code:
sh /etc/rc.d/rc.inet1 stop
wpa_supplicant -d -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
This produces much text some of which makes you wonder if it is working. Eventually:
Code:
CTRL-EVENT-CONNECTED - Connection to xxx completed (auth) [id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
This is followed with more output.

Opening another term to avoid killing wpa_supplicant:
Code:
bash-3.1# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.6
...
DHCPACK from 192.168.1.1
bound to 192.168.1.103 -- renewal in xxx seconds.
At this point I can use the internet with the wireless.

If run wpa_supplicant with -B option instead of -d:
Code:
bash-3.1# wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 -

bash-3.1# dhclient
...bound to 192.168.1.100 -- renewal in xxx seconds.
So that works also.

Code:
bash-3.1# wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
No information is returned.
Code:
bash-3.1# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.6
...
bound to 192.168.1.104 -- renewal in xxx seconds.
And again internet works over wireless.

If at this point run rc.inet1 start, it does not wipe out the wireless connection. But if run rc.inet1 restart that does kill the wireless.

I hope this is of some help for the script writers.
 
Old 08-31-2008, 02:56 PM   #47
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

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

Eric
 
Old 08-31-2008, 05:52 PM   #48
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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.
 
Old 08-31-2008, 06:04 PM   #49
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
Confirmed that this works with 2.6.26.3 kernel in same manner.

Code:
rc.inet1 restart
wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
dhcpcd wlan0
and it works
 
Old 08-31-2008, 06:12 PM   #50
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

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

Eric
 
Old 08-31-2008, 06:37 PM   #51
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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 06:38 PM. Reason: spelling
 
Old 08-31-2008, 06:46 PM   #52
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

Rep: Reputation: Disabled
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:
Code:
/etc/rc.d/rc.inet1 wlan0_restart
Eric
 
Old 08-31-2008, 07:19 PM   #53
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
I made sure rc.wireless was executable.

I deleted rc.wireless.conf:
Code:
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.

Last edited by forum1793; 08-31-2008 at 07:27 PM.
 
Old 08-31-2008, 09:31 PM   #54
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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.

Tried 4 cases:

Case 1:
eth0 disconnected
Code:
killall wpa_supplicant
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
dhcpcd wlan0
This works. Wlan0 is up and functioning.

Case 2: Fails
eth0 disconnected
Code:
killall wpa_supplicant
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
dhcpcd
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.

Case 3:
Code:
killall wpa_supplicant
wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0
connect eth0 cable
Code:
ifconfig eth0 up
dhcpcd
This works. Both wlan0 and eth0 are up and functioning.

Case 4:
eth0 is connected
wlan0 is up
Code:
sh /etc/rc.inet1 restart
fails. If eth0 is connected, eth0 works. wlan0 does not work with or without eth0 connected.

Last edited by forum1793; 08-31-2008 at 10:33 PM.
 
Old 09-01-2008, 06:23 PM   #55
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
My temporary solution is to add the following to rc.local
Code:
killall wpa_supplicant
rm /etc/dhcpc/*wlan*pid
sleep 1
wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
sleep 1
dhcpcd wlan0
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.

Last edited by forum1793; 09-01-2008 at 09:45 PM.
 
Old 09-02-2008, 02:14 AM   #56
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
Did you try setting the DHCP_TIMEOUT value in inet1.conf?
 
Old 09-02-2008, 09:43 PM   #57
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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.
 
Old 09-02-2008, 10:09 PM   #58
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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
OH well back to rc.local
 
Old 09-03-2008, 02:21 AM   #59
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

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

Code:
IFNAME[4]="wlan1"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_TIMEOUT[4]=5
WLAN_ESSID[4]=AIRTIES_RT-205
WLAN_MODE[4]=Managed
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
Even a timeout of 2 was good enough.

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.
 
Old 09-03-2008, 04:27 AM   #60
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
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.

Code:
tail -n 30 /var/log/syslog
for the last 30 lines.
 
  


Reply

Tags
atheros, madwifi, slackware


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
Slackware blocking internet or settings incorrect for Java Wireless Toolkit? lifeforce4 Slackware 0 02-15-2008 11:41 AM
Wireless card..Wireless router.. Slackware 10.2 ..Problems with Internet Connection. Storm Bringer Linux - Wireless Networking 4 03-23-2006 07:25 AM
How do I automatically bring up wireless internet conneciton in Slackware 10.1? n00bified Linux - Hardware 1 12-28-2005 02:17 PM
Slackware 9.1 - Wireless Internet problem jelitegamer Linux - Software 3 09-01-2004 06:39 PM


All times are GMT -5. The time now is 05:25 AM.

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