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: Disconnect all power sources.
  2. Locate DIP Switches: Turn the tool board over. Find the DIP switch block on the back.
  3. Set Correctly: To use CAN mode, set all switches to the position shown in the example below.
    Loading...

Important: After changing the DIP switches, you must re-flash the corresponding firmware (this guide uses CAN firmware).

Step 2: Connect the Cables

  1. Keep Power Off: Do not power on during the entire wiring process.
  2. Prepare Cable: Use an XT30(2+2)-F 4-core data cable. The color definitions are as follows:
    • Red (VCC): Connect to 12V-24V power positive
    • Black (GND): Connect to power negative
    • Yellow (CAN-H): Connect to H of the CAN expansion port
    • White/Green (CAN-L): Connect to L of the CAN expansion port
  3. Connect Devices:
    • Plug the XT30(2+2)-F connector of the cable into the tool board.
    • Connect the terminal block of the cable to the UTOC module or the mainboard that has been flashed with "USB Bridge CAN" firmware.
    • Finally, connect the UTOC module or mainboard to your host (e.g., FLY Pi or Raspberry Pi) via a USB cable.

Step 3: Configure and Check Termination Resistors

For signal stability, the termination resistors must be correctly connected. Configure according to the table below and measure in a powered-off state:

DeviceOperation Description
Tool BoardLocate and insert the jumper cap labeled 120Ω.
MainboardIf connecting via a mainboard, also insert its 120Ω jumper cap.
UTOC ModuleHas built-in resistor*.

How to Check:

  1. Ensure the system is completely powered off.
  2. Use a multimeter to measure the resistance between CAN-H and CAN-L on the CAN port of the tool board.
  3. Interpreting Results:
    • ~60Ω: Normal, resistors at both ends are correctly connected.
    • ~140Ω: Possibly CAN-H and CAN-L are swapped.
    • ~120Ω: No 120Ω resistor installed or a broken wire.
    • ~40Ω: Possibly an extra resistor. Check intermediate nodes.

Summary: Power off first. Set the DIP switch correctly. Connect the wires properly. Install the 120Ω jumper caps at both ends. Finally, measure the resistance to ensure it is around 60Ω.

Checklist:

  • All operations performed with power off
  • All DIP switches set to OFF (CAN mode)
  • Tool Board 120Ω jumper cap inserted
  • Mainboard (if used) 120Ω jumper cap inserted
  • CAN data cable connected securely
  • Measured resistance value is approximately 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...