PPS via USB-based devices - NTP/Chrony

Hello!

Long time FreeBSD user here, first started with v5.0 and a software and electronics engineer - just for some background.

In the past I've previously used a WRAP board with an Oxford chipset-based RS-232 to provide real hardware-based RS-232 (with a few kernel source changes so it is recognised) to provide NTPD with an GPS-based timesource which also provided PPS via the DCD pin. That setup worked great and I built it with NanoBSD scripts.

Now, moving on at least a decade, things have of course moved on...

I was looking at repurposing my APU2 device as it was expensive (at the time) and I thought that I should bring back my own time server.

I had a Garmin GPS 18 which was wired during the WRAP days and I soldered up the connector to provide both PPS and NMEA. But I noticed (recently-ish) that PPS via either DCD or CTS pin via USB was now actually supported - https://lists.freebsd.org/pipermail/freebsd-usb/2019-August/016078.html

But upon my own research and testing, that doesn't actually seem to true. I even e-mailed the OP of that thread asking for more information but that e-mail bounced back. I've tried to feed in a PPS signal via both DCD and CTS and every app (GPSD, NTPD, and Chrony) via USB and it just ignores it. Tried numerous USB adapters which even provided those pins but it seems that either the app or FreeBSD just ignores PPS by USB-based devices. It ONLY seems to work if it's a REAL hardware-based RS-232 port (ie UART). So why does "Ian" claim that it worked for him?

Can someone help shed some light on this? As that list thread seemed to claim that everything was working but it seems that it isn't. Or did I miss something very obvious?

Additional information available on request.


Thanks in-advance,

Danny.
 
Hello!

Long time FreeBSD user here, first started with v5.0 and a software and electronics engineer - just for some background.
If You are electronics engineer, probably You know how to work by hands ;), because You may doing some work (link would be later in this reply).
In the past I've previously used a WRAP board with an Oxford chipset-based RS-232 to provide real hardware-based RS-232 (with a few kernel source changes so it is recognised) to provide NTPD with an GPS-based timesource which also provided PPS via the DCD pin. That setup worked great and I built it with NanoBSD scripts.

Now, moving on at least a decade, things have of course moved on...

I was looking at repurposing my APU2 device as it was expensive (at the time) and I thought that I should bring back my own time server.
Nice idea, especially if it eating less electricity and have a small form-factor and HAVE A GOOD STABLE POWER SUPPLY UNIT.

I had a Garmin GPS 18 which was wired during the WRAP days and I soldered up the connector to provide both PPS and NMEA.
Recently we bought for one of projects new Garmin GPS 16x-HVS (more robust and stable working, and same or better receiver sensitivity rather 19x-HVS, especially for non-moving objects like rack server).

P.S. May be this thread would be interesting for You ;)
And this one

But I noticed (recently-ish) that PPS via either DCD or CTS pin via USB was now actually supported - https://lists.freebsd.org/pipermail/freebsd-usb/2019-August/016078.html

But upon my own research and testing, that doesn't actually seem to true. I even e-mailed the OP of that thread asking for more information but that e-mail bounced back. I've tried to feed in a PPS signal via both DCD and CTS and every app (GPSD, NTPD, and Chrony) via USB and it just ignores it. Tried numerous USB adapters which even provided those pins but it seems that either the app or FreeBSD just ignores PPS by USB-based devices. It ONLY seems to work if it's a REAL hardware-based RS-232 port (ie UART). So why does "Ian" claim that it worked for him?
Most of modern GPS receivers use one of DB9 pins (CTS) for 1PPS signal.

So NMEA without 1PPS give You precision between 50-100milliseconds, - THAT WAS ABSOLUTELY UNUSABLE even for NTP pool server.

Need to note that 1PPS signal are only if Your GPS-antenna able to see sufficent (in my case 3+ satellite, but depend on satellites network You use (GPS, Galileo, etc ) and GPS-receiver developer) clear view.

Also I suggest You carefully read this thread., this one and this one.

Good luck!
 
If You are electronics engineer, probably You know how to work by hands ;), because You may doing some work (link would be later in this reply).

Nice idea, especially if it eating less electricity and have a small form-factor and HAVE A GOOD STABLE POWER SUPPLY UNIT.


Recently we bought for one of projects new Garmin GPS 16x-HVS (more robust and stable working, and same or better receiver sensitivity rather 19x-HVS, especially for non-moving objects like rack server).

P.S. May be this thread would be interesting for You ;)
And this one


Most of modern GPS receivers use one of DB9 pins (CTS) for 1PPS signal.

So NMEA without 1PPS give You precision between 50-100milliseconds, - THAT WAS ABSOLUTELY UNUSABLE even for NTP pool server.

Need to note that 1PPS signal are only if Your GPS-antenna able to see sufficent (in my case 3+ satellite, but depend on satellites network You use (GPS, Galileo, etc ) and GPS-receiver developer) clear view.

Also I suggest You carefully read this thread., this one and this one.

Good luck!


Sergei_Shablovsky
Yes I am into electronics and many other things.

I see HVS as HIGH voltage as you seemed to choose that - it's down to circumstances.


I already know about the PPS signal, as previously mentioned i've been doing this for two decades now.


But my issue is with the lack PPS support outside that pin one. As far I can tell, it should be supported on others.
 
So why does "Ian" claim that it worked for him?
Ian LaPore was a FreeBSD developer with an expertise in embedded. He passed away.
He created the FreeBSD interrupt driver for GPIO so I am pretty sure when he said something worked it did.
It is possible his review of 4 boards results did not list all the steps involved.
For instance he mentioned Wandboard. I am pretty sure that for Device Tree boards you would need an overlay for gpiopps.

