Date: Mon, 08 Jun 2009 22:20:39 +0000 From: Jeremy Faulkner <gldisater@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: Yubikey - cont'd Message-ID: <4A2D8EB7.4050305@gmail.com> In-Reply-To: <200906082127.35793.hselasky@c2i.net> References: <ca650bda0906071707q2296a50flb81d77379d01e404@mail.gmail.com> <200906082127.35793.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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) -- Jeremy Faulkner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A2D8EB7.4050305>