Weird WiFi problem with Samsung Devices

I am experiencing a very strange situation with OpenWRT and Samsung devices, and I would like to know if anyone is experiencing this issue and what the cause could be.
To give some context: I live in a very lightly populated area, so there are no wifi issues around my place coming from my neighbors. Scanning wifi channels show most of them are available.
I have a Linksys WRT1900ac(v1) and my Samsung devices (Galaxy S7 edge and Galaxy Tab S3) connect to the router's 5 Ghz band (Channel 149 - 80 Mhz country US). The download speed is horrible for both devices, because they get stacked in the 20 Mhz bandwidth, but the upload speed is fine. This happens even when the devices are next to the router.
On the other hand, my laptop connects with no problem and keeps a great wifi link for both upload and download.
I can't blame it on the OpenWRT version I am running (22.03.0-rc6) because I tried different versions (even going back to 19.07) and the problem still exists, but just for the Samsung devices. Everything else seems to be working fine. What is interesting is that is happening to 2 different Samsung devices running different versions of Android (8 and 9).
Is there anything that needs to be configured/tweaked for the Samsung devices to work properly? What could be causing this? I'm positive it is no interference...
Thanks!

Some comments regarding Marvell at the following: LINK

I suspect your problem is router specific since I did not encounter any issues with WiFi downloads/uploads during testing two? months ago with multiple Samsung phones and a OpenWrt DIR-878 (MediaTek MT7621/7615 SoC) router.

If issue is just weak WiFi,
A report of conflict with Google Location Accuracy ...
Following may be of interest: A32 5G weak wifi

Thanks for the links.
Yes, the problem is freaking mwlwifi.
I guess I will have to open a new post to get instructions to compile an old version of the driver myself, when the problem was not present. I will open a new post for that...

I've seen post stating openwrt 19.07 behaves better ...

