18.7.6 issues with NTP & GPS

Started by va176thunderbolt, October 30, 2018, 05:41:05 AM

Previous topic - Next topic
I have a GPS attached serially and configured in NTP as a time source. Works great - sync's right up. However, when I go into Services/Network Time/Status, I get a php error:

[30-Oct-2018 09:38:37 Etc/GMT-5] PHP Warning:  A non-numeric value encountered in /usr/local/www/status_ntpd.php on line 100
[30-Oct-2018 09:38:37 Etc/GMT-5] PHP Warning:  A non-numeric value encountered in /usr/local/www/status_ntpd.php on line 102
[30-Oct-2018 09:38:37 Etc/GMT-5] PHP Warning:  A non-numeric value encountered in /usr/local/www/status_ntpd.php on line 103
[30-Oct-2018 09:38:37 Etc/GMT-5] PHP Warning:  A non-numeric value encountered in /usr/local/www/status_ntpd.php on line 105

The Dashboard Network Time widget  also chokes.

I've submitted a couple of error reports, and I'd be happy to allow someone access if they needed to test/troubleshoot on my box.

Adam
AMD Ryzen 3 1200
GA-A320M-S2H
8GB DDR4
Intel X550-T2 10GB
32GB Industrial SSD

Shuttle SZ270R8
Intel i5-6500
8gb ram
120gb ssd
Intel x540-t2 10gb nic

Hi Adam,

Would you mind providing the output of:

# /usr/local/sbin/ntpq -c clockvar


Thanks,
Franco

adam@gw:~ % sudo /usr/local/sbin/ntpq -c clockvar
Password:
associd=0 status=00f2 15 events, clk_bad_format,
device="NMEA GPS Clock",
timecode="$GPRMC,112850,A,____.____,_,_____.____,_,000.0,190.7,301018,007.0,W*__",
poll=21419, noreply=8, badformat=261, baddata=0, fudgetime2=600.000,
stratum=0, refid=GPS, flags=13
adam@gw:~ %
AMD Ryzen 3 1200
GA-A320M-S2H
8GB DDR4
Intel X550-T2 10GB
32GB Industrial SSD

Shuttle SZ270R8
Intel i5-6500
8gb ram
120gb ssd
Intel x540-t2 10gb nic


Is ____.____ the actual output or did you blank it? I'm asking because it can't parse latitude and longitude and I'm unsure how to parse correctly what is actually returned. I don't need the exact values, just the info whether each "_" is literally a number or not.


Cheers,
Franco

That is the actual output.
AMD Ryzen 3 1200
GA-A320M-S2H
8GB DDR4
Intel X550-T2 10GB
32GB Industrial SSD

Shuttle SZ270R8
Intel i5-6500
8gb ram
120gb ssd
Intel x540-t2 10gb nic

Ok, so there may also be an issue with the GPS tracker itself.

In any case, will fix the malformed parsing. Thanks!

Thanks Franco!
AMD Ryzen 3 1200
GA-A320M-S2H
8GB DDR4
Intel X550-T2 10GB
32GB Industrial SSD

Shuttle SZ270R8
Intel i5-6500
8gb ram
120gb ssd
Intel x540-t2 10gb nic

Hi Adam,

Here is the patch with additional corrections for other GPS devices and GUI sanity:

https://github.com/opnsense/core/commit/0b58f2f48

Can you confirm it works for you?  Under the circumstances of the output it will show N/A for latitude and longitude since the GPS doesn't return any values.

# opnsense-patch 0b58f2f48


Cheers,
Franco

Curious if this was resolved and also what GPS device you used via serial.

While the patch should speak for itself on the resolved front I don't know what the device was. Maybe Adam can shed some light on it.


Cheers,
Franco