I want to be able to read data from an USB pedometer. I'm trying this in Java and I'm using the LibUsb and Usb4Java libraries. I can't seem to claim the usb pipe or anything like that.
The code I'm using:
final Context context = new Context();
int result = LibUsb.init(context);
if (result < 0)
{
throw new LibUsbException("Unable to initialize libusb", result);
}
DeviceHandle handle = LibUsb.openDeviceWithVidPid(context, vid, pid);
if (handle != null)
{
Device d = LibUsb.getDevice(handle);
int res = LibUsb.claimInterface(handle, 0);
Int res returns '-3' which is 'LIBUSB_ERROR_ACCESS'
The device is found but not claimable. The USB device has only 1 interface.
Any help would be appreciated!