[LinuxPPS] Setting the serial port to match the refclock

clemens at dwf.com clemens at dwf.com
Wed Dec 31 20:59:28 CET 2008


> My refclock defaults to 9800,7,even,1.  It seems that the serial port (/dev/ttyS0)defaults to 115000 (and I'm not sure what else).  I do not see how NTP configures the serial port.  Can someone help me out with serial port configuration?
> 
> 
Im not sure which driver you are using, but the oncore driver opens the device 
and sets the
speed with a line like

        if (!(fd1 = refclock_open(device1, SPEED, LDISC_RAW))) {    

where SPEED was previously defined with the line

        #define SPEED           B9600           /* Oncore Binary speed (9600 
bps) */

I would assume that other drivers so something similar, setting the line speed 
on their open.

In this case (the ONCORE) LDISC_RAW does what you would expect, but there are 
other LDISC_
options, and you MIGHT find them defined in a *.h file, or you might have to 
grep the code
to find where they are used, and then grub thru the code to see what is 
actually set.
-- 
                                        Reg.Clemens
                                        reg at dwf.com





More information about the LinuxPPS mailing list