From owner-freebsd-bluetooth@FreeBSD.ORG Fri May 22 07:23:42 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56FE1065672 for ; Fri, 22 May 2009 07:23:42 +0000 (UTC) (envelope-from freebsd-bluetooth@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9188FC12 for ; Fri, 22 May 2009 07:23:42 +0000 (UTC) (envelope-from freebsd-bluetooth@dino.sk) Received: from via.dino.sk (home.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Fri, 22 May 2009 08:42:45 +0200 id 0002E03D.4A164965.00006247 From: Milan Obuch To: freebsd-bluetooth@freebsd.org Date: Fri, 22 May 2009 08:46:59 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905220847.00259.freebsd-bluetooth@dino.sk> Subject: Bluetooth keyboard X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 07:23:43 -0000 Hi, I bought recently a Logitech Cordless MediaBoard Pro keyboard (see page at http://www.logitech.com/index.cfm/gaming/playstation_3/keyboards/devices/3616&cl=za,en for details). Using 8.0, googled a bit and (for summary) did the following: kldload vkbd (I already have ng_ubt loaded via /loader.conf) Now I turned keyboard on and with hccontrol -n ubt0hci inquiry I found my bluetooth address to be 00:07:61:e6:bb:79. Next with bthidcontrol -a 00:07:61:e6:bb:79 query >> /etc/bluetooth/bthidd.conf I put device definition into config file for bthidd. For hcsecd I added following definition into /etc/bluetooth/hcsecd.conf: device {bdaddr 00:07:61:e6:bb:79; name "Logitech Bluetooth Keyboard"; key nokey; pin "9680"; } Configuration ended with bluetooth host definition in /etc/bluetooth/hosts, adding line: btkeyboard 00:07:61:e6:bb:79 Now I started daemons with /etc/rc.d/bthidd start /etc/rc.d/hcsecd start As I tested the keyboard already with Windows on the same machine, it was paired already, so I just need wait a bit until I got kbd2 at vkbd0 on console/in syslog and it works now, both keyboard and touchpad. Now I added hcsecd_enable="YES" bthidd_enable="YES" into /etc/rc.conf to start on reboot and that's it. When I turn on bluetooth module on my machine and bluetooth keyboard, it works. And now two small bugs. There is some resource leakage I think, I am getting more entries logged on console like this: kbd2 at vkbd0 kbd2 at vkbd1 kbd2 at vkbd2 kbd2 at vkbd3 kbd2 at vkbd4 This occures when I turn keyboard off and later on again. I have no other bluetooth keyboard here, so I think somehow link got broken and after re-connect new instance got created, but system should note it's the same device (uses the same address) and reuse the first one... Second, I am getting repeatedly logged in syslog Got short message (1 bytes) on Interrupt channel from 00:07:61:e6:bb:79 Maybe it's just cosmetic, but it repeats too often for me. What I would like to be able, but do not know now, is using additional keys on this keyboard. It was designed for PlayStation3, the kayes are on top left, labelled Menu, <<, >/||, >> and BD-DVD menu. I appended device definition to this message, maybe someone could decipher it and recommend something to try... Thank for work on bluetooth stack, hopefully my summary could be usefull for someone else, even if it turns out to be really simple... Regards, Milan /etc/bluetooth/bthidd.conf device { bdaddr 00:07:61:e6:bb:79; control_psm 0x11; interrupt_psm 0x13; reconnect_initiate true; battery_power false; normally_connectable false; hid_descriptor { 0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01 0x29 0x08 0x15 0x00 0x25 0x01 0x75 0x01 0x95 0x08 0x81 0x02 0x05 0x01 0x09 0x30 0x09 0x31 0x16 0x01 0xf8 0x26 0xff 0x07 0x75 0x0c 0x95 0x02 0x81 0x06 0x09 0x38 0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x01 0x81 0x06 0x05 0x0c 0x0a 0x38 0x02 0x81 0x06 0x05 0x09 0x19 0x09 0x29 0x10 0x15 0x00 0x25 0x01 0x95 0x08 0x75 0x01 0x81 0x02 0xc0 0xc0 0x05 0x01 0x09 0x06 0xa1 0x01 0x85 0x01 0x75 0x01 0x95 0x08 0x05 0x07 0x19 0xe0 0x29 0xe7 0x15 0x00 0x25 0x01 0x81 0x02 0x95 0x01 0x75 0x08 0x81 0x03 0x95 0x01 0x75 0x08 0x91 0x03 0x95 0x06 0x75 0x08 0x15 0x00 0x26 0xff 0x00 0x05 0x07 0x19 0x00 0x29 0xff 0x81 0x00 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 0x85 0x03 0x75 0x10 0x95 0x02 0x15 0x01 0x26 0xff 0x02 0x19 0x01 0x2a 0xff 0x02 0x81 0x60 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 0x85 0xac 0x05 0x01 0x09 0x06 0xa1 0x02 0x05 0x06 0x09 0x20 0x15 0x00 0x25 0xff 0x75 0x08 0x95 0x01 0x81 0x02 0xc0 0xc0 0x05 0x01 0x09 0x80 0xa1 0x01 0x85 0x04 0x15 0x00 0x25 0x01 0x75 0x01 0x95 0x01 0x09 0x82 0x81 0x02 0x95 0x01 0x75 0x07 0x81 0x03 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 0x85 0xad 0x05 0x01 0x09 0x06 0xa1 0x02 0x06 0x00 0xff 0x25 0x01 0x75 0x01 0x95 0x02 0x0a 0x03 0xfe 0x0a 0x04 0xfe 0x81 0x02 0x95 0x06 0x81 0x03 0xc0 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 0x85 0xff 0x05 0x06 0x15 0x00 0x25 0x02 0x95 0x01 0x75 0x02 0x19 0x24 0x29 0x26 0x81 0x40 0x75 0x06 0x81 0x01 0xc0 0x06 0x00 0xff 0x09 0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95 0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01 0x81 0x00 0x09 0x01 0x91 0x00 0xc0 }; }