Serial Port Debugging 101 : Loopback Test

Loopback Tests

Now, I need to ensure that each component is working. So, I use the “Loopback test” at each step of the communication link. In a loopback test, signal is sent from the Tx pin and (looped back) received on the Rx pin of the same component in order to verify if the communication is healthy so far. The first component on which it fails is the kink in our chain.

Necessary Software

On Windows: Hyperterminal can be used to perform loopback test.

Running the Test

Testing Serial Port of Raspberry Pi: As shown in the figure below, short the UART pins 8 and 10 (TxD and RxD).

Shorting Rx-Tx (UART Pins) of Raspberry Pi. The shield on RPi in the picture is PiUPS+ which, as the name suggests, is the Uniterrupted Power Supply for the RPi.
sudo minicom -D /dev/ttyS0
Console output for Serial port
Shorting Rx-Tx of USB-Serial Converter
Setup to check USB-serial converter
Console output for USB port
Standard Port settings. Note that: The flow control is None.
Console when echo is disabled
How to enable Echo on Hypertermminal
First output: Echo disabled, Second output: Echo enabled

What’s Next

In the next post, I will share debugging of serial ports using sniffers.



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store