User Tools

Site Tools


x40:octoprint

This is an old revision of the document!


There are three ways to install OctoPrint on a Raspberry Pi:

  1. Our Customized OctoPi
  2. guysoft/OctoPi
  3. Install OctoPrint from source on a Raspberry Pi.

Our Customized OctoPi

This is the easiest way to use OctoPrint on a Raspberry Pi

Download Image

Install image tool

Download the latest version of Raspberry Pi Imager and install it. If you want to use Raspberry Pi Imager from a second Raspberry Pi, you can install it from a terminal using sudo apt install rpi-imager

Flash image

Then:

  • Connect an SD card reader with the SD card inside.
  • Open Raspberry Pi Imager and choose the Customized OctoPi.
  • Choose the SD card you wish to write your image to.
  • Review your selections and click on the Write button to begin writing data to the SD Card.

guysoft/OctoPi

The latest version of OctoPi is 0.18.0 released on Jan 25, 2021. This version of OctoPi needs to update the serial driver of ch340/ch341.

1.Install Image

Unzip the guysoft/OctoPi image and install it to an sd card according to the installation instructions of guysoft/OctoPi.

2.Login

Log into your pi via SSH or other means

3.Delete the older ch340/ch341 serial driver

Check if the ch340/ch341 serial driver already exists:

ls /lib/modules/$(uname -r)/kernel/drivers/usb/serial/

Delete it:

sudo rm /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch341.ko


4.Build the newer serial driver and install it:

a)Install the Linux kernel header file:

The Linux kernel version of OctoPi is 5.4.79, So we download the corresponding header file installation package.

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20201126-1_armhf.deb 

(If your Linux kernel version is not 5.4.79, download the corresponding one from http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ;
Use this command to check which version of your Linux kernel: uname -r
Install the header file :

sudo dpkg -i ./raspberrypi-kernel-headers_1.20201126-1_armhf.deb

b)Download the CH340 serial driver source code and unzip it

wget http://www.weedo3dprinter.com/lib/exe/fetch.php/firmware/ch341ser_linux-kernel5.4.79.zip
unzip ch341ser_linux-kernel5.4.79.zip

c)Build it:

cd ch341ser_linux-kernel5.4.79 && make

d)Install it:

sudo cp ch34x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/
sudo depmod

5.Reboot your Raspberry Pi and Connect the printer with its baud rate


Install OctoPrint from source on a Raspberry Pi

1.Install OctoPrint

Install OctoPrint following the OctoPrint community documents.

If you can connect the printer with OctoPrint, there's nothing more you need to do.

If you can not connect the printer with OctoPrint, continue with section 2 to update the serial driver of CH341:

2.Update serial driver

a)get your Linux kernel version

uname -r

b)Install your Linux kernel header package

If you are compiling a kernel module or similar, you will need the Linux Kernel headers. These provide the various function and structure definitions required when compiling code that interfaces with the kernel.

If you have cloned the entire kernel from github, the headers are already included in the source tree. If you don’t need all the extra files, it is possible to install only the kernel headers from the Raspberry Pi OS repo.

sudo apt-get update
sudo apt install raspberrypi-kernel-headers
x40/octoprint.1675048092.txt.gz · Last modified: 2023/01/30 11:08 by mao