1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<table class="head">
<tr>
<td class="head-ltitle">BTMAGIC(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">BTMAGIC(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">btmagic</code> — <span class="Nd">Apple
Magic Mouse and Apple Magic Trackpad</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">btmagic* at bthub?</code>
<br/>
<code class="Cd">wsmouse* at btmagic?</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">btmagic</code> driver provides support for
the Bluetooth “Magic Mouse” and “Magic Trackpad”
from Apple, Inc. As remote devices cannot be discovered by autoconfig,
configuring a mouse is normally carried out with the
<a class="Xr">btdevctl(8)</a> program.</p>
<p class="Pp">The Magic Mouse and Magic Trackpad use the standard USB Human
Interface Device protocol to communicate, but do not provide a proper HID
Descriptor, and require specific initializations to enable the proprietary
touch reports.</p>
<p class="Pp">The Magic Mouse provides basic mouse functionality with two
buttons, and the <code class="Nm">btmagic</code> 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
<a class="Xr">sysctl(8)</a> 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.</p>
<p class="Pp">The Magic Trackpad provides multi touch functionality and one
button. The <code class="Nm">btmagic</code> driver emulates 3 buttons by
splitting the area at the bottom of the device in 3 equal zones and detects
finger presence in one of these zones when the button is pressed. In
addition, a tap in any area of the trackpad is interpreted as a left click.
The timeout for tap detection defaults to 100ms and is adjustable with
<a class="Xr">sysctl(8)</a>.</p>
<p class="Pp">Pointer movement is reported for single-touch movements over the
device, and scroll is reported for multi-touch movements.</p>
<p class="Pp">The trackpad has a base resolution of 1300dpi, which the driver
scales by default to a less sensitive 650dpi, but this is adjustable with
<a class="Xr">sysctl(8)</a> along with the additional downscale factor
applied to scroll movements.</p>
<p class="Pp"><code class="Nm">btmagic</code> interfaces to the system as usual
through the <a class="Xr">wsmouse(4)</a> driver, and the following
properties are used during autoconfiguration:</p>
<dl class="Bl-tag">
<dt>vendor-id</dt>
<dd>Must be 0x05ac.</dd>
<dt>product-id</dt>
<dd>Must be 0x030d or 0x030e.</dd>
<dt>local-bdaddr</dt>
<dd>Local device address.</dd>
<dt>remote-bdaddr</dt>
<dd>Remote device address.</dd>
<dt>link-mode</dt>
<dd>This optional string represents the link mode of the baseband link, and
may be one of ‘auth’, ‘encrypt’, or
‘secure’.</dd>
</dl>
<p class="Pp">When the <code class="Nm">btmagic</code> 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 ‘0000’ during the pairing process.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">bluetooth(4)</a>, <a class="Xr">bthub(4)</a>,
<a class="Xr">wsmouse(4)</a>, <a class="Xr">btdevctl(8)</a>,
<a class="Xr">sysctl(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">btmagic</code> driver was written by
<span class="An">Iain Hibbert</span> with reference to the Linux driver
written by <span class="An">Michael Poole</span>. <span class="An">Manuel
Bouyer</span> added Magic Trackpad support, with reference to the Linux
driver written by <span class="An">Michael Poole</span> and
<span class="An">Chase Douglas</span>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">July 4, 2015</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|