This is a python program that acts as a go-between between a telnet port and a serial port. In effect, this adds serial port connectivity to terminal programs which lack it. As a secondary function, it could be used to share a serial port over the internet, if you needed such a feature.
Usage: tsb [OPTIONS]
Creates a TCP<->Serial port bridge, which allows a telnet client to
cross over a Serial port.
Serial Options:
-p, --port : Specify the desired serial port.
(0 for COM1, 1 for COM2 etc)
-r, --baudrate : Specify baudrate
-s, --bytesize : Specify bytesize
-y, --parity : Specify parity options
-b, --stopbits : Specify number of stopbits
-t, --timeout : Specify timeout
-f, --flow : Specify flow-control options
TCP Options:
-l, --listen : Specify a TCP port to listen on
General Options:
-h, --help : Display this help messsage
This version differs from the original in that it runs as a client rather than a server, which allows the user to connect to a remote data source and redirect it to a local serial port. Also, this version of the script no longer tries to remove any telnet negotiation from the data stream. The alternate usage flags are as follows:
TCP Options: -c, --connect : Specify a TCP port to connect to -i, --ip : Specify the IP address or hostname of the host to connect to
Same general thing as the original, it just runs in reverse. The code will read a little funny as I didn't adjust any of the verbs (we are no longer listening for instance), but thats just how it is.