1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

RS232 monitor/sniffer.

Discussion in 'General Electronics Chat' started by Odin, Jan 10, 2006.

  1. Odin

    Odin Member

    Joined:
    Jun 29, 2004
    Messages:
    43
    Likes:
    1
    Location:
    Norway
    Hi guys!

    I'm looking for a way to monitor, or sniff, the signals on COM1 on a laptop running Windows 98. The laptop is running a program that is communicating with a ECU for air conditioning. This program is no longer maintained. And now I'm stuck in a situation where a have to use this very old lousy laptop to get the program running. It wount run on newer computers or OS'es. And sooner or later the old laptop will die...

    I need this program to send commands to the ECU, for repair and service. I can toggle outputs and read inputs. My idea is to analyze the signals, and try to send the same from another computer, a PIC or similar.

    Right now I'm monitoring the signals with a scope, and there seems to be a communication going on between the ECU and the laptop continously. 3 or 4 packets of data is sent repeatidly. If I could somehow monitor/sniff/record the data, I could duplicate them from another device. A modern device, that is...

    Any ideas?

    Thanx!
     
  2. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    http://www.lammertbies.nl/comm/cable/RS-232-spy-monitor.html

    I've used one of these once to spy on serial communications. it allows you to split the serial data that the computer is sending and recieving to 2 other COM ports, so you can easily log what's happening on either line. If the communication only involves occasional, short data transmissions/receptions, you could potentially do it a couple instances of a terminal program like hyperterminal (there are better ones that can format the data better)... if the data is being sent too rapidly for you to easily monitor it that way then you might have to find (or write yourself) some sort of program that can monitor both of the COM ports and show the data on each line in chronological order so you can see which originated from the laptop, which from the ECU, and what order they were sent in, so hopefully you can pick out a pattern and start to decode the data.
     
  3. MikeHibbett

    MikeHibbett New Member

    Joined:
    Jan 4, 2006
    Messages:
    57
    Likes:
    0
    Location:
    Kent, South East England
    Years back a made a cable up to do something similar - monitoring the comms between a smartcard reader and the PC.

    It was/is very simple - I still use it.

    Take a standard comms cable that will connect between the PC and the device. Cut the cable in two, and then solder the wires back together ( just cut wires going between pins 2,3,5 if you can, since these are the only ones you need. )

    You can run a pair of wires from 'pin 2' and 'pin5' to another serial plug, pins 2 and 5.
    You can also run another pair of wires from 'pin 3' and 'pin 5' to yet another serial plug, pins 2 and 5.

    You can put those two new plugs into the serial ports on another PC and use your favorite program to view the data. Of course it helps if you have a PC with two serial ports on it.

    I wrote a simple app that displayed the data in hex, but there are probably terminal programs on the web that will do the job for you. If you are interested in my code I can probably find it for you.

    In short it's simple, and you dont need and special hardware other than wire and two 9 pin d type plugs.

    Regards,

    Mike
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,329
    Likes:
    585
    Location:
    Peterhead, Scotland

    A bit of test equipment known as a Protocol Analyser would help in this situation. They are however very expensive.
    But...
    our friend Google gives this:

    http://www.beyondlogic.org/protocolanalyser/protocolanalyser.htm

    Try it, it may help you.

    JimB
     
  6. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    JimB, thanks for that link! that's exactly the kind of thing I was thinking of, to show transmitted and received data in chronological order in the same program. Looks like a great solution.
     
  7. ilan1

    ilan1 New Member

    Joined:
    Jan 19, 2006
    Messages:
    16
    Likes:
    0
    evandude: thanks for the link. I would like to do some rs-232 sniffing of my own with some old equipment. Could you clue me in on how to obtain the 1N4148 diode in the schematic?

    When I go to a supplier like Digikey, there are like tons of different kinds of 1N4148 diodes with all kinds of different ratings. Which one should I choose?

    btw, if you know of a place where I can get free samples, please do mention them also. :)

    Ilan
     
  8. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Radio Shack has all the parts, at least the ones in Florida. They have the connectors and the diode.
     
  9. evandude

    evandude New Member

    Joined:
    Oct 1, 2003
    Messages:
    1,395
    Likes:
    5
    Location:
    Maine, USA
    yes, and the exact type of diode doesn't matter very much, just a general-purpose diode such as a 1N4148, 1N914, or any of the 1N400X series, all of which are VERY common, and should be available at any electronics place.

    the diode is only being used as a simple rectifier, (no fancy analog behavior) which is something pretty much any diode would work for, just don't use a zener or some crazy huge power diode :lol:
     
  10. roombasucksdust

    roombasucksdust New Member

    Joined:
    Sep 18, 2017
    Messages:
    1
    Likes:
    0
  11. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,022
    Likes:
    317
    Location:
    Brisbane Australia
    I appreciate that you are new but please look at the date on threads before answering. This one is 11 years old.

    Mike.
     

Share This Page