hwsecurity icon indicating copy to clipboard operation
hwsecurity copied to clipboard

USB transport not working

Open freundTech opened this issue 4 years ago • 0 comments
trafficstars

Hello, I'm planing on using this library and wanted to test it using https://github.com/cotechde/fido-browser.

Using my security key using NFC works find, however when connecting via USB first Android asks me if I want to allow Fido-Browser to access the USB device. After I select Ok nothing happens.

I compiled a debug build of fido-browser and got the following stacktrace:

E/SecurityKeyManager: Failed initial connection with card
    java.io.IOException: Unable to retrieve CTAPHID Report data
        at de.cotech.hw.internal.transport.usb.UsbUtils.requestHidReportDescriptor(UsbUtils.java:134)
        at de.cotech.hw.internal.transport.usb.ctaphid.UsbCtapHidTransport.checkHidReportPrefix(UsbCtapHidTransport.java:155)
        at de.cotech.hw.internal.transport.usb.ctaphid.UsbCtapHidTransport.connect(UsbCtapHidTransport.java:146)
        at de.cotech.hw.SecurityKeyManager.transportConnectAndDeliverOrPostponeOrFail(SecurityKeyManager.java:377)
        at de.cotech.hw.SecurityKeyManager.lambda$cMOTa3wEOq6Pigc1W4rxowhVP1w(Unknown Source:0)
        at de.cotech.hw.-$$Lambda$SecurityKeyManager$cMOTa3wEOq6Pigc1W4rxowhVP1w.usbTransportDiscovered(Unknown Source:2)
        at de.cotech.hw.internal.transport.usb.UsbDeviceManager$ManagedUsbDevice.lambda$createNewActiveUsbTransport$0$UsbDeviceManager$ManagedUsbDevice(UsbDeviceManager.java:238)
        at de.cotech.hw.internal.transport.usb.-$$Lambda$UsbDeviceManager$ManagedUsbDevice$YFgd3rzIRtH1tw0Z-MBTBeZTHBo.run(Unknown Source:4)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:67)

I tested using a SoloKeys USB-C + NFC security key and both an Xiaomi Mi 9T and LG G6 android phone.

freundTech avatar Aug 26 '21 15:08 freundTech