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

Here a readable version of dsp0 for who want’s to investigate, I still have to understand how to find a reference table for the M8xx g macro-codes like @daksimpson did for: M8803 ; Copy configs to udisk
dsp0_output.txt (260.6 KB)

Hey guys. I understand it is possibly not the best place to ask, but there are so little information about those new models. I have kobra 2 pro and the reason i turned up here is i want to calibrate it with teachingtechy guide, but it seems, because of closed firmware, it is impossible to do some settings. So the question is, is there by now a way to modificate k-factor on this printer and to connect it to PC for using terminal in octoprint/pronterface?

For the first, the answer is “is complicated”. I believe some on this thread figured out how to update the printer config by running secret commands.
Please review @daksimpson’s post from Jan 22. I believe it contains the sequence you’re looking for.

For the second the answer is “nope”. Mainly this is the reason we’re working either on a firmware or motherboard replacement :sweat_smile:

1 Like

Hi. Small update. I’ve bought a dev board with T113 and got some “original chinese docs” on this SoC, but unfortunately absolutely no info on HiFi4 DSP :frowning: So at this moment without this info (or SDK) it still looks very hard to almost impossible to port FW part of Klipper to this DSP.
I have very busy last days on my job so paused my researches on Kobra for some days. When will have some free/spare time I will at last make Github repo and finish research on zip bomb.

2 Likes

Thanks to everyone here for their efforts so far! I’ve been quietly following along for a while now, but finally got up the nerve to start poking around.

For anyone else who’s just getting into this, I wanted to share my experience because it took some piecing together of the information from different places. I’m not going to get into fine detail because if you need the detail I’m not providing, you probably shouldn’t be poking around without a detailed tutorial and parts list!

That said, The connection details above for the UART state: UART: 3 Volt 115200 baud rate but right on the main board the VCC pin is labeled 5V. Somewhere else I saw that the configuration should be 1 data bit, 1 stop and no parity. This should be 8 bits data and the rest is correct. Because the power from my USB-RS232 adapter was back-feeding into the board, I tried using only a 3 wire connection, RX, TX and GND. RX and TX need to cross to one another.

I saw absolutely nothing on the terminal with the latest firmware I had installed (3.0.5), but after downgrading (2.3.6), I magically started seeing everything and was able to interrupt the boot process by holding “S” as was indicated above.

To install firmware, I unzipped the OTA update file which resulted in a single folder named “update”. I put this on the root of an empty flash drive and plugged it into the USB slot labeled “FIRMWARE” on the PCB, and has the camera icon screen printed on the case. Using the touch screen, I went into the settings and pressed the red up arrow beside the version number. It started updating immediately and I ended up with 2.3.6 installed.

I hope this wasn’t a mistake, but I’d like to see about doing what I can and learning what I can before one of the OTA updates disables downgrading!

This all may seem pretty basic to those of you who have already dug much deeper, but it would have helped me to have it all in one place like this so I hope this helps someone else. Keep up the great work, and if there’s something I can help with I’m more skilled than average with linux and electronics but not a guru by any means.

1 Like

By this, do you mean just decrypting the newer OTA update to be loaded by USB, or something more involved?

I don’t know where the change was made, but I didn’t see any UART comms with 3.0.5, so downgraded to 2.3.6. I’d love to be able to use the latest firmware but modify it so the UART can still be used. That, or some other yet-to-be discovered method for root shell access.

Great stuff! I now have ssh working on the printer because of the information here.

How about a Samba server? Would this be difficult to set up so that files could just be dropped into the folder where it stores gcode files?

Could this be done the same way that @ultimatelifeform demonstrated to install ssh?

EDIT:
Sorry, still working to process the backlog of information in this thread!

So, I installed opkg and it looks like that should make things pretty easy for installing other packages. BUT do I need to be concerned about the /overlay/upper directory? To be honest, I’m not completely following how that’s supposed to work.

EDIT 2
Hehehe… Having a conversation with myself while I’m pressing too many buttons too quickly here! I installed ‘nano’ using opkg, rebooted, and voila! Yes, it does seem to work perfectly and soooo easily!

This makes it much less painful to watch the machine home itself.

