Raspberry Pi HOWTO progress

Gary E. Miller gem at rellim.com
Tue Apr 26 17:19:23 UTC 2016


Yo Eric!

My comments inline.

On Tue, 26 Apr 2016 10:50:41 -0400
"Eric S. Raymond" <esr at thyrsus.com> wrote:

> with RasPi :keywords: Raspberry Pi, odroid, NTP, NTPsec, time service
                                      ^^^^^^^ Odroid

> Beginner-level light soldering is required.

Don't do it!  How long did it take to get you to solder???

> service footnote[There is one USB GPS, the GR601-W, that provides
                                             ^^^^^^^ and GR-701W

> The build may also generalize to other HAT-compatible Unix SBCs such
> as the ODROID C2, though details of those remain to be filled in.
         ^^^^^^  Odroid


> * Temporary of a USB mouse and keyboard.
              ^^^^ use

> * Temporary use of a DVI-compatible monitor and cable.
                       or HDMI [HDMI more common]

> The Adafruit HAT is shipped as two parts, a circuit board and a 40-pin
> header.

Don't do it!  You can buy similar already assembled.

>  Your first step will be to solder the header to the bottom of
> the board, on the opposite side from the GPS module (under what would
> be the east edge if the Adafruit logo were a map legend). Poke the
> header pins upwards through the double row of through holes at the
> east edge of the board and go.

This can easily lead to disaster for the newbie.  The alignment is
critical.  It is too eassy for a newbie to tilt the pins so they will
not insert into the RasPi.  Better to insert the pins in the RasPi
connector, the place the HAT on the other end of the pins, then solder.


> (The device is shipped as parts almost certainly to evade a regulatory
> requirement for FCC conformance testing to RF emission standards,
> which is expensive and would have added to the unit cost.)

Irrelevant.  Probably wrong.

> The header on the assembled HAT fits down over the
> double row of pins on the east edge of the Pi, such that the two
> boards make a neat stack.

Swap, do this first, then solder.

> One special thing you should do is disable the serial interface.  Your
> HAT needs the GPIO pins it uses, and it's easiest to disable from the
> GUI configurator.  This change is easily reversed until and unless
> you strip out the GUI in phase 6.

No need for the GUI, the curses config works fine.

> Next, check to see if you can expand the filesystem on the SD card;
> the option may be active or frozen depending on how your SD card was
> made.

How to expand?

> peoduction as a dedicated timeserver. Run this:
  ^^^^^^^^^  production.

>           RX bytes:10589511 (10.0 MiB)  TX bytes:880938 (860.2 KiB)
> ------------------------------------------------------------------------
> 
> The key piece of information is the IP address just after "inet
> addr:", in this case 192.168.1.184. Test this by running the
> equivalent of
             ^^   this from a different machine on your network:

> 
> ------------------------------------------------------------------------
> $ ssh pi at 192.168.1.184
> ------------------------------------------------------------------------
> 
> from a different machine on your network, using whatever address you
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ avoid recursive references.

> ------------------------------------------------------------------------
> # arp -a
> ------------------------------------------------------------------------
> 
> run from any machine on your network, will give you a list of
> IP-addresses/hostnames that are or have been active on your network
> (the information is cached).

Gack, this  only works AFTER you have pinged the pi!  It will not help
you find the pi.

>  You can try any IP addresses paired with
> your Pi's hostname; one of them should work.

Unless you have rebooted and your DHCP server issued new addresses!

> To disable the serial console, remove all "console" options.

And the result looks like?  I prefer to cut/paste your result, not to have
to hunt/peck.

> This change can be undone by restoring the saved original
> of /boot/cmdline.txt, or by using the GUI configurator to re-enable
> serial interfaces.

Or comment out the original in the original file, then uncomment.

> the north end of the connector. Most other GPIO pins can be
      ^^^^^ North???

> There is a different, non-HAT Adafruit product, the "Ultimate GPS
> Breakout Board", that also uses GPIO #18.  This may be a source of
> confusion if you read some of the references in this document.

I have that one.  Works fine.

> In all versions, you force the driver to be loaded by
> editing /etc/modules to contain the line "pps-gpio".

Or compile it in the kernel, like a real man would do.

> ------------------------------------------------------------------------
> source 0 - assert 1461161753.267392352, sequence: 246 - clear
> 0.000000000, sequence: 0
> ------------------------------------------------------------------------
> 
> If you can see this, you have 1PPS and can do proper timekeeping.

Sort of, broken clear....

> Next thing you want to do is verify that the GPS works.  Put your
> Pi on someplace like a windowsill with a good sky view outside.

Shoulda done this eariler, to get a fix so the PPS works.

> faster unless you live in a canyon (including the urban kind) or
> dense forest.

Or you moved the GPS while off.

> When the red LED on the HAT blinks once per second, you don't have a
> satellite fix. When it achieves lock it will blink with much lower
> frequency.

Nice to know BEFORE the ppstest, if PPS is gated on a good sat lock.

> the latest fixes and avoids instilling a start-on-boot script
                              ^^^^^^^^^^ installing

> ------------------------------------------------------------------------
  $ cd ~
  ^^^^^^  not some random place!

> ------------------------------------------------------------------------
  $ su -
  ^^^^^^ most people do not know ho to go root!

> # ./gpsmon /dev/ttyAMA0
> ------------------------------------------------------------------------
 
> $ git clone https://gitlab.com/NTPsec/ntpsec.git
> # cd ntpsec
> $ waf configure --refclock=20,22
> $ waf build

Mixed root and not-root???

> ------------------------------------------------------------------------
> KERNEL=="ttyAMA0", SYMLINK+="gps0"  
> KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0660",
> SYMLINK+="gpspps0"
> ------------------------------------------------------------------------

Sorta defeats the ttyAMA0 -> pps0 autodetect??

> At boot time this will ensure that device aliases /dev/gps0 and
> /dev/gpps0 exist.  These are special names that NTPsec expects to see
      ^^^^^^ gpspps0 ???


> # Internet time servers for sanity
> server 0.pool.ntp.org iburst prefer  
                               ^^^^^^  huh???
> # By default, exchange time with everybody, but don't allow
> configuration. restrict default kod nomodify notrap nopeer noquery  

Comment ran together with the ommand.

> The text "mode 17" tells it to look for $GPRMC messages at a baud of
> 9600bps.

Except your earlier test was at 4800!

> flag1 1 tells it that we have a PPS interface from our GPS
> on /dev/gpspps0.
   or gpps0  as above??

> Internet time servers for sanity::
>    This section specifies some NTP pool servers to act as a sanity
>    check for our GPS time. They will also keep the time accurate if
>    your GPS loses signal.

Ho about using the us pool?  Or local country pool??

Talk about 'ntpq -p'.

> If you are running on Raspbian Jessie, an optional but recommended
> step is to uninstall systemd.  It is a CPU hog (not just on the Pi;
> similar problems have been reported across many architectures) and a
> complexity sinkhole. The things that have it as a dependency are
> things you don't want on a headless NTP server.

Die systemd, DIE!!

> # echo -e 'Package: systemd\nPin: release *\nPin-Priority: -1'
> > /etc/apt/preferences.d/systemd

Line wrap!

> As the pps-gpio module is in April 2016 it has a flaw. It catches only
> one edge of the PPS. You have a 50/50 chance you are seeing the
> trailing edge rather than the leading edge (which is the actual top of
> second).  A patch to fix this has been submitted to the Linux kernel
> maintainers but not merged.

Please complain on LKL to get this merged!

> These details will become relevant whenever we qualify a new HAT
> for coverage in this HOWTO.  The important thing to check is whether
> the pps-gpio driver triggers on leading or trailing edge.

You can use a GR-601W to compare against to verify the proper edge.

> * You will not been able to see PPS in a stock gpsmon. GPSD has a
     ^^^^^^^^^^^^^^^^^^^^^^ ????

>   magic kludge for this that recognizes /de/ttyAMA0 as special,
>   but not /dev/ttyS2.

As of May 2016 git, GPSD has the magic kludge.

> * Fotr the same reason, you need to give gpsd /dev/ppsS0 as a
    ^^^^^  for

> . Do "ls /dev/sd*". You should see an additional device, most
> likely /dev/sdd.

Or do: # dmesg | tail

Or do this and look for the 8GB device: fdisk -l

> you don't, you have a USB-layer or hardware problem beyond the scope
> of this HOWTO.

In my case it is /dev/mm*

> . As root, moount the card. The command "mount /dev/ssd1 /media" will
             ^^^^^^

>   probably be right.  Any empty directory will do as as a mount
> point, there is noting magic about "/media".

Or, classically:

# mkdir /mnt/usb
# mount /dev/ssd1 /mnt/usb

/media is non-standard, may already be in use.


>   (e.g."/meda") and run "unzip" with the NOOBS zip as argument.

Example to cut/paste?


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160426/8c461bb7/attachment.bin>


More information about the devel mailing list