[ntp:questions] Setting the COM port for the NMEA driver

David J Taylor david-taylor at blueyonder.not-this-part.nor-this.co.uk.invalid
Sat May 9 10:46:37 UTC 2009

Dave Hart wrote:
>> Does NTP even allow COM4?
> I don't think so.  The unit numbers are limited to 0-3, I believe, but
> I don't have any concept of why.  Windows never has a COM0:, so
> arguably it was a poor choice to map unit number to com port number
> without adding 1, but it's far too late to change that.  At the cost
> of additional documentation complexity, ntpd could easily enough
> interpret unit 0 as COM4:
> Two solutions come to mind, either of which would probably work.
> Somewhere in the registry there lurks a mapping, obviously named by
> someone very young and self-impressed, known as the "COM port
> database".  I got your database right here, buddy.  There's a tiny
> little API used by serial port drivers to claim COM port numbers, but
> I suspect you can ignore the API and fiddle the registry directly.
> Quite possibly easiest would be to disable or renumber COM1:, COM2: or
> COM3:.  I think there might even be an easy mousy way to choose the
> COMx: assignment via device manager properties dialogs.  Try changing
> an unused 1-3 to a higher port and your USB adapter will likely claim
> the lowest-numbered available port next boot.
> Good luck,
> Dave Hart
> P.S.  I predict you'd be able to get better time over the internet
> than over USB, but I'd love to be wrong.   But then, you might end up
> the first to have tried PPS over serial USB and get much better
> results than your predecessors.  Thanks for taking the time to
> investigate this.


Thanks for your information.

Checking with the Device Manager, I don't have any COM devices other than 
COM4.  However, if NTP is ever to work over USB/serial, it's essential 
that it handle COM port numbers greeater than 3.  I did see a note about 
COM ports 0..3 in one file, but nothing in the documentation about how to 
set the number.  Any chance of changing it to allow 0..9, for example (I'd 
rather see more than one digit, but I can appreciate that may be a greater 
code change).

I do see an entry:


which is a string "COM4", so perhaps that's what you mean.  I am somewhat 
reluctant to change it as I don't know what it might break!  Oh, and quite 
a few more places as well.  It's an FTDI driver, and I can't find any "how 
to set the port" information on the Internet.  I checked in the device 
manager, and couldn't see a way to re-assign the port number.

COM3 is used by a built-in modem.


More information about the questions mailing list