I’m trying to make a data gateway using the Jetson nano where data is RX/TX from both ttyS0 and ttyTHS1.
To test the ports, I’ve connected J44 to J41 and am sending data between those two both ways.
All works fine except for when I read() form the J44. It only reads 4 bytes at the time while the J41 port reads all bytes.
Example (Raw data setup):
Sending “1234567890” from J44 to J41. The received data is:
1234567890 (10 bytes)
Sending “1234567890” from J41 to J44. The received data is:
1234 (4 bytes)
5678 (4 bytes)
90 (2 bytes)
The same code is run on both ports just the /dev/tty* is different.
Is there a 4 byte buffer on the J44?
Thanks in advance.
may I know what’s your baudrate settings.
you may also refer to similar discussion thread, Topic 1063027.
we had discussion talking about serial data transferred with data loss.
could you please execute getty running at background for verification.
for example, on Jetson-Nano.
$ sudo /sbin/getty -a ubuntu -L 115200 ttyTHS<port> &
I have read through the topic you suggested.
I had some problems with bit loss earlier but I implemented more frequent flushing and it is good now.
However, I’m using 115200, and I’ve tried other once such as 9600, 2400 … The behavior is the same.
I’ve even tried Jetson to another Jetson Nano board. And the same happens.
It very well might be that my code is causing this, so I just wanted to check if this is a known feature.