Embedded rpi not updating klipper

Basic Information:

MKS SKIPR
MKS SKIPR
klippy.zip (895.8 KB)

For no apparent reason, the rpi host isnt updating klipper.
This first appeared today after using Fluidd to update all components.
I then did a git clone and re-made it, copying the .bin as is required by this board (cannot just ‘make flash…’).

I don’t understand why the ‘make’ isnt updating the host OS components of klipper. I was expecting that recompiling it would do that. Make install is invalid.

Is there something trivial I’m missing?
Or is it related to the Armbian distro that MKS hacked up to make this board function; they stipulate that updating it will probably break things, so I have avoided doing that, but all other components have been updated via fluidd AND later kiauh.

MCU Protocol error

This is frequently caused by running an older version of the
firmware on the MCU(s). Fix by recompiling and flashing the
firmware.

Your Klipper version is: v0.12.0-86-gdaf875e6
MCU(s) which should be updated:
mcu: Current version v0.10.0-530-g3387a9c2-dirty-20220807_204823-mkspi
rpi: Current version v0.11.0-121-ga5fb2076
Up-to-date MCU(s):


Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.

mcu 'rpi': Command format mismatch: query_adxl345 oid=%c rest_ticks=%u vs query_adxl345 oid=%c clock=%u rest_ticks=%u

Error after reflashing MCU:

Your Klipper version is: v0.12.0-86-gdaf875e6
MCU(s) which should be updated:
rpi: Current version v0.11.0-121-ga5fb2076
Up-to-date MCU(s):
mcu: Current version v0.12.0-86-gdaf875e6

So far I have tried:

mv /home/mks/klipper /home/mks/klipper_$(date +%Y-%m-%d)
git clone https://github.com/Klipper3d/klipper
./klipper/scripts/install-octopi.sh
cd ~/klipper/
make menuconfig
    STM32
    STM32F407
    48KiB
    8MHz
    USART1 PA10/PA9
    250000
make
sudo mkdir /media/mks
sudo chown mks:mks /media/mks
sudo mount /dev/mmcblk0p1 /media/mks
sudo cp /home/mks/klipper/out/klipper.bin /media/mks/mks_skipr.bin
ls /media/mks
mks_skipr.bin
sudo umount /media/mks

Physically switch TF card from host to mcu slots. Shutdown. Power up.
Put card back in host to confirm flash successful:

sudo mount /dev/mmcblk0p1 /media/mks
ls /media/mks
mks_skipr.CUR

Yes, yes there is: I need to do a make for BOTH the host, and the printer hardware mcu.

as per this:

Install the rc script[¶](https://www.klipper3d.org/RPi_microcontroller.html#install-the-rc-script)
If you want to use the host as a secondary MCU the klipper_mcu process must run before the klippy process.

After installing Klipper, install the script. run:


cd ~/klipper/
sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
sudo systemctl enable klipper-mcu.service
Building the micro-controller code[¶](https://www.klipper3d.org/RPi_microcontroller.html#building-the-micro-controller-code)
To compile the Klipper micro-controller code, start by configuring it for the "Linux process":


cd ~/klipper/
make menuconfig
In the menu, set "Microcontroller Architecture" to "Linux process," then save and exit.

To build and install the new micro-controller code, run:


sudo service klipper stop
make flash
sudo service klipper start
If klippy.log reports a "Permission denied" error when attempting to connect to /tmp/klipper_host_mcu then you need to add your user to the tty group. The following command will add the "pi" user to the tty group:


sudo usermod -a -G tty pi```
2 Likes

Good afternoon, could you share your binary file for flashing the mks skipr MCU firmware, since for some reason my build does not work. Thank you

I can, and offhand I can’t think of any reason why I shouldn’t… but before i do that; lets just make sure you are doing it right:
You are not trying to make flash /dev/ttyS0…right? It has to be physically transferred to the MCU TF card instead.
What exactly do you mean by: ‘does not work’ ?

1 Like

Thank you, the problem has been solved, just for unknown reasons, the MCU update did not occur, but after several reboots, the MCU was updated.

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