Skip to main content

CAN Firmware Connection Notes

Wiring Instructions​

Please complete the following three steps in order:

Step 1: Set the DIP Switches​

  1. Power off first: Unplug all power sources.
  2. Locate the DIP switches: Turn the tool board over. Find the DIP switch group on the back.
  3. Set to position: To use CAN mode. Set all switches to the positions shown in the example below.
    Loading...

Important note: After changing the DIP switches, you must reflash the corresponding firmware (this guide uses CAN firmware).

Step 2: Connect the Wires​

  1. Keep the power off: Do not apply power during the entire wiring process.
  2. Prepare the cable: Use the XT30(2+2)-F four-core data cable. Its color definitions are as follows:
    • Red (VCC): Connect to the positive terminal of the 12V-24V power supply
    • Black (GND): Connect to the negative terminal of the power supply
    • Yellow (CAN-H): Connect to H on the CAN expansion port
    • White/Green (CAN-L): Connect to L on the CAN expansion port
  3. Connect the devices:
    • Plug the XT30(2+2)-F connector of the cable into the tool board.
    • Connect the cable's terminal block to the UTOC module or to the mainboard that has been flashed with the "USB-to-CAN bridge" firmware.
    • Finally, connect the UTOC module or mainboard to your host computer (such as a FLY Pi or Raspberry Pi) via a USB cable.

Step 3: Configure and Check the Termination Resistors​

To ensure signal stability, the termination resistors must be connected correctly. Please configure them according to the table below and measure them with the power off:

DeviceOperation Instructions
Tool boardInstall the 120Ω jumper cap, or set the 120Ω DIP switch to ON.
MainboardIf connecting to a mainboard, handle its 120Ω termination resistor in the same way (jumper cap or DIP switch).
UTOC moduleBuilt-in resistor*.

How to check:

  1. Keep the device completely powered off.
  2. Use a multimeter to measure the resistance between CAN-H and CAN-L on the tool board's CAN port.
  3. Interpreting the results:
    • About 60Ω: Normal; the resistors at both ends are connected correctly.
    • About 140Ω: CAN-H and CAN-L may be connected in reverse.
    • About 120Ω: The 120Ω termination resistor is not connected or the wire is broken.
    • About 40Ω: There may be extra resistors. Please check the intermediate nodes.

One-sentence summary: Power off first. Set the DIP switches. Plug in the cables correctly. Then connect the 120Ω termination resistors at both ends (jumper caps or DIP switches). Finally, measure whether the resistance is about 60Ω.

Checklist:

  • All operations performed with power off
  • All DIP switches set down (CAN mode)
  • Tool board 120Ω termination resistor connected (jumper cap or DIP switch)
  • Mainboard (if applicable) 120Ω termination resistor connected (jumper cap or DIP switch)
  • CAN data cable connected securely
  • Measured resistance is about 60Ω

CAN Network Configuration and Troubleshooting​

Step 1: Check if the Host Recognizes the CAN Device​

  1. Log in to the host. Enter the command:
lsusb
  1. Observe the result:
  • See 1d50:606f → Device recognized successfully
  • Prompt "command not found: ls" → Execute: sudo apt-get install usbutils
  • No output → Possible system issue, consider reinstalling the system
  • Multiple 1d50:606f entries → It is recommended to keep only one device (e.g., if using UTOC, disconnect other devices flashed with USB Bridge CAN firmware)

⚠️ Important: Only proceed to search for the CAN ID after seeing 1d50:606f.

Step 2: Configure the CAN Network​

Choose Configuration Method Based on System Type:​

Skip this step if already configured or if using the FlyOS-FAST system!

Configuration Method for Standard Linux Systems​

Set 1M bitrate (Recommended):

sudo /bin/sh -c "cat > /etc/network/interfaces.d/can0" << EOF
allow-hotplug can0
iface can0 can static
bitrate 1000000
up ifconfig \$IFACE txqueuelen 1024
pre-up ip link set can0 type can bitrate 1000000
pre-up ip link set can0 txqueuelen 1024
EOF

