# OctoKlipper - UART Cannot connect

**URL:** <https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295>\
**Category:** General Discussion\
**Created:** [February 20, 2024, 6:49pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295 "2024-02-20T18:49:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 20, 2024, 6:49pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/1 "2024-02-20T18:49:30Z")

</div>

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  
dtoverlay=pi3-miniuart-bt  
enable\_uart=1

/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](https://klipper.discourse.group/uploads/short-url/8gwNRnFb0KfeYGBnecSg7DO8aan.zip) (49.3 KB)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 20, 2024, 6:53pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/2 "2024-02-20T18:53:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 20, 2024, 6:58pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/4 "2024-02-20T18:58:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 20, 2024, 7:00pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/5 "2024-02-20T19:00:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 20, 2024, 7:05pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/6 "2024-02-20T19:05:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [February 20, 2024, 7:10pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/7 "2024-02-20T19:10:43Z")

</div>

> [@FullStackIan](#):
>
> In Octoprint I tried using /dev/ttyS1 , /dev/ttyAMA0, and the /tmp/printer that was in there.

For connect OctoPrint to Klipper you use `/tmp/printer`

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

[https://www.klipper3d.org/Installation.html#building-and-flashing-the-micro-controller](https://www.klipper3d.org/Installation.html#building-and-flashing-the-micro-controller)

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 20, 2024, 7:11pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/8 "2024-02-20T19:11:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 20, 2024, 7:11pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/9 "2024-02-20T19:11:43Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 20, 2024, 7:13pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/10 "2024-02-20T19:13:12Z")

</div>

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+

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 20, 2024, 7:15pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/11 "2024-02-20T19:15:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 21, 2024, 3:47pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/12 "2024-02-21T15:47:56Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/6/6ec794e4e0a8e0b3850a0d4cb8e194b28f9373a2.png)  
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

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 21, 2024, 4:23pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/13 "2024-02-21T16:23:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 21, 2024, 5:06pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/14 "2024-02-21T17:06:54Z")

</div>

Excellent good work!

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 22, 2024, 3:18am UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/15 "2024-02-22T03:18:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 22, 2024, 7:34am UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/16 "2024-02-22T07:34:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FullStackIan](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@FullStackIan](https://klipper.discourse.group/u/FullStackIan)\
**Post date:** [February 22, 2024, 1:52pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/17 "2024-02-22T13:52:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [April 22, 2024, 1:53pm UTC](https://klipper.discourse.group/t/octoklipper-uart-cannot-connect/14295/18 "2024-04-22T13:53:05Z")

</div>

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