I shared 2.3.9 above. It’s the same file for Max, Pro and Plus
If you flash this file you will get settings for k2max
How sure are you? Considering firmware has files for all 3 variations
I’m 100% sure.
Interesting. Figured they’d have some detection since they have configs for all 3.
Oh my… Thanks!!! Man I have tried everything but holding “s” lol.
Thanks!! Now I wanna see if I can do something fun!
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.
For booting into u-boot:
Hold key “s” while booting then do:
setenv init /bin/sh
saveenv
bootd
For people who wanna reset the password:
You need to boot manually:
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 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
setenv init /sbin/init
setenv bootdelay 3
saveenv
reset
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.
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)
Maybe GitHub - Jpe230/SonicPad-Debian: Port of Debian for the SonicPad (Allwinner R818) and in particular SonicPad-Debian/DIY.md at main · Jpe230/SonicPad-Debian · GitHub 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.
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.
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/
If either way works we have a functioning linux on our machine
I can’t mount the overlay using this instruction
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 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:
#!/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
wget http://10.0.0.143:8000/installssh.sh -O /tmp/installssh.sh
Then run
chmod +x /tmp/installssh.sh
/tmp/installssh.sh
Here’s what I did:
hold down “s”
setenv init /bin/sh
boot
wait for booting
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
On top of that it would be nice if we could make the file a .swu 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.
I found the firmware url.
Just mount a USB into the firmware port all the way to the right and then just:
cat /mnt/UDISK/log
It shows the mqtt password and all that.
Their mqtt URL:
mqtts://mqtt-universe.anycubic.com:8883
Some URLs:
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
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.
Yeah. Here is a quick python script to check URLs:
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:
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 for all the firmwares I could download.
awesome! thanks for this.