1
\$\begingroup\$

Someone was asking me if it would be possible to monitor the serial communication between two PCBs and output something that is readable. The PCBs are part of an automatic door system - I'm not sure of the baud rate, protocol, or anything right now.

Do you think it would be possible to use an Arduino or something similar to do this? Would it be able to output readable text? Can logic analysers do this? At this point I'm not sure whether it would be I2C, SPI, or just have RX/TX lines, but I'm sure that could be figured out.

Since it would just be listening to a bunch of 1's and 0's without the opportunity to transmit back, I'm concerned it would just end up incorrectly interpreting a bunch of 1's and 0's, resulting in useless data. What do you think?

I am just trying to gauge the difficulty of such a thing, and the best way to go about it.

Thanks!

\$\endgroup\$
  • 1
    \$\begingroup\$ Yes, it's probably possible to reverse-engineer the communications (if it was not designed to be secure). An oscilloscope or a logic analyzer would help, but may not be sufficient. \$\endgroup\$ – Spehro Pefhany Jan 12 '15 at 21:06
3
\$\begingroup\$

This is the kind of thing logic analyzers were created to do. But you could try using an Arduino too in the beginning. To ensure you're starting from similar states, it might be best to first try listening when you turn on the unit. Try something low like 1200 baud then move up to 4800, 9600, etc. There is a list of common ones at http://digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7 It's also most commonly 1 stop bit, no parity, and no hardware handshake. But also have a look at what voltage level (RS-232, TTL 5v, TTL 3.3v, etc) it's transmitting at too.

If you have a logic analyzer like a Saleae Logic (they make very nice ones with good software) it even has an 'autobaud' that could try to detect what baud rate the input is operating at. Then you can try and monitor both sides and see what one side is saying to another. It may be binary data that you'd have to try to parse out, but you'd be surprised how often it's just readable ASCII too.

Good luck!

\$\endgroup\$
2
\$\begingroup\$

For serial it's very easy, just get a pair of usb to serial converters (TTL) and connect the RX of each one to one of the data lines. After you figure out the speed you'll be able to see both TX and RX streams in two terminal windows.

Grabbing other protocols is slightly harder. Some time ago Dangerous Prototypes designed a product called "Bus pirate" which can be used for that, you may want to take a look at it too.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.