All electronic devices, computers and  micro controllers need to exchange data with other devices. One of the most used  way, since 1969, is the serial transmission using the RS232 standard when the EIA defined it. Serial transmission is commonly used with modems and for non-networked communication between computers, terminals, printers and other devices It is  useful for debugging purpose in embedded system. In the following paragraphs we describe the serial transmission in the two forms: Synchronous and Asynchronous. 


The base of the serial transmission is the Universal [Synchronous] Asynchronous Receiver/Transmitter (U[S]ART) controller.


The U[S]ART transmits (the sender side) words of data sending individual bits in sequential way while on the other side (the destination side) a second U[S]ART re-assembles the bits into complete data words; even if the serial is not fast as the parallel transfer, it only requires two or three line and it gives the possibilities to send data to receiver that are not near the sender (up to 15 meters).


The Rs232 standard is a peer to peer communication, so to sniff data exchange throw two devices you have two ways to follow:

  • Modify the kernel on your PC 
  • add external hardware to monitor data exchange.

The first choice is a very complete choice, because modifying the kernel you can trace each character arriving on the RX line and each character going out throw the TX line, you can have a log with date and time and, date and time uses the same clock for both signals. But this is an hard work to do.

The second choice is simpler because you can buy an analyzer for few doblons, and the analyze the traffic.

For half duplex transmissions you can also build your own analyzer, it's easy and it costs few dollars.

In the following picture you'll find all the information about my implementation of this kind of device:


And here you are my personal device



Serial_sniffer


The above picture shows my own device, I have added two leds to the standard schema to see which side of the connection is sending data.

Gg1