Force client mode to connect at 20MHz and set data rates manually

Hello.

I installed OpenWrt on a MikroTik SXTsq Lite2.
I am using it in client mode to connect my grandfather's PC to public wifi.
I chose OpenWrt because of the ease of setting up cloudflare warp.

The problem is that the connection is unstable and often disconnects.
Similar problem (after searching using DuckDuckGo) -> client-mode-ctrl-event-beacon-loss

On MikroTik RouterOS I was able to make the connection stable and never dropped.
By forcing the router at 20MHz and setting data rates like this

Untitled

That way the connection becomes stable!

How can this be done on OpenWrt?
I can't set the AP at 20MHz because I don't have access to it as it is public wifi.

Please post output of

ubus call system board
cat /etc/config/wireless

eithout passwords obviously.
You cñn set radio manually to ht20 ?

Yes.
But this OpenWrt router (in client mode) keeps using 40MHz and occasionally drops to 20MHz if the target AP is set with 20/40MHz.

I think that's normal/standard.
Unfortunately in my case, connection will be stable if I use 20MHz only.

Of course I can force it from the AP side.
But since the target AP is not mine I cannot change it to only 20MHz.

On MikroTik RouterOS I can force the router (from the client side) to use 20MHz even though the target AP is set with 20/40MHz.

I can't find this with OpenWrt.

I confirm your observed behavior:

  • 24.10-rc2
  • also in 5ghz
  • also having sta and ap on same radio
    Do you use github - try to report. If not i can do it too.

The rate filter equivalent on OpenWRT is "cell density" in upper advanced tab when editing wifi conn€ction

I think I have found a solution to this problem.

Instead of forcing channel width to use 20MHz which I haven't found a way to do in OpenWrt.
I let 20MHz/40MHz coexistence work as is.
That way I can still get benefit of high throughput at 40MHz channel width when possible.

To make connection stable.
I changed wireless module parameters on mac80211 like this:

mac80211 beacon_loss_count=60 max_nullfunc_tries=60 max_probe_tries=60 probe_wait_ms=3600000

parm:           minstrel_vht_only:Use only VHT rates when VHT is supported by sta. (bool)
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

There is no problem in 2 days uptime!

References:

  1. https://forums.gentoo.org/viewtopic-t-1144053-start-0.html
  2. https://unix.stackexchange.com/questions/572962/system-setting-to-stop-wifi-from-dropping-connection

Notes: I have tried module parameter cfg80211_disable_40mhz_24ghz on cfg80211 but it does not work in client mode.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.