-
Notifications
You must be signed in to change notification settings - Fork 2
Step 11 Tinypilot under the hood
http://www.tinycorelinux.net/corebook.pdf
-
username tc password pypilot
-
In debian, packages are .deb files and they are once installed from the .deb file onto the file system.
-
In tinycore linux, packages are .tcz files, and they are loaded at boot-time onto a read-only filesystem, and a symbolic link is created to the executables. The script that loads the packages at boot-time, is the script
/opt/bootlocal.sh
. The command that loads .tcz packages istce-load
# This is the pypilot package:
tc@box:~$ find / -name pypilot.tcz 2>/dev/null
/mnt/mmcblk0p2/tce/optional/pypilot.tcz
# This line is where it is being 'loaded' at boot-time:
tc@box:~$ grep pypilot /opt/bootlocal.sh | grep tce-load
chpst -utc tce-load -i python-serial python-RTIMULib python-ujson pypilot > /dev/null
# After loading, the package is availabe at this read-only filesystem:
tc@box:~$ df | grep pypilot
/dev/loop19 384.0K 384.0K 0 100% /tmp/tcloop/pypilot
# And this is how the executables are being accessed: through symbolic links into the read-only filesystem:
tc@box:~$ which pypilot
/usr/local/bin/pypilot
tc@box:~$ ls -al /usr/local/bin/pypilot
lrwxrwxrwx 1 root root 41 Jun 11 20:00 /usr/local/bin/pypilot -> /tmp/tcloop/pypilot/usr/local/bin/pypilot
services are defined under /etc/sv/
startup with sudo sv {start|stop} servicename
log files are under /var/log/servicename/current
configuration under .pypilot, which links to /mnt/mmcblk0p2/.pypilot
Upgrading pypilot on tinypilot is essentially replacing pypilot.tcz with a new version. To make a new pypilot.tcz file, clone pypilot from github and run pypilot.build.
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 only works if you specified DHCP (=no Client Mode Address) in the tinypilot wi-fi settings. If you specified a fixed ip address, you will get the message fatal: Unable to look up github.com (port 9418) (Temporary failure in name resolution)
.
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
tc@box:/mnt/mmcblk0p2/.pypilot$ sudo sv stop pypilot
ok: down: pypilot: 0s
tc@box:/mnt/mmcblk0p2/.pypilot$ pypilot
ERROR loading learning.py No module named tensorflow , No module named learning
ERROR loading learning.py No module named tensorflow , No module named learning
warning, failed to make calibration process idle, trying renice
Settings file not found. Using defaults and creating settings file
Using settings file RTIMULib.ini
Detected MPU9250/MPU9255 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: MPU-925x
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
loading servo calibration /home/tc/.pypilot/servocalibration
WARNING: using default servo calibration!!
connected to gpsd
Loaded Pilots: ['wind', 'simple', 'basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
MPU-925x init complete
servo is running too _slowly_ 0.0678148269653
value 65535
arduino servo found on [u'/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0', 38400]
serialprobe success: /home/tc/.pypilot/servodevice [u'/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0', 38400]
Pypilot Workbook
- Introduction
- What is pypilot
- The software component
- The hardware component
- The User Interface component
- Pypilot functions
- Data connections
-
The steps
- Step 1: Install Openplotter Headless
- Step 2: Install pypilot
- Step 3: The openplotter user interface
- Step 4: The browser interface
- Step 6: The Arduino controller
- Step 7: OpenCPN Pypilot Plugin
- Step 8: Looking under the hood
- Step 9: Wiring up the Nano
- Step 10: Installing Tinypilot
- Step 11: Tinypilot under the hood
- Step 12: Using openplotter tools remotely
- Todo