Connect with us

Monitoring Rs232 data

Discussion in 'General Electronics Discussion' started by Tha fios agaibh, Mar 8, 2021.

Scroll to continue with content
  1. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    I'm trying to diagnose a serial communication problem between a host computer and client printer. It's a RS232 full duplex connection from a DB9 com port on the PC through a crossover cable to the DTE printer. All connections and com settings look normal.

    I thought I'd try reading the data stream coming from the PC with my laptop running Putty terminal software. When I tried connecting my female to female crossover cable, I get nothing at all on the screen. I know I'm using the right com port because it passes a loop back test.

    I'm wondering if I've got the right cable for this, or I'm doing something else wrong?
     
  2. Bluejets

    Bluejets

    5,025
    1,048
    Oct 5, 2014
  3. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    Thanks Bluejets. I know for sure the printer needs a crossover cable but perhaps I should try a straight through cable since this test is really going to my laptop?
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,716
    Nov 17, 2011
    Try a software debugging approach as for example the Free Serial Port Monitor. As fas as I understand it the tool analyzes the data being exchanged over an existing COM port without the need for additional hardware.
    Only drawback: The website mentions only Windows older and up to 8.1, I have no idea whether it will work on Windows 10 :(.
    I found another port monitor here.
     
  5. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    Thanks Harald, but I should be able to monitor the serial port with putty. I'll try a straight through cable next.

    I also considered making up a sniffer 3 connector cable.
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,716
    Nov 17, 2011
    Of course its up to you. But out of sheer curiosity: why does it have to be putty?
     
  7. hexreader

    hexreader

    126
    42
    Apr 21, 2011
    First thing is to check that wiring is correct, ideally using breakout box with LED indications. Connect One side at a time and check that no LED is lit for both sides, and that every expected LED is lit on one side or the other. i.e. no output pin is driving another output.

    The cheaper way to do this is to use a multi-meter on Volts range to check that no pin shows voltage on both sides. e.g. pin 3 should be approx -6 to -12 Volts (lets call it -9V) on PC connector, but open circuit on device side (assumes D9 connector). Pin 2 should be -9V (ish) on device connector, but open circuit (less then 1V typically) on PC side. This test should be done with connectors unplugged.

    Connect common lead of multi-meter to pin 5 of the connector being tested (assuming 9-pin D connector)

    Same goes for handshaking signals if used. Always plus or minus 9V (ish) one side and floating other side, for each pin.

    Next level of diagnostic requires oscilloscope. Do you own one?

    Putty or similar only tells you when you have a working link. It is unlikely to give meaningful clues on robustness, and is a very poor tool to diagnose non-working links.
     
    Last edited: Mar 9, 2021
    Tha fios agaibh likes this.
  8. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    No luck with straight through cable either.

    I'm open to other software, it's just a pain getting approval installing it on a company computer.
     
  9. hexreader

    hexreader

    126
    42
    Apr 21, 2011
    Software is a very poor tool for diagnosing bad wiring. It is generally only useful for verifying good wiring, and even then can give misleading results if you do not fully understand the limitations.
     
  10. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    Thanks hexreader. I like your idea of using a breakout box with LEDs.

    I just wanted to use a terminal program on my laptop just to verify that the data is being transmitted from the host computer. Not even to necessarily analyze it.
    Once transmission is verified, the problem is most likely on the printer side.

    Cabling is about 25ft and I'm not too worried about its integrity. I've verified continuity and it passed a loopback test.

    I don't want to get into the level of analyzing with a scope. Jjust seeing a blip of the Tx,Rx, leds would probably suffice in order to isolate the problem.

    If I dont see the lights blink its likely a software or com port problem on the PC.
     
  11. hexreader

    hexreader

    126
    42
    Apr 21, 2011
    " I've verified continuity and it passed a loopback test."

    Be aware that this test will pass even if baud rate is completely wrong or if Tx/Rx is crossed
     
  12. Tha fios agaibh

    Tha fios agaibh

    2,168
    727
    Aug 11, 2014
    True, except i would see the crossed Tx/Rx by checking continuity.

    I believe I never saw the data with my laptop because the proper bits weren't set such as clear to send.
    If I use a spy cable I presume it would then work.

    I still like the idea of a breakout box. I'll either make or buy one.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-