# Unable to Wirelessly Connect



## Deleted member 47080 (Sep 7, 2015)

Ok, so according to ifconfig(8), my Atheros wireless card is detected out of the box. By default I get an ath0 interface.
I've followed handbook instructions on setting up WiFi, and can never get wpa_supplicant(8) to actually connect (network is WPA2-PSK AES). net-mgmt/wifimgr crashes (as reported in another thread) and net/wpa_gui simply scans forever but never shows anything.

Relevant rc.conf:

```
ifconfig_re0="up"
ifconfig_ath0="ether OBSCURED_RE0_MAC"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
```

Relevant wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="MYSSID"
priority=5
key_mgmt=WPA-PSK
proto=WPA RSN
psk="PSK"
}
```

My user is in wheel and operator groups. Also tried wpa_gui via sudo(8), same results. I've also tried this whole shebang with the LAGG config switched out for plain old eth and WLAN, and had no better luck.


----------



## wblock@ (Sep 7, 2015)

Walk before you run.  By that, I mean get a simple wireless connection working before setting up lagg(4).  And keep it as simple as possible by removing all the extra settings from wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="MYSSID"
        psk="PSK"
}
```

/etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
```

If you have a hidden SSIDs, realize that they frequently cause problems and require extra settings.


----------



## Deleted member 47080 (Sep 7, 2015)

I started out with pretty much that config (without the ctrl_interface part, and using DHCP instead of SYNCDHCP). I just tried it again exactly as you have it for completeness - on boot, still tries and fails to start. wpa_gui still scans without end or result.
The SSID isn't hidden, so no issues there.


----------



## wblock@ (Sep 7, 2015)

Avoid the GUI stuff for now.  Is this a notebook or desktop?  If it is a notebook, is the wireless disabled in the BIOS or with a switch?  Try `ifconfig wlan0 up list scan` a couple of times and see what it shows.


----------



## Deleted member 47080 (Sep 7, 2015)

Ok, avoiding the GUI for now. This is a stock Lenovo B570 laptop. Wireless is enabled in both BIOS and switch, and the command does nothing. Executes without error, returning immediately to the prompt.


----------



## wblock@ (Sep 7, 2015)

Wait for 30 seconds or so, and try that command again.


----------



## Deleted member 47080 (Sep 7, 2015)

It hasn't done anything different since you told me to run it the first time.


----------



## kpa (Sep 7, 2015)

Post your `dmesg` output.


----------



## Deleted member 47080 (Sep 7, 2015)

Attached


----------



## wblock@ (Sep 8, 2015)

The machine was shut off without being shut down.  Please boot in single user mode and use `fsck -tufs -y` before continuing.


----------



## Deleted member 47080 (Sep 8, 2015)

I used `shutdown -r now` in a terminal inside X. Never had any trouble with this method before today, but apparently it's a no-no. At any rate, I've `fsck`'d.


----------



## wblock@ (Sep 8, 2015)

Make sure the contents of /etc/rc.conf and /etc/wpa_supplicant.conf are still what they were, then try `ifconfig wlan0 up list scan` again.  If that still shows nothing, hold Fn and press F5.  Then try the scan one more time.


----------



## Deleted member 47080 (Sep 8, 2015)

That changed nothing. Isn't that a software button anyway?


----------



## wblock@ (Sep 8, 2015)

fade said:


> Isn't that a software button anyway?


Possibly.  It was worth a try.  Unfortunately, I can't think of anything else to suggest except to post on the freebsd-wireless mailing list.


----------



## MorgothV8 (Sep 9, 2015)

Try to disable password for your SSID.
Check if network (router) is running on 2,4 GHz not 5 Ghz....
My Acer netbook doesn't detect 5 GHZ networks, also if used WPA it works, but when used WPA2 it is not working.


----------



## wblock@ (Sep 9, 2015)

If the `list scan` shows nothing, it is not even seeing access points.


----------



## ermin (Nov 2, 2015)

There's a good article about wireless here, check it.

http://www.networkel.com/2015/11/wireless-lan-wlan-overview.html


----------

