Klipper auto-tune input shaper with ADXL345 settings problem

Basic Information:

Printer Model: Ender 3 V2 running Klipper
MCU / Printerboard: Raspberry Pi 3 B+
klippy.zip (1.4 MB)

Hi All,

I have installed Klipper onto my Ender 3 V2. Now I am trying to auto tune the input shaper with an ADXL645 accelerometer but I can’t get it to work. I keep getting the message “MCU ‘rpi’ error during config: Unable to open spi device”

I am 99.9% certain that I have followed the Klipper instructions as I did them all again even slower a 2nd time after I 1st got this error. I have checked 2-3 different ways to verify that my SPI is turned on, & it is.

I replaced my home made wires with new short jumper wires to rule out my dodgy connections but I still get the same issue.

Does anyone have any suggestions?

I still cannot get this to work after many days searching online & am pulling my hair out at this stage.
The MCU rpi is showing on Mainsail under System loads so that part looks to be working.
I think it might to be an issue with the line cs_pin: rpi:None
Do I need to define this to GPIO8 or to pin 24? If so how do you do this as I can’t see how.

[mcu rpi]
serial: /tmp/klipper_host_mcu

cs_pin: rpi:None

accel_chip: adxl345
117, 117, 20 # 20mm above centre of bed

That all looks fine so far!
Did you enable SPI on your RasPi?

Make sure the Linux SPI driver is enabled by running sudo raspi-config and enabling SPI under the "Interfacing options" menu.

Strictly follow Measuring Resonances - Klipper documentation and use a good cable (twisted pair or at least shielded).

Yes I have done that to enable SPI.

The error message would indicate that SPI is not activated.
Post the content of your config.txt and/or usercfg.txt and/or syscfg.txt and/or cmdline.txt file. The files can be found in the /boot or /boot/firmware. Which of them exists and where depends on the Linux flavor you are using

Here is my config.txt & cmdline.txt. Thet are the only ones I could find.

cmdline.txt (79 Bytes)
config.txt (3.4 KB)

The config.txt looks correct.

What is the output of

lsmod | grep spi

Sorry I couldn’t get back on yesterday.
lsmod | grep spi gives me
spi_bcm2835 20480 0

It seems fine but apparently something is wrong on Linux level (99.98% not a Klipper issue)

Maybe one last thing to try:

sudo usermod -a -G spi YOUR_USER_NAME_HERE

then reboot.

Otherwise I’d try a new SD card and start from scratch.

I’ll give that a try this evening as have a long print on the go right now. Hopefully I don’t have to start from scratch but let’s see.

Thank you for all your help. I really appreciate it :+1:

So finally I got around to installing klipper from scratch & some how it is working now. It turns out I was not a mile out with the manual method but the automatic testing is sooo much easier & faster :wink:

Thanks again for all your help