LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-04-2008, 06:55 PM   #1
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Rep: Reputation: 15
wireless problems!


hello again,

Im trying to set up my wireless usb card.

the driver module is loaded, and through console commands, the card connects to my unencrypted AP, and I can then use the internet.

the problem comes when I set WPA2 encryption on my AP.



my 'rc.inet1.conf' file looks like this:
Code:
# Config information for eth0:
#IPADDR[0]=""
#NETMASK[0]=""
#USE_DHCP[0]=""
#DHCP_HOSTNAME[0]=""

# Config information for eth1:
#IPADDR[1]=""
#NETMASK[1]=""
#USE_DHCP[1]=""
#DHCP_HOSTNAME[1]=""

# Config information for eth2:
#IPADDR[2]=""
#NETMASK[2]=""
#USE_DHCP[2]=""
#DHCP_HOSTNAME[2]=""

# Config information for eth3:
#IPADDR[3]=""
#NETMASK[3]=""
#USE_DHCP[3]=""
#DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# 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="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
DHCP_KEEPRESOLV[4]="yes"
DHCP_KEEPNTP[4]="yes"
DHCP_KEEPGW[4]="yes"
DHCP_IPADDR[4]=""
WLAN_ESSID[4]=Thomson48E559
WLAN_MODE[4]=Managed
WLAN_RATE[4]="54M auto"
WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]=""
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
the 'wpa_supplicant.conf' file, looks like this:
Code:
# 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="Thomson48E559"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP WEP104 WEP40
  #psk="N8KR31VC"
  psk=2eca118b8131e024df63caf84267cd94026933903dd4b88e8e954353fac16d1a
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
network={
  key_mgmt=NONE
  priority=0
}

so after configuring those 2 files, I then do:

Code:
/etc rc.d/rc.inet1 wlan0_restart
but get this error:

Code:
/etc/rc.d/rc.inet1:  wlan0 information: 'edimax EW7318USg'
Error for wireless request "Set Nickname" (8B1C) :
    SET failed on device wlan0 ; Operation not supported.
Polling for DHCP server on interface wlan0:
No carrier detected on wlan0.  Reducing DHCP timeout to 10 seconds.
dhcpcd: MAC address = 00:1f:1f:14:34:e8
then I debug per Erics instructions (http://alien.slackbook.org/dokuwiki/...ware:network):

bringing the wlan0 interface down
Code:
/etc/rc.d/rc.inet1 wlan0_stop
start the wpa_supplicant daemon as a foreground process
Code:
wpa_supplicant -dw -c/etc/wpa_supplicant.conf -Dwext -iath0
then activate the wlan0 interface in another terminal
Code:
/etc/rc.d/rc.inet1 wlan0_start
so then I look at the output of the wpa_supplicant daemon and it says:

Code:
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0' (DEPRECATED)
eapol_version=1
ap_scan=1
fast_reauth=1
Priority group 0
   id=0 ssid='Thomson48E559'
   id=1 ssid=''
Initializing interface (2) 'wlan0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:1f:1f:14:34:e8
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=0
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 5 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b19 len=8
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b19 len=8
Received 497 bytes of scan results (2 BSSes)
Scan results: 2
Selecting BSS from priority group 0

Try to find WPA-enabled AP
0: 00:1d:68:eb:5f:ef ssid='Thomson48E559' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   
   skip - no WPA/RSN proto match
   skip - SSID mismatch

No suitable AP found.



Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 30 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=21
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):

     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_asciiioctl[SIOCSIWSCAN]: Network is down
