个人工具

UbuntuHelp:AppleMagicMouse

来自Ubuntu中文

跳转至: 导航, 搜索

There is a driver for this device that is still under development, you can download it from the following address: http://github.com/entrope/linux-magicmouse


README

This code contains a Linux kernel driver for the magic mouse. Please see the INSTALL file for directions on how to use it with your kernel. This code also contains three standalone programs: hid-parse reads one or more input files (specified on the command line) that contain hexadecimal-formatted HID report descriptors, and prints out human-readable text forms of the descriptors. It should be considered fairly complete and stable. mtalk talks to an Apple Magic Mouse (using L2CAP with the HID control and interrupt Protocol and Service Multiplexors [PSMs]) and prints human-readable forms of the messages that it receives. Typically the only command-line parameters you would pass are -r <BluetoothAddr>. It should be considered 85% complete. usb-bt-dump reads a text dump in the format generated by Linux's usbmon (e.g. /sys/kernel/debug/usb/usbmon/0u) to parse Bluetooth messages at various layers (HCI, L2CAP, etc) and print annotations with the parsed form. It is woefully incomplete and buggy and will probably not be maintained. I wrote usb-bt-dump first, followed by mtalk, followed by hid-parse. mtalk is the only one that I expect to modify going forward.

INSTALLING THE MAGICMOUSE DRIVER

The Magic Mouse driver for linux is a module named hid-magicmouse. Older kernels do not have all the hooks that a driver needs to talk to the Magic Mouse. These are provided in this directory; you must apply them and rebuild the kernel before you can load hid-magicmouse. To apply the patch series, change to your linux-2.6 directory, and run either:

  git apply *.patch

OR (in a Bourne shell, such as /bin/sh):

  for PATCH in *.patch ; do patch -p1 < $PATCH ; done

This series were cherry-picked from the HID and Bluetooth trees onto v2.6.32.8. They should be filtering from the HID and Bluetooth trees into the mainstream kernel between v2.6.33 and v2.6.34. This directory's hid-magicmouse.c should match the final result of applying the patches in sequence. You will obviously need to reboot into the new kernel before the module can be loaded, but at that point user-space should see it as a normal input device, including a(n emulated) scroll wheel and middle button. A great howto can be found here: http://ubuntuforums.org/showpost.php?p=8777663&postcount=21