LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ntp.conf : need settings for a refclock using Symmetricom bc635PCI timing card (https://www.linuxquestions.org/questions/linux-networking-3/ntp-conf-need-settings-for-a-refclock-using-symmetricom-bc635pci-timing-card-787257/)

Merlin53 02-05-2010 10:42 AM

ntp.conf : need settings for a refclock using Symmetricom bc635PCI timing card
 
Hello,
I have setup a box using RHEL-5 inside a private network, no outside connections, and I've got a Symmetricom bc635PCI-V2 clock card installed and working. It's getting GPS time via IRIG-B feeding the PCI card from a TrueTime GPS receiver.
I need to setup the NTP software to use the time from the PCI card. Which means I need to setup a /dev/refclock-? symbolic link to the driver as far as I know? I can't find any documentation on the bc635 card that associates the refclock to the driver. Does anyone know what settings I need to use in the server line of the ntp.conf file?

Server 127.127.<type>.<unit>

(anything else needed?)

Thanks!!

TB0ne 02-06-2010 11:43 AM

Quote:

Originally Posted by Merlin53 (Post 3853961)
Hello,
I have setup a box using RHEL-5 inside a private network, no outside connections, and I've got a Symmetricom bc635PCI-V2 clock card installed and working. It's getting GPS time via IRIG-B feeding the PCI card from a TrueTime GPS receiver.
I need to setup the NTP software to use the time from the PCI card. Which means I need to setup a /dev/refclock-? symbolic link to the driver as far as I know? I can't find any documentation on the bc635 card that associates the refclock to the driver. Does anyone know what settings I need to use in the server line of the ntp.conf file?

Server 127.127.<type>.<unit>

Well, I've use just generic NMEA USB GPS units before, and have used the 127.127.20.xx device. Since the GPS was essentially serial data, I made a symlink from the /dev/ttyUSB0 device to /dev/gps0, and it works fine. After I patched the time-server kernel with the PPS patch, I had to change it /dev/gpspps0.

A complete list of reference clock numbers and setup hints can be found here:
http://www.eecis.udel.edu/~mills/ntp/html/refclock.html

The Symmetricom site has user manuals and software, and they mention Linux. However, since I'm not a registered user, I can't get to it, but I'm assuming since you've got the hardware, you're all set. :)
http://www.symmetricom.com/products/...35PCI-V2-IRIG/

There have been references to using the .28 (shared memory) device for your NTP server, but I'm assuming that you've got to get their software first, compile and load it, so the NTP .28 service has something to poll.

Merlin53 02-08-2010 08:28 AM

Thanks TBOne for your reply. I got an email back from the company and they said they don't support using this PCI clock card to establish a cheap NTP server solution using a Linux box. Guess it cuts into sales of their NTP Server units? Shame, it's what we have done for years. This new card just didn't have that feature programmed into the driver that came with the card. They did provide a small SDK so one could write their own driver. Just don't have the time to work on that right now. So as far as I know, there is no public driver out there for this card. At least not right now...

Take Care,
Merlin53

TB0ne 02-08-2010 11:35 AM

Quote:

Originally Posted by Merlin53 (Post 3856641)
Thanks TBOne for your reply. I got an email back from the company and they said they don't support using this PCI clock card to establish a cheap NTP server solution using a Linux box. Guess it cuts into sales of their NTP Server units? Shame, it's what we have done for years. This new card just didn't have that feature programmed into the driver that came with the card. They did provide a small SDK so one could write their own driver. Just don't have the time to work on that right now. So as far as I know, there is no public driver out there for this card. At least not right now...

Yep, but I get good results just using a cheap USB GPS receiver. Picked one up for $89, shoved it in, and (after patching the kernel with the PPS patch), get a very accurate NTP stratum 1 clock. As long as you can get a GPS lock, you're set.

jnapoleone 09-14-2011 09:56 AM

BC635PCI and NTP on Linux
 
I was able to successfully configure this card after:

1) ./configure --enable-BANCOMM
2) Editing the ntpd/refclock_bancomm.c file to update the bcReadBinTime() call to use

BOOL bcReadBinTimeEx (BC_PCI_HANDLE hBC_PCI, PDWORD major, PDWORD min, PWORD nano, PBYTE stat);

This needs to be updated in two places:

a) at line 182 where the extern is located, update the prototype.
b) at line 440 in get_datumtime(), case 2 update change call to bcReadBinTimeEx().
c) comment out call to tvme_fill() and perform the actions within this function here
in the case statment as other places use the tvme_fill() function. The code is a gmtime()
call then set the vmedate struct accordingly. The major field contains seconds, min contains microseconds,
and nano contains hundreds of nano seconds.
3) Perform make, make install for ntp.
4) Use the wdreg tool to load the driver.
5) Add the /dev/btfp0 using the ln -s /dev/windrvr6 /dev/btfp0 (as root).
6) Do chmod 666 /dev/windrvr6, so non-root processes can access the card.
7) Add the "server 127.127.16.0 prefer mode 2 burst minpoll 4 maxpoll 4" line the /etc ntp.conf file.
8) Start the newly built ntpd daemon.

There is a pdf on the Symmetricom website that describes most of this except for the changes to the refclock_bancomm.c file.

Enjoy

TB0ne 09-15-2011 09:06 AM

Quote:

Originally Posted by jnapoleone (Post 4471512)
I was able to successfully configure this card after:

1) ./configure --enable-BANCOMM
2) Editing the ntpd/refclock_bancomm.c file to update the bcReadBinTime() call to use

BOOL bcReadBinTimeEx (BC_PCI_HANDLE hBC_PCI, PDWORD major, PDWORD min, PWORD nano, PBYTE stat);

This needs to be updated in two places:

a) at line 182 where the extern is located, update the prototype.
b) at line 440 in get_datumtime(), case 2 update change call to bcReadBinTimeEx().
c) comment out call to tvme_fill() and perform the actions within this function here
in the case statment as other places use the tvme_fill() function. The code is a gmtime()
call then set the vmedate struct accordingly. The major field contains seconds, min contains microseconds,
and nano contains hundreds of nano seconds.
3) Perform make, make install for ntp.
4) Use the wdreg tool to load the driver.
5) Add the /dev/btfp0 using the ln -s /dev/windrvr6 /dev/btfp0 (as root).
6) Do chmod 666 /dev/windrvr6, so non-root processes can access the card.
7) Add the "server 127.127.16.0 prefer mode 2 burst minpoll 4 maxpoll 4" line the /etc ntp.conf file.
8) Start the newly built ntpd daemon.

There is a pdf on the Symmetricom website that describes most of this except for the changes to the refclock_bancomm.c file.
Enjoy

Great write-up of how to get that card working. Thanks for posting it.


All times are GMT -5. The time now is 03:31 PM.