Skip to content

flush serial port queues before running send/receive command

Sebastian Klemke requested to merge packet23/picocom:flush-before-exec into master

Fixes #8 (closed)

Transcript of successful upload:

$ ./picocom-flush-before-exec -b 115200 -s 'sx -vv' -v 'rx -vv -E' /dev/ttyUSB0
picocom v2023-04

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
txdelay is     : 0 ns
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sx -vv
receive_cmd is : rx -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready

(C)StarFive
CC
(C)StarFive
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
*** file: ./images/jh7110-recovery-20230322.bin
$ sx -vv ./images/jh7110-recovery-20230322.bin
Sending ./images/jh7110-recovery-20230322.bin, 1291 blocks: Give your local XMODEM receive command now.
Bytes Sent: 165376   BPS:7973                            

Transfer complete

*** exit status: 0 ***

Merge request reports