From owner-freebsd-bluetooth@FreeBSD.ORG Mon Nov 5 04:13:55 2007 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 8313216A417 for ; Mon, 5 Nov 2007 04:13:55 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 0F35313C480 for ; Mon, 5 Nov 2007 04:13:54 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1043306nfb for ; Sun, 04 Nov 2007 20:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=+2a80XUbkx/y2kibxr3835IMOcIMAlffiVcMa/pdg6w=; b=XV7+YsiRT+X0OmKGsN+VllNykcCrhX+7j5oP4y5LCZmPwKkgsnt3rjjs5v/7wBpS3t/5wC6gA8DGdprkA2Kl3u/nrohzNq9oqS79l7IjMTID/BCRWHoS+SWbbs7evK9YAcQ+rkVmzDcZt43x/7MZGeK37dr2QfqlScguJpTLpew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YEahBbNwjpdFJ5PC4lTs4JEUHyKDt506TmDqQofiHJSA4So4/eDzMWyHB7A1tevGNHz26l0uUEmQ+iMNx64rH/tUoOuRsZ3y1ULz3WtlLWHPIkD4sqUhTYtXA6HjW8/4PGG4g44MgYMprJlzvdOu5MGQyn+QdCBwvjaYlKpT2hQ= Received: by 10.86.91.12 with SMTP id o12mr263916fgb.1194236021912; Sun, 04 Nov 2007 20:13:41 -0800 (PST) Received: by 10.86.83.12 with HTTP; Sun, 4 Nov 2007 20:13:41 -0800 (PST) Message-ID: Date: Sun, 4 Nov 2007 21:13:41 -0700 From: "Maksim Yevmenkin" To: "Alexandre Sunny Kovalenko" In-Reply-To: <1194229790.861.5.camel@RabbitsDen> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <472DFCE2.2010707@coldhaus.com> <472E39A9.5090107@coldhaus.com> <1194229790.861.5.camel@RabbitsDen> Cc: Eric Millbrandt , freebsd-bluetooth@freebsd.org Subject: Re: bluetooth mouse/keyboard blues 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, 05 Nov 2007 04:13:55 -0000 On 11/4/07, Alexandre Sunny Kovalenko wrote: > > On Sun, 2007-11-04 at 14:47 -0700, Maksim Yevmenkin wrote: > > On 11/4/07, Eric Millbrandt wrote: > > > > > > > > > Maksim Yevmenkin wrote: > > > > Eric, > > > > > > > > i just tried apple keyboard with > > > > > > > > FreeBSD ant.private.org 7.0-CURRENT FreeBSD 7.0-CURRENT #4: Wed Sep 12 > > > > 20:40:41 PDT 2007 > > > > root@ant.private.org:/usr/obj/usr/src/sys/GENERIC i386 > > > > > > > > and it works just fine. granted, it almost a couple month old system, > > > > but bthidd(8) code has not changed in a while, so it still should > > > > work. i'm cvsup'ing RELENG_7 and will build it later. > > > > > > > > thanks, > > > > max > > > > > > > How did you pair the apple keyboard? I paired it initially with windows > > > xp, and put that passkey directly into hcsecd.conf. Is there a step > > > that I am missing? > > > > first of all, what you did is not going to work. pin code only used > > once - when pairing. after that link key is generated and stored. > > unless you store link key into the bluetooth device itself, each os > > will store link key someplace. the point is that this link key will > > only be known to the os that initiated the pairing. > > > > so you need to re-pair keyboard and device (or rather os). apple > > keyboard is tricky because it does not give any visual of when user > > should enter pin code. so, what i do is > > > > 1) make sure hcsecd is running and configured with pin for your keyboard > > > > 2) if bthidd is running - stop it > > > > 3) run as root "bthidcontrol -a keyboard_bd_addr forget" > > > > 4) start bthidd - this should cause bthidd to initiate connection to > > your keyboard. the later in turn will make keyboard to request the > > key. > > > > 5) because freebsd does not know about the link key you have created > > under windows xp, freebsd will reject that link request and will > > request pin code > I have vague recollection that I had to remove /var/db/hcsecd.keys or > some such thing after pairing my keyboard with the Windows incarnation > of my laptop, so FreeBSD will generate new link key. However, now I do > not see such file in /var/db. Was that thing of the past, or are there > some conditions to be met for it to exist? And if it still is around, > does it need to be removed or would "bthidcontrol -a keyboard_bd_addr > forget" be sufficient? bthidd(8) does not manage link keys, hcsecd(8) does that. bthidcontrol(8)'s 'forget' command will remove device from the 'known' list. this would force bthidd(8) to initiate connection to the device on next start. it may or may not be enough to cause re-pair. if you really want to remove link key for a device, you should remove it from /var/db/hcsecd.keys file. there is no utility to do that because this is not something that one would normally do. the whole dual-boot + re-using the same device is a big mess. if you really want to do it then you should either - program link keys into the device itself or - make sure both os'es use the same link key thanks, max > > -- > Alexandre "Sunny" Kovalenko > >