Skip to content

Instantly share code, notes, and snippets.

@Alex4386
Last active July 18, 2023 03:35
Show Gist options
  • Save Alex4386/0f03ba5009a207f1774bcb02d405b625 to your computer and use it in GitHub Desktop.
Save Alex4386/0f03ba5009a207f1774bcb02d405b625 to your computer and use it in GitHub Desktop.
Bypass Huawei Modem Battery
#!/bin/bash
TARGET_DEVICE="/dev/ttyUSB0"
BYPASS=1
if [ "$1" == "disable" ]; then
BYPASS=0
fi
TARGET_SCRIPT="at^nvwrex=50364,0,4,01 00 00 00"
if [[ $BYPASS -eq 0 ]]; then
TARGET_SCRIPT="at^nvwrex=50364,0,4,00 00 00 00"
fi
echo "Running AT Command: $TARGET_SCRIPT to $TARGET_DEVICE"
echo $TARGET_SCRIPT >> $TARGET_DEVICE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment