Create a virtual serial port connection over TCP

后端 未结 3 873
野的像风
野的像风 2021-02-01 20:46

I am developing an application that should be able to write to a virtual serial port and receive data through the same port from remote clients over network.

The applica

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-01 21:35

    Try socat. Possible scenario:

    socat  pty,link=/dev/virtualcom0,raw  tcp:192.168.254.254:8080&
    

    socat creates TCP connection to 192.168.254.254:8080, so that everything, that will be written to /dev/virtualcom0 will be forwarded to 192.168.254.254:8080 and vice versa.

    Another approach would be to use RFC2217 via ser2net on Linux sever side and RFC2217 driver on Windows side (for example http://www.hw-group.com/products/hw_vsp/index_en.html single port version). You can also try to get http://pyserial.sourceforge.net/ to work with ser2net.

提交回复
热议问题