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. virtuak serial driver

virtuak serial driver

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 3 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.
  • B Offline
    B Offline
    BadKarma
    wrote on last edited by
    #1

    Hi, I need to implement my own virtual driver which pretends to be a serial port. Other application would know better if it was a real port or not. I know that there are programs that alreaddy do such a thing. :) Just Google to find them ;P but i need to write it myself. Does anybody have a clue where to begin or have the correct search criteria to find it myself in google. Anyhelp would be very appritiated. codito ergo sum

    Z 1 Reply Last reply
    0
    • B BadKarma

      Hi, I need to implement my own virtual driver which pretends to be a serial port. Other application would know better if it was a real port or not. I know that there are programs that alreaddy do such a thing. :) Just Google to find them ;P but i need to write it myself. Does anybody have a clue where to begin or have the correct search criteria to find it myself in google. Anyhelp would be very appritiated. codito ergo sum

      Z Offline
      Z Offline
      Zac Howland
      wrote on last edited by
      #2

      To get you started, you will need to open the serial port with shared access (instead of exclusive) from both ends. The best way to do this is to write a serial port class (or take one of the many implementations on this site) and modify the OpenFile call to use the flag for shared access. Your application (the code connecting to the serial port) and the simulator (the code pretending to be on the other end) will both use this class and you can handle your data accordingly. An alternative (and easier) solution is to take a serial cable and connect it from 1 port on your machine to another one. Have the application and simulator each open 1 end of and behave normally (basically, creating a loopback using hardware). If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

      B 1 Reply Last reply
      0
      • Z Zac Howland

        To get you started, you will need to open the serial port with shared access (instead of exclusive) from both ends. The best way to do this is to write a serial port class (or take one of the many implementations on this site) and modify the OpenFile call to use the flag for shared access. Your application (the code connecting to the serial port) and the simulator (the code pretending to be on the other end) will both use this class and you can handle your data accordingly. An alternative (and easier) solution is to take a serial cable and connect it from 1 port on your machine to another one. Have the application and simulator each open 1 end of and behave normally (basically, creating a loopback using hardware). If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

        B Offline
        B Offline
        BadKarma
        wrote on last edited by
        #3

        Hi, thanks for the respons. But I need to write the driver not the using application. Let me explain a little better. We have already software that works with a modem. This software can't be changed its an "exe". The virtual serial driver emulates a serial port or even a modem but itself connects through ip for instance or whatever. A have search a little further on google and I think i need to implement a DEVICE DRIVER. Is this the path to go? codito ergo sum

        Z J 2 Replies Last reply
        0
        • B BadKarma

          Hi, thanks for the respons. But I need to write the driver not the using application. Let me explain a little better. We have already software that works with a modem. This software can't be changed its an "exe". The virtual serial driver emulates a serial port or even a modem but itself connects through ip for instance or whatever. A have search a little further on google and I think i need to implement a DEVICE DRIVER. Is this the path to go? codito ergo sum

          Z Offline
          Z Offline
          Zac Howland
          wrote on last edited by
          #4

          BadKarma wrote:

          We have already software that works with a modem. This software can't be changed its an "exe". The virtual serial driver emulates a serial port or even a modem but itself connects through ip for instance or whatever.

          Emulates the serial port over IP? Do you mean you will just be passing the software the data it would receive over the serial port (if it was actually connected to one) via some other means?

          BadKarma wrote:

          A have search a little further on google and I think i need to implement a DEVICE DRIVER. Is this the path to go?

          You could go that route, though, that would be my last resort. Perhaps a bit more about the requirements you need to fill would narrow down the problem. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

          1 Reply Last reply
          0
          • B BadKarma

            Hi, thanks for the respons. But I need to write the driver not the using application. Let me explain a little better. We have already software that works with a modem. This software can't be changed its an "exe". The virtual serial driver emulates a serial port or even a modem but itself connects through ip for instance or whatever. A have search a little further on google and I think i need to implement a DEVICE DRIVER. Is this the path to go? codito ergo sum

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            Are you absolutely sure you must do this? Developing a device driver is time consuming, especially so if you do not have prior experience. I'm currently fiddling with device drivers right now, and I can tell you that it's far more complex than writing a user space app. If you absolutely must write a device driver, I suggest you get a copy of Programming the Microsoft Windows Driver Model (ISBN: 0-7356-1803-8). What you need to do is to write a serial port minidriver - a driver which implements a serial device driver skeleton.

            -- 100% natural. No superstitious additives.

            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