unleashed-firmware/scripts/serial_cli.py

28 lines
536 B
Python
Raw Normal View History

import logging
import os
import subprocess
import sys
from flipper.utils.cdc import resolve_port
def main():
logger = logging.getLogger()
if not (port := resolve_port(logger, "auto")):
logger.error("Is Flipper connected via USB and not in DFU mode?")
return 1
subprocess.call(
[
os.path.basename(sys.executable),
"-m",
"serial.tools.miniterm",
"--raw",
port,
"230400",
]
)
if __name__ == "__main__":
main()