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
libusbjava
Re: libusbjava ok
, 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
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
Re: libusbjava
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
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