Telnet COM connection theory and practice - serial to IP software
Telnet is a TCP/IP protocol used to create connections to remote computers. It is also a user command, and by using Telnet, users or administrators have the ability to access remotely located machines. There are other protocols used on the Web, such as HTTP and FTP that allow you to make file requests from remote computers without logging in as a user of that machine. When using Telnet, you log in as a user of the remote machine and are granted those user’s privileges to applications and data that reside on it.
- Telnet usage
- The problem when connecting serial to telnet
- Telnet serial port solution
- Software solution for telnet COM forwarding
Telnet usage fields
The format of a Telnet command is as follows (use your actual computer name when connecting):
After entering this command you would be presented with a login screen and need to provide a userid and password. If your credentials are correct, you are then logged in as if you were a local user.
Telnet is primarily used to satisfy the need to access designated applications or data that are located on a particular computer that is located remotely. Serial devices that are attached to a remote server can be accessed by using the Telnet RFC 2217 protocol. Examples of these devices are:
- industrial monitoring devices such as water flow control monitors
- medical monitoring equipment
- serial printers and scanners
- copiers, cash registers, and other serially attached equipment
Let’s take a look at an application that utilizes a serially connected device, and employs a COM port, like a GPS reader.
We would like to be able to use a device connected to a computer (server) to be accessed by an application that is running on a network-connected remote computer (client). An example would be having a device connected to the small, single-board PC ODROID. After connecting the ODROID to the network, we want to read the device’s data on our local desktop.
If, as we suspect, the application must use a serial port to communicate with the device, then the client computer needs a virtual serial port for the application to use.
Then the application interacts with the client machine’s serial port and is not concerned by the fact that the data is being sent over the network.
The solution in theory
One of the solutions to this problem is to use Telnet with RFC2217 - Telnet Com Port Control Option. There are many software tools that supports Telnet+RFC2217 serial port forwarding, enabling you to run server and client machines on the Linux or Windows platforms. The interoperability of RFC2217 and Telnet means that a Linux server and Windows client can communicate using completely different software packages, as the underlying protocol is the same. You also have the ability to configure parameters, for example to multiplex the serial ports or enact data encryption when using RS232 to telnet.