From owner-freebsd-bluetooth@FreeBSD.ORG Fri May 12 01:57:47 2006 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38ACF16A408 for ; Fri, 12 May 2006 01:57:47 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E4A543D49 for ; Fri, 12 May 2006 01:57:46 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.21] (andersonbox1.centtech.com [192.168.42.21]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k4C1vjA1075199; Thu, 11 May 2006 20:57:45 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4463EB9B.8070304@centtech.com> Date: Thu, 11 May 2006 20:57:47 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.2 (X11/20060506) MIME-Version: 1.0 To: Sean McNeil References: <1147384638.88133.4.camel@triton.mcneil.com> In-Reply-To: <1147384638.88133.4.camel@triton.mcneil.com> Content-Type: multipart/mixed; boundary="------------090207040400060100090102" X-Virus-Scanned: ClamAV 0.87.1/1459/Thu May 11 15:46:49 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: bluetooth@freebsd.org Subject: Re: Setting up a bluetooth mouse on FreeBSD 6 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: Fri, 12 May 2006 01:57:47 -0000 This is a multi-part message in MIME format. --------------090207040400060100090102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sean McNeil wrote: >>From previous emails, I found: > > Eric Anderson's blog at > http://destari.blogspot.com/2006/01/setting-up-bluetooth-mouse-on-freebsd.html > > I did this and my mouse works, but unfortunately the middle and right > mouse buttons are reversed. This is a bluetooth mouse I got with my > Acer Ferrari lapop. Movement isn't quite as smooth as a USB mouse > either, but it isn't that bad. > > Another odd thing here is that bluetooth is enabled in the standard > build of -CURRENT, but bthidd and bthidcontrol are not. Will these be > added in anytime soon? There is a patch to bthidd (check gnats, but I've attached the one I found) to fix that. I'm not sure what Max's plans are to commit or not, but it's a needed patch for sure. I think (but I'm nobody) that bthidd and bthidcontrol should be enabled on current for greater exposure, and then enabled on -STABLE. I've been using it for quite some time, and it's been very solid. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ --------------090207040400060100090102 Content-Type: text/x-patch; name="bthidd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bthidd.patch" Index: hid.c =================================================================== RCS file: /alt/ncvs/src/usr.sbin/bluetooth/bthidd/hid.c,v retrieving revision 1.2 diff -u -u -r1.2 hid.c --- hid.c 18 Nov 2004 18:05:15 -0000 1.2 +++ hid.c 5 May 2006 18:55:52 -0000 @@ -130,6 +130,8 @@ mouse_x, mouse_y, mouse_z, mouse_butt, mevents, kevents; +#define HID_BUT(i) ((i) < 3 ? (((i) ^ 3) % 3) : (i)) + assert(s != NULL); assert(s->srv != NULL); assert(data != NULL); @@ -216,7 +218,7 @@ break; case HUP_BUTTON: - mouse_butt |= (val << (usage - 1)); + mouse_butt |= (val << HID_BUT(usage - 1)); mevents ++; break; --------------090207040400060100090102--