QTMoko website

Neil Jerram neil at ossau.homelinux.net
Thu Oct 4 20:10:51 CEST 2012


Radek Polak <psonek2 at seznam.cz> writes:

> On Tuesday, October 02, 2012 08:01:03 PM Neil Jerram wrote:
>
>> Attached is a patch to make QtMoko's GPS framework (Q*Whereabouts) use
>> gpsd instead of reading directly from /dev/ttyO1.  The benefit of that
>> is that multiple clients, both Qt and non-Qt, can all use GPS at the
>> same time.
>
> Nice, i was trying to do something like this too, but without any results.
>
> But I wonder how much is gpsd useful for us now. We have lightweight 
> Whereabouts framework which now works good on GTA02 and GTA04. On GTA02 it 
> even handles supplying AGPS data.
>
> I wonder what GPSD can do for us.

Well, I've been using it because I'd like to export GPS from my GTA04 to
another device, over Bluetooth, at the same time as running NeronGPS on
the GTA04.

I believe there are two problems with using
NeoGpsPlugin+QNmeaWhereabouts for that, both of which are solved by
using gpsd instead (with the patch that I posted).

1. If two applications each use NeoGpsPlugin+QNmeaWhereabouts to access
GPS, there will be two instances of NeoGpsPlugin, and they will both try
to open /dev/ttyO1, which (for me) hangs the whole system.  Therefore,
even if we modify every GPS application to use QWhereabouts, we still
can't run more than one of those applications at the same time.

2. For Bluetooth export I need the NMEA stream, and QWhereabouts doesn't
provide that.  To get the NMEA stream I need either to read /dev/ttyO1
directly - which means I can't run any other GPS application at the same
time - or to use gpsd and gpspipe.

> It's another program running in background eating system resources.

I haven't done any measurements, but it doesn't seem that bad.  I
believe it doesn't do anything at all - even access /dev/ttyO1 - until
an application connects to its port, and I didn't notice any impact
while actually using GPS.

> The programs that will use GPSD will be poorly integrated in QtMoko -
> i.e. not showing the fix status in title bar, no blinking with LED to
> indicated NMEA activity, no AGPS.

With my patch, you still get all that for applications like NeronGPS
that use QWhereabouts - except I don't know about AGPS, because we don't
yet have that on GTA04.

I agree you wouldn't get it if, say, the Bluetooth GPS export function
was running on its own.  That wouldn't be a problem for me, though,
because the device that I'm trying to export GPS to has it own good UI
for showing fix status, satellites and so on.  Also in practice I expect
that I'll usually be running NeronGPS at the same time, and that will
activate QWhereabouts and so give me all those UI indications on the
GTA04.

> And one more thing - i hate GPSD because they are breaking API compatibility 
> and we have no control of it. I want now to do some wheezy/armhf experimental 
> release for GTA04 and if wheezy/sqeeze gpsd are not compatible then it's quite 
> problem...

I agree that's annoying - for example because it prevents me from trying
out the QGpsdWhereabouts code - but I don't understand how it might
affect your wheezy/armhf experiment.  As long as there's a version of
gpspipe that matches the version of gpsd, I don't think we need anything
else.

Regards,
        Neil



More information about the community mailing list