Skip to content

Step 10 Installing Tinypilot

marcobergman edited this page Mar 13, 2021 · 17 revisions

While the boat is still on the hard, let’s have a look at tinypilot. Installation instructions for the image on https://pypilot.org – download are clear and concise and I have nothing to add.

Note that it is mentioned here that the tinypilot won’t run on raspberry 3+ or 4. First feedback I read from people who tried to run it on a 3+ was indeed that it had a problem recognizing the wireless adaptor. The intended hardware is a raspberry pizero-WH. The W stands for wi-fi, the H stands for header pins, so you don’t need to solder.

pi@openplotter:~ $ wget https://pypilot.org/download.php?Down=images/tinypilot_2020_10_27.img.xz -O tinypilot_2020_10_27.img.xz
476.13M 5.69MB/s in 81s
pi@openplotter:~ $ xzcat tinypilot_2020_10_27.img.xz | sudo dd of=/dev/sda bs=4M
1.1 GB copied, 32 s, 32.8 MB/s

Once you have downloaded and burnt the SD card, stuck it in, power it up. The pizero has a mini hdmi plug, so you could witness the startup sequence on a screen. But it won’t make you happy; we’ll get to that later.

Instead, like many IoT devices nowadays, Tinypilot manifests upon startup a wi-fi access point with a known SSID and wi-fi password, and you can connect your laptop to it to configure it. It is possible to keep the access point, and then tinypilot can serve as a very compact standalone system. For this exercise, however, we are going to connect tinypilot as a wi-fi client to our openplotter wi-fi access point, and access it from there.

  • After startup, you will see a wi-fi accesspoint called pypilot; it is open and does not require a wi-fi password. Connect to it, make sure your machine uses dhcp.
  • Browse to http://192.168.14.1 and there you will see the browser interface of pypilot.
  • Go to Configuration → Configure Wifi
  • Change Master(AP) to Managed(client), SSID for ‘openplotter’, and the wi-fi password of your openplotter access point, click submit.

  • Tinypilot won’t restart by itself, so you would have to unplug and replug the power.
  • Find the IP address of your tinypilot by typing the following on your openplotter:
pi@openplotter:~ $ sudo grep DHCPACK /var/log/daemon.log | tail
Mar 10 22:26:46 openplotter dnsmasq-dhcp[579]: DHCPACK(wlan9) 10.10.10.159 a4:34:d9:e4:bc:d6 marco-desktop
Mar 10 22:46:32 openplotter dnsmasq-dhcp[579]: DHCPACK(wlan9) 10.10.10.82 b8:27:eb:16:28:c9 box

In the example above, you see that the last IP-address that was handed out, was 10.10.10.82, so you should be able to type http://10.10.10.82 in your browser to get back to the browser interface of tinypilot. If you also add an IMU, you will have an autopilot system in the palm of your hand.

  • At the time of writing, the latest tinypilot image is shipped with pypilot version v0.12, so you cannot access it with a recent OpenCPN plugin user interface. Pypilot on the tinypilot needs updating; for this, see the next Step.
pi@openplotter:~ $ ssh [email protected]
[email protected]'s password: pypilot
tinypilot is a Sailboat Autopilot Distribution for raspberry pi

   ( '>')
  /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
 (/-_--_-\)           www.tinycorelinux.net

tc@box:~$ netstat -antlp
tcp        0      0 0.0.0.0:20220     0.0.0.0:*     LISTEN      1963/pypilot
tcp        0      0 0.0.0.0:21311     0.0.0.0:*     LISTEN      1950/pypilot
tcp        0      0 0.0.0.0:2947      0.0.0.0:*     LISTEN      1707/gpsd
tcp        0      0 0.0.0.0:80        0.0.0.0:*     LISTEN      -
tcp        0      0 0.0.0.0:33333     0.0.0.0:*     LISTEN      -
tcp        0      0 0.0.0.0:22        0.0.0.0:*     LISTEN      -

• Note that 21311 in the output above is a sign of old age: it should be 23322.


Step 11 Tinypilot under the hood >>>

Clone this wiki locally