ioctl[SIOCSIWSCAN]: Network is down
ioctl[SIOCSIWSCAN]: Network is down
(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
Scan timeout - try to get results
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 5 sec 0 usec
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
RX ctrl_iface - hexdump_ascii(len=6):
     53 54 41 54 55 53                                 STATUS          
Starting AP scan (broadcast SSID)
Scan requested (ret=-1) - scan timeout 30 seconds
Failed to initiate AP scan.
   
Removing interface wlan0
State: SCANNING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6


Im really not sure whats going on, so any help would be much appreciated.

Last edited by bashyow; 10-04-2008 at 06:59 PM.
 
Old 10-05-2008, 08:56 AM   #2
dlee99
LQ Newbie
 
Registered: Mar 2006
Location: Berkel en Rodenrijs
Distribution: Slackware64-current
Posts: 21

Rep: Reputation: 2
Shouldn't there be quotes around the psk in wpa_supplicant.conf?

just 2cts
 
Old 10-05-2008, 09:02 AM   #3
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by dlee99 View Post
Shouldn't there be quotes around the psk in wpa_supplicant.conf?

just 2cts
I think not, unless it's the plaintext passphrase that you want to write.
 
Old 10-05-2008, 10:39 AM   #4
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
Quote:
start the wpa_supplicant daemon as a foreground process
Code:

wpa_supplicant -dw -c/etc/wpa_supplicant.conf -Dwext -iath0
Why use iath0 when you seem to be using wlan0. Should be -iwlan0 if it matters.

My 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"
DHCP_TIMEOUT[1]=2
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
The DHCP_TIMEOUT was critical for me and scripts would not connect without it. In my house this works. In an apartment building this did not work but I did not try with increasing the value to 30 or 60.

My wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

network={
  scan_ssid=0
  ssid="yourssid"
  proto=WPA2
  key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  psk="123yourpass"
#  psk=hex conversion of 123yourpass
}
When scripts did not connect I ran the wpa_supplicant directly. In my house that worked. Again, in the apartment building it did not. I was stumped and out of time so didn't try wicd and friend decided to use XP which worked immediately.

Try adding the timeout and running scripts.
If doesn't work, try wpa_supplicant with correct -wlan0.
If doesn't work go over your passwords and router setup again.
If doesn't work use rworkman version of wicd.
 
Old 10-05-2008, 12:25 PM   #5
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by forum1793

My 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"
DHCP_TIMEOUT[1]=2
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
The DHCP_TIMEOUT was critical for me and scripts would not connect without it. In my house this works. In an apartment building this did not work but I did not try with increasing the value to 30 or 60.

My wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

network={
  scan_ssid=0
  ssid="yourssid"
  proto=WPA2
  key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  psk="123yourpass"
#  psk=hex conversion of 123yourpass
}
1. I added 'DHCP_TIMEOUT[4]=5' to my rc.inet1.conf.
2. I changed 'proto=WPA', to 'proto=WPA2' in my wpa_supplicant.conf. (duh! )
3. I commented out all entrys in rc.wireless.

the result is that the card is brought up properly on boot (with no error messages, unlike before).

but to get on to the internet, I have to delete the 'etc/dhcpc/dhcpcd-wlan0.pid' file, then do '/sbin/dhcpcd wlan0'.

so that must mean encryption is working ok.

but why is dhcp not working properly at boot time?

Last edited by bashyow; 10-05-2008 at 12:28 PM.
 
Old 10-05-2008, 02:02 PM   #6
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
Long ago I had this thread where in the end I figured that it was DCHP_TIMEOUT which was the key to get my Broadcom 4312 (rev02) card working. If you look at my experiments over there, it seems there are strange timing issues when it comes to use dhcp with this card. First make sure that you removed all the modifications to rc.wireless (you shouldn't need to edit that file). I also see that your inet1.conf has many DHCP-related options enabled. Try commenting out some of them -- in my case UDE_DHCP="yes" and the DHCP_TIMEOUT options are sufficient.
 
Old 10-05-2008, 06:09 PM   #7
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ilgar View Post
Long ago I had this thread where in the end I figured that it was DCHP_TIMEOUT which was the key to get my Broadcom 4312 (rev02) card working. If you look at my experiments over there, it seems there are strange timing issues when it comes to use dhcp with this card. First make sure that you removed all the modifications to rc.wireless (you shouldn't need to edit that file). I also see that your inet1.conf has many DHCP-related options enabled. Try commenting out some of them -- in my case UDE_DHCP="yes" and the DHCP_TIMEOUT options are sufficient.
yeah, it seems I need 'DHCP_TIMEOUT=5', or my card stays down.



I tried your command chain at the end of your post in the other thread and it works for me too:

Code:
root@kutu:/usr/src/linux# killall wpa_supplicant && killall dhcpcd
root@kutu:/usr/src/linux# /sbin/iwconfig wlan0 nick kutu ; /sbin/iwconfig wlan0 essid "AIRTIES_RT-205" ; wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -Dwext -iwlan0 ; ifconfig wlan0 up; ifconfig wlan0 down; /sbin/dhcpcd -d -t 30  wlan0
Error for wireless request "Set Nickname" (8B1C) :
    SET failed on device wlan0 ; Operation not supported.
dhcpcd: MAC address = 00:1a:73:66:6b:b9
dhcpcd: your IP address = 192.168.2.6

I think I'll stick with the slackware wireless initiation and 'DHCP_TIMEOUT=5' though, and do the last steps manually.

(EDIT******************** this next bit doesnt work, I think I must have been seeing things.)

I found that by uncommenting
Code:
'DHCP_IPADDR=mycomputeripaddressallocatedbyrouter'
allows me to skip the deleting of '/etc/dhcpc/dhcpcd-wlan0.pid', but still need to do '/sbin/dhcpcd wlan0' to get onto the net. I think Ill put that command in local or somewhere.
*************************

and its weird, sometimes I get errors on boot, sometimes I dont.

thanks for everyones help in this thread (also Eric ofcourse for his document).

I have got a wireless internet connection (of sorts) now

Last edited by bashyow; 10-05-2008 at 07:05 PM.
 
Old 10-19-2008, 11:41 AM   #8
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
Deleted as moved response to here.

Last edited by forum1793; 10-19-2008 at 11:56 AM.
 
  


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
Ubuntu 8.04 wireless problems on t60 thinkpad using atheros wireless adapter AR5212 NuxIT Linux - Wireless Networking 0 08-21-2008 05:54 AM
Broadcom Wireless (BCM4306) Wireless problems: modprobe ndiswrapper freezes HP Laptop shthap3ns Linux - Hardware 11 02-11-2007 12:53 PM
Wireless (Intel PRO/Wireless 2200BG) network problems using FC5 kernel 2.6.17 TempleOwl1999 Linux - Laptop and Netbook 14 08-26-2006 02:57 AM
Wireless card..Wireless router.. Slackware 10.2 ..Problems with Internet Connection. Storm Bringer Linux - Wireless Networking 4 03-23-2006 06:25 AM
wireless problems; Broadcom 802.11G Mini PCI Wireless with redhat WS surfbass Linux - Laptop and Netbook 1 12-17-2004 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration