# DietPi mcu Permission Denied

**URL:** <https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532>\
**Category:** General Discussion\
**Created:** [January 19, 2026, 10:53pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532 "2026-01-19T22:53:26Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![cardoc](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cardoc](https://klipper.discourse.group/u/cardoc)\
**Post date:** [January 20, 2026, 7:52pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/21 "2026-01-20T19:52:57Z")

</div>

If I’m not mistaken the error “Timeout on connect → Serial connection closed” really means Klipper is

- Open USB serial port
- Send the very first packet: identify
- Receive nothing
- Wait 1 second
- Retry
- Eventually give up and close the port

If I’m correct that means klipper firmware is not running on the MCU. The creality 4.2.2 board is notoriously dificult to flash.

> [@Ender 3 v2 board 4.2.2, not able to flash Klipper firmware](https://klipper.discourse.group/t/ender-3-v2-board-4-2-2-not-able-to-flash-klipper-firmware/24140):
>
> Basic Information: Printer Model: Creality Ender 3 V2 MCU / Printerboard: STM32F103 RET6 Host / SBC Samsung S10 klippy.log Describe your issue: I’ve been trying to flash Klipper firmware on my printer, which uses a Creality 4.2.2 board, but I haven’t had any success using the settings shown in the image: I’m using an 8GB Kingston SD card formatted to FAT32 with the SD Card Formatter tool. This same card has successfully flashed Marlin firmware b…

Add to that the GD32F330 is not a “mainstream” MCU.

> [@Support for new Creality boards 4.2.2 with GD32F303](https://klipper.discourse.group/t/support-for-new-creality-boards-4-2-2-with-gd32f303/3016/7):
>
> Follow the directions at the top of [klipper/printer-creality-ender3-v2-2020.cfg at master · Klipper3d/klipper · GitHub](https://github.com/Klipper3d/klipper/blob/master/config/printer-creality-ender3-v2-2020.cfg) . In practice, the gd32 chip works the same as the stm32f103.
> 
> -Kevin

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [January 20, 2026, 7:54pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/22 "2026-01-20T19:54:39Z")

</div>

Sorry, your “serial connection port” is wrong.

> [@hcet14](#):
>
> Sorry, didn’t read your attached klippy.log and got you wrong with the title.
> 
> ```auto
> 7260 serial = /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
> .
> .
> 7325 mcu 'mcu': Unable to open serial port: [Errno 13] could not open port /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0: [Errno 13] Permission denied: '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'
> 
> ```
> 
> See Sineos perfect [How-To Trouble-Shoot](https://klipper.discourse.group/t/how-to-trouble-shoot/6326#p-17533-connection-problems-to-the-printer-board-4).

In your latest klippy.log (klippy\_01.20.log)

```auto
Line 215: serial = /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
.
.
Line 280: mcu 'mcu': Unable to open serial port: [Errno 13] could not open port /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0: [Errno 13] Permission denied: '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'

```

---

<div class="post-metadata">

**Author:** ![makerjud](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@makerjud](https://klipper.discourse.group/u/makerjud)\
**Post date:** [January 20, 2026, 8:21pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/23 "2026-01-20T20:21:02Z")

</div>

> [@cardoc](#):
>
> Add to that the GD32F330 is not a “mainstream” MCU.Sorry, your “serial connection port” is wrong.

I am not sure if difficult to flash is right. Every time I flash a firmware it seems to work as expected, blank screen really being the only clue. I have flashed back to stock firmware a few times without issue. The two frustrating things is that without the serial connection there is no good way to tell other than a blank screen which is advised to unplug anyway.

The real killer seems to be silent board changes that make firmware building a crapshoot with limited ways to figure out what is going on. Maybe I just need to keep working through the firmware options and hoping for the best.

> [@hcet14](#):
>
> Sorry, your “serial connection port” is wrong.

I do not understand.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/2/1/21d1267e99fd7128521011c8b8fde38eeb0da2bb.png)

```auto
dietpi@DietPi:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

```

```auto
dietpi@DietPi:~$ ls /dev/serial/by-id/*
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

```

---

<div class="post-metadata">

**Author:** ![cardoc](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cardoc](https://klipper.discourse.group/u/cardoc)\
**Post date:** [January 20, 2026, 9:14pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/24 "2026-01-20T21:14:32Z")

</div>

Long shot but I asked Copilot (AI) to search out information on flashing Creality 4.2.2 boards. It claims that GD32f330 is fundamentally different in that it has an onboard USB interface not a CH430 USB\<\>Serial chip.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/6/4/64ebd3c2b9788a183fe9c55ac9544500e9c47b7a.png)

If Copilot is correct that could explain a lot of issues.

So try this

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/3/0/3049685eaf36c99023f7165e4b72b217c8e45a6a.png)

Copilot also has opinions on file names for flashing this board.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/b/4/b4ce801492376b9793caa3bd8f6c10ab34a26ddd.png)  
Your mileage may vary.

---

<div class="post-metadata">

**Author:** ![makerjud](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@makerjud](https://klipper.discourse.group/u/makerjud)\
**Post date:** [January 20, 2026, 9:20pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/25 "2026-01-20T21:20:07Z")

</div>

Not sure I believe that since lsusb shows a CH340 as the printer then again dmesg shows it as a CH341?

I am willing to give it a shot, but the AI output doesn’t track with what I see.

```auto
dietpi@DietPi:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

```

```auto
[3829.604434] usb 1-1: USB disconnect, device number 2
[3829.606006] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[3829.606192] ch341 1-1:1.0: device disconnected
[3831.091906] usb 1-1: new full-speed USB device number 4 using xhci_hcd
[3831.229845] usb 1-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[3831.229892] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[3831.229914] usb 1-1: Product: USB Serial
[3831.234950] ch341 1-1:1.0: ch341-uart converter detected
[3831.236436] usb 1-1: ch341-uart converter now attached to ttyUSB0

```

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [January 20, 2026, 9:32pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/26 "2026-01-20T21:32:46Z")

</div>

> [@makerjud](#):
>
> Not sure I believe that since lsusb shows a CH340 as the printer then again dmesg shows it as a CH341?

That’s yours. CH340 and CH341 have even the same datasheet. Just connect and disconnect to make sure.

> [@makerjud](#):
>
> I am willing to give it a shot, but the AI output doesn’t track with what I see.

Do yourself a favor and forget that crap…

---

<div class="post-metadata">

**Author:** ![cardoc](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cardoc](https://klipper.discourse.group/u/cardoc)\
**Post date:** [January 20, 2026, 10:02pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/27 "2026-01-20T22:02:33Z")

</div>

I knew it was too good to be true. Copilot 0 - Humans 1

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/f/a/fa5367dd8238a18bb24aa67af37461077ad90eab.png)

---

<div class="post-metadata">

**Author:** ![makerjud](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@makerjud](https://klipper.discourse.group/u/makerjud)\
**Post date:** [January 20, 2026, 11:01pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/28 "2026-01-20T23:01:52Z")

</div>

I did try that make menuconfig for shits and giggles and got no change.

Two things that bug me is that most of the printer.config files have this alternative section about “If you prefer a direct serial connection”. Like who knows? It isn’t addressed in the Klipper docs that i can find. I don’t know if I prefer that or if the board needs that, but it sure seems recommended most often. THe second thing is that the GD chips are rarely mentioned despite how ofteh they seems to have been used. The only ender 3 config I found that mentioned it was the ender 3 pro.

So yeah, I will try to flash again with USART1 PA10/PA9 and USART3 PB11/PB10 and report back.

---

<div class="post-metadata">

**Author:** ![cardoc](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cardoc](https://klipper.discourse.group/u/cardoc)\
**Post date:** [January 21, 2026, 12:04am UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/29 "2026-01-21T00:04:13Z")

</div>

> [@makerjud](#):
>
> If you prefer a direct serial connection

If you have a PC with a real serial port or want to run RS232 over 2 GPIO pins on your PI then you need that. In your case you would need a USB dongle (with a 9 pin out in most cases) to bypass the onboard CH340. Might work but I’d put the $ toward a new mainboard (BTT SKR mini is a drop in upgrade). I don’t know anyone using “direct serial”. Even boards with the host and MCU on the same circuit board use USB.

---

<div class="post-metadata">

**Author:** ![makerjud](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@makerjud](https://klipper.discourse.group/u/makerjud)\
**Post date:** [January 21, 2026, 1:00pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/30 "2026-01-21T13:00:04Z")

</div>

I can mark this solved!

The issue was with dietpi and the lack of group inheritance of the dialout group!

I reflashed with the USART1 PA10/PA9 and have a MCU connection!!

---

<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:** [February 20, 2026, 11:00pm UTC](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532/31 "2026-02-20T23:00:54Z")

</div>

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

[Previous page](https://klipper.discourse.group/t/dietpi-mcu-permission-denied/25532.md?page=1)
