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

Find a solution to HID access on Linux #8

Open
2 tasks
martinpaljak opened this issue Oct 5, 2022 · 7 comments
Open
2 tasks

Find a solution to HID access on Linux #8

martinpaljak opened this issue Oct 5, 2022 · 7 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@martinpaljak
Copy link
Owner

  • Instability
  • Inability to access usage page property and filter FIDO devices.
$ fido -U 0001:0005:00 -i                                                                                                                                                                                                                                                                                                                                                
Yubikey 4 U2F+CCID (v4.3.5, U2F_V2)
$ fido -U 0001:0005:00 -i                                                                                                                                                                                                                                                                                                                                                
UncheckedIOException: java.io.IOException: Channel mismatch during transaction!
java: ../../libusb/os/threads_posix.h:58: usbi_mutex_destroy: Assertion `pthread_mutex_destroy(mutex) == 0' failed.
java: ../../libusb/os/threads_posix.h:46: usbi_mutex_lock: Assertion `pthread_mutex_lock(mutex) == 0' failed.
Aborted
@martinpaljak martinpaljak added bug Something isn't working enhancement New feature or request labels Oct 5, 2022
@martinpaljak martinpaljak added this to the v0.9 milestone Oct 5, 2022
@martinpaljak
Copy link
Owner Author

Maybe https://github.com/nyholku/purejavahidapi helps

@martinpaljak
Copy link
Owner Author

https://github.com/martinpaljak/hid4java publishes with a changed CalVer to https://javacard.pro/maven/SNAPSHOTS (latest is 23.09.14-SNAPSHOT)

@superskybird
Copy link

On Apple M3 Pro, I met this issue
"fido -i" returned below messages

# WARNING: USB HID device support is broken on this platform.
# See https://github.com/martinpaljak/FIDO2/issues/8 for more info
# Workaround: use x86_64 Java
HidException: Hidapi did not initialise: dlopen(/Users/XXX/Library/Caches/JNA/temp/jna5843969688761551292.tmp, 0x0009): tried: '/Users/XXX/Library/Caches/JNA/temp/jna5843969688761551292.tmp' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/XXX/Library/Caches/JNA/temp/jna5843969688761551292.tmp' (no such file), '/Users/XXX/Library/Caches/JNA/temp/jna5843969688761551292.tmp' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

What should I do?

@martinpaljak
Copy link
Owner Author

On Apple M3 Pro, I met this issue "fido -i" returned below messages

# WARNING: USB HID device support is broken on this platform.
# See https://github.com/martinpaljak/FIDO2/issues/8 for more info
# Workaround: use x86_64 Java

What should I do?

For the time being using an intel JDK as the workaround suggests.

@superskybird
Copy link

But I can not install Intel JDK on Apple M3 Pro.
image

@superskybird
Copy link

I just download jdk of tar.gz version and replace the installed jdk and work well.
But I hope "fido -i" can run without any change. Currently, it's ok.
Thank you very much.

@martinpaljak
Copy link
Owner Author

I recommend either Azure or Temurin builds of JDK. For Intel you probably also have to install rosetta first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants