Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. serial port sniffer

serial port sniffer

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    szilics
    wrote on last edited by
    #1

    Friends ! I need help ! I have to write a programme in Visual C++ 6 which can listen or sniff the serial port, but without opening the port. The sniffer and the programme which communicates through the serial port has to be on the same PC, I have to write a program which can read ( or listen ) the data that goes out and comes in from the serial port, BUT NOT TO OPEN THE PORT, to let communication programmes communicate through serial ports. If anyone has an idea how to write this sniffer programme, please send me a advise. Many thanks ! Szilard SZ

    C R 2 Replies Last reply
    0
    • S szilics

      Friends ! I need help ! I have to write a programme in Visual C++ 6 which can listen or sniff the serial port, but without opening the port. The sniffer and the programme which communicates through the serial port has to be on the same PC, I have to write a program which can read ( or listen ) the data that goes out and comes in from the serial port, BUT NOT TO OPEN THE PORT, to let communication programmes communicate through serial ports. If anyone has an idea how to write this sniffer programme, please send me a advise. Many thanks ! Szilard SZ

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      You cannot do that (or from what I know you cannot do). When I need to do such a thing, I make a 'harware' sniffer :). That is, I connect another connector on the wire so I can plug it into another serial port (if you have two on your computer) and I can sniff the data on the port. Hope this helps

      S J 2 Replies Last reply
      0
      • S szilics

        Friends ! I need help ! I have to write a programme in Visual C++ 6 which can listen or sniff the serial port, but without opening the port. The sniffer and the programme which communicates through the serial port has to be on the same PC, I have to write a program which can read ( or listen ) the data that goes out and comes in from the serial port, BUT NOT TO OPEN THE PORT, to let communication programmes communicate through serial ports. If anyone has an idea how to write this sniffer programme, please send me a advise. Many thanks ! Szilard SZ

        R Offline
        R Offline
        Rick York
        wrote on last edited by
        #3

        I recommend looking up "API Hooks." You might be able to set hooks on the API calls used to perform serial communication. That's where I would start.

        1 Reply Last reply
        0
        • C Cedric Moonen

          You cannot do that (or from what I know you cannot do). When I need to do such a thing, I make a 'harware' sniffer :). That is, I connect another connector on the wire so I can plug it into another serial port (if you have two on your computer) and I can sniff the data on the port. Hope this helps

          S Offline
          S Offline
          szilics
          wrote on last edited by
          #4

          Thank you for your reply Cedric :). I don't know if you have heard about the HHD Free Serial Port Monitor. That would be a good model for the programme I have to write. I don't know what tehnique they use. This HHD software monitors in a passive mode al the communication done by other software through the serial port, I don't think it opens the port otherwise it could block the communication for other software. I also have another question, what if I use assembler code, embedded C or something like that, and integrate in my visual C++ code? I think there has to be a possibility to read the memory location through which the serial communication is done. Thanks in advance ! Szilard Szilard

          1 Reply Last reply
          0
          • C Cedric Moonen

            You cannot do that (or from what I know you cannot do). When I need to do such a thing, I make a 'harware' sniffer :). That is, I connect another connector on the wire so I can plug it into another serial port (if you have two on your computer) and I can sniff the data on the port. Hope this helps

            J Offline
            J Offline
            James Brown
            wrote on last edited by
            #5

            sniffing serial-port is certainly possible, with a filter-driver layered just above the serial-port driver. (talking NT/2000/XP here). There are lots of products on the internet which does this: http://www.aggsoft.com/serial-port-monitor/serial-port-spy.htm[^] http://www.hhdsoftware.com/sermon.html[^] There was also an article about it in an old issue of Windows Developer Journal which came with free sourcecode: http://www.windevnet.com/documents/s=7282/wdj9910a/9910a.htm[^]
            http://www.catch22.net

            S 1 Reply Last reply
            0
            • J James Brown

              sniffing serial-port is certainly possible, with a filter-driver layered just above the serial-port driver. (talking NT/2000/XP here). There are lots of products on the internet which does this: http://www.aggsoft.com/serial-port-monitor/serial-port-spy.htm[^] http://www.hhdsoftware.com/sermon.html[^] There was also an article about it in an old issue of Windows Developer Journal which came with free sourcecode: http://www.windevnet.com/documents/s=7282/wdj9910a/9910a.htm[^]
              http://www.catch22.net

              S Offline
              S Offline
              szilics
              wrote on last edited by
              #6

              Thank you James your advise was very usefull.:cool: -- modified at 5:22 Thursday 2nd March, 2006

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups