DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th September 2015
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default Atheros AR9227 wireless PCI on 10.2

I have a TL-WN751ND in a 10.2 system that seems to be having some problems. Basic info:

# pciconf -lv
Code:
ath0@pci0:1:9:0:  class=0x028000 card=0x0301168c chip=0x002d168c rev=0x01 hdr=0x00
  vendor  = 'Atheros Communications Inc.'
  device  = 'AR9227 Wireless Network Adapter'
  class  = network
# ifconfig | grep -B3 -i wireless
Code:
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
  ether c4:e9:84:91:9c:20
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
--
  ether c4:e9:84:91:9c:20
  inet 192.168.49.179 netmask 0xfffffc00 broadcast 192.168.51.255
  nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
# ifconfig wlan0 list caps
Code:
drivercaps=4f85ed01<STA,IBSS,HOSTAP,AHDEMO,TXPMGT,SHSLOT,SHPREAMBLE,MONITOR,MBSS,WPA1,WPA2,BURST,WME,WDS,TXFRAG>
cryptocaps=1f<WEP,TKIP,AES,AES_CCM,TKIPMIC>
htcaps=7016e<CHWIDTH40,SHORTGI20,SHORTGI40>
Basic connectivity isn't a problem (it works) but the console/dmesg gets hammered with continuous reports like:
Code:
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 3 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: bb hang detected (0x4), resetting
Often, if the machine is left on over night, I will find that there is no connection in the morning and the network needs to be restarted. Hopefully, there is some tuning that can be done to get the driver/card to interact with the access point more gracefully. At the moment, I don't know how to proceed other than to collect a bunch of data and ask for guidance from the great anonymous network gurus of the inter-ether (there isn't a <smirk> smilie).

Below, is a command followed by an illustrative snippet what gets displayed on the console (and sent to dmesg).

