I have two Tronxy X3A printers. I have Octoprint on one, but not on the other. I love Octoprint so much that I can't stand not having it. So I decided to connect both printers to my Pi.
Detailed instructions are given on the web here.
Without further ado, here's what I did.
Identify the port for my current printer
-
ssh into my Raspberry pi, with the user name of pi (which was set up when
I installed Octoprint).
ssh -lpi octopi.local
-
List the ports for the connected usb devices
ls /dev/ttyUSB*
-
Plug in the second printer, then relist the ports for the connected usb
devices. The new device is the one for the second printer.
ls /dev/ttyUSB*
-
Get the device info for both devices, and find the differences (I have
/dev/ttyUSB0 and /dev/ttyUSB1. You might have different devices.)
My difference is this:udevadm info -a -n /dev/ttyUSB0 > devInfoUSB0 udevadm info -a -n /dev/ttyUSB1 > devInfoUSB1 diff -u devInfoUSB0 devInfoUSB1
Where my old printer is 02, and my new printer is ffATTRS{bInterfaceProtocol}=="02" ATTRS{bInterfaceProtocol}=="ff"
-
Create a named symlink to the appropriate USB port that will last through
a reboot by editing the /etc/udev/rules.d/99-usb.rules file
Enter the following two lines in the file (specific for my printers):cd /etc/udev/rules.d sudo vi 99-usb.rules
The symlinks are the names I choose to use for the printer ports.SUBSYSTEM=="tty", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="ttyCDSX3A" SUBSYSTEM=="tty", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyCPSX3A"
- Open up Octoprint, go to the settings menu, and add the new ports to the additional ports box.
Create a second copy of Octoprint
-
Copy the octoprint directory
cp -R .octoprint .octoprint2
-
Copy the octoprint configuration file
sudo cp /etc/default/octoprint /etc/default/octoprint2
-
Edit the octoprint2 configuration file to change the port and add a
basedir
sudo vi /etc/default/octoprint2
No comments:
Post a Comment