Koozali.org: home of the SME Server

ttyS0 to TCP bridge

Ernesto Lorenz

ttyS0 to TCP bridge
« on: November 27, 2003, 04:29:31 PM »
Hi to al,
I have a need to open a TCP port (say 7120) on the internal network of my SME 5.6 server and bridge this to the ttyS0 port for remote controll of my ADSL modem connected to the serial COM1.
Does anyone know how to acomplish this?
Regards,
Ernesto

Steve Brock

Re: ttyS0 to TCP bridge
« Reply #1 on: December 01, 2003, 07:55:33 PM »
Not sure what you could use to do that, there might be a software package out there somewhere.
you can always ssh onto the sme box and use minicom.

Nathan Fowler

Re: ttyS0 to TCP bridge
« Reply #2 on: December 01, 2003, 11:58:45 PM »
I don't imagine it would be very difficult, you just need to open a socket to listen/interact on and then open a file pointer/handler to /dev/ttyS0, piping keyboard input to /dev/ttyS0 and returns from /dev/ttyS0 to the socket.

You could probably do something like this in Perl fairly quickly.

I've done something in the past before with PHP and a web interface, but interaction wasn't real time obviously.  It was more or less a "Issue command, see response" type deal.