# [SOLVED]wpa_supplicant notconnecting to my wireless NW

## orkneywool

[edit] all because of a  typo on my part !!

Im a bit new to all this 

im trying to configure my wireless NW - not got as far as a GUI yet 

 *Quote:*   

>  mars / # wpa_cli 
> 
> wpa_cli v2.4
> 
> Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors
> ...

 

 *Quote:*   

>  mars / # cat  /etc/conf.d/net
> 
> config_eth0="dhcp"
> 
> modules_wlan0="wpa_supplicant"
> ...

 

iI think it is seeing the network but not connecting to it 

 *Quote:*   

> wpa_supplicant -Dnl80211 -iwlan0  -C/var/run/wpa_supplicant/ -c/etc/wpa_supplicant/wpa_supplicant.conf -dd
> 
> <snipped> 
> 
> wlan0: New scan results available (own=1 ext=0)
> ...

 

?Last edited by orkneywool on Sun Jan 03, 2016 2:26 pm; edited 1 time in total

----------

## NeddySeagoon

orkneywool,

Your SSID is case sensitive and there are a few illegal characters for SSID too.

It claims it can't match your SSID.

A problem waiting to happen is 

```
psk="1234567890"
```

With the quotes, its a string that will be applied to the string to hex converter before its used for your key.

Without the quotes, its treated an a hex number to be used directly. 

Both psk="1234567890" and psk=1234567890 are correct syntax but they are different keys.

----------

## orkneywool

here my wpa_supplicant.conf

 *Quote:*   

> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
> 
> #ap_scan=0
> 
> #update_config=1
> ...

 

and the output from the command line 

 *Quote:*   

> 
> 
> wpa_supplicant -B -iwlp1s6 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext
> 
> Successfully initialized wpa_supplicant
> ...

 

----------

## quilosaq

 *Quote:*   

> Line 7: Invalid PSK '86abcfe876'. 

 A valid psk key needs 64 hexa digits or a string (double quoted) from 8 to 63 ASCII characters. Your current key is only 10 hexa characters.

----------

## khayyam

 *orkneywool wrote:*   

> 
> 
> ```
> Line 7: Invalid PSK '86abcfe876'.
> 
> ...

 

orkneywool ... how did you aquire/generate the psk? The above isn't a 'psk', its a "word".

```
network={

  ssid="BTHub4-SRJS"

  #psk="86abcfe876"

  psk=f49a99ab6a6e14e93573f0cb7bab08845684468b0c19cf26adfa54ab347e212e

}
```

As for your initial "SSID mismatch", this could be caused by a number of things, most likely another 'VAP' (virtual AP) with the same SSID. You could supply the BSSID which hopefully will avoid the issue:

```
network={

  ssid="BTHub4-SRJS"

  bssid=2C:39:96:B6:FB:86

  psk=f49a99ab6a6e14e93573f0cb7bab08845684468b0c19cf26adfa54ab347e212e

  scan_ssid=0

}
```

If the above fails then please supply (via pastebin) the full wpa_supplicant.log, and the output of

```
# awk '{RS="Cell"}/BTHub4-SRJS/' <(iwlist dev wlp1s6 scan)
```

Also, note in the above you've provided '-iwlan0' and '-iwlp1s6', and used '-Dnl80211' and '-Dwext' ... that can't be right, at least for the interface name, so consistancy. Your interface probably is 'wlp1s6', and should be using '-Dnl80211'.

best ... khay

----------

## orkneywool

i got the conf file from

https://wiki.gentoo.org/wiki/Wpa_supplicant

i'll do the rest when i get home

and are they single quotes or backticks ?

----------

## NeddySeagoon

orkneywool,

psk=86abcfe876 is a hex number, to be used as the psk directly.

psk="86abcfe876" is a text string to be converted to hex before its used as the key.

The quotes matter.  If your Access Point uses a pass phrase, use the same pass phrase here - in quotes.

If it uses a hex key, most don't, use it here but no quotes.

Its double quotes.

----------

## orkneywool

 *Quote:*   

>  awk '{RS="Cell"}/BTHub4-SRJS/' <(iwlist dev wlp1s6 scan)

 

says iwlist unknown command 'wlp1s6 

the relevant ( i think) output of  iwlist wlp1s6 scan is here    http://pastebin.com/a33MLaUM

the BT Home hubs come with  a 10digit key , not a passphrase 

ive generated a wpa_supplicant.conf file with wpa_passphrase 

the attempt at connection is here 

http://pastebin.com/9T28581g

ive used genkernel  if its relevant 

the output of lspci -k is 

 *Quote:*   

> 01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller (rev 20)
> 
> 	Subsystem: Realtek Semiconductor Co., Ltd. RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller
> 
> 	Kernel driver in use: rtl818x_pci

 

----------

## khayyam

 *orkneywool wrote:*   

> the BT Home hubs come with a 10digit key, not a passphrase

 

orkneywool ... that sounds like a wep key (generally 10 digit), or WPS key (though wps is eight digit, not ten). Anyhow, from the scan I can't tell if wps is in use (as iwlist doesn't show extended capabilities), and wep doesn't seem to be available.

 *orkneywool wrote:*   

> [...] the attempt at connection is here

 

That shows 'ap_scan=0' ... which shouldn't be the case (as that is for 802.11x for wired networks) ... I suspect that is why we see "could not read SSID from driver" subsequently.

Besides the psk the following should be correct:

```
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel

update_config=1

ap_scan=1

network={

  ssid="BTHub4-SRJS"

  bssid=2C:39:96:B6:FB:86

  scan_freq=2462

  scan_ssid=0

  proto=WPA2

  auth_alg=OPEN

  key_mgmt=WPA-PSK

  group=TKIP

  pairwise=CCMP

  psk=

}
```

If this fails then it should be due to authentication ... and we then know the psk provided is incorrect.

best ... khay

----------

## orkneywool

still doesn't connect 

http://pastebin.com/CpLsnEsA

ive put Ubuntu on a different partition . i can connect  to the wireless from there 

if its any help the bits of the logs that i can find are 

http://pastebin.com/CpLsnEsA

----------

## NeddySeagoon

orkneywool'

```
Dec 31 17:18:24 mars kernel: [   46.445578] wlan0: authenticate with 2c:39:96:b6:fb:86

Dec 31 17:18:24 mars kernel: [   46.558580] wlan0: send auth to 2c:39:96:b6:fb:86 (try 1/3)

Dec 31 17:18:24 mars kernel: [   46.560161] wlan0: authenticated

Dec 31 17:18:24 mars kernel: [   46.562553] wlan0: associate with 2c:39:96:b6:fb:86 (try 1/3)

Dec 31 17:18:24 mars kernel: [   46.564658] wlan0: RX AssocResp from 2c:39:96:b6:fb:86 (capab=0x431 status=0 aid=42)

Dec 31 17:18:24 mars kernel: [   46.564691] wlan0: associated
```

That's the hard bit done.  With the wireless stuff out of the way, it can get an IP, if you ask it to.

Try 

```
dhcpcd wlan0
```

 Give it 20 sec or so and look in 

```
ifconfig -a
```

----------

## orkneywool

sorry - my mistake 

the gentoo log is

http://pastebin.com/LQGSM7ZD

the gentoo partition  isnt connecting -the ubuntu one is

----------

## quilosaq

orkneywool,

The SSID of your AP is BTHub4-SJRS

and your wpa_supplicant.conf contains BTHub4-SRJS.

----------

## NeddySeagoon

quilosaq,

Well caught!

----------

