Skip to content

Switching Protocols

A probe’s protocol (USB, or CAN at a given speed) is set by its bootloader and firmware. Switching means replacing both. There are three ways to do it:

Situation Method
V4, USB to CAN at 1M Run the script on V4 - Switching from USB to CAN. Nothing else needed.
Any other switch on a working probe (V3 either direction, V4 back to USB, 500K or 250K CAN) The Katapult deployer, described on this page.
Probe not responding, or no Katapult installed Recovery via DFU, choosing a combined file for the protocol you want.

The Katapult deployer is a special bootloader image that you flash through the existing Katapult. It replaces the bootloader with one for the new protocol and wipes the Cartographer firmware. The probe will not work until you flash firmware over the new protocol in the final step, so read the whole procedure before starting.

You need to know whether you have a V3 or V4; see Which version do I have?

You need the Cartographer firmware repository and Katapult on your Pi. Connect via SSH and run the following. It clones each repository if it is missing, or updates it if it is already there.

Terminal window
cd ~
if [ -d ~/cartographer_firmware/ ]; then
echo "Cartographer Firmware Exists - Updating Repository"
cd ~/cartographer_firmware/
git pull
else
git clone https://github.com/Cartographer3D/cartographer_firmware.git
fi
cd ~
if [ -d ~/katapult/ ]; then
echo "Katapult Exists - Updating Repository"
cd ~/katapult/
git pull
else
git clone https://github.com/Arksine/katapult.git
fi

Add both to moonraker.conf so they stay up to date. The Cartographer firmware entry is the same one used in Klipper Setup, so you may already have it.

[update_manager Cartographer Firmware]
type: git_repo
path: ~/cartographer_firmware
origin: https://github.com/Cartographer3D/cartographer_firmware.git
is_system_service: False
[update_manager katapult]
type: git_repo
path: ~/katapult
origin: https://github.com/Arksine/katapult.git
is_system_service: False

With the probe connected over USB, put it into the Katapult bootloader.

Terminal window
CARTO=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i cartographer | head -n 1)
if [ -z "$CARTO" ]; then
echo "ERROR: No Cartographer probe found in /dev/serial/by-id/. Is it plugged in via USB?"
exit 1
fi
cd ~/klipper/scripts || exit 1
~/klippy-env/bin/python -c "import flash_usb as u; u.enter_bootloader('/dev/serial/by-id/$CARTO')"

The probe now appears as usb-katapult_… in /dev/serial/by-id/.

This replaces the USB bootloader with a CAN one and erases the firmware. The USB status LED goes out and the probe disappears from /dev/serial/by-id/; that is expected.

Terminal window
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v2-v3/katapult-deployer/
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f katapult-deployer-1m.bin -d /dev/serial/by-id/$KATAPULT

For a 500K or 250K network use katapult-deployer-500k.bin or katapult-deployer-250k.bin.

Successful output looks like this:

Power off, unplug the USB cable, connect the probe to your CAN network, and power back on. Reconnect via SSH.

Find the probe on the bus. It should be listed with “Katapult” next to it. Note its UUID.

Terminal window
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

Flash the firmware, replacing <uuid> with the UUID from the query. The file’s CAN speed must match the deployer you flashed in Step 2.

Terminal window
cd ~/cartographer_firmware/firmware/v2-v3/survey/6.1.0/
python3 ~/katapult/scripts/flash_can.py -i can0 -f CartographerV3_6.1.0_CAN_1M_full_8kib_offset.bin -u <uuid>

Other files in this folder: …_CAN_1M_lite_…, …_CAN_500K_full_…, …_CAN_500K_lite_…, …_CAN_250K_full_…, …_CAN_250K_lite_….

The probe reboots into the Cartographer firmware. Continue to Update printer.cfg.

If the probe is configured, the UUID is the canbus_uuid value in [mcu cartographer] in printer.cfg. Otherwise query the bus (this does not list devices Klipper is already connected to):

Terminal window
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

This replaces the CAN bootloader with a USB one and erases the firmware. Replace <uuid> with your UUID.

Terminal window
cd ~/cartographer_firmware/firmware/v2-v3/katapult-deployer
python3 ~/katapult/scripts/flash_can.py -i can0 -f katapult-deployer-usb.bin -u <uuid>

Power the printer off, disconnect the probe from the CAN bus, connect it by USB, and power back on. Reconnect via SSH. The probe appears as usb-katapult_… in /dev/serial/by-id/.

Terminal window
KATAPULT=$(ls /dev/serial/by-id/ 2>/dev/null | grep -i katapult | head -n 1)
cd ~/cartographer_firmware/firmware/v2-v3/survey/6.1.0/
~/klippy-env/bin/python ~/katapult/scripts/flash_can.py -f CartographerV3_6.1.0_USB_full_8kib_offset.bin -d /dev/serial/by-id/$KATAPULT

For Lite firmware use CartographerV3_6.1.0_USB_lite_8kib_offset.bin.

Successful output looks like this, and the probe reappears as usb-Cartographer_….

Klipper still has the old connection details. In the [mcu cartographer] section of printer.cfg, replace the serial: line with canbus_uuid: (USB to CAN) or the other way round (CAN to USB), then save and restart. Klipper Setup explains how to find the new value.

[mcu cartographer]
# USB
serial: /dev/serial/by-id/usb-Cartographer_614e_...
# CAN - use this line instead and remove serial
#canbus_uuid: 379702c36ad1

If you are still on the previous [scanner] plugin, the section is [mcu scanner] instead.