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 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 position shown in the example below.

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

Step 2: Connect the Wires

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

Step 3: Configure and Check the Termination Resistor

To ensure signal stability, the termination resistor must be correctly connected. Please configure according to the table below and measure while powered off:

DeviceInstructions
Tool BoardFind and plug in the jumper cap labeled 120Ω.
MainboardIf connecting to a mainboard, also plug in 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 tool board's CAN port.
  3. Result Judgment:
    • Approx. 60Ω: Normal. Termination resistors at both ends are correctly connected.
    • Approx. 140Ω: Possibly CAN-H and CAN-L are swapped.
    • Approx. 120Ω: No 120Ω resistor installed or a wire is broken.
    • Approx. 90Ω: Only one 120Ω resistor is installed.
    • Approx. 40Ω: Possibly an extra resistor exists. Check intermediate nodes.

Summary in one sentence: Power off first, set DIP switches correctly, plug in wires correctly, connect the 120Ω jumper caps at both ends, and finally measure if the resistance is around 60Ω.

Checklist:

  • Operated with power off throughout
  • All DIP switches are set to down (CAN mode)
  • Tool board 120Ω jumper cap is installed
  • Mainboard (if applicable) 120Ω jumper cap is installed
  • CAN data cable is securely connected
  • Measured resistance is approx. 60Ω

CAN Network Configuration and Troubleshooting

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

  1. Log in to the host computer and enter the command:
lsusb
  1. Observe the result:
  • See 1d50:606f → Device recognized successfully
  • Prompt ls command not found → Execute: sudo apt-get install usbutils
  • No response → Possibly a system issue, consider changing 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 CAN ID after seeing 1d50:606f

Step 2: Configure the CAN Network

Choose configuration method based on system type:

If already configured or using FlyOS-FAST system, this step is not needed!

Standard Linux System Configuration Method

Set 1M rate (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 rate:

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 system does not require this operation!

  1. Reboot the system to take effect:
    sudo reboot

Step 3: Search for CAN ID

Check CAN status:

ip -details link show can0
  • The circled area in the image below shows the host computer's CAN rate and buffer
  • The upper 1024 is the current CAN0 buffer
  • The lower 1000000 is the current CAN0 rate

Search for devices:

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

Normally it will display: Found canbus_uuid=xxxx...

Common Error Solutions

Error MessageCauseSolution
OSError: [Errno 19] No such deviceCAN device not found1. Check USB connection
2. Confirm firmware is correct
3. Execute 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

Steps to Check if CAN ID is Not Found

Step 1: Basic Checks

  • Execute lsusb and see 1d50:606f
  • Both CAN device and tool board are powered on
  • Data cable is securely connected

Step 2: Configuration Checks

  • CAN network is correctly configured
  • Host computer CAN rate matches the tool board firmware rate (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 for broken wires
  • CAN-H and CAN-L are not swapped

Step 4: Special Case Handling

  • If Klipper already occupies the ID:

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

    • ≈60Ω: Normal
    • ≈120Ω: Only one end has a resistor
    • ≈40Ω: Three ends have resistors
    • ≈140Ω: Possibly wires are swapped

Quick Troubleshooting Order

  1. Check device first: lsusb → Is 1d50:606f present?
  2. Check configuration next: ip -details link show can0 → Is the rate correct?
  3. Check hardware last: Power off and measure resistance → Is it approx. 60Ω?

If still not working 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 as per the tutorial
  2. Stop the Klipper service:
sudo systemctl stop klipper

Step 2: Obtain the Tool Board ID

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

Step 3: Execute Firmware Update

Use the following command to flash the firmware (replace 241696050c56 with your actual CAN UUID):

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

Step 4: Verify Result

  • See CAN Flash Success prompt → Flashing successful
  • See other error messages → Flashing failed, please check UUID and connection

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

Step 5: Restart Service

sudo systemctl start klipper

Update Complete!

Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
Loading...