While working on yet another GPS timestamp bug (see ticket #139 for
details), I also looked into the gpsd code and documentation.
I found a newsgroup post in which someone asked about the possibilities
of porting gpsd to Android, but nothing particular seems to have come
out of it yet. And frankly, I don't much like the idea of running a TCP
listener (gpsd) on a smart phone which happily returns my coordinates to
anyone who asks: Unless extra security is in place, anyone from the
Internet might just connect to the gpsd on my phone and locate me within
a few meters.
Looking deeper, I came across the documentation for the gpsd service
library (libgspd) at . It's the interface which gpsd uses internally
to talk to the various GPSes, and its interface looks functionally
similar to the one exposed by gps_freerunner.c - initialization,
activation, deactivation, polling and handling returned data.
With that, we might be able to use a fork of gpsd for the Android GPS
interface. gps_freerunner.c would be rewritten into a simple translation
layer, which would pass all calls to libgpsd and return data it gets
from there. No TCP daemon on top of that - we would just bypass that
layer. (Anyone who really wants to run a full-blown gpsd could still do
that on top of the same client library).
- this approach would be portable across many Android devices - other
Android projects could use the exact same code, which would increase the
developer base of that code
- gpsd has a mature code base, and any GPS hardware issues we encounter
may already be solved there (chances are the Openmoko guys came across
it before we did)
- if we ever port the code to a future GTAxx generation using a
different GPS, in the best case it means zero effort (if the GPS is
already supported by GPSD); in the worst case (unsupported GPS) we can
still work together with Openmoko (same library, same hardware) rather
than duplicating efforts
- maybe (not sure about this one, though) this would work even with
Bluetooth GPS devices - transparently, apps wouldn't see a difference
- I have no idea if anyone has ever compiled gpsd for Android. Despite
being built on top of a Linux kernel, Android is not a full-blown Linux
system - some libraries may be missing and the kernel has some
modifications in it. All of this may or may not have repercussions on gpsd.
Honestly, though - my work on #139 is at a point at which just a few
routine steps are missing, so for this time, unless I encounter some
unforeseen obstacles and/or additional bugs, I'll carry on with the code
we have and keep this as an idea in case I need to touch the code again.
Input is still welcome - has anyone ever tried to get gpsd components to
run on Android? Successfully?
>  http://gpsd.berlios.de/libgpsd.html
Implement using ioctl
To unsubscribe from this group and stop receiving emails from it, send an email to android-on-freerunner+unsub...@googlegroups.com.
Just use an internal tcdrain within your own program / library.
Sent from my Android
You received this message because you are subscribed to the Google Groups "android-on-freerunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-on-freer...@googlegroups.com.