Electronic – Monitoring serial communication and problems with the RS232 listening device

diodesresistorsreverse-engineeringrs232serial

Currently I'm working on a little reverse-engineering project, where I want to understand the communication between the controlling software and a modem/DCE via serial port (RS232C).

EDIT: both the controlling software and the modem are from the early 90s, the software only runs on MS DOS. My laptop, which is supposed to do the work of understanding the communication, runs on Windows 10 and will be connected through a Serial to USB Adapter. (end of edited part)

For this purpose I already build a little listening device which mostly works fine. It looks like this:

enter image description here

I've drawn the circuit diagram but I got the 'blueprints' from http://airborn.com.au/serial/rs232.html, however, no description or explanation is provided there. I just build it and got lucky. Unfortunately I'm not as good in electronics as in the software-part of my project. I've got some simple questions first I hope someone can answer:

  • I think I kind of get why there needs to be a diode at line 2 ('Transmit Data' from a female point of view). To keep it one way? Is that correct? Or am I thinking too simple?
  • I am nowhere near an understanding of why line 3 ('Receive Data' from a female point of view) needs a resistor, instead of a diode. Why is that? And why the specific resistance of 2.2kOhm?

Now for the not so simple question (I think). I don't expect answers, maybe some tips or hints:

The software does an initialization sequence in order to see if the modem works and is connected. This initialization fails if I start the controlling PC and the modem while I am connected thorough my device. I am only able to get a successful initialization and to the actual main menu of the software if I disconnect one of the cables going to my listening computer (either the one with the diode or the one with the resistor). However, if I plug it back in after the initialization everything works fine, I can listen both ways again and the communication between controlling software and the modem is not impeded at all.

  • Why does this 'work around the initialization by unplugging one cable' approach work for either line, the diode- and the resistor-cable? I thought it would either matter which one to disconnect or I would have to disconnect both.

Thanks in advance!

Best Answer

The resistor and diode combination could be replaced with two diodes but then you would need an additional resistor pulling the output down to a negative voltage.

The diodes can only pull the signal positive, not negative. RS232 operates between at least +5V and -5v (can be up to +/-15v)

By using the resistor instead of a diode it is possible to steal the negative supply from the other input; the resistor also acts as the path for the signal when that input is active.

The resistor is not critical - it has to be much lower than the input resistance of the receiver it is connected to but must not be so low that is loads down the signal it is monitoring.

A few kilohms is appropriate - I used 4.7k when I came up with an identical circuit 20 years ago to allow two terminals to be connected to the console input of a voicemail system.

kevin