gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] How to get started writing a GPS driver?


From: Eric S. Raymond
Subject: Re: [gpsd-dev] How to get started writing a GPS driver?
Date: Thu, 4 Apr 2013 06:26:08 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Tim Bird <address@hidden>:
> Sorry to ask a complete newbie question, but is this the right place
> to get started if one wants to write an open source driver for a
> Sony GPS receiver module?

Probably.  Certainly if the module reports over USB or RS232, which
you report to be the case.  Can you point us at documentation
for the module?

> A developer at Sony has contacted me, and wants to write an open
> source driver for a GPS receiver module.  The module is accessed via
> a UART.  On our dev board is made available to
> Linux via a USB/serial interface.   I'm new to this GPS stuff.
> Does writing a driver for this involve writing a kernel driver?

It shouldn't, no.  Actually it's quite likely that gpsd will Just Work
if you pass it the serial device corresponding to the dev board UART.

At worst, you might have to write a new packet driver within GPSD 
for whatever reporting protocol the module is shipping over the UART.  
But this is highly unlikely; it's probably issuing NMEA 0183, which
gpsd speaks.

> Under what conditions does one write a kernel driver, vs extend
> gpsd to support whatever special features Sony has added to their
> receiver module?

A kernel driver would only be required if the kernel needed to be modified
to give access to the GPS device's output stream.  This only happens rarely,
when the design of the GPS hardware or its reporting protocol is perversely
wrong.  

> what is the relationship, if any, between this project and support
> for GPS devices under Android (I suspect none, but maybe I'm wrong
> and there's a shim between gpsd and the Android Location Services
> library?)

We've read that Android 4.0 and later versions use gpsd to read the
output stream from the GPS. (See for example 

       http://www.bitdirect.nl/?p=47

in which somebody's badly designed location-aware app is polling gpsd
constantly and causing it to drain the battery.)

Something in the Java code for Location Services must be acting as a
gpsd client, but nobody in Android-land has bothered to explain the
details to us.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]