Sunday, February 17, 2013

Using an Android device as a USB GPS mouse with GPSd

I was wondering if there was an easy way to use an Android phone as a GPS mouse on a Ubuntu laptop (via USB). The method that I came up with is as follows:

1.       Steps to use ShareGPS BETA via USB:
a.       Download the Android SDK tools for linux
                                                               i.      Click “use an existing IDE” to download SDK Tools
                                                             ii.      Follow directions at http://ubuntuforums.org/showthread.php?t=1918512
                                                            iii.      After step 1, `sudo mv ~/android-sdk-linux /opt/android-sdk-linux`
                                                           iv.      Instead of step 2 do the following: `ln –s /opt/android-sdk-linux/platform-tools/adb /usr/bin/adb`
b.      Download the ShareGPS script
                                                               i.      Edit line 13 of files/adb_gps_usb to `ADB=/opt/android-linux-sdk/platform-tools/adb`
                                                             ii.      `sudo su`
                                                            iii.      `apt-get install nmap
                                                           iv.      `./install.sh`
c.       In the ShareGPS app, enter the settings menu and untick “use Bluetooth” and tick “use USB”.
                                                               i.      Consult http://sharedroid.jillybunch.com/user_linux.html if you have issues


This seems to work just fine in my limited testing. The ShareGPS app does seem to be a little buggy at times, so if your laptop supports Bluetooth, finding a more stable Bluetooth GPS Tethering app may be a better option for you.