Using the Garmin Edge 305 and VirtualBox
The Garmin Edge 305 is a really cool bike computer which includes GPS features to map rides in addition to the typical speed and mileage information. I recently picked one up and am looking into getting it working under Linux.
Before I explore my Linux options, I wanted to see what the Garmin Training Center Software was like under Windows. I run Windows XP within a VirtualBox virtual machine which is running on top of my Ubuntu Gutsy OS. Getting USB devices to work with virtual machine guests is not simple, so I thought I’d share the resources I used to get it working.
First, to set up the USB system requirements that VirtualBox needs on Ubuntu Gutsy, you need to follow this guide. It will walk you through creating a separate group for USB access and enabling the usbfs support which is disabled by default in Gutsy.
Once you’ve done that, follow the remaining steps in that guide to configure your VirtualBox XP guest to access the Garmin’s USB device ID. By this point you will then almost be able to access the device fully within the WinXP guest by right-clicking on the VirtualBox USB icon and checking the Garmin USB device. Unfortunately this isn’t enough to trigger the Garmin gStart daemon.
To resolve this final problem, open up the Windows XP device manager (right-click My Computer->Properties and select the Hardware tab). Within the device manager you need to disable and then re-enable the Garmin USB GPS device, and gStart will properly detect the connection event and allow you to access the device from the Training Center software.
That’s the magic incantation you need to get this device working properly using a VirtualBox VM.
Update 2009-07-25: There is a better way you can automate the restarting of the Garmin device. Check out these instructions for details – they worked great for me. And thanks riaan for the tip!