Public bug reported:
Steps to reproduce:
I'm connecting to a FTDI device (FT2232) over USB using the following
command line:
picocom -f h -b 115200 /dev/ttyUSB1
I then copy-paste a large text file (ca. 72 kbytes) into stdin. Almost
every time, parts of the text does not get sent to the device. Usually,
the missing part is the last 1500 characters or so. The exact amount of
missing characters varies each time, but is usually within +/- 50 % of
the number 1500.
Attempts at debugging / isolating the problem:
I've checked using the tool strace that the entire text file does indeed
get read from stdin (file descriptor 0) and that parts of the text is
NOT getting sent to the serial device (file descriptor 3).
I've attached the complete log file obtained by running the command
strace picocom -f h -b 115200 /dev/ttyUSB1 2>&1 | tee log
In the log file the last reads from file descriptor 0 are:
read(0, "0", 1) = 1
read(0, "x", 1) = 1
read(0, "9", 1) = 1
read(0, "5", 1) = 1
read(0, "1", 1) = 1
read(0, "5", 1) = 1
read(0, " ", 1) = 1
read(0, "0", 1) = 1
read(0, "x", 1) = 1
read(0, "0", 1) = 1
read(0, "0", 1) = 1
read(0, "0", 1) = 1
read(0, "0", 1) = 1
read(0, "\r", 1) = 1
read(0, "\5", 1) = 1
read(0, "\1", 1) = 1
read(0, "\30", 1) = 1
This does indeed correspond to the end of the input text file.
The last writes to file descriptor 3 are:
write(3, "0x9481 0x000E\r0x9482 0x00A0\r0x94"..., 509) = 509
write(3, "\5", 1) = 1
It's not entirely clear here, but these log entries match the behaviour
seen on the device and confirm that parts of the input file is not sent
on the serial port.
Furthermore, I've traced the entire serial traffic on the USB port using
usbmon and there again confirm that the last 1500 or so characters are
missing.
Additional information:
I'm running on Ubuntu 18.04.5 LTS. The version of picocom I'm using is:
picocom v2.2
Compiled-in options:
TTY_Q_SZ is 32768
USE_FLOCK is enabled
LINENOISE is enabled
HISTFILE is: .picocom_history
** Affects: picocom (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "Output from strace"
https://bugs.launchpad.net/bugs/1895521/+attachment/5410672/+files/log
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1895521
Title:
Part of text not sent to device
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/picocom/+bug/1895521/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs