I have my java program working with my usb device under Linux.  I am now 
trying to get it working under Windows and Mac OS.  I am trying to use 
the javax-usb-libusb programs as modified by Rockhopper (see 
jSyncManager project).

I have got as far as opening a pipe.  I can find out that it is an input 
pipe in interrupt mode.

In the Linux version, I then send:-

usbPipe.syncSubmit(buffer);

This doesn't work.  On examining the source code in 
WindowsPipeOsImp.java, you can see that this method is not defined.

I then tried defining a irp and sending :-

DefaultUsbIrp irp = new DefaultUsbIrp(buffer);
irp.setAcceptShortPacket(true);
usbPipe.syncSubmit(irp);

This gets me a bit further.  As error message tells me that

"WindowsPipeOsImp.asyncSubmit: end point type not (yet) supported!"

However, interrupt type endpoint appears to 1 of the 2 types that is 
supported.  Any idea where I am going wrong?

My next tack was to try editing the source code to trace what was 
happening.   After much hassle, I have a structure that compiles but 
gives a runtime error.

In a folder called javaxusbtest, I have:-
my program ComfortDriver.java,
the source files from javax-usb-windows\src\com\mcreations\usb\windows,
a folder called com which contains the class files after compilation,
a folder called net which contains the class files from jsr80_windows.jar
and the javax.usb.properties file.

On running, I get the message:-

Exception in thread "main" ava.lang.RuntimeException: Error: The 
UsbServices implementation class 
com.mcreations.usb.windows.WindowsUsbServices was not found
: com.mcreations.usb.WindowsUsbServices
   at ComfortDriver.getVirtualRootHub(ComfoertDriver.java:251)
   at ComfortDriver.main(ComfoertDriver.java:22)

the code at lines 248-254 are:-

       try {
           services = UsbHostManager.getUsbServices();
       } catch ( UsbException uE ) {
           throw new RuntimeException("Error : " + uE.getMessage());
       } catch ( SecurityException sE ) {
           throw new RuntimeException("Error : " + sE.getMessage());
       }

I have traced this error message to the  javax.usb.properties file where 
the 1st active line says:

javax.usb.services = com.mcreations.usb.windows.WindowsUsbServices.

As far as I can see, I have the file WindowsUsbServices.class in the 
directory
com\.mcreations\usb\windows

I have tried amending this line in the properties file but haven't been 
able to find the correct file designation - the error message changes 
when I change the properties file.

What am I doing wrong?

Is there anyone got a working Windows or Mac version working yet?

abg


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.6/535 - Release Date: 15/11/06 15:47


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to