Skip to content

Commit 293141e

Browse files
committed
Add support to Kobra S1 firmware 2.5.3.5
1 parent fad6588 commit 293141e

File tree

7 files changed

+62
-8
lines changed

7 files changed

+62
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here are the suported printers and firmwares with latest Rinkhals release:
1919
| -- | -- | -- |
2020
| Kobra 3 (+ combo) | `2.4.0` `2.4.0.4` |
2121
| Kobra 2 Pro | `3.1.2.3` | Only with mainboard [Trigorilla Spe **B** v1.0.x](https://1coderookie.github.io/Kobra2ProInsights/hardware/mainboard/#trigorilla_spe_b_v10x-stock-new-revision). `3.1.4` is buggy |
22-
| Kobra S1 (+ combo) | `2.5.2.3` `2.5.3.1` |
22+
| Kobra S1 (+ combo) | `2.5.3.1` `2.5.3.5` |
2323
| Kobra 3 Max (+ combo) | `2.4.6` `2.4.6.5` |
2424
| Kobra 3 V2 (+ combo) | `1.0.5.8` |
2525

docs/docs/printers/kobra-s1.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,22 @@ title: Anycubic Kobra S1
106106
"create_date": 1748257633
107107
}
108108
```
109+
??? quote "2.5.3.5"
110+
```
111+
{
112+
"id": 139,
113+
"model_id": 20025,
114+
"machine_version": "1.1.0",
115+
"firmware_name": "update.swu",
116+
"peripheral_version": "",
117+
"firmware_version": "2.5.3.5",
118+
"firmware_url": "https://cdn.cloud-universe.anycubic.com/attachment/1933454620900286466_efz9nwrw.swu",
119+
"firmware_size": 136521108,
120+
"firmware_md5": "13fa2536989d32b3f0f2291ceca2d51c",
121+
"parent_id": 120,
122+
"force_update": false,
123+
"time_cost": 20,
124+
"update_desc": "1. Added support for cold bed tem.\n2. Fixed printer status issues after tangling\n3. Fixed large file parsing failures\n4. Other issues fixed",
125+
"create_date": 1749807350
126+
}
127+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
# This script was automatically generated, don't modify it directly
4+
# Before MD5: fc674464a870227bf4c860f2086863de
5+
# After MD5: 807d278614cce561376af31c5ce1365b
6+
7+
TARGET=$1
8+
9+
MD5=$(md5sum $TARGET | awk '{print $1}')
10+
if [ "$MD5" = "807d278614cce561376af31c5ce1365b" ]; then
11+
echo $TARGET is already patched, skipping...
12+
exit 0
13+
fi
14+
if [ "$MD5" != "fc674464a870227bf4c860f2086863de" ]; then
15+
echo $TARGET hash does not match, skipping patch...
16+
exit 1
17+
fi
18+
19+
PATCH_FILE=/tmp/patch-$RANDOM.bin
20+
echo 'VB4A6g7woOEvdXNlcmVtYWluL3JpbmtoYWxzLy5jdXJyZW50L29wdC9yaW5raGFscy91aS9yaW5raGFscy11aS5zaCAmIGVjaG8gJCEgPiAvdG1wL3JpbmtoYWxzL3JpbmtoYWxzLXVpLnBpZAB0aW1lb3V0IC10IDIgc3RyYWNlIC1xcXEgLWV0cmFjZT1ub25lIC1wICQoY2F0IC90bXAvcmlua2hhbHMvcmlua2hhbHMtdWkucGlkKSAyPiAvZGV2L251bGxybSAtZiAvdG1wL3JpbmtoYWxzL3JpbmtoYWxzLXVpLnBpZAAEAKDhAwBT46fh/xoAAJ/lAADq/HwSAAUW/OtkAKgl/OsAAJ/lAAAA6mJ9EgD/FQ8AUOP3//8KAAAAAADqvn0SAPkV/OsQABvlAACQ5QQgoOMBEKDjkcr+6xAAG+UAkOUEEKDjOMz+647h/+pSaW5raGFscwA=' | base64 -d > $PATCH_FILE
21+
22+
dd if=$PATCH_FILE skip=0 ibs=1 of=$TARGET seek=1115276 obs=1 count=4 conv=notrunc # 0x11048c / 0x12048c > 0x541e00ea
23+
dd if=$PATCH_FILE skip=4 ibs=1 of=$TARGET seek=1146104 obs=1 count=133 conv=notrunc # 0x117cf8 / 0x127cf8 > 0x0ef0a0e12f75736572656d61696e2f72696e6b68616c732f2e63757272656e742f6f70742f72696e6b68616c732f75692f72696e6b68616c732d75692e73682026206563686f202421203e202f746d702f72696e6b68616c732f72696e6b68616c732d75692e7069640074696d656f7574202d74203220737472616365202d717171202d65
24+
dd if=$PATCH_FILE skip=137 ibs=1 of=$TARGET seek=1146238 obs=1 count=63 conv=notrunc # 0x117d7e / 0x127d7e > 0x74726163653d6e6f6e65202d70202428636174202f746d702f72696e6b68616c732f72696e6b68616c732d75692e7069642920323e202f6465762f6e756c6c
25+
dd if=$PATCH_FILE skip=200 ibs=1 of=$TARGET seek=1146302 obs=1 count=36 conv=notrunc # 0x117dbe / 0x127dbe > 0x726d202d66202f746d702f72696e6b68616c732f72696e6b68616c732d75692e70696400
26+
dd if=$PATCH_FILE skip=236 ibs=1 of=$TARGET seek=1146340 obs=1 count=17 conv=notrunc # 0x117de4 / 0x127de4 > 0x0400a0e1030053e3a7e1ff1a00009fe500
27+
dd if=$PATCH_FILE skip=253 ibs=1 of=$TARGET seek=1146358 obs=1 count=12 conv=notrunc # 0x117df6 / 0x127df6 > 0x00eafc7c12000516fceb6400
28+
dd if=$PATCH_FILE skip=265 ibs=1 of=$TARGET seek=1146372 obs=1 count=18 conv=notrunc # 0x117e04 / 0x127e04 > 0xa825fceb00009fe5000000ea627d1200ff15
29+
dd if=$PATCH_FILE skip=283 ibs=1 of=$TARGET seek=1146392 obs=1 count=10 conv=notrunc # 0x117e18 / 0x127e18 > 0x0f0050e3f7ffff0a0000
30+
dd if=$PATCH_FILE skip=293 ibs=1 of=$TARGET seek=1146404 obs=1 count=37 conv=notrunc # 0x117e24 / 0x127e24 > 0x000000eabe7d1200f915fceb10001be5000090e50420a0e30110a0e391cafeeb10001be500
31+
dd if=$PATCH_FILE skip=330 ibs=1 of=$TARGET seek=1146442 obs=1 count=14 conv=notrunc # 0x117e4a / 0x127e4a > 0x90e50410a0e338ccfeeb8ee1ffea
32+
dd if=$PATCH_FILE skip=344 ibs=1 of=$TARGET seek=2799440 obs=1 count=9 conv=notrunc # 0x2ab750 / 0x2bb750 > 0x52696e6b68616c7300
33+
34+
rm $PATCH_FILE

