[Gta04-owner] gpsd software

Dr. H. Nikolaus Schaller hns at goldelico.com
Sun Dec 4 21:37:39 CET 2011


Am 04.12.2011 um 21:11 schrieb NeilBrown:

> On Sun, 4 Dec 2011 21:02:53 +0100 "Dr. H. Nikolaus Schaller"
> <hns at goldelico.com> wrote:
> 
>> 
>> Am 04.12.2011 um 01:28 schrieb Neil Jerram:
>> 
>>> I just wanted to point out that the latest gpsd (3.x) has a nice feature
>>> that I believe allows providing GPS on demand with no need for an
>>> "enable GPS" switch or something like "fsoraw -r GPS ...".
>>> 
>>> That is, it calls a hook script (/etc/gpsd/device-hook $DEVICE ACTIVATE)
>>> when the first client connects on the gpsd port, and similarly
>>> ((/etc/gpsd/device-hook $DEVICE DEACTIVATE) when the last client
>>> disconnects from that port.
>>> 
>>> For GTA04, I think that means we can put the commands to enable and
>>> disable GPS power into that script, and then just run gpsd all the time.
>> 
>> That is really a nice feature!
>> 
>> One thing we have to consider - the reset impulse for the
>> GPS module is a toggle switch. Each impulse toggles between
>> power on/standby. And the only method I know to detect
>> in which state it is is to check if there are NMEA records
>> on the serial line.
>> 
>> The GTA04 tester sends one impulse and waits up to 5 seconds
>> if there arrive NMEA records. If not, it sends another impulse.
>> 
>> I don't know if that can be done by this type scripts and gpsd.
>> 
> 
> This 'toggle' nature of the standby line makes it hard to write an 'rfkill'
> driver to powerup/powerdown the gps :-(
> 
> It appears that you can send a SiRF command over the serial line to force a
> power-off (though I haven't tested yet).  If that works, I plan to get the
> 'rfkill' to pulse the line at power-on and arrange some udev script to send
> the power-off command when the rfkill switches to 'off'.

Looks good! To hide this toggle nature in the rfkill driver.

> 
> Then the gpsd script would just 
>   rfkill block gps
> or
>   rfkill unblock gps
> 
> which is nice and generic.

And is independent if we ever have to replace the GPS chip
by a variant that behaves differnetly. I always like future-proof
solutions (and stable APIs)...

Thanks,
Nikolaus


More information about the Gta04-owner mailing list