Re: 1.1.6 build fails on FC30

2020-04-16 Thread Hal Murray via devel
> Because RS232 signaling is negative logic.

That's what I used to think, but somebody corrected me many years ago.

The data is upside down but the control signals are not.


>From https://en.wikipedia.org/wiki/RS-232
under Voltage levels

For data transmission lines (TxD, RxD, and their secondary channel 
equivalents), logic one is represented as a negative voltage and the signal 
condition is called "mark". Logic zero is signaled with a positive voltage and 
the signal condition is termed "space". Control signals have the opposite 
polarity: the asserted or active state is positive voltage and the de-asserted 
or inactive state is negative voltage. Examples of control lines include 
request to send (RTS), clear to send (CTS), data terminal ready (DTR), and 
data set ready (DSR).


-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread ASSI via devel
Udo van den Heuvel via devel writes:
> On 16-04-2020 21:15, Achim Gratz via devel wrote:
>>If so, you must use the clear edge of the PPS (flag2 1).
>
> Why is that?

Because RS232 signaling is negative logic.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Hal Murray via devel
>> If so, you must use the clear edge of the PPS (flag2 1).
> Why is that?

Which edge you should use depends on the device and how you wired it up.

Most PPS devices are setup so you should use the rising/assert edge.  If you 
run it through an RS-232 level shifter, they contain an inverter so you should 
use the other edge.

If the width of the PPS is wide enough, you can figure out which edge to use 
by looking at the output from ntpq -p when the system time is close, probably 
because ntpd is using other NTP servers.  Typical low cost GPS units have a 
100 ms or 500 ms pulse.  If it is off that much, try the other edge.

If you have a high end system with a narrow PPS, I'd try something like:
  $ cat /sys/devices/virtual/pps/pps0/{assert,clear}
You have to do that after setting up the PPS but before running ntpd.  It 
disables the edge it's not using.


-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Udo van den Heuvel via devel
On 16-04-2020 21:15, Achim Gratz via devel wrote:
>If so, you must use the clear edge of the PPS (flag2 1).

Why is that?


Udo
___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: LOGIF

2020-04-16 Thread Gary E. Miller via devel
Yo Hal!

On Wed, 15 Apr 2020 20:21:20 -0700
Hal Murray via devel  wrote:

> Gary said:
> > Then hang it off another switch.  
> 
> Care to suggest "another switch"?

Nope.  I just turn them all on.  Ask someone that cares.

> > but it does burn out SD cards quickly.   
> 
> From my initial message:
>   They are all very low volume

Yes, but not zero.  Some people are paranoid.

> If that causes troubles with your SD card, you have more serious
> problems.

Not me.  No accounting for peoples paranoia levels.

RGDS
GARY
---
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
g...@rellim.com  Tel:+1 541 382 8588

Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin


pgpRsfCxikWHx.pgp
Description: OpenPGP digital signature
___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Achim Gratz via devel
Udo van den Heuvel via devel writes:
> refclock nmea unit 0 mode 7 flag3 0 flag2 0 flag1 1 time1 0.0006 time2 
> 0.260 baud 4800

Your time1 value doesn't make any sense.  You should use the highest
baud rate you can configure on your device, if you need to stick with
4800 you must restrict the mesage type so that the GPS actually can send
all data well before the second is over.  Last and most importantly, I
believe you showed before that you get your PPS in via serial line
discipline.  If so, you must use the clear edge of the PPS (flag2 1).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Udo van den Heuvel via devel
On 16-04-2020 11:31, Hal Murray wrote:
>> I could switch to a NMEA clock sans PPS and a dedicated PPS clock?
> 
> That's what I would try.

So I went to:

##NMEA zonder PPS
refclock nmea unit 0 mode 7 flag3 1 flag2 0 flag1 0 time1 0.0006
time2 0.260 baud 4800
#
## PPS van dezelfde NMEA GPS
refclock pps unit 0 flag2 0

A NMEA clock without, a PPS clock with PPS.
(If I did that correctly)

I also switches the two Garmin GPS18X's between this box and the firewall.

On this workstation I see:

$ ntpq -pn
 remote   refid  st t when poll reach   delay   offset
 jitter
==
xNMEA(0).GPS.0 l   18   64  377   0. -331.787
23.4930
xPPS(0) .PPS.0 l7   64  377   0.  -0.8792
0.1323
+192.168.10.98  .GPS.1 u   98  128  377   0.2679  -0.7279
0.1074
*fd00:c0a8:a00: .GPS.1 u  126  128  377   0.2856  -0.5707
0.2049
 2606:4700:f1:: .STEP.  16 1-  5120   0.   0.
