Quick tip: Verify if RS232 (aka serial) cable works

Categories: Hack, Quick tips

I have been playing around with serial cables the last couple of days. One of my major task I was into is to connect a embedded box with my laptop. First trouble was my laptop does not have a serial port to accept connection. But the bigger trouble was whether the cable provided by the IT folks works or not! Well, as always, IT folks had no clue on how to even test it. So, it all landed in our plate.

A brief googling around gave me a hacky but brilliant solution to test the cable. A loopback! An echo loopback!! πŸ™‚

So, here is the theory. Look at this pic and below. Do you realize that the RXD & TXD are neighbors? πŸ™‚

RS232 pinout
RS232 pinout

So what? Well bro isn’t this sufficient? πŸ˜‰ Allow me to explain. Any data sent will go through TXD (pin 3) and any data received will come through RXD (pin 2). So, if we can loop back then any data sent by us will be received by us! Like an echo! Voila!

Now all we gotta do is just to loop back. How can we do it? A simple paper clip. πŸ™‚ Here is what you do. Unfold the paper clip as shown below.

Paper Clip
Paper Clip

And, pin it! πŸ™‚ Insert the paper clip connecting pin 2 and pin 3, as shown below.

Pin It
Pin It

Once done, you can use your favorite terminal for testing. I used Ubuntu’s miniterm.py. A simple quite tool. Anyways, once you open the terminal, start typing. Whatever you type, if you see it on the screen then voila you got it! (NOTE: DISABLE LOCAL ECHO BEFORE TESTING!) I had sent 1234 and see what I got back! πŸ™‚

echo back
echo back

Da da dum dum dhush! πŸ˜€

«
»

Leave a Reply

Your email address will not be published.