[ntp:questions] Problems with NMEA refclocks, Ublox6 GPS, on WinXP with 4.2.7p21 4

Long, Darren Darren.Long at uk.thalesgroup.com
Tue Sep 27 17:08:20 UTC 2011

> -----Original Message-----
> From: Dave Hart [mailto:davehart at gmail.com]

> The GetFileType documentation points out that a return value of
> FILE_TYPE_UNKNOWN (== 0) means either the function failed, or the type
> of the handle is unknown, and one must call GetLastError() to know
> which.  I suggest you debug the problem again and determine what
> GetLastError() is returning in this path.  My guess is it's returning
> 0 (no error) indicating the driver handling the USB-connected UART is
> failing to set the right bits to indicate it's a communications device
> during the open operation.  

I can't step into GetLastError() itself, but 0 is being passed into

> If GetLastError() is returning an error
> value, something else is going wrong.  I'd really like to know whether
> GetFileType() is reporting an error or a legitimate FILE_TYPE_UNKNOWN.
> Assuming a driver problem, I understand there are relatively few
> USB-to-UART bridging chips in the market, with something called the
> pl2003 (IIRC) found in most USB-connected GPS pucks.  With enough
> spelunking, perhaps you can arrange to use a better Windows driver
> compatible with your USB-UART hardware to work around this problem.
> I do question my guess, though, as I'd expect failure to report
> FILE_TYPE_CHAR would also prevent other terminal apps from using the
> device, as for example setting the serial port rate and configuration
> presumably fails on devices that do not present as a communications
> device.

Hmm, well, it gets stranger and stranger.  I've just tried connecting to the
Ublox6 again with putty and some in-house code that is specifically intended
to work with the USB attached Ublox6, at the wrong baud rate (should be
9600, I've tried 19200 and 4800), with wrong number of start and stop bits
and different parity variations and everything still works, contrary to
expectations.  I'm now even more confused.  I'll take the Ublox6 home again,
and hook it up to a Linux box and see what I can learn about the driver it's



More information about the questions mailing list