Set 500K bitrate:

sudo /bin/sh -c "cat > /etc/network/interfaces.d/can0" << EOF
allow-hotplug can0
iface can0 can static
bitrate 500000
up ifconfig \$IFACE txqueuelen 1024
pre-up ip link set can0 type can bitrate 500000
pre-up ip link set can0 txqueuelen 1024
EOF

Note: FAST systems do not require this operation!

  1. Reboot system to apply changes:
    sudo reboot

Step 3: Search for CAN ID​

Check CAN Status:​

ip -details link show can0
  • The circled area below shows the host CAN bitrate and buffer
  • 1024 at the top is the current CAN0 buffer
  • 1000000 at the bottom is the current CAN0 bitrate
Loading...

Search for Device:​

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

Normal output: Found canbus_uuid=xxxx...

Common Error Resolution​

Error MessageCauseSolution
OSError: [Errno 19] No such deviceCAN device not found1. Check USB connection
2. Confirm firmware is correct
3. Run lsusb to verify
can.CanError: Failed to transmit: [Errno 100] Network is downCAN network not configured1. Execute the configuration steps above
2. Reboot the system
can.CanError: Failed to transmit: [Errno 105] No buffer space availableInsufficient buffer1. Confirm CAN buffer is 1024
2. Reboot the system

Troubleshooting Steps if CAN ID Not Found​

Step 1: Basic Checks​

  • lsusb shows 1d50:606f
  • CAN device and tool board are powered on
  • Data cable connection is secure

Step 2: Configuration Checks​

  • CAN network is correctly configured
  • Host CAN bitrate matches tool board firmware (default 1M)
  • System has been rebooted

Step 3: Hardware Checks​

  • Both ends of the CAN bus have 120Ω termination resistors
  • Power off and measure resistance between CAN-H and CAN-L ≈ 60Ω
  • Check cables for breaks
  • CAN-H and CAN-L are not swapped

Step 4: Special Situations​

  • If Klipper is occupying the ID:

    1. Disable the corresponding configuration in Klipper
    2. Power off completely for 1 minute
    3. Power on again and search
  • Termination Resistance Measurements:

    • ≈60Ω: Normal
    • ≈120Ω: Only one end has a resistor
    • ≈40Ω: Three ends have resistors
    • ≈140Ω: Potential wire swap

Quick Troubleshooting Sequence​

  1. Check Device First: lsusb → See 1d50:606f?
  2. Check Configuration: ip -details link show can0 → Bitrate correct?
  3. Check Hardware Last: Power off, measure resistance → ~60Ω?

Still failing after all checks: Try replacing the data cable or device. Or contact technical support.

Tool Board Firmware Update Steps​

Step 1: Preparation​

  1. Compile the new firmware file according to the tutorial
  2. Stop the Klipper service:
sudo systemctl stop klipper

Step 2: Get Tool Board ID​

Find the CAN UUID for the corresponding tool board in the Klipper configuration file (e.g., 241696050c56)

Step 3: Execute Firmware Update​

Version Notes

Select the correct command based on your system version:

  • FlyOS-FAST 1.3.8 and later or Systems where Klipper was updated after April 9, 2026:

    python3 ~/klipper/lib/katapult/flashtool.py -u 241696050c56
  • Older Systems (FAST before 1.3.8 or Klipper not updated before April 9, 2026):

    python3 ~/klipper/lib/canboot/flash_can.py -u 241696050c56

Note: There must be a space after -u. Followed by your tool board's CAN UUID.

Step 4: Verify Result​

  • See CAN Flash Success prompt → Flashing successful

  • See other error messages → Flashing failed. Check UUID and connection.

    Loading...

Step 5: Restart Service​

sudo systemctl start klipper

Update Complete!

Loading...