Thursday, November 17, 2005

Griffin AirClick USB + Linux?

I just purchased a Griffin AirClick USB. The application that powers it is a .NET application, so it should run under Mono, right? Well, not quite. Let's look at what I found.

The application itself doesn't do much- it delegates from a USB driver (I'll come back to this) to one of a set of plugins (these are .NET DLLs renamed with the extension "acp". They can be manipulated just like DLLs). The plugins then do something based on the button pushes. The Windows version comes with Interop.PowerPoint.dll and Interop.iTunesLib.dll, which the PowerPoint and iTunes plugins use to delegate to the applications. Thus, the flow of information seems to be: USB to delegate application to plugin to target application. The problem in porting this to Linux is the USB part. The application includes, compiled into the AirClick.exe assembly, the USBSharp class found here, which in turn makes explicit reference to kernel32.dll. Specifically, the file handle and HID device APIs seem to be used. I'm not too good at .NET hacking, so I can't go too much further on this front.

Assuming I can find some way of getting AirClick.exe to recognize the Linux USB stack, what next? Well, in order to be useful, you have to control something. If, for instance, you use it for controlling music, could you control a Mono music player like Banshee? If you want presentation control, use the CLI-UNO bindings to control OpenOffice.org. I now just have to find the API for the plugins...