Yes, I agree. The problem is that all the imagebuilders are broken and I can't install luci (the GUI) because of a wrong dependency, and since my custom image is quite large, I can't install all the luci packages I need after the image is created...
@eduperez has closed the thread where he used to provide the old version of the driver compiled for the current stable version because the latest driver was included in recent images, but I think for the WRT1900ac owners, the previous driver behaved better (even though the opposite seems to be true for owners of the WRT3200 family...

I also have issues Samsung Galaxy devices: An i9195 (S4 Mini) and a T585 (Tab A 2016).
The APs are Mikrotik hAP AC^2 in dump-AP mode (no firewall or dnsmasq, just every interface bridged together and connected to a router via ethernet cable).

The i9195 is just a backup device, so I didn't even notice this until today (I only turn it up once in a while to update maps, contacts, etc). I could narrow the "can't connect" problem down to .11w "Management frame protection". All 11r, 11v, 11k features can be enabled but 11w can't be set to Optional (or Required) if I want this devices connected. So I created a secondary WLAN interface on all radios just for this device (copy-paste settings besides .11w MFP) and the problem was solved (in a dirty way but still...). It's running Lineage OS 18.1 2023/04, by the way.

However, the T858 is running on LTE ever since I switched from RouterOS to OpenWRT 22.03 because no matter what I try (after creating that _compat SSDI for the i9195 I picked up the T585 for yet another round today), it either doesn't connect (rare) or connects and acquires an IP via DHCP but the connection is insanely slow and sooner or later either the AP or the tablet disables the connection.
I tried with both Lineage OS 19.1 (2023/08) and the last factory OS (which stopped updating in 2020).
I disabled .11 w,r,k,v, multi-to-unicast, etc and even allowed WPA1 with TKIP. I also stopped Dawn (because it sometimes kick the tablet from the AP due to slow/few acknowledgments). I couldn't find any solution. Before one end disables the connection, I can'tping the tablet but it shows signs that it starts to download simple web pages (like text showing up without images after several minutes). It always acquires an IP from DHCP and initially says it detects a functioning Internet connection.

I am currently on OpenWRT 23.05.0-rc3. But this was very similar with 22.03 (actually, I upgraded OpenWRT to an RC build in a hope this might get resolved).
I also tried using this tablet with both the default CT-customized and original vendor wireless firmware/driver sets. I tried forcing it on 2 and 5GHz by disabling the applicable test wireless interfaces.
The tablet is close to the AP, signal strength is reported to be good by the tablet and AP (so I don't think this is a broken antenna/amplifier issue on the tablet side).

Edit:

I knocked one Qualcomm-based Mikrotik AP out and introduced an Atheros-based TP-Link (WDR4300) AP (dumb-AP, 23.05.0-rc3). The tablet has the same symptoms (at least with all the v,w,r,k feature set enabled, I didn't go through all the settings with this AP).

I have similar problem with my Samsung TV and after long digging, I can not find any reason of such behavior. On the beginning I was thinking that the issue is related to MT7621, becasue I was testing on few devices and only device with this CPU has problem (xiaomi 4A Giga edition - does not, xiaomi 3200 - fine, huawei ax3200 (stock) - fine, mikrotik hapAC - fine, tp-link wdr3600 - fine).
Tl;dr try to:

  • change country to other, like US or PL
  • try to change Fragmentation Threshold to 2346 (disable) or less value like 2000
  • try to change RTS/CTS Threshold to 2347 (disable) or less
  • it was working fine with WPA2 + force encryption set to TKIP.
  • try also switch from wpad-mbedtls to wpad-wolfssl or wpad-openssl (I'm using wolfssl)

What is funny, when I set fragmentation threshold to 2376 (which should not be possible), tv was working better than none value or 2346.

If you are interested, I can share my wireless config that is more less working (from time to time I just need to power off (unplug and plug tv from power), because...it is Samsung TV.

EDIT:
currently I'm using snapshot. I will try to check once again on 23.05-rc3.

Thanks. wpad-mbedtls-full could indeed be a culprit because sometimes this pops up in the AP's syslog with an almost default AP config (defaults + WPA+WPA2-Mixed / Auto encryption settings):

Sat Aug 19 19:04:59 2023 daemon.notice hostapd: phy1-ap0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: did not acknowledge authentication response

Although this tablet didn't work with 22.03 either and if I recall correctly, wolfssl was changed to mbedtls between these two OpenWRT versions (so I already tried both of these). I guess I have to test with no encryption at all.
And this isn't necessarily an encryption issue (if the physical connection fails during handshakes then the the authentication will obviously fail...)

Sometimes the handshake completes:

Sat Aug 19 19:13:46 2023 daemon.info hostapd: phy0-ap0: STA xx:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Sat Aug 19 19:13:46 2023 daemon.notice hostapd: phy0-ap0: EAPOL-4WAY-HS-COMPLETED xx:xx:xx:xx:xx:xx

My current country setting is HU but that was also the case with RouterOS.

Can I fully rule out wpad-* / hostapd-* if things don't work when the connection is not encrypted at all?

1 Like

I didn't touch this issue further since my last post. But today, I remembered I have a T580 tablet (the sibling model of the T585 here but without a SIM slot / LTE modem) sitting around at a remote location, connected to a TL-Link 740N v4 (a really old and cheap box with Atheros radio), running the same OpenWRT 23.05.0-rc3 like my Mikrotik AC^2 APs here at home (the 740 is running a custom image built from sources to fit into the 4MB ROM). And I can ping that device (well, with high latency and long stalls but it's most probably in deep sleep mode). I can't ping the T585 here. The differences are only hostapd-basic versus wapd-full-mbedtls (but I think I ruled this package out by testing an unencrypted WiFi connection with the Qualcomm based AP and the T585 tablet + also an Atheros based AP with wpad-full-bedtls in PSK2 mode), the hardware and partially the driver (I think they use the same WiFi driver package as the TP-Link WDR4300 v1 here at home I used to test if this is a Qualcomm issue but the older chipset in the 740N probably touches partially different code parts in the driver package).
So this now halfway rules out the base packages of OpenWRT, the Qualcomm and Atheros chipsets/drivers, and also the default fine-tune settings like fragmentation, etc (since the 740N is running with minimal configuration changes compared to defaults, it's just put into bridge mode like all all my APs and was set to PSK2, I didn't touch fine-tuning setting on the 740N and there is not much to configure with -basic package versions and minimal amount of packages...).