1

I see multiple sources that confirm that the Pi 4 can reach practical WiFi transfer speeds of ~100 Mbps as a WiFi client.

When I follow this tutorial on turning it into a wireless access point, however, I seem unable to make hostapd start unless I select one of the explicitly supported channels, which all have a 20 MHz bandwidth. Higher bandwidth channels are disabled or not listed, neither of which hostapd seems to accept on launch.

With a 20 MHz channel I've read in other answers here that you'd get around 70 Mbps max, at least with hw_mode=a if I understood correctly, leading to the question: are there different speed limits when used as an AP compared to as a WiFi client?

While I succeed in connecting to this newly created AP on channel 36 with hw_mode=a it's only with a solid 802.11n 5 GHz 54 Mbps, in contrast to e.g. the alleged 802.11n 2.4 GHz ~100 Mbps in this GitHub comment.

What does that mean in this context? That higher speeds are attainable if I don't use hw_mode=a? Is using 2.4 GHz more beneficial in this use case?

The client I test with is right next to the Pi.

1 Answer 1

0

I have been able to achieve 90-100Mps when set as AP. But it seems to be a balancing act between allowing more clients or higher throughput, as when I configured it allowing more throughput generally only one client managed to remain connected.

I am using RaspAP and this is my most stable hostapd.conf You can expect to be able to connect 2 clients where if one is at 60Mps the other is still able to achieve 10MPs.

most stable hostapd.conf

driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=1
wpa_key_mgmt=WPA-PSK
beacon_int=100
ssid=YOURSSID
channel=36
hw_mode=a
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
wpa_passphrase=YOURPASSWORD
interface=wlan0
wpa=2
wpa_pairwise=CCMP
country_code=PT
ignore_broadcast_ssid=0

If you only have 1 client to connect to your PI as AP, here you can exploit a much faster connection, but concurrent downloads may be affected in my experience. I am not an expert so this has been findings with trial and error.

The config looks like this hostapd.conf

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=1
beacon_int=100

country_code=PT

interface=wlan0
driver=nl80211

wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

macaddr_acl=0

logger_syslog=0
logger_syslog_level=4
logger_stdout=-1
logger_stdout_level=0

hw_mode=a
wmm_enabled=1

# N
ieee80211n=1
require_ht=1
ht_capab=[MAX-AMSDU-3839][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]

# AC
ieee80211ac=1
require_vht=1
ieee80211d=0
ieee80211h=0
vht_capab=[MAX-AMSDU-3839][SHORT-GI-80]
vht_oper_chwidth=1
channel=36
vht_oper_centr_freq_seg0_idx=42
ssid=YOURPASSWORD
wpa_passphrase=YOURPASSWORD
interface=wlan0
wpa=2
wpa_pairwise=CCMP
ignore_broadcast_ssid=0

Notes that may be affecting overall speed of my configuration:

That one will allow your client to connect to the PI4 at 422Mps with this configuration I have seen speeds of 90-95Mps on the client. Problem seems to be that I have failed to 'keep this as a stable connection' when more then one client is connected to the PI.

in addition, if using an external interface (i occasionally use a TP Link T2U Plus AC600, had to install the driver) you may need a more solid power supply.

Things that may be impacting my setup and thus just an FYI: I have a laptop connected to a wifi network, the machine has kali setup. The laptop connection shows speed test results around 190-200Mbps. Although the speed is good, since I am using 'dns over tls' sometimes this impacts page loading time. more on this later.

I share this Wifi connection, using the NetworkManager on kali, via Ethernet to the RPi4.

The RPi4 is configured with raspbian bullseye. I am sshed into the Pi installed speedtest-cli on the Pi to see how much is arriving. I observe around 150-170Mps. so the maximum the AP must be lower then this.

On the RPi4 I have installed RaspAP as mentioned above, and nextdns. This is important for me because I wanted to ensure that all dns traffic is encrypted before it reaches the main network which I don't trust.

Running a speedtest on a client connected to RPi4 I see around 80-95Mps single client, and more then one client tends to fail and disconnect.

I hope this helps. I have spent over a week around the topic perhaps someone more versed on hostapd can better explain the configs as I am not confident that id make a good representation of what every single option does.

Side Note. Channel 48 is not as wide, but tends to be a good fallback.

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.