Comments (1)
UPDATE:
The bug is not in the library, but in the user program. The method LibUSB.getDeviceList() returns the number of devices copied to the DeviceList, in my case fourteen devices - that's why I got result == 14. Changed the test to (result < 0) and now I'm getting the whole list without problems.
The constructor of LibUSBException changes the errorCode sign, which makes the exception message to appear as USB Error: -14. The negative number led me to a wrong conclusion that there had been an error.
Previous comment:
I can confirm this behavior on Fedora 33 (stock kernel 5.14.18-100.fc33.x86_64), OpenJDK Runtime Environment (build 1.8.0_312-b07), libusb version 1.0.24.11584, usb4java version 1.3.0 from Maven central. Even tried to compile the libusb4java.so from sources (successfully) and replace it within the classpath, but to no success. The error code returned by LibUSB.getDeviceList is -14 and the debugging output is
[ 0.004276] [001d0eff] libusb: debug [libusb_get_device_list]
[ 0.004286] [001d0eff] libusb: debug [discovered_devs_append] need to increase capacity
Exception in thread "main" org.usb4java.LibUsbException: USB error -14: Other error
I succeeded to get the device list using the same libusb in a simple C program.
from usb4java.
Related Issues (20)
- Typo on site
- Cannot connect usb(ch340 serial)
- Read from Rfid reader and get USB error 1: Transfer error on interrupt endpoint: Input/Output Error HOT 2
- Does it support android?
- CAP_SUPPORTS_DETACH_KERNEL_DRIVER always FALSE
- Tutorial Nitpick that got me stuck for no reason for quite a bit. HOT 1
- javax.usb.UsbException: Pipe is still busy
- Upgrade to libusb 1.0.23+ to Restore Support for Older MacOS Versions
- Bulk transfer failed with Input/Ouput error (Windows 10)
- LibUsb.open returns Access denied (insufficient permissions) when accessed too slow
- An irrecoverable SI_KERNEL SIGSEGV has occurred
- keyboard mode
- getActiveUsbConfiguration() is null in macOS. HOT 1
- Attached and Detached events are not received for the device that has lengthy serial number HOT 4
- Mac M1 Laptops not Supported HOT 2
- Why use apache.commons.lang for only two methods
- Loading /org/usb4java/win32-x86-64/libusb4java.dll in Eclipse
- When using the UsbDk, opening the Device within two threads for a short period of time will fail. errorCode : -99 Other error
- Hotplug events do not fire when application is running inside of a docker container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usb4java.