2

I have an goo' ol' Garmin 60csx device with excellent GPS reception. I can connect via USB to a host and provide GPS information this way -- the interface menu allows to send the NMEA data with 4800 baud over USB.

On the other hand I have an Android Tablet running 4.1.2 (rooted/CyanoMod) with very poor GPS quality. In the config I find "GPS source" with the only option "internal". A pity, I would like to use the NMEA data incoming over USB.

I can find plenty of apps that allow the use of Bluetooth GPS receiver, which is close, but not totally. Is no one using USB anymore?

Is there any app that allows me to use the USB GPS device?

And if not, it can't be that difficult to write a program recieving the NMEA data -- I did that with Python once. Then I would need to send it to the Android OS. Where is the lever here?

towi
  • 21,587
  • 28
  • 106
  • 187
  • 1
    You have two problems: First getting the tablet hardware and software stack to act as a USB host and speak the particular USB-serial protocol the GPS understands. Second, injecting the results into the Android stack. This will be possible or not possible depending on the details of the device, and if you are able to customize the android stack running on it (or what options it presents), or if you are locked out of changing that and confined to running builds signed by the maker. – Chris Stratton Apr 22 '13 at 14:50
  • @ChrisStratton Of course! Like those old proprietary crappy serial-to-usb bridge drivers I used to install on my PC. Gotcha. I thought those times were over, but now that you say it, its obvious. – towi Apr 22 '13 at 17:34

2 Answers2

2

If your device is running Honeycomb and above (Android 3.1 ~ Android 4.2+), then you can use the "UsbGPS4Honeycomb_MR1_alpha" app to get the USB GPS Receiver working. Please download it from here: http://forum.xda-developers.com/showpost.php?p=32851757&postcount=58

No Drivers etc needed on my Acer A500 running Android 4.03. Just install APK with a file manager, and enable "mock locations" in android developer settings. Then start application, enable, check settings, and test a mapping app. Gps programs will not show satellites but will show GPS location error (feet). Map apps will act normally. Shutting app down re-enables on board GPS without needing to change "mock locations" setting.

1

I've never done this before, but personally I would try setting up the sample BroadcastReceiver referenced below and see if I could get a connection going.

http://developer.android.com/guide/topics/connectivity/usb/host.html

Then I'd use getInterfaceProtocol() to see if I was able to get the expected protocol.

Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49