When pasting large amounts of text into a serial console like screen
or minicom
, some characters get lost and are not being transmitted.
1 Answer
This seems to be a flow control problem. While probably not solving the root cause of the problem, the issue of missing characters got resolved for me by adding an arbitrary TX delay between characters. This worked for both screen
, as well as minicom
.
The screen
docs even mention this issue when describing the slowpaste
command:
Define the speed text is inserted in the current window by the paste command. If the slowpaste value is nonzero text is written character by character. screen will pause for msec milliseconds after each write to allow the application to process the input. only use slowpaste if your underlying system exposes flow control problems while pasting large amounts of text. defslowpaste specifies the default for new windows.
To set a character TX delay of 1 ms in minicom
, press:
CTRLA, Z, T, F, 1, ⏎, ⏎
There doesn't seem to be such a setting in screen
. However, see How to set "character tx delay" in GNU screen? (Like in minicom) for something similar.
stty -a
in that serial console?stty -a < device
woud do it. But if it is a microcontroller (no way to infer that from your question), it really depends on what software is running there and its flow control possibilities. If it is a, say, Arduino, you can add the flow control to your program. But with no access to more info or to the code, your answer is about as good as it gets in terms of flow control.