Closed tombishop1 closed 3 years ago
Sorry, for some reason I'm not getting mails for these, and I haven't looked at them for a while. You need to be using the 4.3.x versions of ser2net, the 3.x versions and earlier wont work.
There are a couple of ways you can do this. You can use ser2net. On one of the system you can set the other system as a connect back address (connback option in the man page). Set the timeout to zero. However, I don't think it will make a connection until data comes in on the port.
An easier way would be to use the gensiot command On one system you could run:
gensiot -a -i serialdev,/dev/ttyUSB0,.. tcp,1234
And on another system:
gensiot -i serialdev,/dev/ttyUSB0,... tcp,otherhost,1234
The second conmand will connect to the first and hook the two serial ports together. You can add these commands to the /etc/inittab so that init will restart them if they fail.
I'm trying to use ser2net at "both ends" of a serial connection, that is:
Hardware serial <-62k8N2-> ser2net on Raspi OS <-> tcp local network <-> ser2net on Raspi OS <-62k8N2-> Hardware serial
I can successfully get as far as connecting to a hardware serial over the network from a client machine using a pty, but I can't work out how to link a hardware serial back up at the client side. I guess I'm asking if ser2net can be used as "net2ser"?
I'm sorry to have to ask, but I simply can't find any clues in my research!
More info.: I'm trying to communicate between a Yaesu FT857d radio and face-place control panel over IP.