[ntp:hackers] Lindy precision clock - reverse enginered!

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Feb 7 10:47:21 UTC 2006


In message <20060207102721.GM4305 at vanheusden.com>, Folkert van Heusden writes:
>> >It seems it
>> >doesn't wiggle the CTS or other control lines but sends a stream of
>> >bytes indicating the signal strength.
>> I doubt it is signal strength, I would assume that it is the raw
>> antenna signal so that you should read the number of zero bits
>> (incl. the startbit) as the duration of the pulse.
>
>Not sure if I entirely understand what you mean (not a native english
>speaker) but in the implementation of my testtool I do:
>	if (byte_read > /* some arbitrary value, 0x30 in my case */)
>		bit = 0;
>	else
>		bit = 1;
>and this seems to work. In one night I had to resync only 2 times this
>way.

It may also work that way, but your explanation of why is likely wrong.

First look here (and don't let their right to left diagrams fool you)


Something larger than 0x30 is transmitted as:


    1     0     0     0     0     0    1    1    X    X     1

  Idle	Start   1     2     4     8    16   32   64   128  Stop

so that means that the pulse is 5 bit-times wide (start + 1 + 2 +
4 + 8 bits.)

If your serial port is set to 50 bps each bit is 20msec and that
means that 5 x 20msec = 100msec.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the hackers mailing list