accessing data from a usb port

Posted by 66stangrag on 2007-04-25 08:17

I am a student and I am trying to find some code to allow me to access the data from a usb input. I don't knnow where to start at this point. The device is installed with drivers working properly. The data is an 8 bit code from an alarm that I built. Any help would be great. Thanks

jcanon | Tue, 2011-03-01 08:02

I have a problem with some similarities : I use a USB device (CM15PRO) that I can access through Linux.
I use the following instructiion :

use Fcntl;
sysopen( CM15A, "/dev/cm15a0", O_RDWR |O_NOCTTY | O_NONBLOCK ) || die "Cannot open device $!";
syswrite CM15A, pack( "CC", 4, 0x61 ), 2;
sleep 1; # can be less
syswrite CM15A, pack( "CC", 6, 0x63 ), 2; # OFF
close( CM15A );

This code runs perfectly in Linux but I want to use it in Windows and I cannot find what I have to put in the filename in Windows instead of "/dev/cm15a0". A working driver is installed in both OS.

Does anybody an idea how to solve this problem ?