Printer.cfg for Anycubic Kobra 2 Plus/Pro/Max

We haven’t found a way to run klipper yet on the default hardware.

But what we have found is we can now create custom .swu updates with custom rootfs and modifications. (This is just a modified image and not one created with some SDK.)

EDIT: We have made the tools repo private for now. We just wanna stay in front of anycubic so it will be harder for them to patch our findings.

EDIT 2: Progress is being made! Will take a long time though.

1 Like

One more note here. Use sudo for both unsquashfs and mksquashfs because the user must be root, not the one you are using on your linux machine. Alternative way is to use the option -all-root with mksquashfs.

Thanks for your work, sounds good.

Please correct me, if I’m wrong.

My goal would be to have a minimal firmware with moonraker flashed via USB-Stick on the standard hardware and connect to this via WiFi from a box with mainsail or fluidd. In my environment the box would be a Pi.

Does your work go towards this goal?

Of course. We are progressing! At least understanding things easier now!

2 Likes

Uuuuhhhh that’s great news! I’m excited! :partying_face:
Thanks for your work!

If anyone want any clues this flashforge ad5m printer literally have the same board as the kobra 2 series t113-s3: GitHub - FlashforgeOfficial/AD5M_Series_Klipper

It may be the same processor but is hardly LITERALLY the same board:
image

Unfortunately it seems the repository is just almost a copy of the Klipper branch, with the added firmware. No config, only the precompiled code, so I don’t know if we can use this as is. but is a start.

Thanks everyone for contributing here. I’ve learned a lot from this thread!

Here is the easiest way I found to access a camera on Kobra 2 max over local network: https://gist.github.com/EdikSimonian/fef4a9be78410fd688477b3c97880d11

1 Like

Did you try to install it and use it? I found that it also needs:
opkg install fswebcam
Then the python script crashes because the main app takes control over the inserted camera and /dev/video0 is no longer accessible to other processes. When I kill the app the python script start working for a while but then the printer reboots because of that. So, all this to work for the latest version 3.09 needs the main app to be patched to not auto open the inserted device /dev/video0. Maybe it will work in the previous versions where the camera is not yet processed in app.

You are correct. I missed mentioning that you need opkg install fswebcam. You are also correct about /dev/video0 and there being a race condition between /app and this script. I will try to come up with a cleaner solution but for now you can run fswebcam -l 1 in terminal before plugging in your webcam just so /app can’t not connect to it. Definitely don’t kill /app process.

Killing the app was just to prove that the app was opening this device before the script. Tomorrow I will find a solution by patching the app. Maybe modifying the text /dev/video to something else inside the /app/app will do the trick, one sed line of code. Also I have to add starting the script at boot even though python working all the time might not be a good idea, and checking for webcam presence to use it otherwise to show a default image that the webcam is missing. Try-except should be also included to have no way to crash, etc. improvements. Your idea is great, just needs a bit polishing.

You could also use lsof | grep video to find what process has the video open. Turned out there was a way to unbind/bind the uvcvideo module and grab the camera before app does! I fixed the python script. Your sed idea is great I just prefer not to touch the app.

I’m using the latest version 3.0.9. Unfortunately, your last solution is still not working for me. I prefer patching. The main app does not need camera access at all. AC may want to video spy us with this constant connection to their cloud. I don’t need that.

It needed just this:
sed -i ‘s/video4linux/videoXlinux/g’ /app/app && sync && reboot

and now all is working, no more camera icon on the top right corner of the screen, no more cloud <> video communication.

Under auto detect a camera I mean something like this:

# Function to continuously capture images
def capture_images():
    while True:
        # Capture an image to a temporary file
        subprocess.run(["rm", "-f", TEMP_IMAGE_PATH])
        subprocess.run(["fswebcam", "--no-banner", "-r", "1024x576", TEMP_IMAGE_PATH])
        # Atomically move the temporary file to the target file
        try:
            shutil.move(TEMP_IMAGE_PATH, IMAGE_PATH)
            time.sleep(2)  # Wait for 2 second before capturing the next image
        except:
            print("Couldn't connect to the camera!")
            time.sleep(10)

It is waiting for a camera, if present start generating images, if disconnected wait for connection and recover. In the exept we can add also:

shutil.copy(DEFAULT_IMAGE_PATH, IMAGE_PATH)

to show a default image on the web interface that the camera is disconnected, not the latest taken image which is no longer valid.

We’ve made significant progress, but to continue our journey, we need the expertise of exceptional individuals. We’re actively seeking seasoned Linux specialists, adept electronic engineers, proficiency in Chinese as a secondary language is highly advantageous (but not mandatory), proficient programmers, skilled reverse engineers, and DSP experts.

If you possess any of these talents, we invite you to join us in our endeavors. Please direct message @Matm8p (tg) explaining who you are, how you can contribute, and provide your username here. We prioritize efficient contributors and won’t add lurkers or those unable to contribute effectively.

Thank you.

1 Like

2 posts were split to a new topic: Storage place of Gcode files

Nvm I got them!

Also btw I’m taking down the old tina SDK copy I have on my bucket.

Since it’s old and not relevant.

Hi, I am a beginner in 3D printing, I have a Kobra 2 Plus printer. I would like a 100C heat bed.
I can’t connect to the printer by IP address to rewrite this setting :frowning: I pinged the printer and the connection is established between the printer and the PC.
Can someone help me and send me a firmware to get the 105C heat bed

Hi, and welcome.
Is not by pinging your machine that you will be able to change the hotbed temp.
You don’t even need root the machine to do that, you can overwrite the printer cfg by “printing” g-codes found by an our friend here (just read).
If in you, I would not set the hotbed to 100c especially with that little mosfet that does not even have an heatsink.
Feel free to try if you want but you might risk to ruin something.

Good luck

Sorry, thats not really how it works and is a terrible idea.

  1. Custom/modifiable firmware is not available for the Kobra 2 series (including your Plus).
  2. Even if it were, the unit is only rated for a 90C heatbed. Trying to crank it above that would be a bad idea as the heater bed itself is not rated for higher than that, never mind the electronics. Think fire/meltdown.

image

If you need greater than 100C heatbed, you’re going to want to use a printer with a heatbed designed for that.

Hi everyone, now I can get the root acces and I was able to install ssh thing but I don’t now how to use ssh, how I am gonna connect via putty, when I use hostname -i command only thing that I see is TinaLinux name, can someone can help me with that issue, I will be appreciated.