Getting orange pi 3 lts + klipper working with anycubic kobra 2 neo

Basic Information:

Printer Model: Anycubic kobra 2 neo
MCU / Printerboard: Not sure, but microcontroller lablings are GD32F303 RGT6
klippy.log klippy.log (169.9 KB)

I use lts raspbian minimal installation on my board. Tried to search for this problem for 2 days straight. Everything works, except MCU. I get the same error everytime.
image
Yesterday i was working on this problem till 3am and found almost nothing. I hope that smart people can help me with this issue. :sweat_smile:

Edited: You can find working configs and make requests and suggestions in the link below.
Anycubic kobra 2 neo configs

See CR6SE printer firmware installation has consistently failed - #2 by Sineos

i think i’ve already added mine to dialout, but not tty. Let me reboot and double check

okay, the error is the same. Here are the new logs
klippy.log (233.5 KB)

No, the error is not the same.

First log:

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'

Second log:

mcu 'mcu': Timeout on connect
MCU error during connect
...
serialhdl.error: mcu 'mcu': Unable to connect

Which would indicate that the board is not correctly flashed. Check with How-To Trouble-Shoot to see if and how the board registers to the Linux OS

As for the Kobra 2 Neo, I would not be aware of an existing config file and build instructions, so I do not know on which reference you build it.

From your log

========= 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 is not set
# 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=y
CONFIG_BOARD_DIRECTORY="simulator"
CONFIG_CLOCK_FREQ=20000000
CONFIG_SERIAL=y
CONFIG_SIMULATOR_SELECT=y
CONFIG_SERIAL_BAUD=115200
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_SOFTWARE_SPI=y
CONFIG_CANBUS_FREQUENCY=1000000
CONFIG_INITIAL_PINS=""
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_INLINE_STEPPER_HACK=y

These make menuconfig parameters definitively are wrong, but since I do not have better ones, I cannot provide further guidance.

Ok, i was not sure about klipper, cause flashing my very new 3d printer is pretty scary. But now i think that i could try. I have read discussions about installing klipper on the board with the same microcontroller as mine (here) but i am not sure how to do it properly. Do you have any instructions for configuring and flashing a firmware to my board?
Thank you in advance for any help.

also i’ve found the board model. It is TriGorilla Gen V4.0.1

Ok. I tried flashing it with SD card by putting firmware.bin file on it but after several tries of powering on and onn my printer doesn’t flash.
I tried flashing it with “normal” method in kiauh but got this error:

Failed to flash to /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0: Error running dfu-util

If the device is already in bootloader mode it can be flashed with the
following command:
  make flash FLASH_DEVICE=1eaf:0003
  OR
  make flash FLASH_DEVICE=1209:beba

If attempting to flash via 3.3V serial, then use:
  make serialflash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

make: *** [src/stm32/Makefile:111: flash] Ошибка 255

I am pretty much stuck. Can you help me with that, please?

zamonary1@orangepi3-lts:~/klipper$ make flash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  Flashing out/klipper.bin to /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
Entering bootloader on /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
Device reconnect on /sys/devices/platform/soc/5101400.usb/usb5/5-1/5-1:1.0/ttyUSB0
sudo dfu-util -p 5-1 -R -a 2 -D out/klipper.bin

dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
dfu-util: No DFU capable USB device available

Failed to flash to /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0: Error running dfu-util

If the device is already in bootloader mode it can be flashed with the
following command:
  make flash FLASH_DEVICE=1eaf:0003
  OR
  make flash FLASH_DEVICE=1209:beba

If attempting to flash via 3.3V serial, then use:
  make serialflash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

make: *** [src/stm32/Makefile:111: flash] Ошибка 255

Unfortunately, I do not know the board or if it has any peculiarities.

Theoretically the instructions here https://github.com/Klipper3d/klipper/blob/9e765daeedb2adf7641b96882326b80aeeb70c93/config/printer-creality-ender3-v2-neo-2022.cfg should allow you to flash the board.

Make sure to copy only the klipper.bin to the SD card and rename it to something random like blabla.bin

Even if you then manage to flash the board, the real challenge will be the printer.cfg with the relevant pin mapping.

also, look what i found How to install Klipper on Anycubic Kobra 2 - Function3D
it is for kobra 2 (not neo) but i should try

config.zip (4.0 KB)
(downloaded from here)

Yes, this is what I found as well. The big issue is that this is based on a HC32F460 MCU and according to your description the board has GD32F303.

I do not know if both chips are pin-compatible, but I would doubt it. If you are lucky, and they are pin-compatible, the cfg could be used.

i’m really frustrated because i just cannot make this work. The board constantly boots to marlin instead. I reformatted the sd card 2 times and it gave me nothing. I gues i’ll go and rest a little.

Have you tried to rename the klipper.bin file to firmware.bin?

I used klipper.bin, kipper1.bin 123.bin, firmware.bin and firmware1.bin. No result.

Ok. I got in contact the anycubic support. They said that installing klipper on my printer will ruin the official warranty and sent me the only official firmware that they currently have. I think i should share it to you guys and other people looking for anycubic kobra 2 neo firmware. :grin:
Link to google drive that they sent to me (click)

ak2neo-1.5.6.3.zip (154.8 KB)

??? Did they say why it would void the official warranty?

I would think that the only (valid) reasons for making a statement like this is because there is danger of damaging the product or could cause personal harm to the user.

I would suspect that they are making this statement because they don’t want to support Klipper but what level of support do they give if you want to do something like add a filament runout sensor, which would require a firmware change or wanted to change the print surface.

he said)

image

Not helpful.

I’m curious as to what other people here think.

EDIT

Sorry, @zamonary1 I didn’t mean to imply that you weren’t being helpful, just that Anycubic wasn’t giving a reasonable or helpful answer.

idk, i suggest that kobra 2 neo is unpopular model and this raises a problem with making configs and testing them. I really want to get klipper working on my board but i’ve never used it before. If you have any ideas then please let me know.