From owner-freebsd-bluetooth@freebsd.org Sun Aug 9 19:45:15 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 58C7E99D353 for ; Sun, 9 Aug 2015 19:45:15 +0000 (UTC) (envelope-from plunky@ogmig.net) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:c:538::195]) (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 1E141FDD for ; Sun, 9 Aug 2015 19:45:14 +0000 (UTC) (envelope-from plunky@ogmig.net) Received: from mfilter29-d.gandi.net (mfilter29-d.gandi.net [217.70.178.160]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id C51F8A80B4; Sun, 9 Aug 2015 21:45:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter29-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter29-d.gandi.net (mfilter29-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id vi8Gog80L1Oz; Sun, 9 Aug 2015 21:45:10 +0200 (CEST) X-Originating-IP: 31.69.64.51 Received: from galant.ogmig.net (unknown [31.69.64.51]) (Authenticated sender: plunky@ogmig.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 1CF56A80B1; Sun, 9 Aug 2015 21:45:08 +0200 (CEST) Received: by galant.ogmig.net (Postfix, from userid 1000) id B5C8F26026A; Sun, 9 Aug 2015 20:47:06 +0100 (BST) Date: Sun, 9 Aug 2015 20:47:06 +0100 (BST) From: Iain Hibbert To: Stari Karp , freebsd-bluetooth@freebsd.org Subject: Re: Apple Magic Mouse In-Reply-To: <1437909200.57929.3.camel@yandex.com> Message-ID: References: <1437909200.57929.3.camel@yandex.com> 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: Sun, 09 Aug 2015 19:45:15 -0000 On Sun, 26 Jul 2015, Stari Karp wrote: > I am using bluetooth Apple Magic Mouse and it works but the problem is > because works just a left and right click. I search a little and I found > that NetBSD has a driver for Magic mouse which has more functions > (http://netbsd.gw.com/cgi-bin/man-cgi?btmagic+4+NetBSD-current). > > Is it possible to use their driver on FreeBSD, please or FreeBSD > planning to improve Magic Mouse driver? What you see on FreeBSD is that the Magic Mouse works as a normal mouse, without any of the touch screen thing. I guess in X you can emulate a middle click by chording (though I don't remember if the mouse will send a left-and-right click event in basic mode). I'd say that using the NetBSD driver (I am the author) is not really possible on FreeBSD, since FreeBSD does things related to Bluetooth HIDs differently. It should be simple enough to add the Magic Mouse handling to the bthidd(8) daemon though, but I don't know how easy that would be, or a separate daemon could be written instead. The way I worked the identification in NetBSD, was that when configuring a HID device, I checked the descriptor as normal and also the Manufacturer/Product ID via the PNP profile. When the latter matched the Apple Magic Mouse, then it just attaches a different driver. The Magic Mouse then needs an initialization command to be sent via the standard HID protocol "SET_REPORT(FEATURE, 0xd7) = 0x01" once connected to enable the special extra functionality that it provides. regards, iain