You are not logged in.

#1 2009-04-05 16:23:59

wisecapt
Member
From: Russia, St.Petersburg
Registered: 2009-03-02
Posts: 8

[SOLVED]netcfg + hidden ssid + iwl3945 = strange behavior

I have a problem with the connection to the hidden networks using netcfg. Arch assistant is being started automatically at my laptop. It tries to connect, but dies with "no matching ssid found" error. And if I try to connect from arch assistant menu, it yields another one: "wireless association failed."
When I've been configuring wpa_supplicant, it seemed interesting (though weird too) that netcfg (arch assistant) connects with no errors after executing some commands:

bash-3.2# ifconfig wlan0 up
bash-3.2# iwconfig wlan0 essid AVA
bash-3.2# wpa_supplicant -B -dd -c/etc/wpa_supplicant.conf -iwlan0
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' 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='wheel' (DEPRECATED)
ap_scan=1
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=5):
     5a 79 58 45 4c                                    ZyXEL           
PSK (ASCII passphrase) - hexdump_ascii(len=12): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Line: 9 - start of a new network block
ssid - hexdump_ascii(len=3):
     41 56 41                                          AVA             
PSK (ASCII passphrase) - hexdump_ascii(len=20): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Line: 14 - start of a new network block
ssid - hexdump_ascii(len=9):
     65 74 68 65 72 6c 65 73 73                        etherless       
key_mgmt: 0x8
eap methods - hexdump(len=16): 00 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00
phase2 - hexdump_ascii(len=13):
     61 75 74 68 3d 4d 53 43 48 41 50 56 32            auth=MSCHAPV2   
identity - hexdump_ascii(len=7):
     77 66 36 75 31 37 36                              wf6u176         
password - hexdump_ascii(len=15): [REMOVED]
ca_cert - hexdump_ascii(len=29):
     2f 75 73 72 2f 73 68 61 72 65 2f 77 69 66 69 5f   /usr/share/wifi_
     63 65 72 74 2f 72 6f 6f 74 2e 64 65 72            cert/root.der   
Priority group 0
   id=0 ssid='ZyXEL'
   id=1 ssid='AVA'
   id=2 ssid='etherless'
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:19:d2:cf:e5:22
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=10 (from group name 'wheel')
Added interface wlan0
Daemonize..
bash-3.2# dhcpcd wlan0
wlan0: dhcpcd 4.0.12 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.1.2 from 192.168.1.1
wlan0: acknowledged 192.168.1.2 from 192.168.1.1
wlan0: leased 192.168.1.2 for 604800 seconds
bash-3.2# killall wpa_supplicant
bash-3.2# ifconfig wlan0 down
bash-3.2# netcfg home
:: home up                                                               [DONE]

But if I disconnect from the network and try to connect again, the error is returned again:

bash-3.2# netcfg -d home
:: home down                                                             [DONE] 
bash-3.2# netcfg home
:: home up  - Wireless association failed.                               [FAIL]

How can I make the arch assistant (netcfg) to connect at once?
Here is the configurations for my home router:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa"
ESSID=AVA
KEY="<CENSORED>"
IP="dhcp"
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
network={
        ssid="AVA"
        psk="<CENSORED>"
}

Last edited by wisecapt (2009-04-30 06:41:05)

Offline

#2 2009-04-18 18:26:13

wisecapt
Member
From: Russia, St.Petersburg
Registered: 2009-03-02
Posts: 8

Re: [SOLVED]netcfg + hidden ssid + iwl3945 = strange behavior

I had solved this problem a week ago, but I had no time to write a reply.
The solution is quite simply. You need to use wpaessid driver quirk.
Unfortunately, my adventures haven't finished yet as some new problems with wireless have appeared on 2.6.29 kernel.

Offline

#3 2009-04-18 23:40:53

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: [SOLVED]netcfg + hidden ssid + iwl3945 = strange behavior

I, too, use iwl3945 and am trying to connect to a WPA-encrypted wireless network with a hidden SSID. Regarding your new issue, wisecapt, I suggest that you try installing crda as discussed here (and referenced in this forum post). Unfortunately, that doesn't solve my own problem. sad

