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