0.0010
-2405:fc00:0:1: .PPS.1 8  104  128  377 172.2620   1.3215
1.2845
-2001:470:e815: .PPS.1 8  115  128  377 174.3298  -8.0867
1.0422
(cut)

So I start to think the serial port might have an issue?

The firewall shows:

# ntpq -pn
 remote   refid  st t when poll reach   delay   offset
 jitter
===
oNMEA(0) .GPS.0 l   40   64  377   0.   0.1373
 0.
 fd00:c0a8:a00:1 165.216.214.155  2 u8   64  377   0.3301   0.9063
 0.1030
 192.168.10.70   165.216.214.155  2 u   55   64  377   0.2456   0.8751
 0.0562
 2606:4700:f1::1 .NTS.   16 4-  2560   0.   0.
 0.0010
-2a01:3f7:2:202: 194.58.202.202 8   30   64  377  36.1680   2.4365
 0.9056
#2a03:b0c0:1:d0: 37.15.221.1892 8   43   64  377  23.1451   2.6572
 1.8014
+2001:888:0:7::2 193.67.79.2022 u   23   64  377  14.3002   3.6927
 0.3338
(cut)

(also with kernel discipline)
This looks more normal?


Udo

___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Hal Murray via devel
> I could switch to a NMEA clock sans PPS and a dedicated PPS clock?

That's what I would try.


-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel


Re: 1.1.6 build fails on FC30

2020-04-16 Thread Udo van den Heuvel via devel
On 16-04-2020 00:55, Hal Murray wrote:
>> So no error messages about gps/NMEA.
> 
>> NMEA(0) .GPS.0 l   15   64 377   
>> 0.   0.   0.0019
> 
> What's the line for that in your ntp.conf?  Any fudge lines?

driftfile /var/lib/ntp/drift

nts key /etc/letsencrypt/keys/_key-certbot.pem
nts cert /etc/letsencrypt/csr/_csr-certbot.pem

restrict default nomodify nopeer noquery
restrict -6 default nomodify nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

restrict 192.168.10.0 mask 255.255.255.0 nomodify

refclock nmea unit 0 mode 7 flag3 0 flag2 0 flag1 1 time1 0.0006
time2 0.260 baud 4800

disable monitor

server 192.168.10.98 minpoll 4 iburst
server fd00:c0a8:a00:1::1

server time.cloudflare.com:1234 nts  # TLS1.3 only
server ntpmon.dcs1.biz nts
server pi4.rellim.com nts
server ntp1.glypnod.com nts
server ntp2.glypnod.com nts
server ntp.xs4all.nl
server ntp2.xs4all.nl
server ntp0.nl.net
server ntp2.nl.net
server keetweej.vanheusden.com
server ntp.nmi.nl

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

statsdir /var/log/ntp/

logconfig =syncall -clockall


We have some `time`in place.
See the nmea refclock. Has been there for ages.

> What does stty say for the baud rate?

# stty < /dev/ttyS0
speed 4800 baud; line = 18;
intr = ; quit = ; erase = ; kill = ; eof =
;
start = ; stop = ; susp = ; rprnt = ;
werase = ; lnext = ; discard = ;
ignbrk -brkint -imaxbel
-opost -onlcr
-isig -iexten -echo -echoe -echok -echoctl -echoke

> What sort of GPS device ?  What baud rate is it using?

Garmin GPS18X
4800 bps.

> Try stopping ntpd and running cat /dev/whatever
> That should show some NMEA sentences.

It does, even with the ntpd running.

> The 377 reach shows that something is working but the rest of the line shows 
> that it isn't.
> 
> The NMEA driver is strange in that it tries to merge both the NMEA and PPS.  
> I 
> guess that's good if it works, but it makes debugging things like this 
> complicated.

I could switch to a NMEA clock sans PPS and a dedicated PPS clock?

> I run with 2 separate servers.  Here is the chunk from my ntp.conf
> 
> server 127.127.20.0 prefer path /dev/ttyAMA0  mode 0x010011
> fudge  127.127.20.0 flag1 0# disable PPS
> fudge  127.127.20.0 time2 0.600# Fixup offset
> server 127.127.22.0# PPS signal, needs prefer
> fudge  127.127.22.0 flag2 0# Rising edge
> 
> That turns into:
> *NMEA(0) .GPS.0 l   31   64  377   0.  10.9381  
> 27.6977
> oPPS(0)  .PPS.0 l   30   64  377   0.   0.0570   
> 0.0004

Like more or less what I understand from this part...


Udo
___
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel