2

I have a serial RS-232 connection from a PC's com1: port to a vendor's device. The vendor's device is going to 100% CPU utilization and the vendor claims that our software on our PC is causing that.

When we unplug the cable, the utilization drops to less than 20%. I can't see in our application how that could be happening. I'd like to "sniff" the traffic between the PC and the vendor's device by placing a Raspberry Pi between the 2 and displaying that traffic.

I've got 2 serial to USB cables, and the needed gender changers, and I'm trying the socat and screen packages, with various combinations of parameters, but I can't get it to work. I also have some null modems, but am not sure whether they're needed (I've tried them with various programs/paramters, but I can't get it).

I have used the serial/USB cables sucessfully on the RPi, so I know that works. I am setting the baud rates using stty, but am not sure how to set the data/stop/parity settings. I've tried things suggested here, here and other places. With screen I can sometimes see line noise characters, and when I specify the -d -d -d -d option on socat, I get msgs that the ports are opened, and lines are generated when I run the app on the PC. But the app isn't working because the RPi isn't transparent - the communication's being corrupted. I've tried setting raw and other various params.

Anyone got the correct incantation?

  • Use the TX and later the RX line physically to read the traffic on an other device. – devanand Apr 21 '16 at 7:19

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.