libusbjava

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Irwandi
Posts: 2
Joined: Sun Aug 16, 2009 8:11 pm

libusbjava

Post by Irwandi » Sun Aug 16, 2009 8:19 pm

Dear vusb users
I interest to make java based application to control the vusb devices.
I want to connect to custom-class firmware by using java via libusbjava.
Can someone help me how to connect the vusb device by using libusbjava library?

Best regards,
Irwandi

Irwandi
Posts: 2
Joined: Sun Aug 16, 2009 8:11 pm

Re: libusbjava ok

Post by Irwandi » Sat Sep 12, 2009 1:07 pm

:D , I got it

I hard worked, and tricky I got connection between my java program (modified form ReadWrite.java)
the parts of modified code are:

dev.open(1, 0, -1);
dev.controlMsg(0x40,1,value,0,data,4,5000,false);
// dev.writeInterrupt(0x81, data,data.length , 2000, false); //not yet working


// nBytes = usb_interrupt_read(handle, USB_ENDPOINT_IN | 1 , (char *)buffer, sizeof(buffer), 700000 * 1000);
//readInterrupt(int in_ep_address, byte[] data, int size, int timeout, boolean reopenOnTimeout)
for(int i=1;i<10;i++){
dev.readInterrupt(0x81, readData, readData.length, 700000*1000, false);
System.out.println("keypressed "+readData[0]+" "+readData[1]+" "+readData[2]+" "+readData[3]);

the firmware modified form CustomClass especially from custom-class. From host to device use controlmsg, while from device to host use interrupt.
I have problem to use interrupt for both.

If finish I will attach my projects in V-USB, and thank for this company for my hobby.

Best regards.
wandiufo@gmail.com

rb20e
Posts: 4
Joined: Sat May 08, 2010 5:33 am

Re: libusbjava

Post by rb20e » Tue May 11, 2010 7:15 am

Hi,

could you attach your code for this please? Im keen to see how you implemented this.

Im kind of in the same place you were. can read fine but cant write out from the pc.

Thanks

Post Reply