[BACK]Return to btmagic.4 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man4

File: [cvs.NetBSD.org] / src / share / man / man4 / btmagic.4 (download)

Revision 1.2.2.2, Sun Nov 21 03:05:10 2010 UTC (13 years, 5 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.2.2.1: +113 -0 lines

Pull up following revision(s) (requested by plunky in ticket #1407):
	sys/dev/bluetooth/btdev.h: revision 1.9
	sys/arch/iyonix/conf/GENERIC: revision 1.60
	sys/arch/sparc64/conf/GENERIC: revision 1.129
	sys/dev/usb/hid.c: revision 1.30
	sys/dev/usb/hid.h: revision 1.13
	sys/arch/i386/conf/GENERIC: revision 1.983
	usr.sbin/btdevctl/print.c: revision 1.10
	sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.16
	sys/arch/alpha/conf/GENERIC: revision 1.337
	sys/dev/bluetooth/files.bluetooth: revision 1.14
	sys/arch/evbarm/conf/GUMSTIX: revision 1.49
	sys/dev/usb/usbdevs: revision 1.550
	sys/arch/evbppc/conf/OPENBLOCKS266_OPT: revision 1.14
	sys/arch/hpcsh/conf/GENERIC: revision 1.91
	sys/dev/bluetooth/btmagic.c: revision 1.1
	distrib/sets/lists/man/mi: revision 1.1210
	sys/arch/amd64/conf/GENERIC: revision 1.279
	sys/arch/i386/conf/ALL: revision 1.258
	sys/arch/amd64/conf/XEN3_DOM0: revision 1.54
	sys/arch/hpcarm/conf/JORNADA720: revision 1.78
	sys/dev/usb/hid.c: revision 1.29
	share/man/man4/btmagic.4: revision 1.1
hid_get_data() does not work if the size of data is less than
a byte and crosses a byte boundary, and it always returns a
sign-extended value.
fix this by using the algorithm from libusbhid to read bytes,
and provide a hid_get_udata() function to return unsigned data
values.
while here, const args
update DPRINTF to reflect actual function name
add Apple Magic Mouse product-id
regen for Magic Mouse id
allow for vendor-id and product-id properties, passing them
through to child devices
add Magic Mouse driver and manpage btmagic(4)
additionally query the "PnP Information" service record to discover
any USB Forum vendor-id and product-id values and store them in the
property list if found.
add btmagic(4) where other Bluetooth drivers are listed

.\" $NetBSD: btmagic.4,v 1.2.2.2 2010/11/21 03:05:10 riz 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 May 22, 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 .
.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
The Magic Mouse should be configured with the
.Xr btdevctl 8
program and
.Nm
interfaces to the system as usual through the
.Xr wscons 4
driver.
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.
.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 .