Menu

#16 Connection to GPSD

open
nobody
None
5
2003-12-19
2003-12-19
Anonymous
No

While playing with Kismet and qpegps at the same time, i saw
that qpegps just works with the supplied gpsd. No other older
or newer versions seems to connect to.
I think the problem is, that qpegps leaves the "\n" from the "\r\n"
in the socket buffer and therefore there is never ever a new
(complete) line to read. I didn't track down more, but if you apply
the following patch, you get a "works for me" solution...
----- patch -----
--- client.org.cpp 2003-12-19 10:08:32.000000000 +0100
+++ client.cpp 2003-12-19 10:09:05.000000000 +0100
@@ -287,6 +287,7 @@
dataPos = dataStr.find('=')-1;
}
}
+ while( socket->getch()>0 ) { ; }
if(positionChanged)
{
gpsData->adjustDatum();

----- end patch -----

Discussion

  • Jose Bernardo B R Silva

    Logged In: YES
    user_id=666930

    For me it doesn't fix the comunication with gpsd 1.10
    completely. Qpegps reads something from gpsd, so that the
    gpsd "light" turns green, and now stays green, but it is
    still unable to get a position fix (or anything at all).

     
  • Jose Bernardo B R Silva

    Logged In: YES
    user_id=666930

    The following patch fixes qpegps to work with gpsd 1.10:

    --- qpegps/client.cpp.orig 2004-02-18 20:24:24.000000000 +0000
    +++ qpegps/client.cpp 2004-03-10 23:29:40.190749312 +0000
    @@ -128,7 +128,7 @@
    widgetToReEnable = application->currentPage();

    // start the timers
    - readyToConnect("SPAVHBDX", 250);
    + readyToConnect("SPAVHBDXR", 250);

    // mode enabled
    d_opMode = MODE_SNIFF;
    @@ -140,6 +140,7 @@
    if (d_opMode == MODE_SNIFF) {
    // switch off sniffing
    d_opMode = MODE_NORMAL;
    + gpsdRequest = "SPAVHBDX\n";
    if (widgetToReEnable)
    application->tabChanged(widgetToReEnable);
    }
    @@ -287,6 +288,7 @@
    dataPos = dataStr.find('=')-1;
    }
    }
    + while( socket->getch()>0){;}
    if(positionChanged)
    {
    gpsData->adjustDatum();

     
  • Jose Bernardo B R Silva

    Logged In: YES
    user_id=666930

    Please ignore my patch. I've just submitted to the gpsd
    mailing list a patch that, together with the first patch
    submitted here, should allow gpsd to work with qpgs.

     
  • Nobody/Anonymous

    Logged In: NO

    I have exactly the same problem, which you mentioned below
    (18.2.2004), when trying to use qpeGPS on my Zaurus
    (SL-5500) with a Holux GM-270 (this problem came only after
    several successful uses).
    As I could not find the gpsd mailing list, nor a new version
    of this program, could you tell me if your patch has now
    been integrated in a new version?
    Could it be possible to get a compiled version of the patches?
    I am eager to use my qpeGPS again!

    Pierre-f

     
  • Jose Bernardo B R Silva

    Logged In: YES
    user_id=666930

    Pierre, I'll try and put a gpsd ipk with the patches on a
    web site today. I'll also check if I can find your message
    on the OE/Zaurus mailing lists, and reply to it with the url.

     
  • Yann Dirson

    Yann Dirson - 2006-02-14

    Logged In: YES
    user_id=38086

    I have tried qpegps 0.9.2.3.3 and gpsd 2.30, and it seems I
    get a similar problem:

    - running "gpsd -n -N -D4" shows GSA packets with 5 sats,
    which ought to be enough
    - running qpegps shows a green light for gpsd but everything
    else is red
    - running cgps does show a reasonable position

    Should I investigate, or is there some working solution
    somewhere already ?

     
  • Yann Dirson

    Yann Dirson - 2006-02-14

    Logged In: YES
    user_id=38086

    It is easy to check that socket->readLine() does not ineed
    has th bahaviour described. Not being familiar with the
    code yet, I can't see what the change to
    Client::endSniffMode() brings, but just adding 'R' to the
    request as show by jbbrs' patch does the trick for me. That is:

    diff -ru qpegps_my/client.cpp qpegps-0.9.2.3.3+/client.cpp
    --- qpegps_my/client.cpp 2006-02-02
    17:04:37.000000000 +0100
    +++ qpegps-0.9.2.3.3+/client.cpp 2006-02-14
    23:30:33.000000000 +0100
    @@ -130,7 +130,7 @@
    widgetToReEnable = application->currentPage();

    // start the timers
    - readyToConnect("SPAVHBDX", 250);
    + readyToConnect("SPAVHBDXR", 250);

    // mode enabled
    d_opMode = MODE_SNIFF;

     
  • Rob Neild

    Rob Neild - 2006-10-27

    Logged In: YES
    user_id=450613

    Is anything happening with this ? I just had the problem -
    with the gpsd on open zaurus, and had to download the
    replacement gpsd on the qpegps sourceforge page. All works
    now, but should work with out hastle.

     

Log in to post a comment.