Bed_Distance_sensor icon indicating copy to clipboard operation
Bed_Distance_sensor copied to clipboard

MCU Protocol error

Open AlOmaira opened this issue 1 year ago • 11 comments

Keep getting this error after updating to the latest klipper. If i disable the bed distance sensor klipper works fine. It needs an update firmware for the bed distance sensor i think please help. IMG_2722

AlOmaira avatar Apr 14 '24 20:04 AlOmaira

I think you did not run the BDsensor install script after updating the klipper that will remove the BDsensor patch code and then flash the latest firmware into the MCU. you can just check if there is a file BD_sensor.c in the ~/klipper/src and compile the klipper.bin and flash the MCU again.

markniu avatar Apr 15 '24 01:04 markniu

Can you share the steps please and how to do that.

AlOmaira avatar Apr 15 '24 04:04 AlOmaira

install :

cd  ~/Bed_Distance_sensor/klipper/
./install_BDsensor.sh

compile:

cd ~/klipper/
make

then flash the firmware of klipper.bin into MCU again

markniu avatar Apr 15 '24 05:04 markniu

Oh yes i did that after updating klipper again and still issue not fixed. I had this same issue arise when i installed an adxl but fixed the issue by updating the adxl firmware in dfu mode. I guess the probe needs a newer firmware to work with the updated klipper

AlOmaira avatar Apr 15 '24 05:04 AlOmaira

this error is from the BD_sensor.c which will be compile into the klipper.bin for the MCU, not the firmware of probe. you can check again if there is BD_sensor.c file in the klipper/src folder before compile the klipper.bin, and if it is flashed success again. image

markniu avatar Apr 15 '24 06:04 markniu

sorry last question when you say flash mcu do u mean the pi as Linux or you mean the printer board. Because if its the Raspberry pi i already re flashed it again by choosing it as Linux and error still there

AlOmaira avatar Apr 15 '24 12:04 AlOmaira

oh, sorry for replay late, did you fix this error? seems that the BDsnesor is connected to the MCU, so you need to flash the mcu.

markniu avatar Apr 17 '24 05:04 markniu

The install script patches the Klipper source code.

  1. run the install
  2. build the Kipper firmware
  3. flash the printer MCU board

dhoard avatar Apr 23 '24 19:04 dhoard

I'm having the same issue: I have followed every instruction. Reflashed multiple times, only built with ./make_with_bdsensor.sh ... Confirmed bd_sensor.c file is in the ~/klipper/src directory, as well as the bd_sensor.py file is in the /klipper/klippy/extras directory. I have found no solutions to fix this...

Steps taken:

  1. Remove all Klipper files, including moonraker, mainsail, etc.
  2. Download bd_sensor files
  3. Re-download klipper and all requisite packages (moonraker, mainsail, etc.)
  4. Install bd_sensor
  5. Move to klipper directory
  6. make menuconfig
  7. ./make_with_bd_sensor.sh
  8. ./flash-sdcard.sh /dev/serial/by-id/... creality-v4.2.7
  9. Echoed a successful flash with MCU
  10. power cycle printer
  11. ./flash-sdcard.sh -c ... ... Receive "Dirty" error...
  12. Repeat until insanity sets in (current state)

klippy_log

VoldDesigns avatar Jul 06 '24 22:07 VoldDesigns

please check the version by run make after install_BDsensor.sh instead of ./make_with_bd_sensor.sh there will be a date in the version.

~/Bed_Distance_sensor/klipper/install_BDsensor.sh
cd ~/klipper/
make clean
make
./flash-sdcard.sh ..

image

markniu avatar Jul 09 '24 09:07 markniu

Hey Mark!

I figured out my problem. my creality v4.2.7 board was not flashing the firmware. Since the board does not have a reset button or a way to force the bootloader through bridging pins, it was not writing the firmware.bin to update the original Klipper install.

I ended up buying an SKR mini E3 v3.0 and installing it (Was looking for an excuse to replace the stock board anyway). Now, everything is working flawlessly. I appreciate your reply and your continued push to get this sensor supported natively within Klipper, as I feel it is a substantial improvement over a BLTouch.

I was able to run a 10x10 bed mesh in about a minute. Thank you again.

VoldDesigns avatar Jul 12 '24 16:07 VoldDesigns