Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some inconsistencies #26

Open
icemagno opened this issue Jul 25, 2024 · 2 comments
Open

Some inconsistencies #26

icemagno opened this issue Jul 25, 2024 · 2 comments

Comments

@icemagno
Copy link

icemagno commented Jul 25, 2024

I have two identical Tokens

Vendor ID: 4185
Product ID: 23
Class Code: 11
Manufacturer: Giesecke & Devrient GmbH
Product: STARSIGN_CUT

The first one I can insert and remove without problem. All informations are taken from the "deviceConnected" and "deviceDisconnected" triggers.

The other one, when I insert for the first time I receive this error:

net.codecrete.usb.UsbStallException: internal error (retrieving descriptor 0 failed)
	at net.codecrete.usb.windows.WindowsUsbException.throwException(WindowsUsbException.java:52)
	at net.codecrete.usb.windows.WindowsUsbException.throwLastError(WindowsUsbException.java:80)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.getDescriptor(WindowsUsbDeviceRegistry.java:259)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.getDescriptor(WindowsUsbDeviceRegistry.java:236)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.createDevice(WindowsUsbDeviceRegistry.java:223)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.createDeviceFromDeviceInfo(WindowsUsbDeviceRegistry.java:191)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.onDeviceConnected(WindowsUsbDeviceRegistry.java:334)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.handleWindowMessage(WindowsUsbDeviceRegistry.java:312)
	at net.codecrete.usb.windows.winsdk.User32B.GetMessageW(User32B.java:99)
	at net.codecrete.usb.windows.WindowsUsbDeviceRegistry.monitorDevices(WindowsUsbDeviceRegistry.java:134)
	at java.base/java.lang.Thread.run(Thread.java:1570)

but after remove and insert it again, the triggers are fired without any errors, but the vendor name may come empty sometimes.

Windows 10. Java 22.

@manuelbl
Copy link
Owner

The exception indicates that USB configuration descriptor 0 cannot be queried. This is strange. This descriptor must be available otherwise the USB device does not work.

Did Windows show any errors related to the device, e.g. "The last usb device you connected malfunctioned"? Does the device properly work on Windows? Does your computer have any endpoint security software installed that disables certain USB devices for security reasons?

@icemagno
Copy link
Author

icemagno commented Jul 25, 2024

No. This Token is working without problems. And it have a twin that not throwing any error. Perhaps you are being too fast to read the device ( before windows load all drivers - don't know... maybe ... ).

Guess what... this not occour on my other window$ machine with W11. I think this may be a driver problem (or USB port) and there is nothing you can do about.

Well.. thanks for your help anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@icemagno @manuelbl and others