I can connect to my access point "manually" (using ifconfig, iwconfig, and wpa_supplicant); however, my usual netcfg profile will not allow me to connect:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa"
ESSID="$ESSID"
KEY="$KEY"
IP="dhcp"
TIMEOUT=20
QUIRKS=(wpaessid)

(where $ESSID and $KEY have the correct values).

As described in this thread, I have created a network profile that uses wpa_supplicant more directly:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa-config"
WPA_CONF=/etc/wpa_supplicant.conf
IP="dhcp"
TIMEOUT=20

Attempting to use that profile works; however, I have profiles for various separate networks (both WEP and WAP), and I'd like to have a separate profile for each network.

If I connect with the latter profile, then I can disconnect from the network and reconnect successfully with the former; however, attempting to connect using only the former (even after connecting and disconnecting manually) yields the following:

:: wireless up  - Wireless association failed.                           [FAIL]

To the best of my knowledge, these issues arose after updating to the 2.6.29 kernel. I've tweaked my normal profile a little since I first ran into this problem, but it seems that it should work. As mentioned above, I've installed/configured crdb, but that doesn't seem to have resolved my issue.

Does anyone have any ideas here?


Edit:

For the moment, I have found a workaround to my problem.

This post mentions adding the network parameter scan_ssid=1 to /etc/wpa_supplicant.conf. As my access point has a hidden SSID, it seems that I need to use this option for wpa_supplicant to connect (though I could be wrong).

When connecting to a WPA-encrypted network, netcfg creates a configuration file for wpa_supplicant based on the network profile. It uses the wpa_passphrase utility to generate the network parameters. wpa_passphrase outputs a network block containing the proper ssid and psk; however, no other network-specific parameters (such as scan_ssid) are added to the config file.

I've settled on making a small patch for netcfg (/usr/lib/network/wireless.subr) that will add scan_ssid=1 for any network that does not have SCAN enabled:

176c176,179
<         elif ! wpa_passphrase "$ESSID" "$KEY" >> $WPA_CONF; then
---
>         elif ! (wpa_passphrase "$ESSID" "$KEY" | tr -d "}" >> $WPA_CONF \
>                 && (! checkyesno $SCAN \
>                     && echo -e "\tscan_ssid=1\n}" >> $WPA_CONF \
>                     || echo "}" >> $WPA_CONF)); then

This is, perhaps, not the most elegant solution to my problem; however, it does seem to work. I just don't understand why I've never needed scan_ssid=1 in the past.

Last edited by ssjlegendx (2009-04-19 02:10:36)


#!/vim/rocks

Offline

#4 2009-04-26 07:15:07

wisecapt
Member
From: Russia, St.Petersburg
Registered: 2009-03-02
Posts: 8

Re: [SOLVED]netcfg + hidden ssid + iwl3945 = strange behavior

Thanks. Installing and configuring crda has solved that problem. So netcfg connects without errors. The only thing left to do is to make search and connection automatically.

I can connect to my access point "manually" (using ifconfig, iwconfig, and wpa_supplicant); however, my usual netcfg profile will not allow me to connect:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="no"
SECURITY="wpa"
ESSID="$ESSID"
KEY="$KEY"
IP="dhcp"
TIMEOUT=20
QUIRKS=(wpaessid)

(where $ESSID and $KEY have the correct values).

May be TIMEOUT affects to connecting? I haven't written this option in netcfg configuration file.
By the way, ap_scan isn't set in wpa_supplicant.conf too.

Last edited by wisecapt (2009-04-26 07:17:30)

Offline

#5 2009-05-21 19:50:48

sfauzia
Member
Registered: 2009-01-11
Posts: 88

Re: [SOLVED]netcfg + hidden ssid + iwl3945 = strange behavior

What is really strange is that I never needed scan_ssid=1 in the past either yet when I'm trying to use it now to fix my problem of not being able to connect to a hidden network, it isn't working. In the past I used a quirk of running iwconfig before ifconfig wlan0 up, then iwconfig again, (and then wpa_supplicant and dhcpcd, thus enabling me to connect to the network without any difficulty). Any help would be appreciated!

Offline

Board footer

Powered by FluxBB