root@TinaLinux:/user# diff printer_max.cfg printer_max.cfg.original  -U0
--- printer_max.cfg
+++ printer_max.cfg.original
@@ -6 +6 @@
-max_z_velocity : 40.000000
+max_z_velocity : 16.000000
@@ -21,2 +21,2 @@
-homing_speed : 100.000000
-second_homing_speed : 10.000000
+homing_speed : 30.000000
+second_homing_speed : 15.000000
@@ -36,2 +36,2 @@
-homing_speed : 60.000000
-second_homing_speed : 10.000000
+homing_speed : 30.000000
+second_homing_speed : 15.000000
@@ -51 +51 @@
-homing_speed : 40.000000
+homing_speed : 8.000000
2 Likes

Afaik it happened when updating from v3.0.3 to v3.0.5.

There’s an approach / a solution (I personally didn’t try it yet tho) I mentioned here where you basically set up your own server and the printer connects to that one then. Dunno if that’s what you’re looking for / were asking about, but just in case you didn’t come across that one yet… :wink:

Hi, you have limited ram in the board. Samba will eat most resources available, i personally use a rpi for that purpose.
Do you log ssh via wlan? Have you enabled ssh persistently?

Some Dsp documentation here:
DSP模块开发指南.zip (5.2 MB)
It looks like you can use xtensa explorer to configure the DSP.
Check file DSP_环境_使用指南.pdf inside my upload.

If I understand your question correctly, yes, ssh is running over WiFi on my local network. It persists across reboots.

Good point about the resource limitations. Would there be a lighter weight solution that provides similar functionality? I’d love for it just to show up as another computer on the network.

Can RAM be extended by mounting a dedicated fast USB flash drive for the purpose?

Good to know. Does an update replace everything, or just the Anycubic app? Is there a good reason to update at all?

Most importantly I want to know if it will blow away everything I did for root access and ssh. Less importantly would be the modified config, which is easy to put back

Instead of that one could for example use the internal memory as ram (for example in android is called ram+) no external memory needed.

Something like (did not test it and i am not even sure it could work, i won’t try it). And i dont know openWRT.

sudo fallocate -l 256M /mnt/ssd/swapfile && sudo chmod 600 /mnt/ssd/swapfile && sudo mkswap /mnt/ssd/swapfile && sudo swapon /mnt/ssd/swapfile && echo ‘/mnt/ssd/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab - where “ssd” is the internal 8gb memory.

But the best thing imho would be strip off all the anycubic garbage to free up memory, not possible atm. (t113 has 128mb in total)

So you gained root via uart then you connected the printer to your local lan and ssh. That’s cool, i have 3.0.5fw i dont know if it will works, monday i’ll try.

Would you be so kind to paste results of these commands?

free -h
ps aux

Thanks

root@TinaLinux:~# free -h
             total       used       free     shared    buffers     cached
Mem:        111532      79880      31652         64      11228      29244
-/+ buffers/cache:      39408      72124
Swap:            0          0          0

ps switches are limited. No -aux options with what’s installed.

root@TinaLinux:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      2624 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 IW<  [rcu_gp]
    4 root         0 IW<  [rcu_par_gp]
    6 root         0 IW<  [kworker/0:0H-mm]
    7 root         0 IW   [kworker/u4:0-ev]
    8 root         0 IW<  [mm_percpu_wq]
    9 root         0 SW   [ksoftirqd/0]
   10 root         0 IW   [rcu_preempt]
   11 root         0 SW   [migration/0]
   12 root         0 SW   [cpuhp/0]
   13 root         0 SW   [cpuhp/1]
   14 root         0 SW   [migration/1]
   15 root         0 SW   [ksoftirqd/1]
   16 root         0 IW   [kworker/1:0-mm_]
   18 root         0 SW   [kdevtmpfs]
   19 root         0 IW   [kworker/u4:1-ev]
   21 root         0 SW   [rcu_tasks_kthre]
   33 root         0 IW   [kworker/0:1-pm]
   34 root         0 IW   [kworker/1:1-mm_]
  385 root         0 SW   [oom_reaper]
  386 root         0 IW<  [writeback]
  388 root         0 SW   [kcompactd0]
  420 root         0 IW<  [kblockd]
  557 root         0 SW   [ion_system_heap]
  580 root         0 SW   [watchdogd]
  674 root         0 IW<  [rpciod]
  675 root         0 IW<  [kworker/u5:0-hc]
  676 root         0 IW<  [xprtiod]
  679 root         0 IW<  [cfg80211]
  687 root         0 SW   [spi0]
  692 root         0 SW   [spi1]
  703 root         0 SW   [kswapd0]
  785 root         0 IW<  [nfsiod]
  801 root         0 SW   [vsync proc 0]
  802 root         0 SW   [vsync proc 1]
  804 root         0 IW   [kworker/0:2-eve]
  882 root         0 IW<  [uas]
  932 root         0 SW   [irq/38-mmc0]
  954 root         0 IW<  [ipv6_addrconf]
  977 root         0 IW<  [mmc_complete]
 1009 root         0 IW<  [kworker/1:1H-kb]
 1010 root         0 IW<  [kworker/1:2H-kb]
 1054 root         0 SW   [jbd2/mmcblk0p10]
 1055 root         0 IW<  [ext4-rsv-conver]
 1189 root      2084 S    /sbin/ubusd
