gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Ublox EVK-M8T


From: Eric S. Raymond
Subject: Re: [gpsd-users] Ublox EVK-M8T
Date: Tue, 19 Sep 2017 17:36:17 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

Denny Page <address@hidden>:
> It doesn’t recognize a type. 
> 
> Starting condition is, unit set to 115200, port set to 115200, and
>  gpsctl used to set binary mode.

OK. Just getting stuck in the hunt loop is much less weird. Not *good*,
but not inexplicable the way a false lock would be.
 
> However, if the “-b” option is used to gpsd, gpsd correctly identifies u-blox 
> on the second packet:

That is evidence of something very specific going wrong.

Normally, when gpsd recognizes a type, it may try to send the device
mode-setting strings that put it in what gpsd considers an optimal mode.
In the case of the u-blox that code looks like this:

static void ubx_event_hook(struct gps_device_t *session, event_t event)
{
    if (session->context->readonly)
        return;
    else if (event == event_identified) {
        unsigned char msg[32];

        gpsd_log(&session->context->errout, LOG_DATA, "UBX configure\n");

        msg[0] = 0x03;          /* SBAS mode enabled, accept testbed mode */
        msg[1] = 0x07;          /* SBAS usage: range, differential corrections 
and integrity */
        msg[2] = 0x03;          /* use the maximum search range: 3 channels */
        msg[3] = 0x00;          /* PRN numbers to search for all set to 0 => 
auto scan */
        msg[4] = 0x00;
        msg[5] = 0x00;
        msg[6] = 0x00;
        msg[7] = 0x00;
        (void)ubx_write(session, 0x06u, 0x16, msg, 8);

#ifdef RECONFIGURE_ENABLE
        /*
         * Turn off NMEA output, turn on UBX on this port.
         */
        if (session->mode == O_OPTIMIZE) {
            ubx_mode(session, MODE_BINARY);
        } else {
            ubx_mode(session, MODE_NMEA);
        }
#endif /* RECONFIGURE_ENABLE */
    } else if (event == event_deactivate) {
        unsigned char msg[4] = {
            0x00, 0x00,         /* hotstart */
            0x01,               /* controlled software reset */
            0x00
        };                      /* reserved */

        gpsd_log(&session->context->errout, LOG_DATA, "UBX revert\n");

        /* Reverting all in one fast and reliable reset */
        (void)ubx_write(session, 0x06, 0x04, msg, 4);   /* CFG-RST */
    }
}

There are two operatioins here - switch to binary and enable SBAS.
The next diagnostics steps are:

1. Comment out both writes, try running without -b.  Does it achieve sink?

2. Comment out one, then the other write.  Which is the bad guy?
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.





reply via email to

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