[2008.8] TangoGPS/gpsd and suspend/resume
mwester at dls.net
Mon Sep 15 17:06:05 CEST 2008
Radek Bartoň wrote:
>>> BTW: What do you think is the best way to detect that GPS should be
>>> powered up after resume: seach for tangogps process or save GPS state in
>>> suspend.d script to some file (i. e. /var/run/gps_state) and enable GPS
>> IMHO it should save the state.
> I meant how should I regognize that GPS was on before suspend. Maybe clearer
> way may be ask on D-Bus (if such interface exists) and save that information
> to gconf?
The correct solution, IMO, would be to make the gps management service
(gpsd? gypsy? what are we using on the current images to read the serial
port data from the gps currently?) aware of suspend/resume. It should
then keep something that reflects the state of the GPS, and manage it.
That could easily be a file in /var.
Upon suspend, we wish only to send a signal to this process, and let it
figure out what to do. For example, this process would be the only one
that knows if we currently have a valid GPS position, and thus would be
the process that would determine if there is any current GPS chipset
state (agps data?) that is worth fetching before suspending.
Until that happens, a "slightly-better-than-nothing" solution might be
to test if the GPS is powered up or not at suspend. D-Bus would be
ideal to find this information, but a generic (and very fast) solution
would also be to peek inside /sys/... to read the poweron/off state for
[Note: The GPS on the GTA01 is very different than the GTA02, and you'll
almost certainly need completely different code (and perhaps algorithms
too) for the two of them.]
More information about the devel