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