Joerg Schilling wrote:
> James Carlson <carls...@workingcode.com> wrote:
> 
>>> But I also mentioned that is is simple to write a driver that supports such 
>>> information. As Solaris does not support DCF-77 receivers, I did e.g. write 
>>> a 
>>> small driver that installs itself in the related callback tables from the 
>>> "zs" 
>>> driver in order to fetch the time when a related line from the DCF-77 
>>> receiver 
>>> indicated a second clock signal. This driver later allowed to read the time 
>>> stamp via ioctl.
>> As long as your DCF-77 receiver has a PPS output, the system already
>> supports it, and has supported it for ages.  No special driver required.
>>
>> Look into the TIOCSPPS ioctl on the termio(7I) man page.  Instead of
>> relaying the information to user space (which involves latency), the
>> mechanism automatically adjusts the system clock and latches the
>> timestamp of the last tick.  You can get the timestamp with TIOCGPPSEV.
>>
>> I'm pretty sure that xntpd supports this interface.  I remember a
>> co-working in Burlington setting up a test system with a GPS time source
>> many years ago.
> 
> I did implement my code between 1992 and 1994 and the way I interpret the 
> documentation, it seems that the Solaris driver does not deal with the fact
> that the pulse at the 59. second is missing.
> 
> DCF-77 uses cheap reaceiver hardware that has been developed by Telefunken 
> for 
> Junghans wrist watches around 1980. For decoding the 0s and 1s in the data 
> stream, you set the baudrate to 50 baud and then use a char table to detect 
> 100ms vs 200 ms pulses.
> 
> For DCF-77, you then need to throw away the pulse start time samples that are
> outside the standard deviation and you need to implement a low pass on the 
> rest of the samples. If you do it the right way, you get aprox. 200 usec 
> accuracy when you have a user space daemon that implements the filters and 
> that sets an adjust value for adjtime().
> 
> Is this implemented on Solaris now?

As I plainly said before, if your hardware supports standard PPS output
-- a quick Google search tells me that the Meinberg COM52HS supports
this, but I have no clue about the hardware you were using -- then the
generic PPS feature in the Solaris serial drivers should do the trick.

If not, then you'd probably need to modify the drivers or buy better
hardware.  I suspect, though, that going up to user space to do the work
(rather than doing it in the driver) is a bit of a bummer, particularly
on a busy system where dispatch delays could become unpredictable.
That's why it's quite intentionally not implemented that way on Solaris
or OpenSolaris.

In any event, this entire discussion has not a whit to do with the
original poster's question.  So I'm done.

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to