# wpa_supplicant hangs



## rysic (Mar 19, 2012)

Hello!

I installed FreeBSD and now try to configure the wlan0 interface. I have in /etc/wpa_supplicant.conf below extra config:

```
network={
ssid="asd"
psk="123"
scan_ssid=1
}
```

and in /etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

but when *I* try to do `wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf` then it hangs (there is some connection loop, *I* think). What can be wrong in my configuration?

I am fresh in *Free*BSD, so please write if you need more data.


----------



## SirDice (Mar 20, 2012)

Does the card work at all?

See if it responds to this:

```
ifconfig wlan0 create wlandev ath0
ifconfig wlan0 up scan
ifconfig wlan0 list scan
```


----------



## rysic (Mar 20, 2012)

```
# ifconfig wlan0 create wlandev ath0
ifconfig: create: bad value
```

:[


----------



## rysic (Mar 20, 2012)

PS. In ifconfig I can see wlan0 and MAC address.


----------



## SirDice (Mar 20, 2012)

There should also be an ath(4) interface. That's assuming you have an Atheros based Wifi card.

Post the output of [cmd=]ifconfig -a[/cmd]


----------



## rysic (Mar 20, 2012)

Yes, there is ath0 and I can see its MAC address and media is IEEE 802.11 Wireless Ethernet autoselect mode 11b and status is associated.


----------



## rysic (Mar 20, 2012)

May be it can help








BTW. Why there is no iwconfig command in FreeBSD?


----------



## SirDice (Mar 20, 2012)

rysic said:
			
		

> BTW. Why there is no iwconfig command in FreeBSD?


Because it's a network interface and network interfaces are configured with ifconfig(8). Why would we need a separate command?


----------



## rysic (Mar 20, 2012)

So what is the way to set SSID using ifconfig? In Linux sometimes when wpa_supplicant is not working correctly, there must be set SSID using simple iwconfig (iwconfig can't connect to WPA2 but it is setting SSID correctly when wpa_supplicant is not). 

But let*'*s think about *Free*BSD configuration way now  What else can I do/check to connect to my WiFi?


----------



## SirDice (Mar 20, 2012)

rysic said:
			
		

> So what is the way to set ssid using ifconfig?


See ifconfig(8).



> What else can I do/check to connect to my WiFi?


Try adding -dd to the wpa_supplicant(8) command to add more debugging output.


----------



## rysic (Mar 20, 2012)

There is message:

```
No suitable network found
```

I suppose that problem is that network is hiden and he can't find it! He is tryin*g* to scan for networks as I see in output but he can't find such SSID.


----------



## SirDice (Mar 20, 2012)

Turn SSID broadcasts back on. It's a useless "security" precaution anyway. The SSID is sent along with every packet, unencrypted, regardless of the encryption being used.


----------



## rysic (Mar 20, 2012)

I know that... But my boss wanted broadcast off and it must be like that :/
I'll test it and we will see if that is the reason.


----------



## rysic (Mar 21, 2012)

Turn on broadcast didn't help


----------



## SirDice (Mar 21, 2012)

Does it show up now?

`# ifconfig wlan0 list scan`


----------



## rysic (Mar 27, 2012)

SirDice said:
			
		

> Does it show up now?
> 
> `# ifconfig wlan0 list scan`



No output...


----------



## rysic (Mar 28, 2012)

OK! It's time to try PC-BSD 
Thanks!


----------



## rysic (Apr 5, 2012)

In PC-BSD I discovered one ama*z*ing thing. There was a disabled WiFi button! The easiest things are the most difficult to discover. Thank you very much for help. I'm going back to FreeBSD


----------

