From owner-freebsd-bluetooth@freebsd.org Mon Sep 14 17:09:30 2015 Return-Path: Delivered-To: freebsd-bluetooth@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06AA8A031C6 for ; Mon, 14 Sep 2015 17:09:30 +0000 (UTC) (envelope-from plunky@ogmig.net) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:c:538::198]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B81911D79 for ; Mon, 14 Sep 2015 17:09:29 +0000 (UTC) (envelope-from plunky@ogmig.net) Received: from mfilter21-d.gandi.net (mfilter21-d.gandi.net [217.70.178.149]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 9633BFB87E; Mon, 14 Sep 2015 19:09:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter21-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter21-d.gandi.net (mfilter21-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 9CvaGqFy522T; Mon, 14 Sep 2015 19:09:23 +0200 (CEST) X-Originating-IP: 31.68.69.76 Received: from galant.ogmig.net (unknown [31.68.69.76]) (Authenticated sender: plunky@ogmig.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 34194FB882; Mon, 14 Sep 2015 19:09:22 +0200 (CEST) Received: by galant.ogmig.net (Postfix, from userid 1000) id 6EFD726026A; Mon, 14 Sep 2015 18:09:23 +0100 (BST) Date: Mon, 14 Sep 2015 18:09:23 +0100 (BST) From: Iain Hibbert To: Dirk Engling cc: "freebsd-bluetooth@freebsd.org" Subject: Re: Apple Magic Mouse In-Reply-To: <55F60ED8.8080203@erdgeist.org> Message-ID: References: <1437909200.57929.3.camel@yandex.com> <55F4362A.4050203@erdgeist.org> <55F60ED8.8080203@erdgeist.org> User-Agent: Alpine 2.11 (NEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2015 17:09:30 -0000 On Mon, 14 Sep 2015, Dirk Engling wrote: > On 12.09.15 19:53, Maksim Yevmenkin wrote: > > > i think it should be possible to teach bthidd to make another sdp > > request to pull device id sdp record (if available). if apple mouse > > answers it then it should very easy to identify it and enable all the > > features. > > Apples magic mouse indeed answers the SDP request for its Device ID > Service Record. > > Find attached a first patch that adds a vendor, product and version > member in the bthid_session object that is filled after both connections > for the session were attached. > > This is done in a new function session_get_devid that issues and handles > the SDP requests. > > There's also a new hid_initialise function, that gets a chance to take a > look at those new members and initialise devices based on those information. My advice is, to put that code in bthidcontrol, which already queries the device, and add product-id and vendor-id fields to the bthidd.conf file. that then solves your issue about the libsdp blocking read/write calls, since it knows the information before it starts. iain