.\" $NetBSD: btmagic.4,v 1.2 2010/10/11 15:15:57 plunky Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Iain Hibbert. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd October 11, 2010 .Dt BTMAGIC 4 .Os .Sh NAME .Nm btmagic .Nd Apple Magic Mouse .Sh SYNOPSIS .Cd "btmagic* at bthub?" .Cd "wsmouse* at btmagic?" .Sh DESCRIPTION The .Nm driver provides support for the .Tn Bluetooth .Dq Magic Mouse from .Tn Apple, Inc . As remote devices cannot be discovered by autoconfig, configuring a mouse is normally carried out with the .Xr btdevctl 8 program. .Pp The Magic Mouse uses the standard .Tn USB Human Interface Device protocol to communicate, but does not provide a proper HID Descriptor, and requires specific initializations to enable the proprietary touch reports. .Pp The Magic Mouse provides basic mouse functionality with two buttons, and the .Nm driver additionally interprets the touch reports to emulate a middle mouse button when more than one firm touch is detected during a click event, plus horizontal and vertical scrolling for touch movements greater than a certain distance. The mouse has a base resolution of 1300dpi, which the driver scales by default to a less sensitive 650dpi, but this is adjustable with .Xr sysctl 8 along with the pressure needed to discern a firm touch, the minimum distance necessary to trigger scrolling and the additional downscale factor applied to scroll movements. .Pp .Nm interfaces to the system as usual through the .Xr wsmouse 4 driver, and the following properties are used during autoconfiguration: .Bl -tag -width ".It remote-bdaddr" .It vendor-id Must be 0x05ac. .It product-id Must be 0x030d. .It local-bdaddr Local device address. .It remote-bdaddr Remote device address. .It link-mode This optional string represents the link mode of the baseband link, and may be one of .Sq auth , .Sq encrypt , or .Sq secure . .El .Pp When the .Nm driver has configured, it will attempt to open a connection to the mouse and, if this fails or the connection is lost, will wait for the mouse to initiate connections. The Magic Mouse requires connections to be authenticated, and should accept a PIN of .Sq 0000 during the pairing process. .Sh SEE ALSO .Xr bluetooth 4 , .Xr bthub 4 , .Xr wsmouse 4 , .Xr btdevctl 8 , .Xr sysctl 8 .Sh HISTORY The .Nm driver was written by .An Iain Hibbert with reference to the .Tn Linux driver written by .An Michael Poole .