Skip to content

updating pypilot tinypilot

marcobergman edited this page Jul 7, 2023 · 1 revision

Upgrade pypilot on tinypilot

The easiest way to upgrade tinypilot is to download the latest tinypilot image from https://pypilot.org and burn it on the SD card. Take a new SD card so you can roll back to the previous is there is a problem. It should be noted, however, that the latest tinypilot image does not guarantee the latest pypilot sofftware patches.

But if you understood the previous paragraph, you already know that upgrading pypilot on tinypilot is essentially the same as replacing pypilot.tcz with a new version. Now read this carefully, and let it sink into your system:

To make a new pypilot.tcz file, clone pypilot from github and run pypilot.build.

Connecting tinypilot to the internet - To clone, tinypilot needs to be connected to the internet. If it is connected as a client to the openplotter wi-fi access point, and openplotter is connected to the internet with a cable (or, on the boat, with a USB-tether to your smart phone), you can clone directly from the tinypilot.

NOTE: this works if you specified DHCP in the tinypilot wi-fi settings. If you specified a fixed ip address (Client Mode Address), you will get the message fatal: Unable to look up github.com (port 9418) (Temporary failure in name resolution). Understandable, because you have not specified a fixed dns and gateway yet. Make sure there's nameserver 8.8.8.8 in /etc/resolve.conf, and specify a default gateway e.g. sudo route add default gw 10.10.10.1

If you have done all this, run the code below to update pypilot. This is best done line by line, and it is best capture the output of each command as forensic evidence in a text file, that you save with the current date in the filename:

cd
mkdir pypilot-update
cd pypilot-update/
git clone git://github.com/pypilot/pypilot
git clone --depth 1 git://github.com/pypilot/pypilot_data
cp -rv pypilot_data/* pypilot
cd pypilot
. pypilot.build

After this, reboot your tinypilot. sudo reboot will do, unplugging and replugging the power as well.

Alas, as per march 2022 this does not work anymore; the git clone will time out because unauthenticated access with the git:// protocol is no longer supported. Trying git clone https:// will not work on tinypilot, because git has been compiled without https-support. In future images this might be the case, so I won't delete the procedure yet for this workbook. Next:

Upgrading tinypilot remotely - If connecting tinypilot to the internet is a problem, you can also update it remotely from a raspberry that is connected to the internet; replace 10.10.10.3 with the ip address of tinypilot:

git clone https://github.com/pypilot/pypilot
git clone --depth 1 https://github.com/pypilot/pypilot_data
cp -rv pypilot_data/* pypilot

ssh [email protected] "mkdir pypilot_update"
scp -r pypilot/* [email protected]:~/pypilot_update/
ssh [email protected] "cd pypilot_update; . pypilot.build; sudo reboot"

Roll back upgrade - In both cases, you can revert to the old version of pypilot by running pypilot.build in the old source directory:

ssh [email protected] "cd pypilot; . pypilot.build; sudo reboot"
Clone this wiki locally