I'm working on embedded ARM platform, Slackware. I'm using G24 Java modem which is configured to forward data between ports
/dev/ttyACM0, so anything that goes onto any of these ports is then visible on the other. I want to set terminal on one of these ports,
/dev/ttyS1 and forward the other port,
/dev/ACM0 to the TCP port, so it can be accessed from other machine via LAN.
First of all, I configured
s2:12345:respawn:/sbin/agetty -L ttyS1 115200 vt100
Then I'm trying to use socat with following command:
/usr/local/bin/socat -d -d -d TCP-l:2020,reuseaddr,fork /dev/ttyACM0,raw,nonblock,waitlock="/var/run/ttyACM0.lock",b115200,echo=1,icanon=1,crnl
Then I'm trying to connect with telnet from other machine typing:
telnet 192.168.1.222 2020
The result is not quite good, I see from the client side that terminal is asking for login, but then there is an immediate answer which I haven't typed in:
^M^M^M... etc., the terminal is answering that the login is incorrect and then again and again the same thing.
I know that
^M means carriage return sign, but I'm not quite sure how to fix that problem.
I have tried different configurations of socat, but none of them worked correctly.
Any help would be very appreciated.