freemed / tty0tty

Null modem emulator
GNU General Public License v2.0
290 stars 86 forks source link

write error: Invalid argument #21

Closed janblumenkamp closed 1 month ago

janblumenkamp commented 6 years ago

Hi, I installed the tool and it seemed to work. I don't know what happened, but suddenly I have following problem:

$ sudo depmod
$ sudo modprobe tty0tty
$ ls /dev/tnt*
/dev/tnt0  /dev/tnt2  /dev/tnt4  /dev/tnt6
/dev/tnt1  /dev/tnt3  /dev/tnt5  /dev/tnt7
$ sudo chmod 666 /dev/tnt*
$ echo test > /dev/tnt0
bash: echo: write error: Invalid argument

This error appears when I try to write in the terminal, or open normally. After the error, the port closes. Writing to a physical com port works without problems. What is wrong? Best, Jan

xrombik commented 5 years ago

Same problem. It needs to be fixed for new kernels.

minedogan commented 5 years ago

Same problem and no solution anywhere.

stappersg commented 4 years ago

Works for me

gs0604@trancilo:~/src/github/tty0tty
$ echo works for me > /dev/tnt0
gs0604@trancilo:~/src/github/tty0tty
$ ls -l /dev/tnt0 ; id ; uname -a
crw-rw---- 1 root dialout 240, 0 jan 18 22:39 /dev/tnt0
UID=1001(gs0604) GID=1001(gs0604) groepen=1001(gs0604),4(adm),20(dialout)
Linux trancilo 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
gs0604@trancilo:~/src/github/tty0tty
$ 

and I can reproduce the "problem"

gs0604@trancilo:~/src/github/tty0tty
$ echo bingo > /dev/tnt0
bash: echo: write error: Invalid argument
gs0604@trancilo:~/src/github/tty0tty
$ 

by stopping the program that is reading from /dev/tnt1.

My observation: tty0tty is a great nullmodem cable, it should have something connected to both ends.

klogg commented 3 years ago

I have suggested a workaround for this issue in #26

stappersg commented 3 years ago

I have suggested a workaround for this issue

Which resulted into #29 #30 and #31

stappersg commented 1 month ago

closing this stale issue.

If issue is still present, express it in a fresh issue.