Skip to content

Instantly share code, notes, and snippets.

@crok
Last active September 25, 2025 09:32
Show Gist options
  • Save crok/c6396ebce5435c0f84293059b8ddbe8c to your computer and use it in GitHub Desktop.
Save crok/c6396ebce5435c0f84293059b8ddbe8c to your computer and use it in GitHub Desktop.
Xiaomi Redmi Note 4X (Snapdragon - Mido) - Wifi along with Bluetooth = bad network experience and sporadical Bluetooth connection issues
The SoC in the phone theoretically can support 802.11ac (2x2:1)
but the actual SoC in the phone does not support it, it's not built in (it's in WCN3680b) - only 802.11n.
The phone's SoC has a WCN3660B and it has no 802.11ac (in WCN3680B there is).
Doc on WCN3660B:
https://developer.qualcomm.com/download/sd410/wcn3680b-wcn3660b-device-spec.pdf
This is what the phone can do for you 802.11n:
1x1:1 antenna config and thus
^ ^ ^
| | |
| | '-- 1 possible data stream
| '-- 1 RX antenna
'-- 1 TX antenna
- so one antenna, the antenna has a Tx/Rx integrated switch
thus (with one antenna) there's no possibility for MIMO, nor beamforming (not even physically possible)
but that's a 802.11ac feature anyway (and as I mentioned the chip inside does not support it).
(Note: BT is using the same antenna!
You can easily experience the slowdown of Wifi connection
along with an active and traffic forwarding BT connection
because the internal switch has to switch to BT TX/RX too.)
- Long or Short GI (800ns | 400ns)
- Channel bandwidth: 20 or 40MHz (HT20 | HT40)
TL;DR - this phone's capabilities are:
Wifi | Freq | Channel | Guard | Max conn speed
"type" | | bandw | Interval | (1 stream)
---------+----------+----------+----------+----------------
802 11g | 2 4GHz | 20MHz | 800ns | 54Mbps
802 11n | 2 4/5GHz | 20MHz | 800ns | 65Mbps
802 11n | 2 4/5GHz | 20MHz | 400ns | 72Mbps
802 11n | 2 4/5GHz | 40MHz | 800ns | 135Mbps
802 11n | 2 4/5GHz | 40MHz | 400ns | 150Mbps
So all your tweaks should be supported on both the phone and the AP (wireless router, AP, whatever) side as well.
Most people say that it was better in MIUI. Indeed, it was and is.
When both Wifi and Bluetooth are running at the same time
MIUI lets the Wifi work more "aggressively" and Bluetooth still works.
Google it how Wifi is dealing with the half-duplex behavior of the media (RF field)
and how the backoff timer is working in CSMA/CA. That's the key.
The backoff timer works differently and the internal switching
(the IC that is swithing between the WLAN and BT circuitry) is quicker..
well not really quicker but let's say optimised.
Sometimes this optimisation is the cause of killing the connection
(BT beacon starvation during long and high volume wifi traffic
consisted of small IP packets, vice versa - but these are atypical for a _normal_ user),
so I just want to say that even the MIUI implementation has gaps just most ppl doesn't see it.
@wretchedneo
Copy link

Is this the reason why wifi takes a lomg time to turn on when battery saver is on?
I am on lineageos20 android13 by zeelog

@crok
Copy link
Author

crok commented Aug 25, 2025

I think it has nothing to do with this - I think it is caused by the more strict WLAN scan throttling while in battery saver mode.

@wretchedneo
Copy link

Hey @crok
The issue seems to be mostly fixed now
I switched to the last android 11 (los18) build by zeelog
In that rom, the battery and resource management is by far the best for this device- so I never felt the need to turn on battery saver explicitly

Although I still have set it to turn on automatically at 5% or below

The issue still returns sometimes after the phone was plugged in with battery saver on, we unplug it and try to turn on the wifi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment