Yubikey - cont'd

Hans Petter Selasky hselasky at c2i.net
Tue Jun 9 08:36:11 UTC 2009


On Tuesday 09 June 2009 00:20:39 Jeremy Faulkner wrote:
> Hans Petter Selasky wrote:
> > On Monday 08 June 2009 02:07:32 Jeremy Faulkner wrote:
> >> Thanks for the reply Hans. I can't reply to the original thread as I
> >> wasn't subscribed to usb@ and didn't mention that in my previous
> >> email. I'm subscribed now.
> >>
> >> I assume you meant 'cat /dev/usb/5.5.1 | hexdump -C' as 'hexdump C'
> >> expects C to be a file. I've attached the output of hexdump when the
> >> Yubikey is triggered.
> >
> > Your Yubikey input looks like the input of a keyboard. I'm a little bit
> > busy at the moment. What needs to be done is to search for Yubikey in the
> > NetBSD ukbd.c driver (sys/dev/usb) and port those changes to the FreeBSD
> > ukbd.c driver (sys/dev/usb/input). Is that something you can do?
> >
> > You might find the following link useful:
> >
> > http://fxr.watson.org
> >
> > --HPS
>
> There were no occurances of Yubikey in fxr.watson.org so I checked the
> FreeBSD ukbd.c to see if it was rejecting the Yubikey for some reason. I
> found in ukbd_probe() that it required that the keyboard have
> InterfaceSubClass == UISUBCLASS_BOOT and InterfaceProtocol ==
> UPROTO_BOOT_KEYBOARD in order to attach.
>
> I don't know what they're for but the Yubikey has no subclass or
> interface protocol set. To test this I hacked it to return 0 if the
> idVendor is that of Yubico (0x1050) and it attached as ukbd0 (kbd2) and
> worked. Perhaps it would be better to create a USB Quirk for forced ukbd
> attach than to have the Yubico vendor id in ukbd_probe()
>
> Also, I don't know what the difference between UPROTO_BOOT_KEYBOARD
> (defined in ukbd.c) and UIPROTO_BOOT_KEYBOARD (defined in usb.h)
>

Then you need to compare the ukbd.c in NetBSD anb the ukbd.c in FreeBSD. You 
can use usbconfig dump_device_desc to get the fields that are matched against.

--HPS



More information about the freebsd-usb mailing list