<- cd /workbench
> cat ./workbench/usb-modem-firmware-sleep-patch.md_

Eliminating Idle Sleep on Deployed USB Modems

Nov 8, 2026•5 min read

Engineered a zero-dependency C# P/Invoke WinUSB patcher to modify persistent Linux cJSON daemon configs directly over composite debug endpoints, keeping remote links alive 24/7.

EmbeddedField-OpsInfrastructure

Portable USB cellular pucks are designed for consumer battery preservation, which becomes a critical liability when they are deployed as unattended 24/7 WAN uplinks for remote field systems.

Even with constant 5V bus power, the internal Linux power-management daemons aggressively enter idle sleep states or power down once the internal battery hits 100% charge with low traffic.

To solve this without installing external SDK binaries on locked-down field images, I built a self-contained C# P/Invoke WinUSB client inside PowerShell. It speaks raw ADB packet framing directly to the composite debug interface, patches the persistent cJSON sleep timers across both onboard daemons, and re-locks the debug endpoint upon completion.