Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Apple Magic Mouse driver

On Sat, 15 May 2010, Iain Hibbert wrote:

> I wrote a driver for the Apple Magic Mouse, as the protocol was mostly
> decoded by a Linux developer, and Somebody was kind enough to send me
> one..
> The mouse itself is a wireless Bluetooth mouse and operates with the USB
> HID protocol much like other mice, but it doesn't provide a proper
> descriptor and requires features to be activated and special
> interpretations of the touch surface reports, so doesn't fit exactly into
> our HID framework, which configures independent sub-devices to report id's
> from the descriptor.
> The driver interprets the touch reports to allow emulation of a middle
> mouse button (for mulitple firm touches detected), and horizontal and
> vertical scroll actions (for touches moving over a certain distance). It
> works well on NetBSD-current and NetBSD-5 and the mouse is pretty slick.


I have committed this now. If you used a Magic Mouse with NetBSD using the
btms(4) driver already, you may need to update btdevct(8) and update the
stored plist as it now queries the PnP information for the vendor and
product IDs which are required for the btmagic(4) driver to match.

The commands to detach the btms(4) driver, query the mouse PnP Information
and reattach as btmagic(4) would be

  # btdevctl -a magic -d ubt0 -s HID -D
  # btdevctl -a magic -d ubt0 -s HID -q -A

(assuming that your Bluetooth controller was ubt0 and you already entered
the mouse BDADDR as 'magic' in /etc/bluetooth/hosts). You should see in
the output of btdevctl that the vendor and product IDs were found:

  vendor id: 0x05ac
  product id: 0x030d

(ignore the descriptor dump, it is sadly broken)


(have been ask to organise pullups to NetBSD-5 which I will do shortly but
its too late for 5.1 now)

Home | Main Index | Thread Index | Old Index