I am not sure how USB is supposed to route DTS signals it does not contain.
For TTL signaled GPS modules there is a separate pin from module you would route to a GPIO pin and set overlay for it.

You mentioned APU2 and it just so happens I have a MiniPCIe GPS module in the PCIE/USB signalling slot I am currently testing.
A Ublox module from Advantech. I will poke around and see what I find although I am using locational services not NTP.
 
A quick review of the topic shows that even USB MiniPCIe GPS modules have an extra pin for PPS:

ZED-F9T variant has an extra uFL connector for timepulse output.

I/O Port1 x Timepulse (connector type: 1 x 5pins

As you can see an extra line is used for PPS on these modules.
On APU2 I would connect PPS to GPIO pin. I just not sure how you would tell the system that gpio pin $ is a PPS signal.
Here they use a symbolic link to /dev/pps0
 
Sergei_Shablovsky
Yes I am into electronics and many other things.

I already know about the PPS signal, as previously mentioned i've been doing this for two decades now.

I thought that I should bring back my own time server.

Thank You!

As I mentioned before, if You need an own SOHO quality and robust time server - this Trimble NetRS are the solution.
If You need to fun with coding and ironing - this is another case. (I doing so much of that in childhood so now I prefer a stable solutions and spending time on other interesting things in my life ;)
 
Ian LaPore was a FreeBSD developer with an expertise in embedded. He passed away.
He created the FreeBSD interrupt driver for GPIO so I am pretty sure when he said something worked it did.
It is possible his review of 4 boards results did not list all the steps involved.
For instance he mentioned Wandboard. I am pretty sure that for Device Tree boards you would need an overlay for gpiopps.

I am not sure how USB is supposed to route DTS signals it does not contain.
For TTL signaled GPS modules there is a separate pin from module you would route to a GPIO pin and set overlay for it.

You mentioned APU2 and it just so happens I have a MiniPCIe GPS module in the PCIE/USB signalling slot I am currently testing.
A Ublox module from Advantech. I will poke around and see what I find although I am using locational services not NTP.

It's sad that he passed away, would explain why I didn't get a reply from him. RIP Ian.

My current setup is a couple of Ublox-based GPS boards from Amazon (fairly cheap - think they were about £20 each) with some external active antennas which are both connected to a USB-to-serial card and the PPS from those are fed via the real RS-232 ports via pin one - this has been working fine for well over a year now, whereas the GPS 18 died after a month or so. Weird. But glad at least my custom-made solution is working at least. Have had two GPS18 units fail in the past.

But would like to route the PPS through to DCD via USB if that's available as it would free up some hardware - like the real RS-232 card and would simplify the config and would be more useful for systems which can't take an external RS-232 card.
 
A quick review of the topic shows that even USB MiniPCIe GPS modules have an extra pin for PPS:





As you can see an extra line is used for PPS on these modules.
On APU2 I would connect PPS to GPIO pin. I just not sure how you would tell the system that gpio pin $ is a PPS signal.
Here they use a symbolic link to /dev/pps0

Interesting, never looked at dedicated miniPCIe cards before - always gone for more generic external hardware as that's what I'm used to using.

I have actually enabled GPIO on the APU2 and it's fully supported by FreeBSD.
 
And consider to use Trimble NetRS instead of SOHO computers: it is MUCH MORE robust, stable at work and useful solution from well-reputable company.

P.S. For now it is ~$160 in great condition, on eBay aftermarket

Looked that PDF and it's custom hardware, and even at ~$160 dollars is too expensive for me given that I already own hardware which is perfectly capable of doing the same. I want to re-use my hardware as much as possible to reduce on e-waste, hence why I want to use the APU2 for this.
 
this has been working fine for well over a year now, whereas the GPS 18 died after a month or so. Weird. But glad at least my custom-made solution is working at least. Have had two GPS18 units fail in the past.
So, from financial point of view You spending:
2 x GPS18 in past (both die)
2 x GPS18 now (one die)
some wires
some amount of power adapters
some amount of USB<~>RS-232 converters
—————

As for now all of this for now equal (or comparable less) than price on one Trimble NetRS (~$160) with a power and ETH adapter (~$80-100) and antenna (~40-60).

And this is at least robust solution for outdoor environment, builded on great electronics components, well-tested, from well-reputable brand, with a lot of extra features, WORKING WITH TWO GPS FREQUENCIES AN MUCH MORE GREAT ANTENNA, intended for working YEARS !

Am I wrong with this?
 
So, from financial point of view You spending:
2 x GPS18 in past (both die)
2 x GPS18 now (one die)
some wires
some amount of power adapters
some amount of USB<~>RS-232 converters
—————

As for now all of this for now equal (or comparable less) than price on one Trimble NetRS (~$160) with a power and ETH adapter (~$80-100) and antenna (~40-60).

And this is at least robust solution for outdoor environment, builded on great electronics components, well-tested, from well-reputable brand, with a lot of extra features, WORKING WITH TWO GPS FREQUENCIES AN MUCH MORE GREAT ANTENNA, intended for working YEARS !

Am I wrong with this?

Only spent money on three GPS18 in the past and we're talking like over like 20 years period (but yeah, don't like the failure rate of those - hence, why I switched to my own custom setup). Not very much considering the lifespan. But NEVER going to use those again.

But my *current* custom setup involving ublox GPS modules, USB-to-serial device along with an active antenna for the GPS modules, and feeding the PPS signal to a real RS-232 port is still WAY cheaper - like at least a third cheaper than that Trimble device. This has allowed me to run multiple GPS units. I'm not looking for an argument here - I'm just stating my facts and experience. This setup has been very robust for me for a long time now - even with antennas inside, which is a plus for me.

I just want to be able to send the PPS signals via USB serial, which currently I can't - despite previously mentioned research. Simple as that as per my post title.
 
Back
Top