2

I am studying a system running a serial connection and looking not to intercept its packets, but merely to inspect the traffic as it passes.

Option 1

Hook the RX and TX wires to the RX of two serial channels on my Arduino. Read the messages sent in either direction separately. Don't know the baud rate so this might be experimental?

Option 2

Split the connection, absorb both sides of the break into a RX TX serial connection on the Arduino, and set up forwarding from each to the other while inspecting the content.

In either option I can see the need to inspect the connected wires and establish the highest observed baud rate to match to. In the second option until I inspect enough data to reliably get the baud rate, data will be lost unless it is buffered.

Has anyone got any experience with a situation like this?

6
  • 2
    Use a logic analyser so you can find the baud rate visually. They can also decode the raw data into values, and some even know about common protocols already.
    – Majenko
    Dec 11 '20 at 17:42
  • option 1 is preferred ... option 2 makes an assumption that voltage levels are not important to the exchange of data .... you could have a system that sends bogus serial data and uses voltage levels to transmit the true data covertly
    – jsotola
    Dec 11 '20 at 18:42
  • I would suggest spending more time studying it and updating the information you presented. There are thousands of serial communications formats and most have both a transmit and receive connection. Is it a sync or async format. Could it be I2C or SPI? Maybe it's VPWM, you will need to know before you can spi on the data going to and fro. Once you have this you can use a few Op Amps and resistors as a high impedance connection so you do not damage the data stream.
    – Gil
    Dec 12 '20 at 1:28
  • Keep in mind even if it is RS232-like asynchronous serial protocol you don't need to know the baud rate beforehand. You can write an algorithm to measure and detect the baud rate of traffic passing by. This is what "autobaud" means for higher level systems which support it. They have just written algorithms to figure out the baud rate by listening to traffic for a moment first. Dec 12 '20 at 5:25
  • 1
    There are also lots of logic analysers, that only cost like 10$. Surely they are not as capable as the top tier ones, but that most likely will be enough.
    – chrisl
    Dec 12 '20 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.