Guide/script still a work in progress but its good enough to upgrade to klipper 12. My end goal is to figure out what services are not needed(yes I think there are some) and remove the un-necessary clutter in the MKS user folder.
Preform this at your own risk, I am not responsible if something happens while running this script. Making a backup is highly recommended.
- Runs through backing up config files and restoring them once klipper and moonraker is removed then reinstalled
- Saves current printer history including runtime
- You should not see a difference once this script is done running
- Webcamd and touch screen still work like normal
- Recompiles RPI mcu
- Fixes sources.list fist so that you can update(only to what is in the archive area) and apply security patches.
- Future work to compile Armbian 24 and get this working corectly.... TBD
- Install script does not update the STM32 microcontroller to klipper 12 automatically, updating the microcontroller will be a manual process that is documented at the end of this document
The following steps are for backing up and moving to a bigger eMMC module.
- Acquire an eMMC to USB Adapter: MKS USB3 Adapter - AliExpress or Adapter with spare eMMC - AliExpress
or
Acquire bigger eMMC 32GB version (without adapter) or 32GB version (without adapter) - AliExpress. - If using same eMMC card, backup all files in
/home/mks/klipper_config
- Power off the printer and access the Mainboard by removing all the middle screws and loosening the outer ones.
DO NOT fully remove the outer screws as they are being held in with tnuts. - Remove the tow screws securing the eMMC module and safely lift it free
Windows (not tested)
- Use usbimager application, and follow their instructions.
Linux
- Insert eMMC module into USB module and insert into computer, make sure to insert it the correct way.
- Run
dd bs=4m if=/dev/sdX | gzip > infimechTx_bak.img.gz
- Remove eMMC module from computer
- Run the following if upgrading to bigger eMMC module
- Replace eMMC module with larger eMMC module and insert into computer
- Use balena etcher to flash to new eMMC if going to bigger drive
- Remove from computer
- Insert eMMC back into motherboard (wait till everything is working before putting the bottom back on)
- Power on the printer
- Access your printer's terminal console (via SSH or Serial)
- Determine the new IP of your printer (two options below):
a. Use your router's web interface > DHCP lease table.
b. Or use AngryIP (Settings Cog
>Ports
> Clearport selection
entries, type7125
,Ok
, thenStart
) - Connect via SSH using:
ssh mks@YOUR-PRINTERS-IP
. Password:makerbase
.
-
Connect your computer to the printer's USB-C port (
1500000 Baud
Serial terminal).
a.Windows
users can use PuTTY. Here is a useful quick connection Guide.
b.Linux
users can usescreen
for terminal access (linux commands below).lsusb
Find the relevant ttyACM / ttyUSB device then paste yours into the command below.
screen /dev/tty* 1500000
To exit screen, press
Ctrl + A
followed byK
, then confirm withY
. -
Once connected login using: User:
mks
. Password:makerbase
.
- Pull script
wget https://raw.githubusercontent.com/jimmyjon711/InfimechTxUpgrade/main/infimechTxUpgrade.sh && chmod +x ./infimechTxUpgrade.sh
- Run script
~/infimechTxUpgrade.sh
- Either run all with
a
or choose each step in order from1-8
- See sections with prompted with input
- Once done reboot
sudo reboot
- Perform optional steps if everything is working
- Choose
Y
to updateN
to continue without updates
- Navigate to :
Personal
>Timezone
to set your zone. - Exit
-
Hit
Y
to update and relaunch. -
Choose
Y
if Kiauh updated -
Enable automatic backups before updates (optional)
-
Type (
6
) forSettings
-
Type (
4
) for Enable automatic backups before updates -
Should now say - Disable automatic backups before updates
-
Type (
b
) to navigate back -
Time to remove and install all currently installed plugins
Removal- Type (
3
) for[Remove]
- Type (
1
) for[Klipper]
- Type (
2
) for[Moonraker]
- If you have any others installed (eg. mobileraker) note what you have installed and remove them now.
( NOTE: You do not have to remove fluidd, have not tried mainsail ) - Type (
b
) to navigate back
- Type (
Installation
- Type (
1
) for[Install]
- Type (
1
) for[Klipper]
- install with python 3.x then follow on screen prompts - Type (
2
) for[Moonraker]
- follow on screen prompts - If you removed anything else, add it back now
- Type (
b
) to navigate back - Install G-Code Shell Command
- Type (
4
) forAdvanced
- Type (
8
) for[G-Code Shell Command]
- Select
Y
to install at your own risk - Select
N
to create and example shell command?
- Select
- Type (
b
) to navigate back
- Type (
Updating Other plugins
- Type(
2
) for[Update]
- Type(
4
) for[Fluidd]
Manually update anything else - Type(
b
) to navigate back - Type(
q
) to quit kiauh
- Type (
Reference : https://www.klipper3d.org/RPi_microcontroller.html#install-the-rc-script
- In the menu, set "Microcontroller Architecture" to "Linux process," then save and exit.
- Once all steps
1-8
are completed reboot and everything should be working correctly - If you run into the following error Option 'position_endstop' is not valid in section 'stepper_z' when rebooting, then navigate to your printer.cfg file and search for
[stepper_z]
then comment out theposition_endstop: -4
line. Save and restart. - Put bottom cover back on.
- Rerun Temperature calibration, Resonance Compensation, and Auto leveling before using again
PID_CALIBRATE HEATER=extruder TARGET=200
PID_CALIBRATE HEATER=heater_bed TARGET=60
- Remove configuration backup files with option
8
- DO NOT USE CROWSNEST it does not work. Use webcamd instead
- Enable webcam with option
10
( This can be ran at any time ) - In klipper web gui navigate to Configuration
- Open webcam.txt file and edit
camera_usb_options
. Make sure the-d
option points to your webcam.- If you are having trouble finding your webcam run the following in an ssh session
- Install v4l-utils
sudo apt get install v4l-utils
- Download crowsnest helper tool and run
wget https://raw.githubusercontent.com/mainsail-crew/crowsnest/master/tools/dev-helper.sh && chmod +x ./dev-helper.sh && dev-helper.sh -c
- If you are having trouble finding your webcam run the following in an ssh session
The following instructions were provided by GoldenGreek
This process assumes that you have already run the InfimechTXUpgrade.sh file from this repository to get to klipper 0.12 first! The directory structure that these steps assume are dependent on this.
-
SSH to the Infimech and login as mks/makerbase
-
cd kiauh
-
./kiauh.sh
-
If prompted to update, enter
Y
, and then rerun the above command to relaunch kiauh. -
Select option (
4
) foradvanced
-
Select option (
2
) forbuild only
You will get the Klipper Firmware Configuration window:
Change the following settings:
- Set Micro-Controller Architecture to STMicroelectronics STM32
- Set Processor Model to STM32F401
- Ensure that Bootloader offset is set to 32Kib bootloader
- Ensure that communication interface is set to USB (on PA11/PA12)
- Press
Q
, andYes
when prompted to save your configuration
KIAUH will now compile your firmware:
-
Type
B
and hit enter to go back, then typeQ
and hit enter to quit KIAUH. -
Enter the following command to rename and and copy the file so you can download it from fluidd:
cp ~/klipper/out/klipper.bin ~/printer_data/config/mks_skipr_mini.bin
-
Go to your printer's web interface and download the mks_skipr_mini.bin file
-
Copy the file you downloaded to a microSD card.
-
Properly shutdown the Infimech and power it off then insert the microSD card into the sd-card slot.
-
This slot is located on the mainboard, and is accessible without taking the bottom off. There is an opening on the side that you can sneak the card in if you could see it properly. (But be careful, if you drop it then you are taking the bottom off to retrieve the sd-card)
It's easiest to remove the left side panel to pop the card in. The bottom does not need to come off.
-
-
Power on the printer, once you can get to the web interface navigate to
System
(second from the bottom option on the left side) -
Verify
mcu information
Version shows v0.12.0-xxx-xxxxxxxxx (See picture below), your x's will be something different depending on when klipper was pulled from github. -
Properly shutdown the Infimech and power it off then remove SD-Card from the MCU TF-Card slot.