-
Notifications
You must be signed in to change notification settings - Fork 9
Flashing Test Carto Firmware On Ubuntu
THIS IS A RISKY OPERATION YOU COULD EASILY BRICK YOUR CARTO
IMPORTANT: Do not follow these instructions unless you have a USB V3 Carto!!!!!!
You might corrupt the katapult boot loader trying to use a Linux VM to flash the carto, I strongly recommend a live USB over a VM.
You must make sure that the cable you are using is pinned correctly. For both flat pack and right angle carto's the default cable that comes with your carto might not be pinned correctly.
IMPORTANT: The right angle and flat pack pin out is different to using a low profile carto, so the image above does not apply to low profile cartographers!
The reason this cannot be done on K1, seems to be some incompatibility with pyserial and MIPS, and issue for this has been opened https://github.com/Arksine/katapult/issues/137
You will need some kind of linux environment, this can be a Raspberry Pi, desktop Linux or even a Linux Server if you can plug something in via USB. If you do not have anything like that, you will need to create a Live USB key running Ubuntu 24.04 Desktop edition.
You should create a live USB with Ubuntu 24.04 Desktop, make sure the USB is at least 8GB in size!
https://ubuntu.com/tutorials/try-ubuntu-before-you-install#1-getting-started
On your raspberry pi, linux desktop, linux server or live Ubuntu USB environment you need to run the following commands to install essential packages.
sudo apt-get update
sudo apt-get install virtualenv python3-dev python3-pip libffi-dev build-essential git dfu-util
git clone "https://github.com/Klipper3d/klipper" $HOME/klipper
virtualenv --system-site-packages $HOME/klippy-env
$HOME/klippy-env/bin/pip3 install -r $HOME/klipper/scripts/klippy-requirements.txt
Plug the cartographer into your computer and make sure it shows up if you type lsusb
you should find an entry something like this:
Bus 001 Device 067: ID 1d50:614e OpenMoko, Inc.
CARTO_DEV=$(ls /dev/serial/by-id/usb-Cartographer*)
cd $HOME/klipper/scripts
sudo $HOME/klippy-env/bin/python -c "import flash_usb as u; u.enter_bootloader('$CARTO_DEV')"
IMPORTANT: If you get a message like ls: cannot access '/dev/serial/by-id/usb-Cartographer': No such file or directory
, it means you forgot the *
in the command above or else your carto cable is incorrectly pinned
You should see a message like:
Entering bootloader on /dev/serial/by-id/usb-Cartographer_614e_16000C000F43304253373820-if00
Note: If the carto does not enter bootloader mode, it is possible you forgot to use sudo!
Note: If your carto does show up in /dev/serial but won't enter bootloader mode, you will need to fix this with DFU mode
wget https://raw.githubusercontent.com/pellcorp/downloads/main/cartographer/firmware/v2-v3/survey/5.1.1/Survey_Cartographer_USB_8kib_offset.bin -O /tmp/Survey_Cartographer_USB_8kib_offset.bin
CATAPULT_DEV=$(ls /dev/serial/by-id/usb-katapult*)
sudo $HOME/klippy-env/bin/python $HOME/klipper/lib/canboot/flash_can.py -f /tmp/Survey_Cartographer_USB_8kib_offset.bin -d $CATAPULT_DEV
You should see output this this:
Attempting to connect to bootloader
CanBoot Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32f042x6
Flashing '/tmp/Survey_Cartographer_USB_8kib_offset.bin'...
[##################################################]
Write complete: 22 pages
Verifying (block count = 338)...
[##################################################]
Verification Complete: SHA = BB45B9575AC57FFF03CA5FE09186DB479E09BF53
CAN Flash Success
Note: If the carto does not flash, it is possible you forgot to use sudo!
When you reconnect your carto to your printer it should show a version CARTOGRAPHER 5.1.1
:
Simple AF Bltouch, CrTouch and 3dTouch
Simple AF Klicky COMING SOON
If you are looking for a way to support the project, and its entirely optional, this is my preferred approach. I am conducting a fundraiser to purchase a K1M printer, just so I can push out fixes and new features a bit faster, but also specifically test the K1M as well as the K1.
If you can't donate via go fund me directly, I have also added a kofi account.