Wednesday, July 19, 2017

sertial over tcp

*** diagram

pc1 ----(serial)----pc2 ----(tcp)---- pc3


1- test on vmware
pc1 add serial port
- use socket: /home/user/serial1
- from server to a virtual machine

pc2 add serial port
- use socket: /home/user/serial1
- from client to a virtual machine



2- to test whether the serial connection between the two pc work properly
- pc 1
$ cat /dev/ttyS1

- pc2
$ echo "will be displayed" > /dev/ttyS1

if the message displayed on pc1, it means it work properly

3- start getty on pc1
$ sudo getty -8 115200 ttyS0

- on pc2
$ socat /dev/ttyS1,b115200,raw TCP-LISTEN:8444

- on pc3
$ telnet pc2-ip 8444,

will drop shell to pc1

No comments:

Post a Comment