20140809

Getting the LeapReader to work in Linux...sort of

I'm going to document briefly what I did, and what the problems appear to be.

TL&DR:  Remove usb_storage, blacklist it, reboot, remove it again if necessary, use VirtualBox and connect the device to a Windows VM.  Profit.

Firstly, LeapReader is a Windows-compatible thing, along with its godforsaken software.  It's NOT Linux-compatible, in any sense of the word, and let's just assume it will never be.  The developers Just Don't F-ing Care.

Not a problem, though, if you have VirtualBox to install a Windows virtual machine.  You might even be able to find some VM images from Microsoft themselves - I seem to remember them publishing images for sake of testing software against older versions.  In my case, I have a (legit) licensed copy, because unfortunately LeapFrog is not the only company that hates developing for Linux.

On the metal I'm running Linux Mint 16.  It's stocked with 3.11 for a kernel and version 204 of UDEV.  That last number will become relevant shortly.  Now, you can get LeapReader talking to the Windows VM, and VirtualBox makes that easy.  The hard part is getting LeapFrog Connect to talk to it.  And, in all honesty, I am forced to conclude it's not Connect's fault.

The problems start when UDEV and the kernel decide to try to investigate the device as a USB storage device.  Bad News.  My educated guess is that the kernel's attempts (and verbose failures, from the looks of dmesg) drive the LeapReader into a sort of temporary insanity...after which it won't talk successfully to the LeapFrog Connect program.

I tried, and tried, and tried in vain to get UDEV to stop messing around with the device.  BUT, someone somewhere removed pretty much all the commonly-known features for the commonly-published solutions.  In other words, ignore_device doesn't work, and last_rule is worthless.  At least, so far as my testing has gone.  Someone else might have better luck, and frankly I'm out of time to mess with it.

What I DID get working was to remove the usb_storage module.  I also had to blacklist it.  Strangely, Mint will load this device on boot even though it's blacklisted in modprobe.d.  At least doing an rmmod on the command line will take care of that for the current session.

It is vitally important that the device be disconnected when you remove the usb_storage module.  If usb_storage twiddles with the LeapReader, game over.  Once you are able to connect LeapReader and see nothing but basic USB interactions (no drive-style access) in the kern.log, you're good to connect the device through VirtualBox to Windows.

In the future I would very much like to make this work correctly.  Ideally, UDEV should be instructed not to fiddle with the device, and/or to represent it as anything BUT a USB storage device.  If I could even achieve the latter, I would be happy.  Unfortunately I don't know enough about the relevant subsystems to make it happen.

But, you too can now make the LeapReader work.  All you need is Windows and a whole lot of patience...and possibly an indestructible keyboard.