1

Brief Intro:

Raspberry Pi 3 acting as a WiFi AP hosting 2.4Ghz and 5Ghz Wifi AP's. The AP of concern is the 2.4Ghz network. The NIC is a TP-Link WN722N adapter using driver ath9k_htc.

Tests:

A speedtest done from the Raspberry Pi 3 results in:

  • Download: 21.69 Mbit/s
  • Upload: 18.32 Mbit/s

which is expected and correct.

Clients connecting to the 2.4Ghz hosted network doing a speedtest results in:

  • Download: 1-11 Mbit/s (AVG: 2.5 Mbit/s)
  • Upload: 14-18 Mbit/s

note: Changing router channels does not have any effect on the download speed of hosted wifi network.

A shared ethernet connection, hosted by the Raspberry Pi, to which clients connect do not experience this issue. These achieve expected download speeds.

Question:

Since all NIC's report correct download and upload speed except the hosted wifi network (2.4Ghz adapter) using the ath9k_htc driver has slow download speed, is this an issue with the ath9k_htc driver?

Some HW Info:

note: The hosted 5Ghz network does not have this download issue, speeds are correct and as expected

NIC Info

sudo lshw -C net

  *-usb:1                 
       description: Wireless interface
       product: USB2.0 WLAN
       vendor: ATHEROS
       physical id: 3
       bus info: usb@1:1.3
       logical name: wlan2
       version: 1.08
       serial: 12345
       capabilities: usb-2.00 ethernet physical wireless
       configuration: broadcast=yes driver=ath9k_htc driverversion=4.9.35-v7+ firmware=1.3 ip=192.168.2.254 link=yes maxpower=500mA multicast=yes speed=480Mbit/s wireless=IEEE 802.11

and hostapd config

cat /etc/hostapd/hostapd-2g.conf

interface=wlan2
driver=nl80211
ssid=local-wifi
hw_mode=g
channel=11
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=my_pass_here
rsn_pairwise=CCMP
logger_syslog=-1
0

As the 2.4GHz band is pretty much overloaded anywhere, the specs define that any AP when going up, have to listen for other APs broadcastings in the same channel.

If they listen to other APs broadcasting in the same channel (which is bound to happen in any city home), they are supposed to downgrade from 40MHz to 20MHz bandwidth.

Most commercial APs do not bother, hostapd honours the RFCs and does it.

I once wrote a patch for that; however I could swear newer hostapd versions have an option to change that behaviour. Not finding it at the moment...

Defining a country code in hostapd country_code=ZA for instance, also helps it transmitting into a higher potency, as the FCC in the US which is the default country code limits the potency more than other countries.

  • thanks for the reply, however there are no wifi networks on the same channel. My router is on channel 6 shared with another wifi network with low signal. Testing with my router I get full speed, up and down. Connecting to the hosted network running on channel 11, I get slow down but normal up. If it were interference, then shouldn't both up and down speed be slow/jittery? – Cybex Jul 6 '17 at 13:41
  • Interference is yet another concern - too much noise in the 2.4GHz band in cities; I am talking that if it listens as much a broadcast, it does not matter if weak or strong from a neighbor in the same channel, hostapd downgrades itself to 20MHz – Rui F Ribeiro Jul 6 '17 at 13:43
  • ok, why would hostapd react like this (slow down speed) while my router still has standard up and down speed. Based on what you mentioned above, with the existance of both my networks (2.4Ghz), this alone should cause both to be using the 20Mhz width, thus both should give a slow down speed. But since my router has normal down speed, what you said does not apply here (however, I may misunderstand your meaning) – Cybex Jul 6 '17 at 13:49
  • Commercial routers do not downgrade ; 5GHz this rule does not apply. – Rui F Ribeiro Jul 6 '17 at 13:51
  • South Africa...In Angola and Mozambique I barely was able to use 2.4Ghz in many days due to several operators not caring about broadcast regulations and overriding all the specs to improve coverage with less equipment. – Rui F Ribeiro Jul 6 '17 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.