[Soekris] FreeBSD 7.3, net4501, ntpd gpsd?
Hi, I have problem with the NMEA output from my GPS. The time stamp changes from around 1 to 2 seconds delay which means that the PPS signal is not used. Very few hits on Google suggest that this is normal. However the ones I do find suggest that NMEA can't be used just because what I see, that sometimes a time stamp is missing. I now want to try to use the binary mode of the GPS (a Rockwell Jupiter TU30- D140-221). I have these two lines in /etc/ntp.conf (plus many more): server 127.127.31.0 prefer fudge 127.127.31.0 time1 0.4 When I start ntpd I get these two comments in /var/log/messages: refclock_newpeer: clock type 31 invalid configuration of 127.127.31.0 failed I can't figure out why? Is it some option I should have used when I compiled the ntpd? # gpsd -l n Generic NMEA Delorme EarthMate (pre-2003, Zodiac chipset) Furuno Electric GH-79L4 c MTK-3301 AIVDM n b oncore binary n b SiRF binary n b SuperStarII binary b Zodiac binary Garmin Simple Text The Zodiac binary in the list made me think that gpsd should work, but it doesn't either. There isn't any output if I try 'cgps'. If I connect the GPS output to a terminal window, I do get garbage printed. If I check the output with a hex-editor, it looks like I do get Message header, word 1 and 2 as per the specification of the GPS so I think that the output from the GPS reach my soekris in the right way. Anyone having any suggestions? Thanks, Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
[Soekris] NanoBSD - Package input?
Hi, I am trying to build a NanoBSD image. I added a few packages that I want to include. I can see in the _.cust.install_packages log that one of the packages is expecting the user to make a choice: Would you like me to set up log rotation [y]? Is it possible to just provide a CR somehow to accept default choices for any possible question like the one above? Thanks, Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] NanoBSD - Package input?
On Saturday 28 August 2010 11.51.09 Henrik Brix Andersen wrote: Hi On Aug 28, 2010, at 11:15, Goran Sandin wrote: I am trying to build a NanoBSD image. I added a few packages that I want to include. I can see in the _.cust.install_packages log that one of the packages is expecting the user to make a choice: Would you like me to set up log rotation [y]? Is it possible to just provide a CR somehow to accept default choices for any possible question like the one above? Try setting BATCH=yes in the environment - ports are supposed to honor this, but unfortunately not all do. Which port is this? Regards Brix Thanks, this worked :-) It is munin-common-1.4.3_2 and I'm using FreeBSD 7.3 So far it doesn't survive a reboot. There is a config file where a location for pid-file is stated. If I change the default directory for this pid-file, the program doesn't start properly. /var/run/munin must exist when munin-node is started. If it doesn't exist, the pid-file can not be created and the program start-up exits. Is there a way to re-create /var/run/munin when nanobsd start? Regards, Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] FreeBSD PCI-driver?
In case someone else is searching for the same problem in the future... This line needs to be added in the kernel config: options COM_MULTIPORT # Code for some cards with shared IRQs. After this, it works with the new kernel (7.3). /Göran On Sunday 15 August 2010 21.20.41 Goran Sandin wrote: Hi all, I have problem with a http://www.lavalink.com/dev/index.php?id=53 net5501 identifies it like this from the BIOS: Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1Base2 Int --- 0:14:0 1407 0110 07000200 0041 0480 00 00 80 E501 10 0:14:1 1407 0111 07000200 0041 0480 00 00 80 E509 10 A linux 2.6.27 kernel identify this card like this a boot: Serial: 8250/16550 driver8 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A :00:0e.0: ttyS4 at I/O 0xe500 (irq = 10) is a 16550A :00:0e.1: ttyS5 at I/O 0xe508 (irq = 10) is a 16550A lspci -v gives: 00:0e.0 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port A (prog-if 02 [16550]) Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port A Flags: slow devsel, IRQ 10 I/O ports at e500 [size=8] Kernel driver in use: serial 00:0e.1 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port B (prog-if 02 [16550]) Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port B Flags: slow devsel, IRQ 10 I/O ports at e508 [size=8] Kernel driver in use: serial I tried to use both /dev/ttyS4 and /dev/ttyS5 without any problem. FreeBSD 7.3 identify the card like this at boot: sio0: Koutech IOFLEX-2S PCI Dual Port Serial port 0xe500-0xe507 irq 10 at device 14.0 on pci0 sio0: moving to sio4 sio4: type 16550A sio4: [FILTER] sio0: Koutech IOFLEX-2S PCI Dual Port Serial port 0xe508-0xe50f irq 10 at device 14.1 on pci0 sio0: moving to sio5 sio5: type 16550A Now to the problem... With FreeBSD the system halt when I run sysinstall. If I try to use the serial ports; sio4 seems to work, but when I try to open sio5 the system halt. I think this is where FreeBSD gets Koutech info instead of Lava from... /usr/src/sys/dev/sio/sio_pci.c { 0x01101407, Koutech IOFLEX-2S PCI Dual Port Serial, 0x10 }, { 0x0407, Koutech IOFLEX-2S PCI Dual Port Serial, 0x10 }, /usr/src/sys/dev/puc/pucdata.c lists some serial cards from Lava, but not the one I have. I can't find any description of what the purpose of the different fields in the structure is. Does anyone have some ideas of what to try to get this card work properly in FreeBSD (7.3)? Also, what does it mean that the BIOS says Base1 is 0xe501 and 0xe509 while both linux and FreeBSD reports the address to be 0xe500 and 0xe508, it looks like it is an offset of 1. Thanks, Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
[Soekris] FreeBSD PCI-driver?
Hi all, I have problem with a http://www.lavalink.com/dev/index.php?id=53 net5501 identifies it like this from the BIOS: Slot Vend Dev ClassRev Cmd Stat CL LT HT Base1Base2 Int --- 0:14:0 1407 0110 07000200 0041 0480 00 00 80 E501 10 0:14:1 1407 0111 07000200 0041 0480 00 00 80 E509 10 A linux 2.6.27 kernel identify this card like this a boot: Serial: 8250/16550 driver8 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A :00:0e.0: ttyS4 at I/O 0xe500 (irq = 10) is a 16550A :00:0e.1: ttyS5 at I/O 0xe508 (irq = 10) is a 16550A lspci -v gives: 00:0e.0 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port A (prog-if 02 [16550]) Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port A Flags: slow devsel, IRQ 10 I/O ports at e500 [size=8] Kernel driver in use: serial 00:0e.1 Serial controller: Lava Computer mfg Inc Lava DSerial-PCI Port B (prog-if 02 [16550]) Subsystem: Lava Computer mfg Inc Lava DSerial-PCI Port B Flags: slow devsel, IRQ 10 I/O ports at e508 [size=8] Kernel driver in use: serial I tried to use both /dev/ttyS4 and /dev/ttyS5 without any problem. FreeBSD 7.3 identify the card like this at boot: sio0: Koutech IOFLEX-2S PCI Dual Port Serial port 0xe500-0xe507 irq 10 at device 14.0 on pci0 sio0: moving to sio4 sio4: type 16550A sio4: [FILTER] sio0: Koutech IOFLEX-2S PCI Dual Port Serial port 0xe508-0xe50f irq 10 at device 14.1 on pci0 sio0: moving to sio5 sio5: type 16550A Now to the problem... With FreeBSD the system halt when I run sysinstall. If I try to use the serial ports; sio4 seems to work, but when I try to open sio5 the system halt. I think this is where FreeBSD gets Koutech info instead of Lava from... /usr/src/sys/dev/sio/sio_pci.c { 0x01101407, Koutech IOFLEX-2S PCI Dual Port Serial, 0x10 }, { 0x0407, Koutech IOFLEX-2S PCI Dual Port Serial, 0x10 }, /usr/src/sys/dev/puc/pucdata.c lists some serial cards from Lava, but not the one I have. I can't find any description of what the purpose of the different fields in the structure is. Does anyone have some ideas of what to try to get this card work properly in FreeBSD (7.3)? Also, what does it mean that the BIOS says Base1 is 0xe501 and 0xe509 while both linux and FreeBSD reports the address to be 0xe500 and 0xe508, it looks like it is an offset of 1. Thanks, Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
[Soekris] Installing FreeBSD on net5501 using PXE?
Hi all, I have tried this instruction that was listed on the Wiki site http://jdc.parodius.com/freebsd/pxeboot_serial_install_7.html I wonder if anyone has used that information and got it working on a net5501? After many hours of testing, 'googling', fine-tuning and so on, I am now OK up until step 8. Or rather it is in step 8 where it doesn't work like expected. After I chose ANSI or VT100 terminal I get a long list like: acpi0_check: nexus0 attached acpi0_check: legacy0 attached acpi0_check: cpu0 attached 52 items are listed. The process always freeze on the last one for net5501. If I use the same kernel and setup for a net4801, I do get a sysinstall menu. I.e. all the acpi0_checks are still there, but it doesn't freeze. I've tried with including/excluding different options in the kernel without any success. I also tried to add info in loader.conf about non-existing acpi but it doesn't look like it helps. I have tried FreeBSD 7.2 since this is what I had installed on the laptop. Thanks for any input. /Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] FreeBSD 8, net4501 ntp?
On Wednesday 31 March 2010 15.05.38 Ralph Smith wrote: Sorry about the long delay. Appendicitis has a way of getting one's attention. It's OK, I understand and the priority sounds right :-) On Feb 28, 2010, at 5:34 PM, Goran Sandin wrote: On Sunday 28 February 2010 19.15.41 Ralph Smith wrote: Can I use gpsd in between the rs-232 port and ntpd? You can if you want. You would then configure ntpd to use the shared memory driver rather than the NMEA driver. The only reason to do this is if you want to use some of the features of gpsd to share and monitor the gps information. It won't give you any more accuracy than the NMEA driver you are currently using. I guess it would be possible to send requests for gps-info from another computer to net4501? Exactly. Any ideas of how to configure this? If you want to pursue this it's fairly straightforward. It's OK, I understand that it will not make the result better. But as long as it does not make it less accurate I am curios to give it a try. Can you give me some hints of how to do it? I guess I have to compile gpsd on the computer where I build the CF? But how do I make it appear in the nanobsd image? Short answer is to build the port, create the package from the port, and have the nanoBSD script install the package. You will need to tweak the gpsd build so it doesn't include all the python and X11 stuff. I can provide more details if needed. Yes please, I like to read the long answer also. For the moment my net4501 is still open and not in use. After I saw it worked, I decided to make a pcb for the cables and some other interface circuits. I probably have to wait another two-three weeks before I receive it. Ralph /Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech
Re: [Soekris] FreeBSD 8, net4501 ntp?
On Sunday 28 February 2010 01.12.14 Ralph Smith wrote: On Feb 27, 2010, at 2:25 PM, Goran Sandin wrote: Hi, I have built a ntp-server based on information found here http://www.febo.com/pages/soekris/ and here http://ralphsmith.org/~ralph/soekris-ntp/NET4501. First of all, a caution that the files under http://ralphsmith.org/~ralph/soekris-ntp/ were placed there at various times and are not part of a coherent whole. I really need to clean this up and put together a unified treatment. It's OK, after all it was your set of files that finally made me to get a working setup. So far I have only been able to find bits and piece's on different sites. Your information had the last missing parts :-) I use this tool http://www.satsignal.eu/software/net.htm#NTPmonitor to check the result. The result is not in line with my expectations so I think something is not quite right. It might have been my expectations that was a little bit off... It took much longer than I had expected for ntpd to reach a small offset. ntptime now (18 hours after selecting the PPS as source) show: # ntptime ntp_gettime() returns code 0 (OK) time cf34b8f6.fb361508 Sun, Feb 28 2010 9:42:14.981, (.981294987), maximum error 5534 us, estimated error 15 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 0.021 us, frequency -0.040 ppm, interval 1 s, maximum error 5534 us, estimated error 15 us, status 0x2001 (PLL,NANO), time constant 4, precision 0.001 us, tolerance 496 ppm, The ntp_adjtime() - offset is still trying to get better, but it seems to be stable at values below 0.1 us. If I compare with a normal PC (running FreeBSD 7.1) which is synchronized against stratum 2 servers over Internet, the performance I get from net4501 is not any better than this PC. The NTPmonitor program show following result: An Internet Stratum1 server | my PC | net4501 Precision: 2^-29s 2^-19s 2^-16s Dispersion: 2ms ~30ms 0ms The precision values shown are to be expected, and isn't anything to really get excited about, and is a function of the machine architecture. From http://www.ntp.org/ntpfaq/NTP-s-sw-clocks-quality.htm we read In NTP precision is determined automatically, and it is measured as a power of two. For example when ntpq -c rl prints precision=-16, the precision is about 15 microseconds (2^-16 s). OK. I thought that the precision was something that was measured from remote and lower value was better. Is 15 us right for net4501, or does it indicate that something in my configurations should be changed? Both the PC and net4501 show a huge offset error of 1s about 11 times in 2 hours. The Internet Stratum1 server does not seem to have this error. I solved this one. It seems to be a Windows-feature. I was using host names in the config file for NTPmonitor. The server on internet of course had a real name that could be found by dns-lookup. My internal machines was found since the were listed in 'lmhosts'. After I changed the config file for NTPmonitor to use ip-addresses for my internal machines instead of host names, the very periodic 1 second offset has disappeared. Can't help much until we know what peers and refclocks you have configured. Also, make sure that you have the following in your kernel configuration. options CPU_ELAN options CPU_SOEKRIS options HZ=150 options CPU_ELAN_PPS I have those, or rather I used HZ=200. febo.com says HZ=1000 should be used, but also had a description of how things were related. My PPS signal is 25.6ms wide. So I thought that 200Hz would give me 5ms polling and that it should be good enough margin to the 25ms width I have for the PPS. febo.com also says you should include 'option GEOM_VOL', but your config file did not. I did not include this option in the kernel. My feeling is that my net4501 server does not really use the PPS signal. How do I check if the ntpd daemon actually use the PPS? What are you using to drive the PPS signal? ntpq -p will tell you if ntp is using the pps. This all depends on course on what drivers you configure it to use: my system is currently showing: wendell# ntpq -p remote refid st t when poll reach delay offset jitter == +ntp.cox.net .GPS.1 u 1594 1024 366 28.7712.371 0.545 *SHM(0) .GPS.0 l 15 16 3770.000 4.976 0.231 oPPS(0) .PPS.0 l 12 16 377 0.0000.000 0.015 wendell# The o in the first column tells me that ntp is synchronizing with the PPS. Offset is less than 1 microsecond. Or rather, how do I know the the precision of the PPS signal is transferred into the ntpd daemon? (I can see with ntpq -p that the PPS
Re: [Soekris] FreeBSD 8, net4501 ntp?
On Sunday 28 February 2010 19.15.41 Ralph Smith wrote: Summary is that you are in good shape. More comments below. Fine :-) It might have been my expectations that was a little bit off... It took much longer than I had expected for ntpd to reach a small offset. NTP convergence times are often discussed, with some people being surprised or dismayed with the convergence speed. Personally, I have no problem with it as long as you know what to expect. Also, keep in mind that ntp is designed to deal with distributing time across jittery network links. I agree, no problem now when I see how it works. ntptime now (18 hours after selecting the PPS as source) show: # ntptime ntp_gettime() returns code 0 (OK) time cf34b8f6.fb361508 Sun, Feb 28 2010 9:42:14.981, (.981294987), maximum error 5534 us, estimated error 15 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 0.021 us, frequency -0.040 ppm, interval 1 s, maximum error 5534 us, estimated error 15 us, status 0x2001 (PLL,NANO), time constant 4, precision 0.001 us, tolerance 496 ppm, The ntp_adjtime() - offset is still trying to get better, but it seems to be stable at values below 0.1 us. This indicates that you are spot on. The offset returned by ntp_adjtime() of 0.021 us is well within the 125 ns resolution of the timestamping capability of the timer. The frequency offset is always the same, very stable. The offset is changing, but almost always within the 125 ns. This is probably where I expected to see a result to be more stable. But your explanation as well as the source code makes it quite clear what is possible to archive, problem is as usual to know where to find the details :-) Have you replaced the clock chip with a clock derived from a precision frequency source? The frequency offset of 0.040 ppm would indicate that. That is what mine indicates, and is due to the slight difference between the clock rate presented and the rate that FreeBSD uses. The sysctl variable machdep.elan_freq gives a clue: wendell# sysctl machdep.elan_freq machdep.elan_freq: 3332 wendell# This value is the nearest multiple of 4 to the clock rate. I use the TAPR clock block, which generates a frequency of 33,333,333.33 Hz, which differs by 1.333... Hz, of the -0.040 ppm. As an experiment I drove the clock block with the correct frequency to get 3332 Hz and that value went to 0.000 as expected. Yes, I also have the TAPR Clock-block. I use http://www.jrmiller.demon.co.uk/projects/ministd/frqstd.htm as source for 10MHz, PPS and GPS-data. Can I use gpsd in between the rs-232 port and ntpd? You can if you want. You would then configure ntpd to use the shared memory driver rather than the NMEA driver. The only reason to do this is if you want to use some of the features of gpsd to share and monitor the gps information. It won't give you any more accuracy than the NMEA driver you are currently using. I guess it would be possible to send requests for gps-info from another computer to net4501? Exactly. Any ideas of how to configure this? If you want to pursue this it's fairly straightforward. It's OK, I understand that it will not make the result better. But as long as it does not make it less accurate I am curios to give it a try. Can you give me some hints of how to do it? I guess I have to compile gpsd on the computer where I build the CF? But how do I make it appear in the nanobsd image? Ralph /Göran ___ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech