On 7/6/10 7:07 PM, Mike Crowe wrote: > Hi Trygve! > > Very interesting, you are not using SWIG as part of your JNI karma. > Why did you move away from it?
I didn't, I've started from scratch with my own stuff. The libusb api is quite simple and I didn't find the generated stuff any easier to use. Being able to have some smarts in the objects/code was also quite handy in a couple of places. It's not set in stone that this is the way it has to be, it just the way I initially though was the easiest and it's worked for me this far. > I checked out your git javax-sb-libusb1 tree. I got it to compile, but > ran into 32/64 bit issues. I resolved them at the compile phase, but > then got strange runtime errors. such as these; I'd like to integrate those patches if you'll offer them. > FATAL ERROR in native method: Field type (instance) mismatch in JNI > get/set field operations > at javalibusb1.libusb1.set_debug(Native Method) > at javalibusb1.Libusb1UsbServices.<init>(Libusb1UsbServices.java:77) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > > ... > > Any ideas? Hm, no, not directly. It's kinda odd as this code is quite basic. It might be related to one of the few hacks in the code where the pointer the libusb context is stored in an int field in the libusb1 object. That part of the code should be improved to store the context in either a byte[] array or not at all. I don't quite remember why I needed it right now. Which JDK and platform are you running this on? Did you run this with a 32 bit or 64bit platform/JVM? I've been working on cleaning up the build to make it easier to run the -- Trygve > > > On Tue, 2010-06-29 at 23:25 +0200, Trygve Laugstøl wrote: >> On 6/29/10 7:53 PM, Trygve Laugstøl wrote: >>> On 6/29/10 5:40 PM, Mike Crowe wrote: >>>> On Sun, 2010-06-27 at 11:13 +0200, Trygve Laugstøl wrote: >>>>> On 6/15/10 12:16 AM, Mike Crowe wrote: >>>>>> Hello >>>>>> I did some rough coding to get javax-usb to work with libusb-0.1 about >>>>>> two years ago. There has been some recent great work being done to port >>>>>> libusb-1.0 to windows XP and newer. Is anyone working at this on moving >>>>>> javax-libusb from 0.1 to 1.0? >>>>> >>>>> I'm working on a new implementation based on 1.0. I haven't published it >>>>> yet as it's very much still a PoC. I can send and receive some packets >>>>> (was able to control a LED on a ftdi chip), but there's lots of work left. >>>>> >>>>> I've done some work on getting the TCK to pass, but libusb right now >>>>> misses at least the negotiated speed so parts of the TCK fails. I'm also >>>>> not very happy with all parts of the TCK so I'd like to discuss that >>>>> later when I'm more into it. >>>> >>>> We'd be happy with Git as well. I'm particularly happy with the local >>>> repo aspect of it. >>> >>> Git is awesome. >>> >>>> I'm not clear what TCK stands for. >>> >>> TCK = Technology Compatibility Kit. By running the TCK you show that >>> your implementation is compliant with the specification. >>> >>>> We have the code compiling, with 1.0, but the enumeration did not port >>>> cleanly and needs some hand coding to work. >>>> >>>> We are actively coding, but it appears that you are well beyond where we >>>> are. It would help if we could be working on the same code. I'm not >>>> clear what it takes to move a sourceforge repo from CVS to git >>>> (CVS2Git). I'm willing to give it a shot if the javax admin guy is >>>> willing to give me the appropriate admin privilages to make the >>>> changes. >>> >>> I've used git-cvsimport on the javax-usb and javax-usb-tck SF >>> repositories (I don't care about the other stuff) and it worked just fine. >>> >>>> Would it make sense to start another project using Git, and libusb-1.0 >>>> (giving credit and links to the original project)? >>> >>> My code is a re-implementation of the libusb stuff. I've reimplemented >>> the relevant javax.usb stuff too as I find the IBM license un-clear and >>> I want it to be under the Apache Software License v2. >>> >>> I'll try to publish my stuff asap. >>> >>> There are parts of the TCK that my code really can't pass as libusb for >>> example doesn't support hot plug/unplug events of new devices yet. >> >> Tada, here it is: >> >> http://github.com/trygvis/javax-usb-libusb1 >> >> Note that it's not very likely that it will build cleanly for anyone but >> me on my machine but I can try to work on that if that's wanted. Right >> now I'm just trying to get the basic stuff to work. I had to do some >> work on libusb too so you'll have to build libusb from my libusb repository: >> >> git://git.libusb.org/libusb-trygvis.git >> >> A web view is available here: >> http://git.libusb.org/?p=libusb-trygvis.git;a=summary >> >> -- >> Trygve > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > javax-usb-devel mailing list > javax-usb-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel