- what OS?
- when you say 'intercept', do you really mean take it, or are you looking for something like pcap, which gives you a copy without interrupting the existing flow?
- have you looked at Device::USB::*?
fnord
| [reply] |
A1. its windows vista
A2. I'd want to copy as not to interupt the current software from doing its job
A3. I haven't looked at Device::USB yet, thought I'd get some feedback first before jumping into it
| [reply] |
I don't think you're going to find a perl module that will do this. However, this page has some links to tools that should be able to capture the data ala wireshark/windump. I have not looked at any of these tools, but you should hopefully find one that can pipe the raw data to your perl appfnord
| [reply] |
I read "live" data from an Arduino attached to the USB port in Perl. You can see how I did it at http://www.martin-evans.me.uk/node/86. Basically I just use Win32::SerialPort. I'm sure you can do something similar in other operating systems.
| [reply] |
It sounds to me like the requirement here is to intercept the USB data, Wireshark-style, so that the data is being read by the Perl program while it is also being read by the proprietary software.
I think that it is safe to say that some “OS-specific privileged-mode high magick” will be required in order to do that. Or maybe just a piece of wire. If the data is simply coming in as a serial data stream, and it is now being sent using USB just because those connectors require a lot fewer wires (i.e. no command-and-control data going the other way), then perhaps you could electrically split the wire using some kind of a pigtail without running into impedance or voltage-drop problems.
| |