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

**URL:** <https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658>\
**Category:** Configs\
**Created:** [November 17, 2023, 11:56pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658 "2023-11-17T23:56:49Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Kuroi](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kuroi/32/8132_2.png) [@Kuroi](https://klipper.discourse.group/u/Kuroi)\
**Post date:** [December 9, 2023, 3:11pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/62 "2023-12-09T15:11:54Z")

</div>

I shared 2.3.9 above. It’s the same file for Max, Pro and Plus

---

<div class="post-metadata">

**Author:** ![rol](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rol](https://klipper.discourse.group/u/rol)\
**Post date:** [December 9, 2023, 3:16pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/63 "2023-12-09T15:16:40Z")

</div>

If you flash this file you will get settings for k2max

---

<div class="post-metadata">

**Author:** ![Kuroi](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kuroi/32/8132_2.png) [@Kuroi](https://klipper.discourse.group/u/Kuroi)\
**Post date:** [December 9, 2023, 4:38pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/64 "2023-12-09T16:38:58Z")

</div>

How sure are you? Considering firmware has files for all 3 variations

---

<div class="post-metadata">

**Author:** ![rol](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rol](https://klipper.discourse.group/u/rol)\
**Post date:** [December 9, 2023, 4:43pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/65 "2023-12-09T16:43:26Z")

</div>

I’m 100% sure.

---

<div class="post-metadata">

**Author:** ![Kuroi](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/kuroi/32/8132_2.png) [@Kuroi](https://klipper.discourse.group/u/Kuroi)\
**Post date:** [December 9, 2023, 6:44pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/66 "2023-12-09T18:44:34Z")

</div>

Interesting. Figured they’d have some detection since they have configs for all 3.

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 1:06pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/67 "2023-12-10T13:06:36Z")

</div>

Oh my… Thanks!!! Man I have tried everything but holding “s” lol.

Thanks!! Now I wanna see if I can do something fun!

---

<div class="post-metadata">

**Author:** ![papig](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@papig](https://klipper.discourse.group/u/papig)\
**Post date:** [December 10, 2023, 1:33pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/68 "2023-12-10T13:33:47Z")

</div>

> [@Boris](#):
>
> Create a very basic linux on the board that acts as a serial gateway between a normal SBC (Rpi, etc) and the printer. This way Klipper could be run on an external board, the mainboards HW won’t be a limiting factor since it needs to run basic g-code interpeter.

This is going to be the only option that’s reasonable. The whole point of coming over to klipper is to improve your experience and trying to get a custom stripped down klipper host to run sounds miserable. Bolting on an rpi with a reasonably simple firmware flash that could probably be brought into the kiauh scripts as a kobra 2 option is the most accessible way to free the masses from this anycubic trash.

It’s also more consistent with the typical klipper experience which is a bonus.

Although, it might be possible to free up the Linux host resources by stripping out anycubic trash. When I was doing pcaps of the printer via feeding it a proxy as the gateway it was extremely chatty with the anycubic cloud service, so who knows what it’s loaded down with.

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 2:40pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/69 "2023-12-10T14:40:35Z")

</div>

For booting into u-boot:  
Hold key “s” while booting then do:

```auto
setenv init /bin/sh
saveenv
bootd

```

For people who wanna reset the password:  
You need to boot manually:

```bash
mount -t proc p /proc

. /lib/functions/preinit.sh

. /lib/preinit/80_mount_root

do_mount_root

. /etc/init.d/boot

link_by_name

. /lib/preinit/81_initramfs_config

do_initramfs_config

```

It should do the trick.

Then just cp /etc/shadow to /overlay/upper/etc/shadow

Just change the shadow root password in `/overlay/upper/etc/shadow`.  
I used [this website](https://unix4lyfe.org/crypt/) to generate a password.

then run `sync` just to make sure it saved everything.

You can also override any file in the system by placing them in the upper overlay.

Then reboot the device and reboot into u-boot again.  
Also you may change bootdelay also so it gets easier.  
Then change back init to `/sbin/init`

```bash
setenv init /sbin/init
setenv bootdelay 3
saveenv
reset

```

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 4:13pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/70 "2023-12-10T16:13:13Z")

</div>

Yeah the default image doesn’t even have opkg.

The best would be to make a custom linux with all that stuff enabled by default.  
It’s the best chance this printer has.  
At least we can access the U-boot.  
So the only hard part is making a custom Linux.

It wouldn’t even make sense to hack the default image that’s installed and modifying and creating hacks.  
Best to override everything with a new image.

I’ve began to trying to make a basic basic openwrt image.  
But don’t get your hopes up.

I’m a basic Linux guy. I’m no professional. I will probably miserably fail.  
But I will try at my own pace.

There is literally no documentation for openwrt with this CPU and all that.  
At least I don’t know.  
I’m going in blind here. But I’ll try.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [December 10, 2023, 4:51pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/71 "2023-12-10T16:51:36Z")

</div>

> [@papig](#):
>
> This is going to be the only option that’s reasonable. The whole point of coming over to klipper is to improve your experience and trying to get a custom stripped down klipper host to run sounds miserable. Bolting on an rpi with a reasonably simple firmware flash that could probably be brought into the kiauh scripts as a kobra 2 option is the most accessible way to free the masses from this anycubic trash.

IMO quite unlikely to happen since Anycubic seems to have massively modified Klipper and binary packed whole Klipper and everything else into one executable.

As long as these modifications are unknown and no sources available, it is very unlikely to get a main-line Klipper up and running (at least without spending some significant development effort)

> [@ultimatelifeform](#):
>
> There is literally no documentation for openwrt with this CPU and all that.  
> At least I don’t know.  
> I’m going in blind here. But I’ll try.

Maybe [GitHub - Jpe230/SonicPad-Debian: Port of Debian for the SonicPad (Allwinner R818)](https://github.com/Jpe230/SonicPad-Debian) and in particular [SonicPad-Debian/DIY.md at main · Jpe230/SonicPad-Debian · GitHub](https://github.com/Jpe230/SonicPad-Debian/blob/main/DIY.md) is of any help.

Maybe @jpe230 can support, since he did the effort of replacing the Allwinner R818 Tina Linux with Debian on the Sonic Pad.

---

<div class="post-metadata">

**Author:** ![Boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@Boris](https://klipper.discourse.group/u/Boris)\
**Post date:** [December 10, 2023, 5:45pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/72 "2023-12-10T17:45:48Z")

</div>

Hi Guys,

What I could find about the R528-S3 and compiling linux are the following:

This is a chinese site explaining how to compile Tina linux, I think this is the “official” linux for the CPU. Also we need the SDK from the Allwinner site, which requires registration, etc. This site explains a lot of things such as: how to install it in a virtualBox, how to flash the compiled linux, so I think this way it can be done, but needs time.

[https://d1-docs-aw–ol-com.translate.goog/study/study\_1tina/?\_x\_tr\_sl=auto&\_x\_tr\_tl=en&\_x\_tr\_hl=en&\_x\_tr\_pto=wapp](https://d1-docs-aw--ol-com.translate.goog/study/study_1tina/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp)

The other thing I found is the Armbian site where a user compiled the Armbian linux, (which is a debian based) one for the T113-S3, by modifying some config files and compiling it from scratch.  
Since the R528-S3 and the T113-S3 are very similar I’ll ask him to help us create a base image.

[https://forum.armbian.com/topic/29360-t113-s3-based-board-cant-reach-login-prompt/](https://forum.armbian.com/topic/29360-t113-s3-based-board-cant-reach-login-prompt/)

If either way works we have a functioning linux on our machine 🙂

---

<div class="post-metadata">

**Author:** ![rol](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rol](https://klipper.discourse.group/u/rol)\
**Post date:** [December 10, 2023, 5:56pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/73 "2023-12-10T17:56:30Z")

</div>

I can’t mount the overlay using this instruction

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 6:13pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/74 "2023-12-10T18:13:33Z")

</div>

Sorry. I’ve updated the proper instructions. Please go back to my [post](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/69).

@rol

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 8:31pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/75 "2023-12-10T20:31:20Z")

</div>

Here is how to add permanent ssh to the printer:

Download and extract [https://bitfab.org/dropbear-static-builds/dropbear-v2020.81-arm-none-linux-gnueabi-static.tgz](https://bitfab.org/dropbear-static-builds/dropbear-v2020.81-arm-none-linux-gnueabi-static.tgz) to somewhere.

Keep extracting until you can see the file called: `dropbearmulti`.

Then start a temporary HTTP server using python:  
`python -m http.server`

Make sure to run the command in the same directory as the `dropbearmulti` file.

The URL should be something like:  
`http://10.0.0.143:8000/dropbearmulti`

Download my script:

```bash
#!/bin/sh

# Set IP Variable
#IP=<YOUR COMPUTER IP>
IP=10.0.0.143
PORT=8000

ask_ip() {
    echo "Enter IP address:"
    read IP
    echo "Enter port:"
    read PORT

    echo "Is $IP:$PORT the correct IP address? (y/n)"
    echo "File should be hosted at http://$IP:$PORT/dropbearmulti"
    read answer
    if ["$answer" != "${answer#[Yy]}" ] ;then
        echo "Yes"
    else
        ask_ip
    fi
}

# Ask if ip is correct
echo "Is $IP:$PORT the correct IP address? (y/n)"
echo "File should be hosted at http://$IP:$PORT/dropbearmulti"
read answer
if ["$answer" != "${answer#[Yy]}" ] ;then
    echo "Yes"
else
    ask_ip
fi

mkdir -p /overlay/upper/usr/bin
mkdir -p /overlay/upper/etc/dropbear

wget http://$IP:$PORT/dropbearmulti -O /overlay/upper/usr/bin/dropbearmulti

chmod +x /overlay/upper/usr/bin/dropbearmulti

/usr/bin/dropbearmulti dropbearkey -t rsa -f /overlay/upper/etc/dropbear/dropbear_rsa_host_key
/usr/bin/dropbearmulti dropbearkey -t dss -f /overlay/upper/etc/dropbear/dropbear_dss_host_key
/usr/bin/dropbearmulti dropbearkey -t ecdsa -f /overlay/upper/etc/dropbear/dropbear_ecdsa_host_key
/usr/bin/dropbearmulti dropbearkey -t ed25519 -f /overlay/upper/etc/dropbear/dropbear_ed25519_host_key

# Put a startup script in /overlay/upper/etc/rc.local
# Put the contents before the exit 0 line

CONTENT=$(cat <<EOF
#!/bin/sh

ln -s /usr/bin/dropbearmulti /usr/bin/dropbear
ln -s /usr/bin/dropbearmulti /usr/bin/dbclient
ln -s /usr/bin/dropbearmulti /usr/bin/dropbearkey
ln -s /usr/bin/dropbearmulti /usr/bin/dropbearconvert
ln -s /usr/bin/dropbearmulti /usr/bin/scp

/usr/bin/dropbear -p 22

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

if [-f /app/app]; then
    chmod 755 /app/app
    /app/app&
fi

exit 0
EOF
)

echo "$CONTENT" > /overlay/upper/etc/rc.local

chmod +x /overlay/upper/etc/rc.local

echo "Done! Reboot to start SSH server"

```

Also place the script in the same folder as `dropbearmulti`:  
`http://10.0.0.143:8000/installssh.sh`

Make sure you change the IP to your computer.

Then run on the busybox on the printer

```bash
wget http://10.0.0.143:8000/installssh.sh -O /tmp/installssh.sh

```

Then run

```bash
chmod +x /tmp/installssh.sh
/tmp/installssh.sh

```

---

<div class="post-metadata">

**Author:** ![rol](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@rol](https://klipper.discourse.group/u/rol)\
**Post date:** [December 10, 2023, 9:03pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/76 "2023-12-10T21:03:10Z")

</div>

Here’s what I did:

hold down “s”

```auto
setenv init /bin/sh
boot

```

wait for booting

```auto
mount -t proc p /proc
. /etc/init.d/boot
link_by_name
. /lib/preinit/81_initramfs_config
do_initramfs_config
awk 'BEGIN{FS=":"; OFS=FS} $1=="root"{$2=""}{print}' /etc/shadow > /overlay/upper/etc/shadow

```

reboot on power

login as root without password

`passwd`  
set password for root

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 10, 2023, 11:07pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/77 "2023-12-10T23:07:26Z")

</div>

On top of that it would be nice if we could make the file a .[swu](https://github.com/sbabic/swupdate) update so we just can insert a USB stick and update so other users don’t have to do all this with the uart stuff.

Or anything just to trick the system or something like that without needing uart to flash.

But first we need to just get a basic Linux image compiled.

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 11, 2023, 12:41am UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/78 "2023-12-11T00:41:30Z")

</div>

I found the firmware url.

Just mount a USB into the firmware port all the way to the right and then just:

```bash
cat /mnt/UDISK/log

```

It shows the mqtt password and all that.  
Their mqtt URL:  
mqtts://mqtt-universe.anycubic.com:8883

Some URLs:

```plaintext
https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.3.9_update.zip

https://cdn.cloud-universe.anycubic.com/ota/K2Pro/AC104_K2Pro_1.1.0_2.3.9_update.zip

https://cdn.cloud-universe.anycubic.com/ota/K2Plus/AC104_K2Plus_1.1.0_2.3.9_update.zip

```

---

<div class="post-metadata">

**Author:** ![papig](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@papig](https://klipper.discourse.group/u/papig)\
**Post date:** [December 13, 2023, 1:10pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/79 "2023-12-13T13:10:03Z")

</div>

are you able to snag older firmware? if so, would you grab all the earliest firmware? i think those are important to keep archived in case they correct any “mistakes” that might help us by rolling back.

---

<div class="post-metadata">

**Author:** ![ultimatelifeform](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ultimatelifeform/32/8342_2.png) [@ultimatelifeform](https://klipper.discourse.group/u/ultimatelifeform)\
**Post date:** [December 13, 2023, 4:27pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/80 "2023-12-13T16:27:33Z")

</div>

Yeah. Here is a quick python script to check URLs:

```python
import requests
import threading
import time

base_url = "https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_{}.{}.{}_update.zip"

# Define the maximum number of simultaneous threads
max_threads = 10

# Semaphore to limit the number of simultaneous threads
semaphore = threading.Semaphore(max_threads)

# File to store successful URLs
success_file = "successful_urls.txt"

# Do requests with a delay between them

def check_version(major, minor, patch):
    url = base_url.format(major, minor, patch)
    with semaphore:
        r = requests.head(url)
        if r.status_code == 200:
            success_message = f"Success: {url}"
            print(success_message)
            # Write successful URLs to the file
            with open(success_file, "a") as f:
                f.write(success_message + "\n")
        else:
            print(f"Failed: {url}")

# Create threads
threads = []
for major in range(0, 10):
    for minor in range(0, 10):
        for patch in range(0, 10):
            t = threading.Thread(target=check_version,
                                 args=(major, minor, patch))
            threads.append(t)
            t.start()
            # Add a small delay between starting threads
            time.sleep(0.01)

# Wait for all threads to finish
for t in threads:
    t.join()

print(f"Successful URLs written to {success_file}")

```

Some firmware for K2Max:

```txt
Success: https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.1.0_update.zip
Success: https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.1.1_update.zip
Success: https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.1.3_update.zip
Success: https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.3.5_update.zip
Success: https://cdn.cloud-universe.anycubic.com/ota/K2Max/AC104_K2Max_1.1.0_2.3.9_update.zip

```

EDIT:

I made a [GitHub repo](https://github.com/ultimateshadsform/Anycubic-Kobra-2-Series-Firmware) for all the firmwares I could download.

---

<div class="post-metadata">

**Author:** ![papig](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@papig](https://klipper.discourse.group/u/papig)\
**Post date:** [December 13, 2023, 5:14pm UTC](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658/81 "2023-12-13T17:14:43Z")

</div>

awesome! thanks for this.

[Previous page](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658.md?page=3)

[Next page](https://klipper.discourse.group/t/printer-cfg-for-anycubic-kobra-2-plus-pro-max/11658.md?page=5)
