Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2009 00:49:54 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        freebsd-bluetooth@dino.sk
Cc:        freebsd-bluetooth@FreeBSD.org
Subject:   Re: Keyboard - how?
Message-ID:  <20091227.004954.119882392218644339.imp@bsdimp.com>
In-Reply-To: <200912270746.59264.freebsd-bluetooth@dino.sk>
References:  <20091226.231514.519459540419527384.imp@bsdimp.com> <200912270746.59264.freebsd-bluetooth@dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200912270746.59264.freebsd-bluetooth@dino.sk>
            Milan Obuch <freebsd-bluetooth@dino.sk> writes:
: On Sunday 27 December 2009 07:15:14 M. Warner Losh wrote:
: > OK.  I must be pathologically dense...
: >
: > I've tried to get my apple mini keyboard working with my machine.  I'm
: > so close.  I'm getting the following messages on the console:
: >
: > kbd2 at vkbd16
: > kbd2 at vkbd17
: > kbd2 at vkbd18
: > kbd2 at vkbd19
: > kbd2 at vkbd20
: > kbd2 at vkbd21
: > kbd2 at vkbd22
: > kbd2 at vkbd23
: > kbd2 at vkbd24
: >
: > but don't know what to do next.  Typing on the keyboard doesn't do a
: > dang thing.  Oh, while typing this message, I have a few more:
: >
: > kbd2 at vkbd25
: > kbd2 at vkbd26
: > kbd2 at vkbd27
: > kbd2 at vkbd28
: > kbd2 at vkbd29
: >
: > What's up?
: >
: > Warner
: >
: 
: Could you describe what you did to get this far? In my case, I have a Logitech 
: Cordless MediaBoard Pro keyboard (details could be found at 
: http://www.logitech.com/index.cfm/gaming/playstation_3/keyboards/devices/3616&cl=za,en). 
: 
: I see similar behavior, but only in connection with keyboard being switched 
: off and on. I did report this problem here at 08:46, 22.05.2009, but no 
: response.
: 
: This does not help you probably, but you are not alone, at least :) I can try 
: it again, if it works for me, still - I did at least in 7.2 then.

Here's a thumbnail:

Added my device to /etc/bluetooth/hosts:

00:1d:4f:a6:c0:ed mac-kbd

Added entries to bthidd.conf generated by the "bthidcontrol -a mac-kbd
query" command:

device {
	bdaddr			00:1d:4f:a6:c0:ed;
	control_psm		0x11;
	interrupt_psm		0x13;
	reconnect_initiate	true;
	battery_power		false;
	normally_connectable	true;
	hid_descriptor		{
		0x05 0x01 0x09 0x06 0xa1 0x01 0x85 0x01 
		0x05 0x07 0x19 0xe0 0x29 0xe7 0x15 0x00 
		0x25 0x01 0x75 0x01 0x95 0x08 0x81 0x02 
		0x75 0x08 0x95 0x01 0x81 0x01 0x75 0x01 
		0x95 0x05 0x05 0x08 0x19 0x01 0x29 0x05 
		0x91 0x02 0x75 0x03 0x95 0x01 0x91 0x01 
		0x75 0x08 0x95 0x06 0x15 0x00 0x26 0xff 
		0x00 0x05 0x07 0x19 0x00 0x2a 0xff 0x00 
		0x81 0x00 0xc0 0x05 0x0c 0x09 0x01 0xa1 
		0x01 0x85 0x47 0x05 0x01 0x09 0x06 0xa1 
		0x02 0x05 0x06 0x09 0x20 0x15 0x00 0x26 
		0xff 0x00 0x75 0x08 0x95 0x01 0x81 0x02 
		0xc0 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 
		0x85 0x11 0x15 0x00 0x25 0x01 0x75 0x01 
		0x95 0x03 0x81 0x01 0x75 0x01 0x95 0x01 
		0x05 0x0c 0x09 0xb8 0x81 0x02 0x06 0xff 
		0x00 0x09 0x03 0x81 0x02 0x75 0x01 0x95 
		0x03 0x81 0x01 0x05 0x0c 0x85 0x12 0x15 
		0x00 0x25 0x01 0x75 0x01 0x95 0x01 0x09 
		0xcd 0x81 0x02 0x09 0xb3 0x81 0x02 0x09 
		0xb4 0x81 0x02 0x09 0xb5 0x81 0x02 0x09 
		0xb6 0x81 0x02 0x81 0x01 0x81 0x01 0x81 
		0x01 0x85 0x13 0x15 0x00 0x25 0x01 0x75 
		0x01 0x95 0x01 0x06 0x01 0xff 0x09 0x0a 
		0x81 0x02 0x75 0x01 0x95 0x07 0x81 0x01 
		0x85 0x09 0x09 0x0b 0x75 0x08 0x95 0x01 
		0xb1 0x02 0x75 0x08 0x95 0x02 0xb1 0x01 
		0xc0 
	};
}

Added an entry to the hhcsecd.conf file:

device {
        bdaddr  00:1d:4f:a6:c0:ed;
        name    "Apple Kbd";
        key     nokey;
        pin     "9876";
}

and added the following to /etc/rc.conf:

#
# Bluetooth
#
hcsecd_enable=YES
sdpd_enable=YES
bthidd_enable=YES

rebooted a few times.  The error in the logs looks like:

Dec 27 00:45:32 lighthouse bthidd[638]: Opening outbound session for 00:1d:4f:a6:c0:ed (new_device=1, reconnect_initiate=1)
Dec 27 00:45:32 lighthouse kernel: kbd2 at vkbd289
Dec 27 00:45:37 lighthouse bthidd[638]: Could not connect to 00:1d:4f:a6:c0:ed. Host is down (64)
Dec 27 00:45:52 lighthouse bthidd[638]: Opening outbound session for 00:1d:4f:a6:c0:ed (new_device=1, reconnect_initiate=1)
Dec 27 00:45:52 lighthouse kernel: kbd2 at vkbd290
Dec 27 00:45:57 lighthouse bthidd[638]: Could not connect to 00:1d:4f:a6:c0:ed. Host is down (64)

sure hope that vkbd290 isn't going to run me out of memory :)

Sure wish there was a way to say "I'd like to know what I've paired
with please"...

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091227.004954.119882392218644339.imp>