Bluetooth Keyboard

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Wed Nov 17 13:51:33 PST 2004


>>>>>So...  how is the bluetooth hid driver coming along that I heard was
>>>>>being worked on back in January. He said he was making good progress,
>>>>>but I still don't see any program to enable hid support in FreeBSD 5.3.
>>>>>My bt keyboard shows up as a bt device, but that's about it.
>>>>
>>>>it is coming along. i finally started to commit bits and pieces (i.e. 
>>>>vkbd(4))
>>>
>>>I actually ran across vkbd, it looks like a generic way to insert
>>>keyboard events into the kernel, but not specific to any technology like
>>>bluetooth.  I'm assuming you also have a user-land daemon that uses
>>>sockets to talk on bluetooth then pass the event to vkbd.  Is there a
>>
>>correct
>>
>>>place to find the userland daemon source at the moment or do you just
>>>have a private copy?
>>
>>there is somewhat old version is in cvs, but it is not connected to the 
>>build
>>
>>/usr/src/usr.sbin/bluetooth/bthidcontrol
>>/usr/src/usr.sbin/bluetooth/bthidd
>>
>>you can read the code and try to get the idea. bthidcontrol(8) should 
>>just work. bthidd(8) has very simple support for bluetooth mouse and no 
>>support for the keyboard.
> 
> I tried compiling both bthidd and bthidcontrol, but they are complaining
> about a missing header and a missing type, report_desc_t.  I'm assuming
> report_desc_t is supposed to be defined in libusbhid.h, but that does
> not seem to be on my system anywhere according to locate.  Is that in
> some port or just an old file since I'd think nothing under /usr/src
> should depend on a port.

hmmm, it appears that libusbhid.h was renamed to usbhid.h. no bthidd 
does not depend on any port. just on libusbhid (see usbhid(3) for details).

just apply this patch in /usr/src/usr.sbin/bluetooth/bthidd

--- parser.y    Fri Apr  9 17:18:00 2004
+++ /tmp/parser.y       Wed Nov 17 13:49:04 2004
@@ -33,10 +33,10 @@
  #include <sys/queue.h>
  #include <bluetooth.h>
  #include <errno.h>
-#include <libusbhid.h>
  #include <limits.h>
  #include <stdio.h>
  #include <string.h>
+#include <usbhid.h>
  #include <unistd.h>

>>>I would like to help with this project since I've had my bluetooth
>>>keyboard sitting on the shelf for months waiting for support in freebsd
>>>and I have been doing some other work in bluetooth recently.
>>
>>sure. i'll be glad to review and commit your patches.
> 
> How old is the cvs version, I'd hate to be fixing old bugs or writing
> code that is no longer useful.

well, its old. give me a couple of days and i will update the bluetooth 
hid stuff in cvs. in the mean time the current code is a good starting 
reference.

max


More information about the freebsd-bluetooth mailing list