OctoKlipper - UART Cannot connect

On an Ender 3 w/ BTT SKR Mini E3 V3 connected over UART to my raspberry pi running OctoKlipper and I cannot get the octoprint interface to connect. I need to use UART because I want to leave the usb open for Mosaic Palette 3 Pro to use Connected Mode.

I set /boot/config.txt to have

/boot/cmdline.txt looks like:
console=tty1 root=PARTUUID=346a32b5-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=US

In Octoprint I tried using /dev/ttyS1 , /dev/ttyAMA0, and the /tmp/printer that was in there.

Any thoughts?

octoprint-systeminfo-20240220134349.zip (49.3 KB)

This is a tricky setup and depends on a lot of variables

  • Your SBC needs to be setup correctly, which can already be a pain in the back
  • Choose the right pins on your SBC
  • Wire RX to TX and vice versa. GND to GND
  • You need to flash your printer board accordingly

I have the correct pins wired, TX - RX and such and GND to GND, 5V disconnected since I’m powering from external. I’ll try re-flashing the board

Next time, please attach your log.
Also it is not needed since you will mostly find the same message in it: Serial connection closed

This means your setup is not correct WRT one of the points raised above

I’m guessing the pi isn’t set up correctly. Which puts me at a dead end for the moment, not sure what could be wrong.

For connect OctoPrint to Klipper you use /tmp/printer

Klipper establishes it’s own connection to the printer on it’s own via USB:


I use UART. This unfortunately does not apply. I need the USB connection open for my MMU.

As indicated above, this can be tedious to setup:

  • A lot of “variables” and if one is not correct → no joy
  • Even different Pi models behave differently WRT the serial setup and pins
  • Flashing the printer board with the correct serial pins is important
  • Using the correct pins on the printer board is important (usually TFT or EXP pins are used)

I noticed in all the directions, that we delete the consoled=display line, up until the baudrate. But we leave the other console var set to tty1. Does that have anything to do with this?

EDIT: I am using a standard Raspberry Pi 3B+

TBH, I do not remember. I did it once just out of curiosity and remember it was a pain to get it working by a lot of trial and error.

Follow relevant guides how to setup serial for your RPi model and then make sure to choose the correct pins on the board and build your firmware accordingly.

I think I found my issue, I believe it is config related, I was using UART on PA9/PA10… and I was jumper’d to the UART2 on the TFT pins!

Edit: Will update after my SD does a clean format and I can flash it again

YES, I have an MCU connection! I’m using a modified klippy.py that allows me to be in Connected Mode with my MMU, Mosaic Palette 3 Pro, so that’s the next step, getting the palette to recognize the printer.

1 Like

Excellent good work!

Unfortunately, I had UART working on my Raspberry Pi 3B+, but now that I need it on my BTT CB1 Raspberry pi, I’m having issues again.

I set console=serial

and according to the config it should use ttyS0 but I’m not getting a connection there. This is the result of dmesg.

dmesg | fgrep tty
[ 0.000000] Kernel command line: root=UUID=e345f9fc-00c8-4132-8e8e-8afa1304e8ed rootwait rootfstype=ext4 bootsplash.bootfile=bootsplash.armbian console=tty1 consoleblank=0 loglevel=7 ubootpart=6b982306-01 usb-storage.quirks= cgroup_enable=memory swapaccount=1
[ 0.000931] printk: console [tty1] enabled
[ 1.246101] 5000000.serial: ttyS0 at MMIO 0x5000000 (irq = 31, base_baud = 1500000) is a 16550A
[ 5.987807] systemd[1]: Created slice system-getty.slice.
[ 7.117782] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0

Well, this is exactly what I described above. At least you now know that the pins on the board and the board’s firmware are working.

If you are using the BTT image, you could also try switching to vanilla Armbian and see if you get further on it.

I’ve reached out directly to BigTreeTech. I want to see if they have any thoughts for their image. Otherwise I’ll try vanilla Armbian and KIAUH

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.