Send commands to the MobileMash ESP32 phone button presser via serial. Use when the user wants to press phone buttons, enter fastboot, or check servo status.
Send a command to the MobileMash ESP32 device connected via USB serial.
/mobilemash <command> [args]
PRESS_POWER <ms> — Press power button for given millisecondsPRESS_VOLDN <ms> — Press volume-down button for given millisecondsRELEASE_ALL — Release all buttons immediatelyFASTBOOT [shutdown_ms] [combo_ms] — Full fastboot entry sequence (default: 30s shutdown + 5s combo)PING — Health check (responds PONG)STATUS — Show current button statesRun the following to send the command and display the response:
python3 -c "
import serial, time, sys
raw = '$ARGUMENTS'.strip().upper()
if not raw:
print('Usage: /mobilemash <command> [args]')
print('Commands: power [ms], voldn [ms], release, fastboot, ping, status')
sys.exit(0)
# Shorthand aliases
parts = raw.split()
aliases = {
'POWER': 'PRESS_POWER 500',
'VOLDN': 'PRESS_VOLDN 500',
'VOL': 'PRESS_VOLDN 500',
'RELEASE': 'RELEASE_ALL',
}
if parts[0] in aliases and len(parts) == 1:
cmd = aliases[parts[0]]
elif parts[0] == 'POWER' and len(parts) == 2:
cmd = 'PRESS_POWER ' + parts[1]
elif parts[0] in ('VOLDN', 'VOL') and len(parts) == 2:
cmd = 'PRESS_VOLDN ' + parts[1]