Answer the question
In order to leave comments, you need to log in
How to transfer information through the com port correctly?
I transfer data to the port with the command sudo cat data > /dev/ttyUSB0
I accept cat /dev/ttyUSB0 > temp
This, the ones that come are completely different, firstly, a lot of extra line breaks that are not in data, and secondly, the data is duplicated (sometimes), the duplicates overlap. Okay if you transfer text information, but if binary data? For example link the computer with the uart of the microcontroller?
Answer the question
In order to leave comments, you need to log in
In addition to the port settings mentioned by @pi314 (which, most likely, have nothing to do with it: with an incorrect baud rate, nothing meaningful can usually be obtained) there are 100,500 more terminal parameters available for change via stty. Among them are, for example, local echo or insertion of additional CR before LF. When exchanging binary data, the terminal should be switched to raw mode (stty -F <device> raw).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question