1200 root      1988 S    /sbin/askfirst /bin/login
 1201 root      1988 S    /sbin/askfirst /bin/login
 1251 root      2552 S    /usr/sbin/dbus-daemon --s
 1280 root      2236 S    /sbin/logd -S 64
 1281 root      2288 S    /sbin/logread -f -F /tmp/
 1370 root         0 SW   [jbd2/mmcblk0p13]
 1371 root      2336 S    /sbin/netifd
 1376 root         0 IW<  [ext4-rsv-conver]
 1378 root         0 IW<  [kworker/0:2H-mm]
 1388 root         0 SW   [jbd2/mmcblk0p11]
 1389 root         0 IW<  [ext4-rsv-conver]
 1420 root       732 S    /usr/bin/dropbear -p 22
 1423 root      207m S    /app/app
 1450 root     10152 S    /usr/sbin/MtpDaemon -D
 1456 root      1740 S    /sbin/swupdate-progress -
 1465 root      3156 S<   /usr/sbin/ntpd -n -N -S /
 1477 root     21504 S    tt
 1524 root         0 Z    [sh]
 1525 root         0 Z    [sh]
 1526 root         0 Z    [sh]
 1527 root         0 Z    [sh]
 1529 root         0 Z    [sh]
 1531 root         0 Z    [sh]
 1532 root         0 Z    [sh]
 1533 root         0 Z    [sh]
 1534 root         0 Z    [sh]
 1535 root         0 Z    [sh]
 1615 root         0 IW<  [kworker/u5:2-hc]
 1662 root         0 SW   [RTW_CMD_THREAD]
 1665 root      3056 S    wpa_supplicant -D nl80211
 1858 root       756 R    /usr/bin/dropbear -p 22
 1859 root      3072 S    -ash
 1876 root      3072 R    ps
1 Like

Updating the printer’s fw and updating the APP are two different things (afaik! - I never used the APP… :wink: ), so I’m not really sure what exactly you mean.
Seems like ‘severe’ changes took place when updating from v3.0.3 to v3.0.5 (up to v3.0.3 the firmware file was .SWU filetype, v3.0.5 is .BIN filetype), so I’d guess at least that one “replaced everything” (if got your question somewhat right):

At least up to v2.9.5 updates were kinda important as e.g. M600 came with it (iirc - might be that it came with v2.9.3 already, don’t remember exactly right now…).

1 Like

Thanks, looks like about 79mb of ram are in use in idle status.
Would be usefull to run the same command while the printer is running a job.

And also: swapon --show

Thank you, rooting monday anyway i am looking for an alternative board unless someone find any “magic solution”.

APP is the binary inside the firmware. It’s literally called APP. It’s the app your printer runs when you’re using it, so to say.

1 Like

Ooohh ok, thx, now I got it :slight_smile:
Now that you say it, I actually remember seeing a folder and a file named “app” when inspecting the content of the SWU file back then lol

What is ‘tt’ and why is it listening on port 8888?

~ $ nmap xx.xx.xx.xx
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-28 01:53 PST
Nmap scan report for xx.xx.xx.xx
Host is up (0.0087s latency).
Not shown: 998 closed tcp ports (conn-refused)
PORT     STATE SERVICE
22/tcp   open  ssh
8888/tcp open  sun-answerbook

root@TinaLinux:~# netstat -antp | grep 8888
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      1477/tt

ps -p 1477

It’s advised to investigate further.