Multiple Creality printers on same PI4

Hi, 

I have been using the Repetier server with my Prusa and my Creality CR6SE just fine. But I have just added a CR10 SMART, (I opened it and added the USB cable to the board) 

When I plug the CR 10 Smart into the Pi. It thinks it is the CR6SE and wants to use the same port. How do I get around this? 

I should also mention, I have a CR6 MAX coming in a couple days I also want to connect up. 

Do I need separate pi's for each Creality machine? Seams to defeat the server feature here. 

On another note, While I am here. I have a Prusa MK3+ that will not stay connected to Repetier, Any advice on this is great too. 

Thanks, for ANY help. 

Viper

Comments

  • edited November 2021
    Make sure to use port names that are unique and always the same for each printer. Safest solution is to always plug them into the same usb port and set ALL ports based on names /dev/serial/by-path/... these bind it to the usb port which is always a unique name. Just make sure not to use same path twice or it will get problems.

    The Prusa MK3+ board is a bit unique in that usb powers serial converter chip, but not cpu. So server constantly tries to connect and fails if main power is off and that is what I hope you see. For this we have the checkbox "Port is visible even if printer is not running". Especially added for the Prusa special problem here. Then it should only switch when the connection is really established which should happen when you enable main power. On newer firmwares it might not detect for same reason when it gets disabled - for that we have a solution in next server update.
  • I know this video playlist is for OctoPrint but it does contain a fix using udev rules. It is in one of the Multiple Instance videos.

    In short, you create a /etc/udev/rules/99-usb.rules file.

    In this file you add an entry like this: (ALL INFO TWO SEPARATE LINES. Or in your case three.)

    SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.3", SYMLINK+="Ender_3v2"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.4", SYMLINK+="Ender_3Max"

    You can see what UBS ports are used by doing "ls /dev/ttyUSB*"  This will list you printers and USB ports.

    The devpath "1.3" or "1.4" is the usb port that the particular is on. The printer MUST stay on the same port ALL the time. IF you change ports you HAVE to change the devpath to the new port.

    Here is the output of "sudo udevadm info /dev/ttyUBS0" on my system:

    P: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0
    N: ttyUSB0
    L: 0
    S: serial/by-id/usb-1a86_USB_Serial-if00-port0
    S: serial/by-path/pci-0000:00:14.0-usb-0:3:1.0-port0
    E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0
    E: DEVNAME=/dev/ttyUSB0
    E: MAJOR=188
    E: MINOR=0
    E: SUBSYSTEM=tty
    E: USEC_INITIALIZED=236759428
    E: ID_BUS=usb
    E: ID_VENDOR_ID=1a86
    E: ID_MODEL_ID=7523
    E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
    E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
    E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
    E: ID_VENDOR_FROM_DATABASE=QinHeng Electronics
    E: ID_AUTOSUSPEND=1
    E: ID_MODEL_FROM_DATABASE=CH340 serial converter
    E: ID_VENDOR=1a86
    E: ID_VENDOR_ENC=1a86
    E: ID_MODEL=USB_Serial
    E: ID_MODEL_ENC=USB\x20Serial
    E: ID_REVISION=0264
    E: ID_SERIAL=1a86_USB_Serial
    E: ID_TYPE=generic
    E: ID_USB_INTERFACES=:ff0102:
    E: ID_USB_INTERFACE_NUM=00
    E: ID_USB_DRIVER=ch341
    E: ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
    E: ID_PATH=pci-0000:00:14.0-usb-0:3:1.0
    E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_3_1_0
    E: DEVLINKS=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 /dev/serial/by-path/pci-0000:00:14.0-usb-0:3:1.0-port0
    E: TAGS=:systemd:
    E: CURRENT_TAGS=:systemd:

    In the top line you see the port that goes in to devpath.

    Not only do you get the devpath you need to set the idVendor and idProduct values as well. Also found with udevadm.  You can see the values in bold in the sample output.

    The symlink I haven't had much luck with, but you can set that a more familiar name. YMMWV.

    When you reboot the pi you should be able to go into repetier and select the proper /dev/ttyUSB0 or 1 or 2 or 3 for the particular printer.


    Hope this helps. I've been doing this for about 4 months with my two Ender 3 printers with OctoPrint. Though with my install of repetier this step was unnecessary. I was able to choose the port. Of course OctoPrint DOESN'T officially support multiple printers so it is a "hack".

    Also as in the video since this solution is more of a hack and doesn't ALWAS work, there can be glitches and devpath could change on you requiring you to make the change in 99-usb.rules.
Sign In or Register to comment.