files/3-rinkhals/opt/rinkhals/patches/create-patches.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ def patch_K3SysUi(binaryPath, modelCode, version):
129129
# bl QStackedWidget::setCurrentIndex
130130
# nop < patchReturnAddress
131131

132-
elif modelCode == 'KS1' and version == '2.5.2.3':
133-
buttonCallback = k3sysui.symbols['_ZZN10MainWindow26AcSettingGeneralPageUiInitEvENKUlRK11QModelIndexE0_clES2_']
134-
patchJumpAddress = 0x1138d8
135-
patchReturnAddress = 0x1138e0
136132
elif modelCode == 'KS1' and version == '2.5.3.1':
137133
buttonCallback = k3sysui.symbols['_ZZN10MainWindow26AcSettingGeneralPageUiInitEvENKUlRK11QModelIndexE0_clES2_']
138134
patchJumpAddress = 0x11f48c
139135
patchReturnAddress = 0x11f494
136+
elif modelCode == 'KS1' and version == '2.5.3.5':
137+
buttonCallback = k3sysui.symbols['_ZZN10MainWindow26AcSettingGeneralPageUiInitEvENKUlRK11QModelIndexE0_clES2_']
138+
patchJumpAddress = 0x12048c
139+
patchReturnAddress = 0x120494
140140

141141
else:
142142
raise Exception('Unsupported model and version')

files/3-rinkhals/opt/rinkhals/ui/check_updates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_latest_update(self, model_code=None, current_version=None):
114114
self.firmware_version = '2.4.0.4'
115115
elif model_code == 'KS1':
116116
self.model_id = '20025'
117-
self.firmware_version = '2.5.3.1'
117+
self.firmware_version = '2.5.3.5'
118118
elif model_code == 'K3M':
119119
self.model_id = '20026'
120120
self.firmware_version = '2.4.6.5'

files/3-rinkhals/opt/rinkhals/ui/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ def collect():
506506
if firmware_version == '2.5.2.2': supposed_hash = None
507507
if firmware_version == '2.5.2.3': supposed_hash = 'b29e8594f56001c09d4e232696b9827d'
508508
if firmware_version == '2.5.3.1': supposed_hash = '7678403dc8064f650931904f48be88f0'
509+
if firmware_version == '2.5.3.5': supposed_hash = 'd4021a6471d431dcebbe1b2f7bc17add'
509510
elif printer_info.model_code == 'K2P':
510511
if firmware_version == '3.1.2.3': supposed_hash = 'fb945efa204eec777a139adafc6a40aa'
511512
if firmware_version == '3.1.4': supposed_hash = None
@@ -516,7 +517,7 @@ def collect():
516517
if firmware_version == '2.4.6': supposed_hash = 'ff5c2d8ae79b8d90d0ff7c697d85502d'
517518
if firmware_version == '2.4.6.5': supposed_hash = 'b79497202880f92b6e4a578a32e8f3a3'
518519
elif printer_info.model_code == 'K3V2':
519-
if firmware_version == '1.0.5.8': supposed_hash = None
520+
if firmware_version == '1.0.5.8': supposed_hash = '94b173bb47de679f11439e363a4628c8'
520521

521522
if supposed_hash is None:
522523
printer_cfg_mtime = os.path.getmtime(printer_cfg_path)

files/3-rinkhals/tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ is_verified_firmware() {
6262
return
6363
fi
6464
elif [ "$KOBRA_MODEL_CODE" = "KS1" ]; then
65-
if [ "$KOBRA_VERSION" = "2.5.2.3" ] || [ "$KOBRA_VERSION" = "2.5.3.1" ]; then
65+
if [ "$KOBRA_VERSION" = "2.5.3.1" ] || [ "$KOBRA_VERSION" = "2.5.3.5" ]; then
6666
echo 1
6767
return
6868
fi

0 commit comments

Comments
 (0)