Solved 5Ghz Wireless Connections using iwn

rhsbsd

Member

Thanks: 9
Messages: 60

#1
The problem was that my Intel Centrino wireless 6205 nic was not associating with a 5ghz channel in my Cisco Model: DPC3941T Hardware revision 1.0 cable router. The 2.4ghz band and connections are functioning well but the 5gig connection is much faster. Okay if you really want to know, after 2am, when all is quite, I can connect to the 5ghz band at up to 60Mgb down and 15 up with an rssi level at around -72 db. It almost equals my cabled in port. I'm not using any range extenders, repeaters, or fancy antennas. The 2.4ghz band using "g" and high throughput "ht/20" gets 20Mgbits (max) down and 12 up.

I'm including a look at my cable modems wireless 5ghz properties page. Take note of the mixed mode(s) of operation and the tiny little print under the security mode window. Oh gee more confusing crap, to add to the overwhelming amount of confusion already confusing me. Symptoms of this problem include but not limited to the following:
a] Repeated, albight endless connection attempts by local instance of lan interface, i.e. "wlan0" in my case. This can be viewed in real time either in /var/log/messages or preferably using Wire-shark. Wire-shark lets you save your dhcp boot packets so I can compare them to successful connections by my Windows OS. In my case the dhcp request packets were exactly the same save for one tiny little difference.
b] If your using "wpa_gui for wpa_supplicant" you can also see very brief successful connections followed by a message in the message window stating a reason "1" or "3" for the disconnection.
c] At times, it may appear that dhclient has not set up dhcp with wlan0. This means that if you type dhclient wlan0 and get an error of any kind instead of "dhclient running" and an immediate return to your prompt. If you see this or suspect this try ifconfig and it will stop short and also tell you that dhclient is not running or complain about wpa_supplicant and show nothing for wlan0.
The point here is that this problem ran me around in circles for quite some time but as usual all you have to do is look at the clues and read man(8) ifconfig about 150 times and you will have arrived right where I am. THE FIX!
Code:
# ifconfig wlan0 scan list sta
SSID/MESH ID  BSSID  CHAN RATE  S:N  INT CAPS
HOME-A3BF-2.4  **:**:**:**:**:**  6  54M -75:-95  100 EPS  RSN HTCAP WPA WME ATH RSN WPA
They'reHotSpot  **:**:**:**:**:**  6  54M -76:-95  100 EPS  RSN HTCAP WPA WME ATH RSN WPA
Riley  **:**:**:**:**:**  11  54M -89:-95  100 EP  RSN HTCAP WPS WPA WME
HOME-D292  **:**:**:**:**:**  11  54M -89:-95  100 EP  HTCAP WPA RSN WME
xfinitywifi  **:**:**:**:**:**  11  54M -89:-95  100 E  HTCAP WME
Laughlin  **:**:**:**:**:**  11  54M -91:-95  100 EPS  RSN WPA WME HTCAP ATH
Giveitashot  **:**:**:**:**:**  7  54M -77:-95  100 EPS  RSN HTCAP WPA WME WPS
Linksys27183  **:**:**:**:**:**  2  54M -86:-95  100 EP  RSN HTCAP WPS WME
HOME-A3BF-5     **:**:**:**:**:**  149  54M -81:-95  100 EP  HTCAP WME ATH RSN WPA<<<<<<<<<<<<<<<<<<<<<<<
xfinitywifi  **:**:**:**:**:**  6  54M -88:-95  100 E  HTCAP WME
yngwie2  **:**:**:**:**:**  6  54M -91:-95  100 EP  HTCAP RSN WME WPS
0x000000000...  **:**:**:**:**:**  2  54M -86:-95  100 EPS  RSN HTCAP WME
HOME-09A0-2.4  **:**:**:**:**:**  1  54M -91:-95  100 EPS  HTCAP WME ATH RSN WPA WPS
Linksys07330  **:**:**:**:**:**  3  54M -92:-95  100 EP  RSN HTCAP WPS WME
NETGEAR88  **:**:**:**:**:**  9  54M -86:-95  100 EP  RSN HTCAP WPS WME
ATT50333  **:**:**:**:**:**  11  54M -92:-95  100 EPS  RSN WPA WME ATH
ADDR  AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG
d8:97:ba:fb:f7:10  1  149  13M 13.0  0  24428  27136 EP  AQS+  HTCAP WME ATH RSN WPA
Take a look at the 'CAPS' column and follow it down to where you see <<<<<<<<<<<<<<. That's the 5gig channel I want to associate with. Notice the capabilities of this AP listed by scan as being 'EP' only! Notice all the EPS stations. The S means the station is setup for Short Preamble. In this case IT IS NOT! Now look at the FLAGS column at the bottom in the list sta AQS+. Below is excerpt from ifconfig:
  • Q Quality of Service (QoS). Indicates that the station is using QoS encapsulation for data frame. QoS encapsulation is enabled only when WME mode is enabled.
  • S Short Preamble. Indicates that the station is doing short preamble to optionally improve throughput performance with 802.11g and 802.11b
