Help to convert from socat to ser2net
YuriTAngelico opened this issue · comments
Hello!
So I've been using socat for a while but it is not being a good solution for me.
I'm using socat in a raspberry pi to connect to some devices that acts like modems and normal USB.
These are the socat commands:
ExecStart=socat -d -d -d -d -v -x tcp-listen:21000 /dev/ttyUSB0,nonblock,cs8,b115200,cstopb=0,raw,echo=0
ExecStart=socat -d -d -d -d -v -x tcp-listen:21000 /dev/ttyACM1,nonblock,cs8,b115200,cstopb=0,raw,echo=0
ExecStart=socat -d -d -d -d -v -x tcp-listen:21000 /dev/ttyACM3,nonblock,cs8,b115200,cstopb=0,raw,echo=0
ExecStart=socat -d -d -d -d -v -x tcp-listen:21000 /dev/ttyACM5,nonblock,cs8,b115200,cstopb=0,raw,echo=0
I tryed to convert to ser2net and then connect to the USR VCOM software. So far I manage to connect in the USR but when I try to send and receive data nothing happens.
Can you help me please?
This is .yaml that I configured in the /etc/ser2net.yaml:
connection: &con22001
accepter: tcp,22001
enable: on
options:
banner: *banner
kickolduser: true
telnet-brk-on-sync: true
connector: serialdev,
/dev/ttyACM1,
115200n81,local
Sorry I've been slow to respond, I've been heavily distracted. Try the following:
connection: &con22001
accepter: tcp,22001
connector: serialdev,
/dev/ttyACM1,
115200n81,local
enable: on
options:
kickolduser: true
telnet-brk-on-sync: true
I can't tell because you didn't put the code in ```, but the indention is important in YAML. Also, if you want a banner, it has to be defined someplace.
You also didn't say what went wrong. If it still doesn't work. Output from "ser2net -d" would be handy.
Hello, so there is a product from my company that I connect like a modem in Windows.
What I'm doing is, I'm connecting the product in the raspberry, emulating the COM ACM"x" and then in my Windows machine I connect to this tcp port with USR VCOM.
After this we connect in Windows as a modem.
And finally, we connect this in our software.
After your help I managed to connect this product in the Windows modems that I configured so I think it is ok now and I need to run more tests, but I think I will have to talk to other engineers to change something in this part: "115200n81" because in this final software the product is not connecting.
In resume:
Raspberry - OK
ser2net - OK
USR VCOM - OK
Modem connect - OK
final software - BAD
I'm gonna run this "ser2net -d" to understand it better.
Can you provide me more docs about this specific part: "115200n81" ? What every part means and so on? Thanks in advance!