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

Good News, Everyone!

I’ve recently spent some time digging inside main application (app) of my Kobra 2 Pro and found a couple of interesting things.

  1. I’ve found an OTA update (en)decryption AES key in 3.0.3 app, so we can now decrypt update.bin packages with newer firmwares like 3.0.5. After decryption you will get normal zip with swu update file inside…
    AnycubicUpdateBin.zip (1.2 KB)
    Attached is LINQpad C# script (actually just a C# program) that you can use to decrypt update.bin by yourself.

  2. I’ve found a bunch of hidden G- macro codes in app, from M8000 to M8822, that is used to change any printer configuration settings, upload and download printer configs from and to USB disk and even replace default printer config files with anything you want! It also slightly looks like some of Mxxxx command from that bunch is able to execute arbitrary shell code. But all this needs further investigation, I will check and test all this and will write additional comment with results.

  3. I’v also found an (en)decryption AES keys for logs that you can export to USB disk using printer settings menu with 3.0.5 FW. Files “log_1” and “log_2”. I’ve still not wrote a snippet in C# (this will be an exercise for you! now :slight_smile: My be in next post I will attach such snippet if will not be lazy enough. Anyway, you can use this decryption key and IV for logs:
    6DE30155B7964E8CF0F3D2465997A458F8B56FF7E1E537597E9B5861062B4742
    001F35A46358F76877C3382764460775

  4. Now some of my thoughts about base that anycubic used for building FW for Kobra 2 Pro series.
    APP: Althgough it very looks like Klipper, it definitely not. At least not all that python stuff from that was Klippy made… I think they took basic ideas, concepts, algos, etc. and remade it almost from scratch.
    FW: Firmware (a Klipper counterpart for smaller MCUs, you know it) resides inside Extensa DSP coprocessor named “HiFi4” of main Allwinner SoC. You can grab this part from update swu file, it is named “dsp0”. Just an ELF wrapped compiled binary that also can be loaded in IDA and investigated. It looks like was made from original Klipper firmware, at lease reusing original code from Klipper project. May be even older one (who knows?) but with some modifications, adaptations and enchancements (uhm?) from our Chinese friends. I’ve just slightly looked inside, not thoroughly, it also needs more investigation.

Что один человек сделал, другой завсегда сломать сможет! :slight_smile:

Final thoughts.

I think it is almost impossible to goodly run original Klipper on Trigorlla (kek!) platform because of very limited RAM (only 128 megs) and not very speedy CPU to perform heavy computations on Klippy side and running some Web UI side by side. May be I am wrong, but I don’t think so. Anyway, it looks for me a relative simple and trivial task to port and run original Klipper (bare Klippy) on Linux part. But without GUI (no KlipperScreen because it needs heavy GTK). Also without OctoPrint and etc. because also very heavy software for T113. It also needs porting of firmware counterpart of Klipper to HiFi4 architecture, writing drivers, many sleepless nights, no official opensource sdk, etc… So… I think, we need to use this controller as is, may be just tweaking configs if needed and untieing it from Chinese cloud. But porting original Klipper… hm… I think no way. It is better and faster to throw out Trigorlla and retrofist it with some good aftermarket controller.

3 Likes