HyperOS aggressively switches 5G → 4G when it thinks hotspot or tethering is idle.
If your carrier gives unlimited 5G but capped 4G (Airtel), this is super annoying.
This repository has a tiny Windows .bat file that sends 1 ping every 5 seconds to keep hotspot traffic alive and prevent HyperOS from dropping 5G.
- Turn on Wi-Fi hotspot or USB tethering on your phone.
- Turn on Caffeine mode (keeps the screen logically awake).
- Double-click
keep_5g_alive.bat. - Minimize the window — 5G will stay alive.
- Close the
.batwindow when done — 5G may drop back to 4G.
~1 MB in 45 hours. Basically nothing.
- Works with both USB tethering and Wi-Fi hotspot.
- Caffeine mode alone doesn’t work.
- Ping interval >5 sec may fail.
- No root required.
- Slight extra battery drain is expected.
keep_5g_alive.bat→ the ping loop