Optimizing wifi settings

Is there any guide about optimizing the wifi settings?

I feel there are several uncommon options ("bursting", "ff", "compression", "turbo"), and all the "HT_CAPAB" options, that are not well documented, and I am not getting the most out of my hardware. I have seen several blog posts explaining "I did this and that, and now it is faster", but I haven't found any guide about when to use each option.

Any pointer would be appreciated!

Challenging... cause it's heavily chipset and client dependant.

What has helped me alot is...

  1. General articles that explain the "principles"... so you can make rational choices on what to "try" given your current environement.

  2. Setup ( any os ) articles to highlight options to put at the top of the list or not on the list at all....

I agree though... there is a huge gap in the middle.... know nothing about.... but alot of that is "play it safe" and stick to generic options supports by all/most clients factor....

( what would be really cool is a "w3c markup checker"... like page where you can paste settings and it will explain / warn regarding them! -> is suppose some luci info-bubble array would perform a similar function... and if any part of luci needed one... this would be it.... )

3 Likes

I have seen that all HT_CAPAB and VHT_CAPAB parameters are being automatically extracted from iw and passed to hostapd; so, one thing less to look at.

I think I will experiment with the other parameters, and see what happens.

you could use some info from this PR: https://github.com/qca/open-ath9k-htc-firmware/issues/109

1 Like

I know this thread is a bit dated but by chance are you able to point me in the direction if I'd like to edit, add to, and/or overide the VHT_CAPAB parameters?

i.e. would I edit /etc/config/wireless:

config wifi-device 'radio0'
        option type 'mac80211'
        option vht_capab '[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP7][BF-ANTENNA-3][SOUNDING-DIMENSION-3]'

if I wanted to add the [BF-ANTENNA-3] and [SOUNDING-DIMENSION-3] options?

EDIT: i guess this question is really about customizing the /var/run/hostapd-phy0.conf file. In this file, I currently have line with vht_capab={options above sans BF-ANTENNA and SOUNDING-DIMENSION} and I'd like to experiment adding to this line the "openwrt way."

The "/var/run/hostapd-phy0.conf" file is generated from "/etc/config/wireless" each time you restart your wifi. So, yes, I would put them at "vht_capab", restart wifi, and check if they were caught.

1 Like

Is there any optimization that could be done regarding wifi range? I've read that enabling xr would help with that, but it doesn't work on ath9k, does it?

While client range from the AP is likely a contributing factor to some of the wifi behavior I've seen, I am not specifically trying to boost range nor am I aware of settings that would provide a significant benefit.

I suspect you may be already aware of the following "generic" advice:

Focus on physical factors like AP/client placement (and obstructions in between), client/AP antenna choice, tx power, identifying and removing sources of wifi interference. However, more power is not always better for "quality," and I'd like to be a good neighbor.

1 Like

Yea, I believe I have headroom to focus more on the physical factors, I have a TP-Link W8980 that has 3 external antennas for 5GHz and 2 internal antennas for 2.4GHz.

Now since 5GHz on this router isn't supported by OpenWRT, I thought that I might be able to reverse soldering 5G external antennas to the 2.4G channel, what do you think, should I go for that?

BTW, is it considered good practice to solder more than one antenna to the same node on the router PCB? since I would have one extra external antenna that got no place to be soldered to 2.4GHz channel nodes.

Sorry, I don't have that device and I suspect the type of antenna mods you are considering are device specific. Personally, I would not consider using 5 GHz antennas for 2.4 GHz service as I suspect they are incompatible. If you don't need 5 GHz, perhaps completely remove and replace them with 2.4 GHz external antenna's?

Considering the time and cost to do such mods, a new device might be a better option.

HTH

After looking over /lib/netifd/wireless/mac80211.sh, it isn't obvious to me that editing /etc/config/wireless to set options like [BF-ANTENNA-3] would work (at least like I suggested).

Rather than try that, I did

# edit /var/run/hostapd-phy0.conf vht_capab parameter to look like:
r7500v2 # cat /var/run/hostapd-phy0.conf | grep vht_capab
vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMER][MU-BEAMFORMER][SU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][RX-STBC-1][MAX-MPDU-11454][MAX-A-MPDU-LEN-EXP7][BF-ANTENNA-2][SOUNDING-DIMENSION-2][BF-ANTENNA-3][SOUNDING-DIMENSION-3]
r7500v2 # kill -HUP $(pidof hostapd) # reload hostapd config

To see if my hostapd changes were accepted, I used:

r7500v2 # hostapd_cli -i wlan0 status | grep vht_cap
vht_caps_info=338b79b2

i'm pretty sure vht_caps_info is a hex number for the vht_capab bit mask in <path_to_hostapd-wpad-full_src>/hostapd/config_file.c

Between that and the defs in <path_to_hostapd-wpad-full_src>/src/common/ieee802_11_defs.h and a little python to check bits:

In[36]: int(bin(0x339b79b2)[2:]) & 1 << 13
Out[36]: 8192

In[37]: int(bin(0x339b79b2)[2:]) & 1 << 14
Out[37]: 16384

In[38]: int(bin(0x339b79b2)[2:]) & 1 << 15
Out[38]: 32768

I can see that the bits got set. The above python command using the vht_caps_info value before the changes returned "0" for bits 13, 14, and 15 and other bits are consistent with the vht_capab parameters in /var/run/hostapd-phy0.conf.

I think one can compare the hostapd vht_capab value(s) with the VHT capabilities advertised by the ath10k-ct firmware via

r7500v2 # iw phy phy0 info | grep VHT\ Capab
                VHT Capabilities (0x339b79b2):

and comparing the bits making up 0x339b79b2 with those advertised by hostapd (0x338b79b2).

I disconnected/connected a few clients after that and... well everything still works but I have yet to see a meaningful difference. So far I've found limited information about setting these bits but there is some hints on the ath10k mailing list. At least I learning a little.

I would not have figured any of this out without your hint:

Thank you.