--- gpsd-2.29/serial.c 2005-08-16 17:07:13.000000000 -0700 +++ gpsd-2.29/serial.c-new 2005-09-03 01:47:31.000000000 -0700 @@ -174,7 +174,7 @@ * MAX_PACKET_LENGTH or we risk never syncing up at all. Large values * will produce annoying startup lag. */ -#define SNIFF_RETRIES 256 +#define SNIFF_RETRIES 10 bool gpsd_next_hunt_setting(struct gps_device_t *session) /* advance to the next hunt setting */ @@ -184,14 +184,21 @@ if (session->retry_counter++ >= SNIFF_RETRIES) { session->retry_counter = 0; + if('N' == session->gpsdata.parity) + { + session->gpsdata.parity = 'O'; + } else + { + session->gpsdata.parity = 'N'; if (session->baudindex++ >= (unsigned int)(sizeof(rates)/sizeof(rates[0]))) { session->baudindex = 0; if (session->gpsdata.stopbits++ >= 2) return false; /* hunt is over, no sync */ } + } gpsd_set_speed(session, rates[session->baudindex], - 'N', session->gpsdata.stopbits); + session->gpsdata.parity, session->gpsdata.stopbits); } return true; /* keep hunting */