[time-nuts] RS 232
Hal Murray
hmurray at megapathdsl.net
Fri Jul 26 20:31:40 EDT 2013
john at miles.io said:
>> RS232 works much better for capturing PPS timing.
> Unless you are watching it with a ring-0 (kernel) driver, and/or ...
The NTP folks have done a lot of good work in this area.
RFC 2783 from March 2000 covers the API.
http://tools.ietf.org/html/rfc2783
It's implemented in all (or most?) recent Linux and *BSD systems.
The general idea is that when a PPS signal on a modem control pin (or printer
port, or ...) makes a transition, the kernel grabs the timestamp and bumps a
counter. User code can poll for the latest info.
There is nothing magic about PPS. You can use it to monitor power line
frequency. (See previous discussions here.) It works fine at 50-60 Hz. How
fast it will go probably depends upon your hardware (CPU speed) and how much
other work your system is doing at interrupt level. [Years ago, some Linux
box I worked with used PIO rather than DMA for disk access. If you did a lot
of disk reads, timer interrupts would get lost.]
In general, that's not supported over USB. I don't remember any success
stories.
There are two problems in this area. The first is that in the typical GPS
"mouse", the PPS signal isn't connected to anything on the serial-USB chip.
(I suspect many drivers or user code did something stupid when they got
changes on DCD. It's only a few geeks who want good timing.) The second is
that many vendors of serial-USB chips don't publish programming specs so open
source drivers are second class citizens and edge cases like PPS don't work
well.
A while ago (several months?) Eric Raymond started a discussion on the GPSD
list. He found a friendly GPS vendor that used a good serial-USB chip and
got a few prototypes of a GPS mouse with PPS connected to DCD. I think it
worked well, but I don't remember any details. (If anybody is curious, I'll
find that discussion in their archives.)
---------
> USB devices have gotten a bad reputation in this regard because of
> developers' failure to understand the idea behind serial numbers. As with
> noise immunity, it's possible to do it right, it's just that too many people
> don't bother.
That's a very good point. Thanks for bringing it up.
My Rigol scope has a serial number. It was simple to setup my Linux system
to turn that into /dev/scope no matter where it was plugged in.
I think most thumb drives have a serial number. (It would be interesting to
see the history on this area.)
Unfortunately, lots and lots of Vendors don't implement a serial number.
Hopefully, that's "yet" and they will get the message, but there will be lots
of old gear out there for a long time.
Maybe we should make a make a list of good/bad chips/vendors/whatever.
I have 2 Garmin GPS-18-USB, one with X, one without. Neither has a serial
number. (On the other hand, they don't claim to be serial ports so the
average user is unlikely to have more than one of them.)
I just tried a BU-353. It's one of the classic low cost, SIRF-III GPS chip
with a Prolific serial-USB chip. No serial number.
I have one of the Sure demo boards. It says "SerialNumber: 0001". Should I
be suspicious?
--
These are my opinions. I hate spam.
More information about the time-nuts
mailing list