CAN Error Troubleshooting
This document covers common CAN network errors, communication anomaly troubleshooting, and procedures for when a CAN ID cannot be found.
Applicable scenarios:
- Klipper reports errors related to CAN0, CAN UUID, or the CAN network.
- CAN devices intermittently go offline or cannot be found.
- Need to troubleshoot issues like
bytes_invalid,USB CANBUS bridge,BUS-OFF,Timer too close.
If you need to configure CAN0, search for a CAN ID, or understand wiring and termination resistor rules, please first refer to CAN Network Configuration and ID Search.
Common Error Diagnosis
| Error | Common Cause | Solution |
|---|---|---|
OSError: [Errno 19] No such device | Host cannot find CAN device | Check UTOC, USB cable, CAN bridge firmware, and power supply |
can.CanError: Failed to transmit: [Errno 100] Network is down | CAN0 not started or configured incorrectly; also common in the short window after restarting Klipper, reconfiguring CAN0 or link recovery | Restart Klipper first and see whether it still reproduces: appearing on its own and disappearing shortly after usually does not affect printing. Only when it recurs, or shows up together with errors such as Timer too close and Lost communication, reconfigure CAN0 and check the bit rate and the termination resistors |
can.CanError: Failed to transmit: [Errno 105] No buffer space available | Insufficient CAN buffer or system network queue anomaly | Confirm buffer is 1024, reconfigure CAN0 if necessary |
mcu 'xxx': Invalid CAN uuid | Incorrect CAN UUID or device not online | Re-search for UUID, check wiring order, power supply, and termination resistors |
Serial connection closed | Klipper found the configuration but connection was interrupted | Check CAN network quality, wiring order, termination resistors, and firmware baud rate |
Duplicate canbus_uuid | Multiple MCU configurations use the same CAN UUID | Re-search for UUID, ensure each [mcu xxx] is unique |
Unknown canbus_uuid xxx | CAN UUID in config not found in current network scan | Comment out the corresponding MCU config, re-scan, and fill in the correct UUID |
Can not update MCU 'xxx' config as it is shutdown | CAN MCU entered shutdown first, subsequent config update failed | Scroll up in klippy.log to find the root cause of the first disconnection or shutdown |
USB CANBUS bridge 'mcu' is discarding! | USB-CAN bridge MCU's CAN hardware has discarded messages | Check canstat_mcu, bus_state, power supply, transceiver, and wiring harness |
can state BUS-OFF / ERROR-PASSIVE | CAN controller entered an error state | Power off and check the physical bus, termination resistors, wiring order, and number of nodes |
For more Klipper errors, refer to Common Error Messages.
CAN Communication Error Troubleshooting
A large portion of CAN bus communication anomalies are caused by electromagnetic interference (EMI). The stepper motor wires, heater wires, and bed heater wires inside a 3D printer generate strong electromagnetic fields when operating at high current. If the CAN communication wires (CANH/CANL) are routed in close parallel with these high-power wires, interference signals will couple onto the CAN bus, causing:
- Communication timeouts, intermittent MCU disconnections
- CAN devices randomly going offline,
canbus_query.pyunable to detect them Timer too closeorCommunication timeouttriggered during homing- Sudden shutdown during printing with no obvious hardware errors in the log
When troubleshooting interference, prioritize checking the routing layout of CAN wires versus high-power wires, shielding layer grounding, and termination resistor integrity.
CAN bytes_invalid counter keeps increasing
Error message: In klippy.log, the per-second Stats line shows a non-zero bytes_invalid that keeps increasing.
Cause: CAN bus messages are being reordered. This is a serious issue that will cause instability and random errors at any stage of printing.
Known causes:
- Linux kernel version lower than v6.6.0, which has a gs_usb CAN driver reordering bug.
- USB-CAN adapter running candlelight firmware older than v2.0.
- Klipper USB-to-CAN bridge mode node firmware older than v0.12.0.
Solution:
- If using a candlelight USB-CAN adapter, upgrade the firmware to v2.0 or higher.
- If using Klipper USB-to-CAN bridge mode, ensure the bridge node is flashed with Klipper v0.12.0+ firmware.
- If
bytes_invalidis still increasing, the root cause has not been resolved; continue investigating kernel version and firmware version. - Note: An increasing
bytes_invalidis not caused by hardware issues such as wiring or termination resistors; it can only be fixed by updating software/firmware.
Insufficient CAN bus queue causing Timer too close
Error message: MCU 'xxx' shutdown: Timer too close during CAN bus communication.
Cause: The Linux kernel's default queue length (qlen) for CAN network interfaces is typically 10, which is too small for Klipper's high-frequency, low-latency communication requirements. Klipper's official examples commonly use txqueuelen 128; FlyOS-FAST presets it to 1024, providing more headroom in scenarios with many nodes or high load.
Solution:
- Check the current CAN interface queue length:
ip link show can0 | grep qlen
- Temporarily increase the queue length. For standard systems, test with
128first; for FLY systems or multi-node machines, use1024:
sudo ip link set dev can0 qlen 128
# or
sudo ip link set dev can0 qlen 1024
- Permanent setting: Add the
txqueuelen 128ortxqueuelen 1024parameter in/etc/network/interfaces.d/can0; if using systemd-networkd, setTxQueueLength=in the.linkfile.
USB CANBUS bridge is discarding / bus_state=off
Error message: USB CANBUS bridge 'mcu' is discarding!, canstat_mcu: bus_state=off, can state BUS-OFF, ERROR-PASSIVE, followed by Timeout with MCU 'xxx' or Serial connection closed.
Cause: The CAN hardware of the USB-CAN bridge MCU has stopped sending or receiving messages normally. This is usually not a simple txqueuelen shortage; more commonly it is poor contact in the CAN wiring harness, incorrect termination resistor placement, a faulty transceiver or node, power supply fluctuations on the tool board, or insufficient signal margin due to excessive bus length or too many nodes.
Troubleshooting methods:
Before inspecting CANH/CANL, re-plugging the tool board, adjusting termination resistors, or measuring CANH-CANL resistance, completely power off the printer and disconnect the power supply. Do not add or remove CAN nodes or plug/unplug tool board wiring harnesses while powered on.
- In
klippy.log, find theStatslines before and afterUSB CANBUS bridge 'mcu' is discarding!and record thebus_state,rx_error,tx_error, andtx_retriesofcanstat_mcu. Note: According to Klipper documentation, only rp2XXX (RP2040) reports non-zerotx_retries, and itstx_erroris always 0 whilebus_stateis alwaysactive; RP2040'stx_retriesis also calculated astx_attempt - tx_total - 1, which is one less than the actual retransmission count and lags by one cycle, and can grow to millions in practice. Therefore, base your judgment primarily onrx_errorand whetherdiscardingappears; do not conclude the bus is faulty just becausetx_retriesis large. - If
bus_statechanges fromactivetoofforpassive, prioritize hardware bus troubleshooting rather than only adjusting the Linux queue length. - After powering off, confirm there are exactly two termination resistors on the CAN bus, located at the physical ends of the bus; the measured CANH-CANL resistance should typically be close to
60Ω. - Test by reducing CAN nodes one at a time: first keep only the main board and one tool board, then gradually add nodes to confirm whether a particular tool board, wiring harness, or branch triggers the anomaly as soon as it is connected.
- Check tool board power supply and connector crimping status; if a tool board resets, the bridge end may show
discardingfirst, followed by other MCUs being reported as timed out. - For machines with multiple toolheads or long wiring harnesses, temporarily reduce the CAN rate for testing, or split multiple toolheads across two USB-CAN adapters for cross-validation.
- If the issue still reproduces after updating Klipper and all CAN node firmware, prioritize replacing the finished CAN cable, USB-CAN adapter, or tool board transceiver module for cross-testing.
Only some UUIDs found with multiple CAN nodes
Error message: canbus_query.py can only find some tool board UUIDs, or any one or two nodes on the same CAN bus work normally, but after adding a third or more nodes, none can be found, connection times out, or BUS-OFF occurs.
Common causes:
- The newly added tool board has not entered Katapult / Klipper CAN mode, or the firmware CAN rate does not match the host's
can0. - A node has CANH/CANL reversed, poor crimping, or a damaged transceiver, dragging down the entire bus when connected.
- Termination resistors are not at the physical ends of the bus, or extra termination resistors are mistakenly enabled on tool boards, hub boards, or adapter boards.
- Multi-toolhead wiring harnesses form excessively long loops, star branches, or impedance discontinuities, resulting in insufficient signal margin as node count increases.
- Different batches of tool boards use different bootloaders, Katapult, or Klipper firmware, resulting in inconsistent detection states.
Troubleshooting methods:
Before adding or removing CAN nodes, adjusting termination resistors, re-crimping wiring harnesses, or measuring CANH-CANL resistance, completely power off the printer and disconnect the power supply.
- Keep only the host CAN interface and one target tool board, and confirm the single node's UUID can be found.
- Swap in short cables, ports, and tool boards one at a time to determine whether it is a specific node issue or an issue that only triggers when the node count increases.
- Verify the bootloader, Klipper firmware communication method, and CAN rate of each tool board, ensuring all nodes match
can0. - Confirm that each
[mcu xxx]has a uniquecanbus_uuid; if the device has already been written to the configuration, temporarily comment out the corresponding MCU configuration and restart Klipper before scanning. - Power off and measure CANH-CANL resistance; approximately
60Ωtypically indicates one120Ωtermination resistor at each end; if it deviates significantly, address the termination resistors first. - If any two nodes are stable but three or more are unstable, prioritize checking bus topology, cable length, termination placement, and hub board documentation; if necessary, split into two CAN buses.
CAN bus node not responding
Error message: CAN device suddenly goes offline, canbus_query.py cannot detect the device.
Common causes:
- Missing or incorrect CAN termination resistors (there must be exactly two 120Ω resistors between CANH-CANL).
- Loose CANH/CANL wiring, poor crimping, or loose connectors.
- CAN wires not using twisted shielded pair, or routed parallel to high-power wires causing electromagnetic interference (a common and relatively hidden cause).
- Abnormal power supply to the USB-CAN adapter.
Interference troubleshooting focus:
CAN communication anomalies caused by electromagnetic interference often manifest as "intermittent" and "random" — sometimes everything is normal, sometimes it suddenly goes offline, and recovers after a power cycle. When troubleshooting, focus on:
- Routing layout: Are CAN communication wires routed side by side with motor wires, heater wires, and bed heater wires in the drag chain? High-speed PWM-modulated motor drive signals and heater switching noise are the main interference sources.
- Shielding layer grounding: When using shielded cable, is the shielding layer grounded at one end only (grounded only on the host side)? Grounding at both ends creates a ground loop, which actually introduces interference.
- Termination resistor placement: Are termination resistors installed at the physical ends of the CAN bus and enabled via onboard jumper caps, DIP switches, or finished termination connectors?
- CAN cable specifications: Are twisted pair wires used (twist pitch no more than a few centimeters)? Parallel wires (non-twisted) have virtually no suppression capability against common-mode interference.
- Grounding integrity: Are the machine power supply and enclosure reliably grounded? An ungrounded metal frame acts as a large antenna, easily picking up ambient noise.
Troubleshooting methods:
The following hardware troubleshooting must be performed after the printer is completely powered off and the power supply is disconnected: inspecting CANH/CANL, re-routing wires, adjusting shielding layers, enabling/disabling termination resistors, measuring CANH-CANL resistance.
- Confirm there are exactly two 120Ω termination resistors on the CAN bus, preferably using onboard jumper caps, DIP switches, or finished termination connectors.
- Check that CANH/CANL wiring is secure and connectors are fully inserted.
- Power off before working. Use a multimeter to measure the resistance between CANH-CANL (normally about 60Ω).
- Re-route wires: Separate CAN communication wires from high-power wires, maintaining at least 2-3cm distance and avoiding parallel routing.
- Confirm shielding grounding: The shielding layer should be grounded only on the host side, with the tool board side left floating; do not disassemble the power supply or modify the mains ground wire yourself.
- Use
candumpto monitor CAN bus traffic and observe whether a large number of error frames appear. - Temporarily reduce printing speed/acceleration for testing; if the problem disappears, it indicates the interference is positively correlated with motor drive intensity.
Search Order When Unable to Find an ID
- Execute
ip -details link show can0to confirm CAN0 exists and is in an available state. - Verify the CAN baud rate in the toolhead/mainboard firmware matches the host's CAN0 baud rate.
- If the device ID is already written in
printer.cfg, temporarily comment out the corresponding configuration section. Power off the machine for about 10 seconds, then power it back on before searching again. - Check if CAN-H and CAN-L are reversed, broken, or have poor contact.
- Ensure there is one
120Ωtermination resistor at each end of the CAN network. Measure the resistance between CAN-H and CAN-L with the machine powered off; it should be approximately60Ω. - Confirm the toolhead board or mainboard is receiving power correctly.
- Confirm the correct communication method was selected when compiling the firmware.
- If the search result shows
Application: CANBOOTorApplication: Katapult, please flash the Klipper firmware first, then search again.
Termination Resistor Rules
Before adjusting termination resistor jumper caps, DIP switches, or reconnecting CAN cables, completely shut down the printer and disconnect the power supply.
| Device Type | Termination Resistor Requirement | Explanation |
|---|---|---|
| CAN Toolhead Board | Requires 120Ω termination resistor | Enable via onboard jumper cap or DIP switch |
| Mainboard CAN Interface | Requires 120Ω termination resistor | Enable via onboard jumper cap or DIP switch |
| UTOC-type Converter Module | Usually has a 120Ω resistor built-in | No need to add an extra termination resistor |
Quick Troubleshooting Sequence
- Check the device: Execute
lsusbto confirm a device with the ID1d50:606fis visible. - Check the configuration: Execute
ip -details link show can0to confirm CAN0 exists, the baud rate is correct, and the buffer size is1024. - Check the hardware: With the power completely off, measure the resistance between CAN-H and CAN-L. Confirm it is approximately
60Ω.
If the issue persists after all checks, try cross-testing by replacing the USB cable, CAN cable, UTOC, or CAN bridge device.
CAN Device Firmware Update Reference
This section is for scenarios where the device is already connected to the CAN network and needs a firmware update via CAN for the mainboard or a toolhead board. The firmware name and compilation method vary by product; please compile the firmware according to the specific product tutorial first.
Preparation
- Compile the new firmware according to the product tutorial.
- Confirm the device's CAN UUID can be found, or it is already entered as
canbus_uuid:inprinter.cfgfor the specific device. - Stop the Klipper service:
sudo systemctl stop klipper
Performing the Update
Replace <CAN_UUID> in the command below with the actual device ID.
Choose the 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 <CAN_UUID>
- Older systems, i.e., FlyOS-FAST before 1.3.8, or systems where Klipper was not updated before April 9, 2026:
python3 ~/klipper/lib/canboot/flash_can.py -u <CAN_UUID>
There must be a space after -u before entering the CAN UUID.
A CAN Flash Success message usually indicates successful flashing.
Post-Update Actions
After the update is complete, restart Klipper:
sudo systemctl start klipper
If you cannot connect after the update, re-search for the CAN ID and confirm the canbus_uuid: in printer.cfg is still correct.
Final Checklist
When unable to find a CAN ID or Klipper cannot connect to a CAN device, quickly verify the following in order:
can0is recognized by the system.bitratematches the CAN baud rate set during firmware compilation.qlenortxqueuelenis1024.- CAN-H and CAN-L are not swapped.
- Termination resistors are correctly placed at both ends of the CAN bus.
- Toolhead board or mainboard is powered correctly.
- The firmware's communication method is selected correctly.
printer.cfguses the actualcanbus_uuid:found during the search.- The same
[mcu]section does not have bothserial:andcanbus_uuid:enabled simultaneously.