# wlandebug rate
Code:
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: bad series0 hwrate 0x80, tries 2 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
wlan0: [20:b3:99:1c:02:48] ath_rate_findrate: min_switch 1077028 > ticks_since_switch 1064071..
wlan0: [20:b3:99:1c:02:48] ath_rate_tx_complete: size 250 (227 bytes) OK rate/short/long 5 MCS/0/1 nframes/nbad [1/0]
wlan0: [20:b3:99:1c:02:48] ath_rate_tx_complete: size 250 (227 bytes) OK rate/short/long 5 MCS/0/1 nframes/nbad [1/0]
wlan0: [20:b3:99:1c:02:48] ath_rate_findrate: min_switch 1078646 > ticks_since_switch 1078031..
# wlandebug input
Code:
wlan0: [b0:05:94:16:4e:87] discard frame, not to bss
wlan0: [00:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [02:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [06:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [b0:05:94:16:4e:87] discard frame, not to bss
wlan0: [00:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [02:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [06:1d:ce:a1:fc:a0] discard frame, not to bss
wlan0: [52:57:1a:1f:bc:b0] discard frame, not to bss
# wlandebug elemid
Code:
wlan0: [20:b3:99:1c:02:48] discard beacon frame, ie too short, got 26, expected 30
wlan0: [20:b3:99:1c:02:48] discard beacon frame, ie too short, got 26, expected 30
wlan0: [20:b3:99:1c:02:48] discard beacon frame, ie too short, got 26, expected 30
wlan0: [20:b3:99:1c:02:48] discard beacon frame, ie too short, got 26, expected 30
wlan0: [20:b3:99:1c:02:48] discard beacon frame, ie too short, got 26, expected 30
# wlandebug state
Code:
ath0: bad series0 hwrate 0x80, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x80, tries 2 ts_status 0x0
ath0: bb hang detected (0x4), resetting
ath0: bb hang detected (0x4), resetting
ath0: bb hang detected (0x4), resetting
wlan0: beacon miss, mode STA state RUN
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
wlan0: beacon miss, mode STA state RUN
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
# wlandebug dumppkts
Code:
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 31
ath0: bad series0 hwrate 0x80, tries 2 ts_status 0x0
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 32
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 31
wlan0: received beacon from 20:b3:99:1c:02:48 rssi 31
Reply With Quote
  #2   (View Single Post)  
Old 7th September 2015
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

I have the same chipset (out of use now since I switched to powerline adapters). It worked well enough for me In FreeBSD 9.x/10.0/10.1 and 10.2 (ath driver). It also worked flawlessly with OpenBSD's athn driver and with DragonFly's ath driver. NetBSD only supports it in 7.0 and -current

However I set my access point to 802.11g only. I'm not up to date with the state of FreeBSD's wireless networking stack, wpa_supplicant, etc, but last time I checked the ath driver supported the 'n' hardware like the AR9227, but not the 'n' data rates. I'm sure I tested it on an 'n' only access point and there were problems. I suggest doing some more research in that direction.
Reply With Quote
  #3   (View Single Post)  
Old 7th September 2015
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by cynwulf View Post
I have the same chipset (out of use now since I switched to powerline adapters). It worked well enough for me In FreeBSD 9.x/10.0/10.1 and 10.2 (ath driver). It also worked flawlessly with OpenBSD's athn driver and with DragonFly's ath driver. NetBSD only supports it in 7.0 and -current
Glorious news! I first installed OpenBSD but the kernel panicked moments after installing the ath firmware. I had planned on trying both {Open,Free}BSD on this machine so I just moved on without any further exploration of the issue. So, there is a light at the end of this tunnel. I'll finish my assessment of FreeBSD and plan on returning to OpenBSD when 5.8 is released next month. Thanks for confirming this chipset/driver on OpenBSD!

Quote:
However I set my access point to 802.11g only.
I am using a community access point that probably supports 11g so maybe it's possible to coerce this card into operating in the 11g mode. Tried this:

# ifconfig wlan0 destroy
# ifconfig wlan0 create wlandev ath0 mode 11g
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
# dhclient wlan0
# ifconfig | grep -B3 -i wireless
Code:
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether c4:e9:84:91:9c:20
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
--
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether c4:e9:84:91:9c:20
        inet 192.168.49.179 netmask 0xfffffc00 broadcast 192.168.51.255 
        media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
But it reports the mode as 11ng and the console still gets spamed with
Code:
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x82, tries 4 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
Quote:
I'm not up to date with the state of FreeBSD's wireless networking stack, wpa_supplicant, etc, but last time I checked the ath driver supported the 'n' hardware like the AR9227, but not the 'n' data rates. I'm sure I tested it on an 'n' only access point and there were problems. I suggest doing some more research in that direction.
I guess it's time to start digging through the source code.

Muchas gracias, amigo!
Reply With Quote
  #4   (View Single Post)  
Old 8th September 2015
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 316
Default

Quote:
Originally Posted by hanzer View Post
Glorious news! I first installed OpenBSD but the kernel panicked moments after installing the ath firmware. I had planned on trying both {Open,Free}BSD on this machine so I just moved on without any further exploration of the issue. So, there is a light at the end of this tunnel. I'll finish my assessment of FreeBSD and plan on returning to OpenBSD when 5.8 is released next month. Thanks for confirming this chipset/driver on OpenBSD!
That's odd about the firmware and kernel panics. Actually AR9227 doesn't need it, but it still gets installed by fw_update. Just uninstall the athn-firmware package (maybe boot with athn disabled, remove the package, reboot, etc).

Quote:
Originally Posted by hanzer View Post
I am using a community access point that probably supports 11g
Are you certain that the access point is not set to 802.11n ("greenfield") only? In this mode, a/b/g support is effectively killed, but FreeBSD will still see the network. That was my experience when using this hardware to try and connect to an 802.11n access point.

Can you have a look at ifconfig(8) under the 802.11 specific section and read the "chanlist" and "channel" options. It looks like you can force a specific channel to 802.11g there as well.
Reply With Quote
  #5   (View Single Post)  
Old 8th September 2015
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by cynwulf View Post
Can you have a look at ifconfig(8) under the 802.11 specific section and read the "chanlist" and "channel" options. It looks like you can force a specific channel to 802.11g there as well.
Good stuff. I hadn't noticed that before. After reading carefully, here's what I did:

# ifconfig wlan0 up scan
My community Access Point was in the list with channels 6 and 11.

# ifconfig wlan0 up scan chanlist 6:g
My community Access Point was in this list.

# ifconfig wlan0 up scan chanlist 11:g
My community Access Point was also in this list.

# /etc/rc.d/dhclient stop wlan0
# /etc/rc.d/wpa_supplicant stop
# ifconfig wlan0 destroy

# ifconfig wlan0 create wlandev ath0 channel 11:g
or
# ifconfig wlan0 create wlandev ath0 channel 6:g
(ether will work with my AP)

# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

This may be needed if the first attempt to get an address (auto) isn't successful.
# dhclient wlan0

The console and dmesg still gets spammed with messages like:
Code:
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 2 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: bad series0 hwrate 0x81, tries 2 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
but it seems to have calmed down a bit. Not great, but interesting.

To enable the new configuration at boot, /etc/rc.conf was modified like so:
Code:
wlans_ath0="wlan0"
create_args_ath0="channel 11:g"
ifconfig_wlan0="WPA DHCP"
Thanks for the suggestions. The NIC isn't operating perfectly (yet) but I am learning some nifty new stuff
Reply With Quote
  #6   (View Single Post)  
Old 7th February 2016
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by hanzer View Post
Glorious news! I first installed OpenBSD but the kernel panicked moments after installing the ath firmware. I had planned on trying both {Open,Free}BSD on this machine so I just moved on without any further exploration of the issue. So, there is a light at the end of this tunnel. I'll finish my assessment of FreeBSD and plan on returning to OpenBSD when 5.8 is released next month. Thanks for confirming this chipset/driver on OpenBSD!
I don't think that NIC worked with 5.8 but I don't remember how it failed.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Atheros ar9565 fossala OpenBSD General 5 23rd September 2014 03:46 PM
[Help needed] Atheros on Dragonflybsd joanelis Other BSD and UNIX/UNIX-like 4 4th May 2010 09:09 PM
atheros wireless card not working guitarscn FreeBSD General 0 26th August 2009 05:50 PM
atheros AR5424 amru OpenBSD General 5 12th June 2009 12:29 AM
[FB7|wireless]Atheros 5213 cannot search AP magnus FreeBSD General 3 8th May 2008 11:46 PM


All times are GMT. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick