2022-08-02 14:05:31 +00:00
|
|
|
import logging
|
|
|
|
import subprocess
|
|
|
|
from flipper.utils.cdc import resolve_port
|
2022-09-24 11:30:19 +00:00
|
|
|
import os
|
|
|
|
import sys
|
2022-08-02 14:05:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
logger = logging.getLogger()
|
|
|
|
if not (port := resolve_port(logger, "auto")):
|
2022-09-24 11:30:19 +00:00
|
|
|
logger.error("Is Flipper connected over USB and isn't in DFU mode?")
|
2022-08-02 14:05:31 +00:00
|
|
|
return 1
|
2022-09-24 11:30:19 +00:00
|
|
|
subprocess.call(
|
|
|
|
[
|
|
|
|
os.path.basename(sys.executable),
|
|
|
|
"-m",
|
|
|
|
"serial.tools.miniterm",
|
|
|
|
"--raw",
|
|
|
|
port,
|
|
|
|
"230400",
|
|
|
|
]
|
|
|
|
)
|
2022-08-02 14:05:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|