The QoS bits in FreeBSD are set to 0x04 and the default is none or, 0x00 as is the case in my windows dhcp request packets (this is the tiny differance mentioned earlier). This drove me nuts for a long time until I figured out that when connecting in any mode other than WME QoS bits are ignored no mater how they are set. That is why if you ever look carefully at the IPV4 subsection of the DHCP request packet and see this "Differentiated Services Field: 0x10 (DSCP 0x04: Unknown DSCP; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))" those are the QoS bits being ignored. The short preamble is indicative of stations operating in g and b modes. Now look at this:
Code:
# ifconfig
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
  ether **:**:**:**:**:**
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet autoselect mode 11na<<<<< iwn0 coming up 11na capable
                                                     (okay maybe, but that is not g or b?)
  status: associated
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
  ether **:**:**:**:**:**
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: Ethernet autoselect (none)
  status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
  inet6 ::1 prefixlen 128
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
  inet 127.0.0.1 netmask 0xff000000
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether **:**:**:**:**:**
  inet6 fe80::215:ff:fe62:85fc%wlan0 prefixlen 64 scopeid 0x4
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
  status: no carrier<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<this was also indicative of this problem
  ssid "" channel 149 (5745 MHz 11a ht/40+)<<<<<<<<no ssid, mode 11a, ht/40+ (this line makes no sense at all!!!)
  country US authmode WPA2/802.11i privacy ON deftxkey UNDEF txpower 14
  bmiss 10 mcastrate 6 mgmtrate 6 scanvalid 60 bgscan bgscanintvl 300
  bgscanidle 250 roam:rssi 7 roam:rate 64  ampdulimit 8k
  -amsdutx amsdurx shortgi wme roaming MANUAL
That is the way this interface presented itself all the time. It took me a long time to recognize the clues. Now, just type ifconfig wlan0 ht -ht40 and have a look:
Code:
# ifconfig
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
  ether **:**:**:**:**:**
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet autoselect mode 11a<<<<<<<<<<<<<<<<<<<<much better
  status: associated
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
  ether **:**:**:**:**:**
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: Ethernet autoselect (none)
  status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
  options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
  inet6 ::1 prefixlen 128
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
  inet 127.0.0.1 netmask 0xff000000
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  ether **:**:**:**:**:**
  inet6 fe80::215:ff:fe62:85fc%wlan0 prefixlen 64 scopeid 0x4
  inet 10.0.0.226 netmask 0xffffff00 broadcast 10.0.0.255
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
  media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a<<<<<<<<<<<<<<<<<<oh dear the same mode at 54mbps
  status: associated<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<everyones favorite word
  ssid HOME-A3BF-5 channel 149 (5745 MHz 11a) bssid d8:97:ba:fb:f7:10
  country US authmode WPA2/802.11i privacy ON deftxkey UNDEF
  TKIP 2:128-bit TKIP 3:128-bit txpower 14 bmiss 10 mcastrate 6
  mgmtrate 6 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250
  roam:rssi 7 roam:rate 12 wme roaming MANUAL
Please forgive my complete ignorance of the intimacies involved with 802.11 protocol, but I believe that the iwn0 interface should only be considering the CAPS of the listed AP's and ignoring the flags completely. I would also add that maybe the cable modem is not advertising itself correctly but that's not true cause my other windows PC's and I Pad's and my wife's MAC desktop all seem to connect to this AP on this channel seamlessly. What I am trying to say is that it looks like the flags are messing up iwn0 and it just goes down hill from there. Please clue me in. I have personally googled the crap out of this and did not get anywhere. I'm good though, cause this is now behind me finally, and my laptops wireless connection is rock solid just like it should be. Since this is really about iwn (part of the base system) I'm also confused about whether this is the right spot to put this little blurb?
 

Attachments

OP
OP
rhsbsd

rhsbsd

Member

Thanks: 9
Messages: 60

#2
A giant oop's and apology. Here is link to Wiki of supported 802.11n hardware. This may not be current, but, there are so many posts in this Wiki I did not have time to sift through all of them. At best this post describes how to access an AP on a 5Ghz channel by falling back to 'a' when 'autoselect an' fails. Sorry Mr. Chad. You have done a spectacular job considering what is taking place in the industry. I'm getting an Atheros 9287.
 
Top