usb4java

I try to read from a usb device I get USB error 5: Unable to read data: Entity not found can someone help me?

孤街醉人 提交于 2019-12-13 13:22:09
问题 I try to read from a usb device through usb4java api but I get an error: USB error 5: Unable to read data: Entity not found can anybody help me? It has to be noted that the endpoint_in i get it from LibUsb.ENDPOINT_IN and i pass it to the read funtion The device is found is claimed but I cannot move forward to read from the device. My code is given below: import java.io.IOException; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.nio.ByteBuffer; import java.nio

Usb4java library, error while claiming an interface

喜夏-厌秋 提交于 2019-12-12 09:23:40
问题 Here I use the library usb4java to access to my usb device. The problem is I have an error while I try to claim an interface of my usb device. The error is on this line: int msg = LibUsb.claimInterface(deviceHandler, 1); error: USB error 3: Unable to claim interface: Access denied (insufficient permissions) Is there someone who know why I have this error or how fix it ? 回答1: I have the same issue you got, and my env is Mac OS X 10.9 After a long search with google, I finally found this just

Unable to claim interface: Resource busy

允我心安 提交于 2019-12-11 01:23:17
问题 I am working with USB4Java (the low-level version) and am basically working from this code here. I'm working in Ubuntu, and I was running into a problem about permissions but was able to resolve by running eclipse using gksu from the terminal. Now I am having a new problem: When I get to the point in the code here: public static void claimDevice(DeviceHandle handle, int interfaceNum){ int r = LibUsb.claimInterface(handle, interfaceNum); . . . I'm getting an exception telling me that the