Hi,
On 03/11/2014 01:51 PM,
bertel...@googlemail.com wrote:
> first good news is: the UnsatisfiedLink-Error ist gone :-) BUT...
> on Win 7 it always run fine, but on the pi i'm now getting
> "USB error 6: Unable to claim interface: Resource busy"
Sounds like some other driver has claimed the device.
If you use the high-level API you should enforce the claim like this:
iface.claim(new UsbInterfacePolicy()
{
@Override
public boolean forceClaim(UsbInterface usbInterface)
{
return true;
}
});
When you use the low-level API then you need to do this:
// Detach kernel driver from interface. This can fail if
// kernel is not attached to the device or operating system
// doesn't support this operation. These cases are ignored here.
result = LibUsb.detachKernelDriver(handle, 1);
if (result != LibUsb.SUCCESS &&
result != LibUsb.ERROR_NOT_SUPPORTED &&
result != LibUsb.ERROR_NOT_FOUND)
{
throw new LibUsbException("Unable to detach kernel driver",
result);