I am working with a piece of software which connects to a serial
Rather than using a RS232 device I want to use a piece of USB hardware. So that the software plays ball I want to create a virtual COM port and provide automatic responses to certain calls and possibly play around or pass on other commands.
Currently the software makes sure that there is a COM port to talk to thusly (data retrieved by sniffing the port)
Port opened by process "A2Dsoft.exe" (PID: 2100)
24 0D $.
Port closed
Simple enough, there just needs to be something to receive the command, no response necessary, then the software starts. When switching to capture mode the following happens
Port opened by process "A2Dsoft.exe" (PID: 2100)
24 01 $.
Answer: 20/02/2008 17:57:52.71164 (+0.6406 seconds)
24 02 $.
Fine - it asks a question (presumably, 'hey, you there?) and wants a response. I'd just need my virtual COM port to respond in that way. Next the software says a few things (as far as I can tell just interogatory commands making sure it's okay/online etc). Then at some point sends data, there seems to be a few second 'window' in which it will accept data before it reissues a data request and another 'window' of opportunity to recieve data occurs - there are reasons for this which I wont go into.
My question boils down to... I have a USB device that sends and receives data but not (as far as I know) via the COM port route. I want to write something that will act as a COM port then talk to the USB device's driver or simply issue a standard response depending on the message received - possibly doing a bit of translation too if the response from the USB device differs hugely from the serial device. Does this sound very complicated or merely mildly difficult? Where would I look for literature on how to do this or am I in way over my head and should just ask Linus Torvalds for his help??
Rather than using a RS232 device I want to use a piece of USB hardware. So that the software plays ball I want to create a virtual COM port and provide automatic responses to certain calls and possibly play around or pass on other commands.
Currently the software makes sure that there is a COM port to talk to thusly (data retrieved by sniffing the port)
Port opened by process "A2Dsoft.exe" (PID: 2100)
24 0D $.
Port closed
Simple enough, there just needs to be something to receive the command, no response necessary, then the software starts. When switching to capture mode the following happens
Port opened by process "A2Dsoft.exe" (PID: 2100)
24 01 $.
Answer: 20/02/2008 17:57:52.71164 (+0.6406 seconds)
24 02 $.
Fine - it asks a question (presumably, 'hey, you there?) and wants a response. I'd just need my virtual COM port to respond in that way. Next the software says a few things (as far as I can tell just interogatory commands making sure it's okay/online etc). Then at some point sends data, there seems to be a few second 'window' in which it will accept data before it reissues a data request and another 'window' of opportunity to recieve data occurs - there are reasons for this which I wont go into.
My question boils down to... I have a USB device that sends and receives data but not (as far as I know) via the COM port route. I want to write something that will act as a COM port then talk to the USB device's driver or simply issue a standard response depending on the message received - possibly doing a bit of translation too if the response from the USB device differs hugely from the serial device. Does this sound very complicated or merely mildly difficult? Where would I look for literature on how to do this or am I in way over my head and should just ask Linus Torvalds for his help??
Last edited: