Solved [SOLVED] 10.0-RELEASE memstick: Atheros AR9462 won't connect

I'm using FreeBSD-10.0-RELEASE-amd64-memstick.img. I'm in the Network Configuration step in the post-installation part of the installer.

The network interfaces listed are:
Code:
re0     RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet
ath0    Wireless Atheros AR946x/AR948x

I select ath0, and then the scan shows an error: No wireless networks were found. Rescan? At that point, I hit Alt+F4 to go to a shell to begin my very long debugging session.

pciconf -lv shows that my network device is AR9462 Wireless Network Adapter.

ifconfig -l shows
Code:
re0 ath0 lo0 wlan0

ifconfig shows
Code:
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
            ether <redacted>
            nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
            media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
            status: associated
wlan0: flags=8847<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
            ether <redacted>
            nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
            media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
            status: no carrier
            ssid "" channel 1 (2412 MHz 11g ht/20)
            regdomain 106 indoor ecm authmode WPA1+WPA2/902.11i privacy ON
            deftxkey UNDEF txpower 20 bmiss 7 scanvalid 60 protmode CTS
            ampdulimit 8k ampdudensity 8 shortgi wme burst roaming MANUAL

The "status: no carrier" concerns me. Does it just mean the card isn't connected to any network?

ifconfig wlan0 scan returns nothing. The exit code is 0.

I created my own /mnt/etc/wpa_supplicant.conf with the following contents:
Code:
network={
    ssid="<my_network_name>"
    proto=WPA2
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    psk="<my_wpa2_password>"
}

I also tried the same config with just the ssid and psk parameters, but had the same result.

wpa_supplicant -B -i wlan0 -c /mnt/etc/wpa_supplicant.conf -d -d shows
Code:
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED

The exit code is 0. I'm not using EAP (I'm using WPA2-PSK), so I wonder if those EAP messages are just a red herring.

dmesg | less shows
Code:
wlan0: Ethernet address: <redacted>
ath0: ath_reset_grablock: didn't finish after 10 iterations
ath0: ath_reset_grablock: warning, recursive reset path!
ath0: ath_chan_set: concurrent reset! Danger!
wlan0: Ethernet address: <redacted>
ath0: ath_edma_recv_tasklet: sc_inreset_cnt > 0; skipping
ath0: ath_edma_recv_tasklet: sc_inreset_cnt > 0; skipping

dhclient wlan0 shows
Code:
wlan0: no link .............. giving up

"92 pci/ath_pci" is listed under "kernel" in the kldstat -v output.

ping -c 3 [url=http://www.freebsd.org]http://www.freebsd.org[/url] shows
Code:
ping: cannot resolve www.freebsd.org: Host name lookup failure

If I use an IP address instead ( ping -c 3 8.8.178.110), I get:
Code:
ping: sendto: No route to host

Since / is read-only with the installer, I cannot modify /etc/rc.conf; however, I did make sure my /mnt/etc/rc.conf is correct:
Code:
wpa_supplicant_enable="YES"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"

I'm on a desktop that also has Arch Linux and Windows 8 installed on it. Wireless works perfectly fine with them, so the card is functional and suggests that if my desktop does have a hardware switch for the wireless device, it's in the "on" position.

I'm stuck and need some help. Any ideas? Does my wireless router need to be configured a certain way to work with FreeBSD? Is there anything else I can check to help with debugging?
 
Solution

I figured out how to get a working wireless connection.
  • Once you hit the Network Configuration step in the post-installation and no wireless networks are found after a scan, hit Alt+F4 to switch to a shell.
  • Create /mnt/etc/wpa_supplicant.conf with the appropriate network block for your wireless network.
  • Configure your wireless interface by invoking wpa_supplicant(8) with your wpa_supplicant.conf(5): wpa_supplicant -B -i wlan0 -c /mnt/etc/wpa_supplicant.conf
  • Start the netif service: service netif start
  • Get an IP: dhclient wlan0
  • Congratulations! You should now having a working wireless connection. Try pinging a Web site: ping [url]http://www.freebsd.org[/url]
  • Hit Alt+F1 to switch back to the installer.
  • Rescan for wireless networks (note that you might need to rescan a few times before any networks are picked up; it took me a couple tries).

I hope no one else has to waste many, many hours (days, actually) trying to establish a wireless connection.

Is it a bug that the installer doesn't start the netif service automatically? It seems that that step was necessary for me to get a working wireless connection, but it's not something that the installer did for me.

EDIT:

The problem still exists in 10.1-RC2. A better workaround is to hit cancel during the 5 second scan. When I cancel, I'm taking to a list of wireless networks, including my own.
 
Last edited:
Back
Top