From owner-freebsd-bluetooth@FreeBSD.ORG Mon Nov 27 23:49:56 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79F1316A40F for ; Mon, 27 Nov 2006 23:49:56 +0000 (UTC) (envelope-from maksim.yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59762445EB for ; Mon, 27 Nov 2006 22:39:33 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 563BB3BE77; Mon, 27 Nov 2006 16:40:35 -0600 (CST) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03089-02-47; Mon, 27 Nov 2006 16:40:35 -0600 (CST) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id A2A933BE3F; Mon, 27 Nov 2006 16:40:34 -0600 (CST) Message-ID: <456B6961.10803@savvis.net> Date: Mon, 27 Nov 2006 14:40:33 -0800 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: Eric Anderson References: <20061126005413.0faaea7b@localhost> <1164502329.816.8.camel@RabbitsDen.RabbitsLawn.verizon.net> <456B292D.3000509@savvis.net> <456B43CC.1000107@centtech.com> <456B4888.5060903@savvis.net> <456B4FC6.7070805@centtech.com> In-Reply-To: <456B4FC6.7070805@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org, Jona Joachim Subject: Re: Support for Bluetooth Keyboards? 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: Mon, 27 Nov 2006 23:49:56 -0000 Eric Anderson wrote: > On 11/27/06 14:20, Maksim Yevmenkin wrote: >> Eric Anderson wrote: >>> On 11/27/06 12:06, Maksim Yevmenkin wrote: >>>> Alexandre "Sunny" Kovalenko wrote: >>>>> On Sun, 2006-11-26 at 00:54 +0100, Jona Joachim wrote: >>>>>> Hi! >>>>>> I wanted to know if Bluetooth keyboards are likely to work on >>>>>> FreeBSD. >>>>>> I'm looking at this marvellous object to be precise: >>>>>> http://www.thinkgeek.com/computing/input/8193/ >>>>>> >>>>>> They say that they "were able to get the Bluetooth Virtual Laser >>>>>> Keyboard to work with Mac OSX using the built-in bluetooth support in >>>>>> the OS." >>>> then it should work in releng_6 and -current. >>>> >>>>> I am running Apple Bluetooth keyboard on -CURRENT. I order to >>>>> accomplish >>>>> that, I have followed steps outlined by Eric Anderson here >>>>> >>>>> http://destari.blogspot.com/2006/01/setting-up-bluetooth-mouse-on-freebsd.html >>>>> >>>>> >>>>> There seems to be a quirk in the bthidd which causes it reattach >>>>> keyboard every couple of minutes, so I am accustomed to seeing vkbd >>>>>> 10000 being attached but these seem to be harmless enough. YMMV, >>>>> though. >>>> hmmm... i'd like to get more information on this. does this happen >>>> when you type on the keyboard? or when keyboard is idle? >>>> >>>> if this happens when the keyboard is idle, then, i'd guess, the >>>> keyboard simply kills the bluetooth connection to conserve battery. >>>> if bluetooth connection was in fact killed then bthidd(8) will close >>>> vkbd(4) device and it will, in turn, detach vkbd(4) keyboard. >>>> >>>> in any case, could you please get an hci dump (binary) when this >>>> happens and sent it to me? or could you please tell me how to >>>> reproduce this locally? >>> I see something like this too, but with mice. I use a microsoft >>> bluetooth explorer mouse, and when it disconnects and goes into >>> battery sleep mode, and then comes back, it registers a new vkbd >>> device. Here's some snippets: >> >> [...] >> >> hmm... could you please post hid descriptor from your microsoft >> bluetooth explorer mouse? > > # bthidcontrol -a msmouse dump > Collection page=Generic_Desktop usage=Mouse > Collection page=Generic_Desktop usage=Pointer > Input id=2 size=1 count=1 page=Button usage=Button_1 Variable, logical > range 0..1 > Input id=2 size=1 count=1 page=Button usage=Button_2 Variable, logical > range 0..1 > Input id=2 size=1 count=1 page=Button usage=Button_3 Variable, logical > range 0..1 > Input id=2 size=1 count=1 page=Button usage=Button_4 Variable, logical > range 0..1 > Input id=2 size=1 count=1 page=Button usage=Button_5 Variable, logical > range 0..1 > Input id=2 size=3 count=1 page=0x0000 usage=0x0000 Const, logical > range 0..1 > Input id=2 size=8 count=1 page=Generic_Desktop usage=X Variable > Relative, logical range -127..127 > Input id=2 size=8 count=1 page=Generic_Desktop usage=Y Variable > Relative, logical range -127..127 > Input id=2 size=8 count=1 page=Generic_Desktop usage=Wheel Variable > Relative, logical range -127..127 > Input id=2 size=8 count=1 page=Consumer usage=AC_Pan Variable > Relative, logical range -127..127 > End collection > Feature id=2 size=1 count=1 page=Generic_Desktop usage=0x004b Variable, > logical range 0..1 > Feature id=2 size=7 count=1 page=0x0000 usage=0x0000 Const, logical > range 0..1 > End collection > Collection page=Consumer usage=Consumer_Control > Collection page=Generic_Desktop usage=Mouse > Input id=3 size=2 count=1 page=Microsoft usage=0xfe01 Variable, > logical range 0..3 > Input id=3 size=1 count=1 page=Microsoft usage=0xfe00 Variable, > logical range 0..1 > Input id=3 size=5 count=1 page=0x0000 usage=0x0000 Const, logical > range 0..1 > End collection > End collection > Collection page=Consumer usage=Consumer_Control > Collection page=Generic_Desktop usage=Mouse > Input id=4 size=8 count=1 page=Consumer usage=AC_Pan Variable > Relative, logical range -127..127 > Feature id=4 size=1 count=1 page=Microsoft usage=0xff04 Variable, > logical range 0..1 > Feature id=4 size=1 count=1 page=Microsoft usage=0xff06 Variable, > logical range 0..1 > Feature id=4 size=1 count=6 page=0x0000 usage=0x0000 Const, logical > range 0..1 > End collection > End collection > > > # bthidcontrol -a msmouse query > device { > bdaddr 00:50:f2:e9:a1:f1; > control_psm 0x11; > interrupt_psm 0x13; > reconnect_initiate true; > battery_power true; > normally_connectable false; > hid_descriptor { > 0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02 > 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01 > 0x29 0x05 0x15 0x00 0x25 0x01 0x75 0x01 > 0x95 0x05 0x81 0x02 0x75 0x03 0x95 0x01 > 0x81 0x01 0x05 0x01 0x09 0x30 0x09 0x31 > 0x09 0x38 0x15 0x81 0x25 0x7f 0x75 0x08 > 0x95 0x03 0x81 0x06 0x05 0x0c 0x0a 0x38 > 0x02 0x95 0x01 0x81 0x06 0xc0 0x05 0x01 > 0x09 0x4b 0x15 0x00 0x25 0x01 0x75 0x01 > 0xb1 0x02 0x75 0x07 0xb1 0x01 0xc0 0x05 > 0x0c 0x09 0x01 0xa1 0x01 0x85 0x03 0x05 > 0x01 0x09 0x02 0xa1 0x02 0x06 0x00 0xff > 0x15 0x00 0x25 0x03 0x75 0x02 0x95 0x01 > 0x0a 0x01 0xfe 0x81 0x02 0x25 0x01 0x75 > 0x01 0x0a 0x00 0xfe 0x81 0x02 0x75 0x05 > 0x81 0x01 0xc0 0xc0 0x05 0x0c 0x09 0x01 > 0xa1 0x01 0x85 0x04 0x05 0x01 0x09 0x02 > 0xa1 0x02 0x05 0x0c 0x0a 0x38 0x02 0x75 > 0x08 0x95 0x01 0x15 0x81 0x25 0x7f 0x81 > 0x06 0x06 0x00 0xff 0x0a 0x04 0xff 0x0a > 0x06 0xff 0x15 0x00 0x25 0x01 0x75 0x01 > 0x95 0x02 0xb1 0x02 0x95 0x06 0xb1 0x01 > 0xc0 0xc0 > }; > } > > >> also, binary hci dump (that captures detach/reattach event) would be >> nice. > > Here: > http://users.centtech.com/~anderson/freebsd/bt-mouse-dump.raw beetle% fetch http://users.centtech.com/~anderson/freebsd/bt-mouse-dump.raw fetch: http://users.centtech.com/~anderson/freebsd/bt-mouse-dump.raw: Forbidden :( max > > and corresponding log messages: > > Nov 27 14:45:44 neutrino bthidd[833]: Remote device 00:50:f2:e9:a1:f1 > has closed interrupt connection > Nov 27 14:47:31 neutrino kernel: kbd1 at vkbd9 > Nov 27 14:47:31 neutrino bthidd[833]: Accepted control connection from > 00:50:f2:e9:a1:f1 > Nov 27 14:47:31 neutrino bthidd[833]: Accepted interrupt connection from > 00:50:f2:e9:a1:f1 > > > Eric > > > >