This project access for the serial port and It is able to script control.
pip install macross-serial
git clone [email protected]:rondou/macross-serial.git
cd macross-serial
poetry install
macross-serial run [--repeat N] <port-name> <macro-file>
macross-serial list-port
<method> <content> [<timeout-second> [progress-message]]
script.tsv
wait_for_str 'system started at UTC'
send 'account\n'
send 'password\n'
wait_for_regex r'\b(([0-9A-Fa-f]{2}:){5})\b'
send 'reboot\n'
Write data to serial port
E.g.
send 'poweroff\n'
Waiting until for find out a specific string then continue to execute next step.
E.g.
wait_for_str 'system started at UTC'
Waiting until for find out a regular expression pattern then continue to execute next step.
E.g.
wait_for_regex r'\b(([0-9A-Fa-f]{2}:){5})\b'
Wait/sleep/pause for N seconds.
E.g.
wait_for_second 10