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? 🙂
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.
And, pin it! 🙂 Insert the paper clip connecting pin 2 and pin 3, as shown below.
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! 🙂
Da da dum dum dhush! 😀