Hi. I use Ubuntu 16.04. In the first terminal I wait for data:
Then in the second terminal I try to send data to the serial port:
Code:
echo -e '123' > /dev/ttyS0
but data is not visible in the first terminal. I have added myself to the group dialout for /dev/ttyS0.
Additional info:
dmesg | grep ttyS
Code:
[ 0.684920] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
stty -F /dev/ttyS0 -a
Code:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
ifconfig -a
Code:
enp0s25 Link encap:Ethernet HWaddr d0:50:99:5e:47:a7
inet addr:192.168.0.164 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: 2a02:a31a:a043:6d80:8f91:68c2:9a1d:1b86/64 Scope:Global
inet6 addr: 2a02:a31a:a043:6d80:81a4:6233:ff1f:6b9a/64 Scope:Global
inet6 addr: fe80::1942:8c1c:9235:bbe7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9231 errors:0 dropped:0 overruns:0 frame:0
TX packets:6295 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9029350 (9.0 MB) TX bytes:809689 (809.6 KB)
Interrupt:20 Memory:f7300000-f7320000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:966 errors:0 dropped:0 overruns:0 frame:0
TX packets:966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90014 (90.0 KB) TX bytes:90014 (90.0 KB)
Why reading/writing to the serial port doesn't work ?