
Notes on the meaning of protocol bits
We’ve received a lot of questions on whether Apple multitouch products will be supported in Ubuntu 10.10. I’m pleased to say that all of the currently available products will have some support:
- Magic Mouse
- Magic Trackpad
- iPhone
- iPod
- iPad
- Macbook, Macbook Air, and Macbook Pro with multitouch touchpads
I’ve written an App for iOS, Remotux, that sends mouse and keyboard input to Ubuntu, and I will be bringing full multitouch support to it. But this post is about the trackpad. The Magic Trackpad has been out a few weeks now, and it just so happens that I received one last week. I started hacking on it yesterday by analyzing the protocol using the PacketLogger utility that ships with Apple’s OS X SDK. I was able to decode the protocol by comparing reams of data generated by the device and looking for patterns. I found that the protocol is similar to the Magic Mouse protocol, but a little different. The Magic Mouse protocol is six bytes of data followed by N x 8 bytes of touch data for N touches active on the surface of the mouse. The Magic Trackpad protocol is four bytes of data followed by N x 9 bytes of touch data. The difference is that the mouse has two relative axes due to its mouse nature, while the trackpad has a higher range of values across its surface in both the X and Y axes. I’m currently testing patches to the hid-magicmouse driver. For those interested, the patches can be found in git://kernel.ubuntu.com/cndougla/ubuntu-maverick.git in the magictrackpad branch. With these patches, I’ve been able to use the trackpad with both synaptics and Ubuntu’s hacked up gevdev X input modules.