Hardware and Software Solutions for UART over Ethernet communication
Definition and characteristics of UART
A universal asynchronous receiver/transmitter (UART) shouldn’t be confused with communication protocols like I2C or SPI. As a rule, it's a self-contained IC or a physical circuit in a microcontroller, the main mission of which is serial data transferring and receiving.
One of the primary advantages of UART is that it utilizes only 2 cables for data transfer between devices. UART communication is quite simple: UART1, after converting parallel data from a controlling device (e.g.: CPU) into a serial format, transfers it to UART2, which in its turn transforms the serial data back into parallel form for the receiving device. Therefore, data streams from the Tx pin of UART1 to the Rx pin of UART2 (see Fig 1). UARTs interact with each other directly, requiring only two wires for data transmission between them.
Data is transferred asynchronously by UARTs, that’s why there won’t be any clock signal for synchronization neither of the output of bits from the transmitting UART nor of the sampling of bits by the receiving UART. As a substitute for a clock signal, the transmitting UART adds start and stop bits to the transferred data packet to designate its beginning and end, thus letting the receiving UART know when it can start reading the bits.
Once the receiving UART spots a start bit, it begins reading incoming bits at a certain frequency, referred to as a baud rate. The baud rate measures data transmission speed in bits per second (bps). UARTs should both work at almost identical baud rate. At least, the difference between baud rates of receiving and transmitting UARTs shouldn't exceed 10 percent before the timing of bits gets too far off.
So, is it possible to share UART data over Ethernet? If yes, how to do it best?
When using UART protocol, you can easily track all the passing streams and save them into a file. However, if you need to work with a remote UART device, located within the Ethernet network coverage area, you can do nothing but utilize additional hardware or software.
Hardware UART to Ethernet Converter
UART TO ETH module, mostly utilized for transparent data transmission, seems to be a simple solution for communicating between UART and Ethernet. It is a serial TTL to Ethernet module that can be customized via web page. For TCP or UDP socket data to serial UART conversion a data transparent transmission appliance (USR-TCP232-T) is used.
Capabilities and characteristics of Ethernet serial module:
- 10/100M auto detect interface;
- Automatic MDI/MDI-X support. Possibility of utilizing parallel cable connection or a crossover cable;
- Different work modes available: UDP Client, UDP Server, TCP Server, TCP Client;
- Possibility to adjust working model settings via a COM port or network;
- Supports 3.3V TTL level (module products);
- Support of virtual COM port;
- Ensures reliable connection due to its exclusive heartbeat package mechanism, eliminating connect feign death;
- No packet broadcasting in UDP mode, has better anti-interference ability; through the gateway/switches/routers;
- Works in LAN/Internet (external network) and so on.
To sum up, the aforementioned converter is an ideal solution for local networks and nearby devices. However, what should you do to access UART over Ethernet being far away, let's say, from some other part of the world? How can you employ UART via network?
UART over Ethernet software solution
There is no better software for sharing distant UART over Ethernet than Serial to Ethernet Connector. Installing this program on each computer within the network will connect UART to network and make the device attached to the serial port, together with its data and functionality, accessible for all the people in the network.
Operating serial port devices with the help of UART to Ethernet converter is the same thing as managing them when they are physically plugged into your computer.
Quick start guide on utilizing Serial to Ethernet Connector:
- Download the software;
- Install UART to Ethernet converter on all the machines in your network and virtual computers with programs requiring access to COM ports;
- Choose “Create Server Connection” in the software main pane;
- Adjust connection settings;
- Establish a client connection on a distant machine.
You are all set. Now you can freely use the remote serial ports over network.
Serial to Ethernet Connector is fully compatible with Windows and Linux. Remark: UART to Ethernet Linux app is a command-line software at the moment.
Serial to Ethernet Connector
Requirements for Linux: Kubuntu 9.10 “Karmic Koala”, openSUSE 11.2, 7.63MB free space , 4.66MB size , 4.66MB size
Version 7.1.876 (28th Jan, 2017) Release notes