Klipper cannot find rpi mcu - Please help

Basic Information:

Printer Model: Ender 5 Plus
MCU / Printerboard: SKR 2
Host / SBC - Rpi 4
klippy.log attached

Describe your issue:

i am adding this incase someone else gets stuck here. After doing

sudo systemctl enable klipper-mcu.service

add these commands

cd ~/klipper/

sudo cp “./scripts/klipper-mcu-start.sh” /etc/init.d/klipper_mcu

sudo update-rc.d klipper_mcu defaults

then proceeded on with the make command e

I cant get the above plans to work. I get the following messages -

pi@Ender3S1:~/klipper sudo cp "./scripts/klipper-mcu-start.sh" /etc/init.d/klipper_mcu cp: cannot stat './scripts/klipper-mcu-start.sh': No such file or directory pi@Ender3S1:~/klipper
pi@Ender3S1:~/klipper sudo cp "./scripts/klipper-mcu-start.sh" /etc/init.d/klipper_mcu cp: cannot stat './scripts/klipper-mcu-start.sh': No such file or directory pi@Ender3S1:~/klipper sudo update-rc.d klipper_mcu defaults
^[[3~update-rc.d: error: unable to read /etc/init.d/klipper_mcu
pi@Ender3S1:~/klipper $

Please help, this is the only instance of klipper I have had problems installing. On an SKR2 board if that helps. Already switched every wire, new Raspberry Pi4, switched to a 3rd Pi4.

At my wits end.

klippy (3).log (356.7 KB)

Could you please format your code snippets with the Preformatted Text feature of the forum editor. Else important informations get lost.

Format

Did you stick to this?

https://www.klipper3d.org/RPi_microcontroller.html#install-the-rc-script

=======================
Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
Git version: 'v0.12.0-171-g2f6e94c9'
Branch: master
Remote: origin
Tracked URL: https://github.com/Klipper3d/klipper.git
CPU: 4 core ?
Python: '3.9.2 (default, Feb 28 2021, 17:03:44) \n[GCC 10.2.1 20210110]'
webhooks client 547812072224: {'program': 'Moonraker', 'version': 'v0.8.0-327-g9447494'}
=============== Log rollover at Mon Apr 22 00:00:02 2024 ===============
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
mcu 'rpi': Unable to open serial port: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
MCU error during connect
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/mcu.py", line 791, in _mcu_identify
    self._serial.connect_uart(self._serialport, self._baud, rts)
  File "/home/pi/klipper/klippy/serialhdl.py", line 182, in connect_uart
    self._error("Unable to connect")
  File "/home/pi/klipper/klippy/serialhdl.py", line 61, in _error
    raise error(self.warn_prefix + (msg % params))
serialhdl.error: mcu 'rpi': Unable to connect

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 176, in _connect
    self.send_event("klippy:mcu_identify")
  File "/home/pi/klipper/klippy/klippy.py", line 263, in send_event
    return [cb(*params) for cb in self.event_handlers.get(event, [])]
  File "/home/pi/klipper/klippy/klippy.py", line 263, in <listcomp>
    return [cb(*params) for cb in self.event_handlers.get(event, [])]
  File "/home/pi/klipper/klippy/mcu.py", line 796, in _mcu_identify
    raise error(str(e))
mcu.error: mcu 'rpi': Unable to connect
Build file /home/pi/klipper/klippy/../.config(3446): Sun Apr 21 15:51:46 2024
========= Last MCU build config =========
CONFIG_LOW_LEVEL_OPTIONS=y
# CONFIG_MACH_AVR is not set
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
CONFIG_MACH_STM32=y
# CONFIG_MACH_HC32F460 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_BOARD_DIRECTORY="stm32"
CONFIG_MCU="stm32g0b1xx"
CONFIG_CLOCK_FREQ=64000000
CONFIG_FLASH_SIZE=0x20000
CONFIG_FLASH_BOOT_ADDRESS=0x8000000
CONFIG_RAM_START=0x20000000
CONFIG_RAM_SIZE=0x24000
CONFIG_STACK_SIZE=512
CONFIG_FLASH_APPLICATION_ADDRESS=0x8002000
CONFIG_STM32_SELECT=y
# CONFIG_MACH_STM32F103 is not set
# CONFIG_MACH_STM32F207 is not set
# CONFIG_MACH_STM32F401 is not set
# CONFIG_MACH_STM32F405 is not set
# CONFIG_MACH_STM32F407 is not set
# CONFIG_MACH_STM32F429 is not set
# CONFIG_MACH_STM32F446 is not set
# CONFIG_MACH_STM32F765 is not set
# CONFIG_MACH_STM32F031 is not set
# CONFIG_MACH_STM32F042 is not set
# CONFIG_MACH_STM32F070 is not set
# CONFIG_MACH_STM32F072 is not set
# CONFIG_MACH_STM32G070 is not set
# CONFIG_MACH_STM32G071 is not set
# CONFIG_MACH_STM32G0B0 is not set
CONFIG_MACH_STM32G0B1=y
# CONFIG_MACH_STM32G431 is not set
# CONFIG_MACH_STM32H723 is not set
# CONFIG_MACH_STM32H743 is not set
# CONFIG_MACH_STM32H750 is not set
# CONFIG_MACH_STM32L412 is not set
# CONFIG_MACH_N32G452 is not set
# CONFIG_MACH_N32G455 is not set
CONFIG_MACH_STM32G0=y
CONFIG_MACH_STM32G0Bx=y
CONFIG_HAVE_STM32_USBFS=y
CONFIG_HAVE_STM32_FDCANBUS=y
CONFIG_HAVE_STM32_USBCANBUS=y
CONFIG_STM32_DFU_ROM_ADDRESS=0
CONFIG_STM32_FLASH_START_2000=y
# CONFIG_STM32_FLASH_START_0000 is not set
CONFIG_STM32_CLOCK_REF_8M=y
# CONFIG_STM32_CLOCK_REF_12M is not set
# CONFIG_STM32_CLOCK_REF_16M is not set
# CONFIG_STM32_CLOCK_REF_20M is not set
# CONFIG_STM32_CLOCK_REF_24M is not set
# CONFIG_STM32_CLOCK_REF_25M is not set
# CONFIG_STM32_CLOCK_REF_INTERNAL is not set
CONFIG_CLOCK_REF_FREQ=8000000
CONFIG_STM32F0_TRIM=16
# CONFIG_STM32_USB_PA11_PA12 is not set
# CONFIG_STM32_SERIAL_USART1 is not set
# CONFIG_STM32_SERIAL_USART1_ALT_PB7_PB6 is not set
# CONFIG_STM32_SERIAL_USART2 is not set
# CONFIG_STM32_SERIAL_USART2_ALT_PD6_PD5 is not set
# CONFIG_STM32_SERIAL_USART3 is not set
# CONFIG_STM32_SERIAL_USART3_ALT_PD9_PD8 is not set
# CONFIG_STM32_SERIAL_USART5 is not set
# CONFIG_STM32_CANBUS_PA11_PA12 is not set
# CONFIG_STM32_CANBUS_PA11_PB9 is not set
# CONFIG_STM32_MMENU_CANBUS_PB8_PB9 is not set
# CONFIG_STM32_MMENU_CANBUS_PB12_PB13 is not set
# CONFIG_STM32_MMENU_CANBUS_PD0_PD1 is not set
CONFIG_STM32_MMENU_CANBUS_PB0_PB1=y
# CONFIG_STM32_MMENU_CANBUS_PD12_PD13 is not set
# CONFIG_STM32_MMENU_CANBUS_PC2_PC3 is not set
# CONFIG_STM32_USBCANBUS_PA11_PA12 is not set
CONFIG_STM32_CANBUS_PB0_PB1=y
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER="12345"
CONFIG_WANT_GPIO_BITBANGING=y
CONFIG_WANT_DISPLAYS=y
CONFIG_WANT_SENSORS=y
CONFIG_WANT_LIS2DW=y
CONFIG_WANT_LDC1612=y
CONFIG_WANT_SOFTWARE_I2C=y
CONFIG_WANT_SOFTWARE_SPI=y
CONFIG_NEED_SENSOR_BULK=y
CONFIG_CANSERIAL=y
CONFIG_CANBUS=y
CONFIG_CANBUS_FREQUENCY=250000
CONFIG_CANBUS_FILTER=y
CONFIG_INITIAL_PINS=""
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_HAVE_CHIPID=y
CONFIG_HAVE_STEPPER_BOTH_EDGE=y
CONFIG_HAVE_BOOTLOADER_REQUEST=y
CONFIG_INLINE_STEPPER_HACK=y
=======================
Build file /home/pi/klipper/klippy/../out/klipper.dict(8261): Sun Apr 21 15:52:21 2024
Last MCU build version: v0.12.0-169-g28faf814
Last MCU build tools: gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.35.2-2+14+b2) 2.35.2
Last MCU build config: ADC_MAX=4095 BUS_PINS_i2c1_PA9_PA10=PA9,PA10 BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PB10_PB11=PB10,PB11 BUS_PINS_i2c2_PB13_PB14=PB13,PB14 BUS_PINS_i2c3_PB3_PB4=PB3,PB4 BUS_PINS_i2c3_PC0_PC1=PC0,PC1 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 CANBUS_FREQUENCY=250000 CLOCK_FREQ=64000000 MCU=stm32g0b1xx PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PB0,PB1 RESERVE_PINS_crystal=PF0,PF1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1
Build file /home/pi/klipper/klippy/../out/klipper.elf(1076840): Sun Apr 21 15:52:28 2024
Attempting MCU 'mcu' reset command
Attempting MCU 'EBBCan' reset command
Attempting MCU 'rpi' reset
Unhandled exception during post run
Traceback (most recent call last):
  File "/home/pi/klippy-env/lib/python3.9/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 234, in run
    self.send_event("klippy:firmware_restart")
  File "/home/pi/klipper/klippy/klippy.py", line 263, in send_event
    return [cb(*params) for cb in self.event_handlers.get(event, [])]
  File "/home/pi/klipper/klippy/klippy.py", line 263, in <listcomp>
    return [cb(*params) for cb in self.event_handlers.get(event, [])]
  File "/home/pi/klipper/klippy/mcu.py", line 953, in _firmware_restart
    self._restart_arduino()
  File "/home/pi/klipper/klippy/mcu.py", line 913, in _restart_arduino
    serialhdl.arduino_reset(self._serialport, self._reactor)
  File "/home/pi/klipper/klippy/serialhdl.py", line 379, in arduino_reset
    ser = serial.Serial(serialport, 2400, timeout=0, exclusive=True)
  File "/home/pi/klippy-env/lib/python3.9/site-packages/serial/serialutil.py", line 240, in __init__
    self.open()
  File "/home/pi/klippy-env/lib/python3.9/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/klipper_host_mcu: [Errno 2] No such file or directory: '/dev/klipper_host_mcu'
Restarting printer
Start printer at Mon Apr 22 00:01:52 2024 (1713758512.3 177.1)
===== Config file =====

Please attach a new klippy.log to your next post.

Are you sure you did these steps?

1 Like

THANK YOU VERY MUCH. After 6 days of trying things, you got it!

1 Like

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