#11 - Install Armbian, OctoPrint and Klipper on the emmc of a Banana pi M5 - Linux and windows.

artezmia
artezmia
1.1 هزار بار بازدید - پارسال - For a linux install just
For a linux install just follow the video. If you are a Window user, when you reach the two minute mark, you can jump to the 53'54" mark, and when you reach the end, jump back to the 6'23" mark. The actual install is the same for both operating systems; the only difference is the way of preparing a micro SD card prior to the emmc install. Please comment on the video, I'd love to hear from my viewers.
Once the Armbian is installed on the pi, these are the following commands and files to be written:
sudo apt-get update
sudo apt-get dist-upgrade

apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

sudo apt install python3-venv libyaml-dev
sudo apt install python-dev-is-python3
sudo apt install mg
sudo apt install mc

mkdir OctoPrint && cd OctoPrint

python3 -m venv venv
source venv/bin/activate
pip3 install pip --upgrade
pip3 install --default-timeout=100 octoprint
sudo usermod -a -G tty pi
sudo usermod -a -G dialout pi

cd ~/
sudo mv octoprint.init /etc/init.d/octoprint
sudo mg /etc/default/octoprint
_________________
Paste in window:
Configuration for /etc/init.d/octoprint

The init.d script will only run if this variable non-empty.
OCTOPRINT_USER=pi

base directory to use
BASEDIR=/home/pi/.octoprint

configuration file to use
CONFIGFILE=/home/pi/.octoprint/config.yaml

On what port to run daemon, default is 5000
PORT=5000

Path to the OctoPrint executable, you need to set this to match your installation!
DAEMON=/home/pi/OctoPrint/venv/bin/octoprint

What arguments to pass to octoprint, usually no need to touch this
DAEMON_ARGS="--port=$PORT"

Umask of files octoprint generates, Change this to 000 if running octoprint as its own, separate user
UMASK=022

Process priority, 0 here will result in a priority 20 process.
-2 ensures Octoprint has a slight priority over user processes.
NICELEVEL=-2

Should we run at startup?
START=yes
_________________________________
sudo mg octoprint.service
Paste this in the window:

[Unit]
Description=The snappy web interface for your 3D printer
After=network-online.target
Wants=network-online.target

[Service]
Environment="LC_ALL=C.UTF-8"
Environment="LANG=C.UTF-8"
Type=simple
User=pi
ExecStart=/home/pi/OctoPrint/venv/bin/octoprint serve
Reboot=always
Nice=-2
[Install]
WantedBy=multi-user.target
____________________________
sudo chmod +x octoprint.service
sudo mv octoprint.service /etc/systemd/system/
sudo update-rc.d octoprint defaults

sudo visudo
Add this below the %sudo line:
pi ALL=NOPASSWD: ALL
___________________________
cd ~/
sudo mg autostart.py
Paste this in the window:

#!/usr/bin/env python
import os
os.system( "sudo service octoprint start")
exit()
_________________________
sudo chmod +x autostart.py

sudo crontab -e
Add this below the last line:
@reboot sudo python3 /home/pi/autostart.py &  
____________________________
This part is to setup auto login for BPI.
RUN TERMINAL COMMAND: sudo mg /lib/systemd/system/[email protected]
Make sure you have this in the window, edit if necessary:
[Service]
the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noissue --autologin pi %I $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
___________________________________
At this point octoprint is installed.

Istalling klipper:

sudo apt install git

cd
git clone https://github.com/Klipper3D/klipper
then run
./klipper/scripts/install-octopi.sh

That's it folks.
پارسال در تاریخ 1402/03/20 منتشر شده است.
1,144 بـار بازدید شده
... بیشتر