# wpa_supplicant && init.d/conf.d script

## Twelc

Hi

I'm trying to set up my wifi card so that I can connect to two networks (not a the same time).

The wifi card is set up correctly (I first tried it with no security at all on the router and it worked fine).

Network one: ssid penthouse, WEP128, broadcast ssid disabled [current available network]

Network two: ssid frogs, WPA-PSK TKIP, broadcast ssid disabled [300 miles away  :Very Happy: ]

My /etc/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1 #I first tried without - I saw it on the forum...

ap_scan=1

fast_reauth=1 #I first tried without - I saw it on the forum...

network={

   ssid="penthouse"

   scan_ssid=1

   key_mgmt=NONE

   wep_key0=XXXXXXXXXXXXXXXXXXXXXXXXX

   wep_tx_keyidx=0 #I've tried commented

   priority=9

   auth_alg=OPEN #I've tried with SHARED and commented

}

network={

   ssid="frogs"

   scan_ssid=1

   psk="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=TKIP

}
```

My /etc/conf.d/wireless

```
modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dndiswrapper " # I had to put a space at the end otherwise error message

wpa_timeout_wlan0=20

config_wlan0=("dhcp")
```

And when I execute "/etc/init.d/net.wlan0 start", I get:

```
 june ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ]

")syntax error: operand expected (error token is "138: ((: i<20

 *     wlan0 connected to "" at 00:00:00:00:00:00

 *   Bringing up wlan0

 *     dhcp

 *       Running dhcpcd ...

[stays there for ages !]
```

What's the syntax error ?!?

Any suggestions on how to make it work?

Thanks

If you're interested in the result of "wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd", there it is  :Wink: 

```
ioctl[SIOCSIWSCAN{,EXT}]: Argument list too long

ioctl[SIOCSIWSCAN{,EXT}]: Argument list too long

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'

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

ap_scan=1

Line: 5 - start of a new network block

ssid - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

scan_ssid=1 (0x1)

key_mgmt: 0x4

wep_key0 - hexdump(len=13): [REMOVED]

Priority group 0

   id=0 ssid='penthouse'

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

Own MAC address: 00:14:a5:12:ae:b0

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (broadcast SSID)

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Signal 2 received - terminating

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

No keys have been configured - skip key clearing
```

----------

## UberLord

Looks like you're using baselayout-1.11

Try baselayout-1.12 - it has much better wpa_supplicant support.

----------

## Twelc

 *Quote:*   

> Looks like you're using baselayout-1.11
> 
> Try baselayout-1.12 - it has much better wpa_supplicant support.

 yep, it was 1.11. I just emerged baselayout 1.12 and ran etc-update so that the config files could be changed (many in /etc/conf.d & /etc/init.d - I made sure that files in conf.d were still ok).

I rebooted my laptop, and when I ran /etc/init.d/net.wlan0 start, I have a slightly different problem :

```
june ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ]

")syntax error: operand expected (error token is "147: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20

")syntax error: operand expected (error token is "164: [[: 20
```

It goes on for ages so I just stopped it with Ctrl C

----------

## UberLord

What version of bash do you have emerged?

----------

## Twelc

 *UberLord wrote:*   

> What version of bash do you have emerged?

 GNU bash, version 3.00.16(1)-release (i686-pc-linux-gnu)

Copyright (C) 2004 Free Software Foundation, Inc.

----------

## UberLord

Could you email me your entire and un-altered conf.d/net and conf.d/wireless files please?

uberlord@gentoo.org

Thanks

----------

## Twelc

ok - I just sent the email.

Thanks  :Smile: 

----------

## UberLord

HAHAHAHAHAHA

Sorry,  I do have to laugh. Unsolvable unless you happen to use an editor that tells you the file type .....

Your config files are DOS style which is confusing the hell out of bash.

Here's the fix

```
cd /etc/init.d

cp net wireless /tmp

iconv /tmp/net > net

iconv /tmp/wireless > wireless

```

----------

## Twelc

Nice !

I haven't emerged a window manager yet so I do my research on windows and then boot on Linux to try...not very convenient.

I also checked /etc/wpa_supplicant.conf and it seems to be fine.

Next problem is that it does not seem to detect my network :/

```
# /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ]

 *     Timed out                                                          [ !! ]
```

Could it be that it does not detect the network because the broadcast ssid is deactivated ?

edit: I've activated the broadcast ssid - iwlist wlan0 does detect the network...but /etc/init.d/net.wlan0 start still goes on time out :/

----------

## UberLord

Debugging wireless is a PITA  :Sad: 

Try using the -dd options of wpa_supplicant.

----------

## Twelc

Hi

Christmas and my exams are finally finished....and I'm back with playing with wpa_supplicant...

I read the following in the "wpa_supplicant.conf.example" file about ap_scan

```
# 1: wpa_supplicant initiates scanning and AP selection

# 0: driver takes care of scanning, AP selection, and IEEE 802.11 association

#    parameters (e.g., WPA IE generation); this mode can also be used with

#    non-WPA drivers when using IEEE 802.1X mode; do not try to associate with

#    APs (i.e., external program needs to control association)

# 2: like 0, but associate with APs using security policy and SSID (but not

#    BSSID); this can be used, e.g., with ndiswrapper and NDIS driver to

#    enable operation with hidden SSIDs and optimized roaming; in this mode,

#    only the first network block in the configuration file is used and this

#    configuration should have explicit security policy (i.e., only one option

#    in the lists) for key_mgmt, pairwise, group, proto variables
```

It seems in my case (hidden SSID) it would be 2. But I tried all values and does not seem to work  :Sad: 

My wpa_supplicant.conf file :

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1 # tried with 0, 1 & 2

fast_reauth=1

network={

   ssid="penthouse"

   scan_ssid=1

   key_mgmt=NONE

   wep_key0=xxxxxxxxxxxxxxxxxxxxxxxxxx

#   wep_tx_keyidx=0 # I tried with & without

#   priority=9 # I tried with & without

   auth_alg=SHARED

}
```

Is this the correct setting for WEP128 ?

In all cases, /etc/init/net.wlan0 start always times out  :Sad: 

The command "wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd" returns the following:

ap_scan=0

```
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'

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

eapol_version=1

ap_scan=0

fast_reauth=1

Line: 7 - start of a new network block

ssid - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

scan_ssid=1 (0x1)

key_mgmt: 0x4

wep_key0 - hexdump(len=13): [REMOVED]

auth_alg: 0x2

Priority group 0

   id=0 ssid='penthouse'

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

Own MAC address: 00:14:a5:12:ae:b0

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

[...]

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Signal 2 received - terminating

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

No keys have been configured - skip key clearing
```

ap_scan=1

```
ioctl[SIOCSIWSCAN{,EXT}]: Argument list too long

ioctl[SIOCSIWSCAN{,EXT}]: Argument list too long

ioctl[SIOCSIWSCAN{,EXT}]: Argument list too long

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'

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

eapol_version=1

ap_scan=1

fast_reauth=1

Line: 7 - start of a new network block

ssid - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

scan_ssid=1 (0x1)

key_mgmt: 0x4

wep_key0 - hexdump(len=13): [REMOVED]

auth_alg: 0x2

Priority group 0

   id=0 ssid='penthouse'

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

Own MAC address: 00:14:a5:12:ae:b0

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (broadcast SSID)

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (broadcast SSID)

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 0

No suitable AP found.

Setting scan request: 5 sec 0 usec

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Signal 2 received - terminating

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

No keys have been configured - skip key clearing
```

ap_scan=2

```
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'

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

eapol_version=1

ap_scan=2

fast_reauth=1

Line: 7 - start of a new network block

ssid - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

scan_ssid=1 (0x1)

key_mgmt: 0x4

wep_key0 - hexdump(len=13): [REMOVED]

auth_alg: 0x2

Priority group 0

   id=0 ssid='penthouse'

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

Own MAC address: 00:14:a5:12:ae:b0

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Trying to associate with SSID 'penthouse'

Cancelling scan request

Automatic auth_alg selection: 0x1

Overriding auth_alg selection: 0x2

No keys have been configured - skip key clearing

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - portControl=ForceAuthorized

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Authentication with 00:00:00:00:00:00 timed out.

Added BSSID 00:00:00:00:00:00 into blacklist

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

Trying to associate with SSID 'penthouse'

Cancelling scan request

Automatic auth_alg selection: 0x1

Overriding auth_alg selection: 0x2

No keys have been configured - skip key clearing

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - portControl=ForceAuthorized

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Authentication with 00:00:00:00:00:00 timed out.

BSSID 00:00:00:00:00:00 blacklist count incremented to 2

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

Trying to associate with SSID 'penthouse'

Cancelling scan request

Automatic auth_alg selection: 0x1

Overriding auth_alg selection: 0x2

No keys have been configured - skip key clearing

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - portControl=ForceAuthorized

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Authentication with 00:00:00:00:00:00 timed out.

BSSID 00:00:00:00:00:00 blacklist count incremented to 3

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

Trying to associate with SSID 'penthouse'

Cancelling scan request

Automatic auth_alg selection: 0x1

Overriding auth_alg selection: 0x2

No keys have been configured - skip key clearing

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - portControl=ForceAuthorized

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Signal 2 received - terminating

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

No keys have been configured - skip key clearing

Removed BSSID 00:00:00:00:00:00 from blacklist (clear)

```

How come there is "No keys have been configured - skip key clearing" ?

I did put a wep key...

----------

## Twelc

I made some further trials tonight...

I first ran "iwconfig wlan0 essid penthouse" (don't know if it helps given that the essid is hidden).

Using the following wpa_supplicant file :

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=2

fast_reauth=1

network={

   ssid="penthouse"

   key_mgmt=NONE

   wep_key0=xxxxxxxxxxxxxxxxxxxxxxxxxx

   wep_tx_keyidx=1

   auth_alg=OPEN # tried Shared, Open [indicated on router's wifi setting page] and without...

}
```

When I do /etc/init/net.wlan0 start, I now get the following :

```
 # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ] 

 *     wlan0 connected to "penthouse" at 00:30:54:40:54:D6

 *   Bringing up wlan0

 *     dhcp

 *       Running dhcpcd ...                                               [ !! ]
```

Running dhcpcd takes ages and...fails.

Now, I get the following with "wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd":

```
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'

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

eapol_version=1

ap_scan=2

fast_reauth=1

Line: 7 - start of a new network block

ssid - hexdump_ascii(len=9):

     70 65 6e 74 68 6f 75 73 65                        penthouse       

key_mgmt: 0x4

wep_key0 - hexdump(len=13): [REMOVED]

wep_tx_keyidx=1 (0x1)

Priority group 0

   id=0 ssid='penthouse'

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

Own MAC address: 00:14:a5:12:ae:b0

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Trying to associate with SSID 'penthouse'

Cancelling scan request

Automatic auth_alg selection: 0x1

No keys have been configured - skip key clearing

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - portControl=ForceAuthorized

Wireless event: cmd=0x8c07 len=51

Wireless event: cmd=0x8c08 len=24

Wireless event: cmd=0x8b15 len=20

Wireless event: new AP: 00:30:54:40:54:d6

Association event - clear replay counter

Associated to a new BSS: BSSID=00:30:54:40:54:d6

Network configuration found for the current AP

EAPOL: External notification - portControl=ForceAuthorized

Associated with 00:30:54:40:54:d6

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

EAPOL: External notification - portEnabled=1

EAPOL: SUPP_PAE entering state S_FORCE_AUTH

EAPOL: SUPP_BE entering state IDLE

EAP: EAP entering state INITIALIZE

EAP: EAP entering state IDLE

Cancelling authentication timeout

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=59

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=58

[...]

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=1

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

EAP: EAP entering state FAILURE

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

[...]

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0

Signal 2 received - terminating

EAPOL: External notification - portEnabled=0

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portValid=0

No keys have been configured - skip key clearing
```

I don't understand the "No keys have been configured - skip key clearing"

Don't see what else is wrong...

----------

## strites

in /etc/conf.d/net

```
wpa_supplicant_wlan0="-Dwext"
```

 instead of -Dndiswrapper

For me worked.

----------

