CAN FAQ
Precautions before searching for devices
- Before searching for a CAN ID, please first connect to SSH
- Please ensure that you are logging in to SSH via network, not through a serial port
- Please ensure that the mainboard with UTOC connected or CAN bridge firmware flashed is properly connected, and the data cable connecting to the host computer supports data transfer
Confirming device presence
- Now that you have successfully logged in to the host computer, you can enter
lsusbto search for devices. You may encounter one of the following situations:- If entering
lsusbprompts that thelscommand is not found, you can install the utility by entering the following command:sudo apt-get install usbutils - If entering
lsusbresults in no output, this is a system issue and cannot be resolved here. You will need to change the system or use a known working system. - The information shown in the image below is for reference only. You just need to ensure that
1d50:606fappears:
- If entering
1d50:606fis the device you will use. You can ignore the rest of the information as system issues might cause incomplete display or no display at all.- If multiple
1d50:606fdevices appear, it is recommended to eliminate one, as it might affect subsequent flashing and firmware connection. For example, onFLY MINI PAD, it is recommended to use the onboard UTOC rather than other CAN bridge devices. - If
1d50:606fdoes not appear, please check if the data cable is properly connected and whether the firmware is flashed correctly.
Note
You can only proceed to search for the CAN ID when 1d50:606f is present.
Diagnosing issues based on error messages
- Below are some common errors:
- OSError: [Errno 19] No such device
- can.CanError: Failed to transmit: [Errno 100] Network is down
- can.CanError: Failed to transmit: [Errno 105] No buffer space available
- The first indicates that the host computer cannot find the CAN device (mainboard with USB bridge firmware or UTOC)
- The second indicates that CAN0 is either not configured or misconfigured on the host computer
- The third indicates that the host computer's buffer is full or there is a system issue causing buffer failure
- For the second and third points, please refer to the CAN0 configuration section below to troubleshoot the issue
- If the ID cannot be found, please refer to the bottom section for further instructions
Checking if the host supports CAN
- If you are using a FLY host computer, you do not need to perform this step
- If your system is
Ubuntu, you need to configureUbuntu for CAN0, but this document has not yet been updated - Enter the following command to determine if the system supports CAN:
sudo modprobe can && echo "Your kernel supports CAN" || echo "Your kernel does not support CAN"
- After entering the above command, if your kernel supports CAN, it will return:
Your kernel supports CAN; if not, it will return:Your kernel does not support CAN. - If it returns
Your kernel supports CAN, you can proceed to configure CAN0.
Configuring CAN0
- This command will overwrite the existing CAN0 configuration in the system. You need to restart the system after execution.
FASTsystems do not need to perform this step !!!!!!- Choose the appropriate configuration based on your actual situation
- Configuration method for standard Linux systems
- Configuration method for Raspberry Pi systems
Configuration method for standard Linux systems
-
You need to choose the appropriate CAN speed based on your device
-
For a speed of 1M, enter the following command:
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
-
For a speed of 500K, enter the following command:
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 -
If you encounter a similar prompt, please refer to the Raspberry Pi system configuration method
Configuration method for Raspberry Pi systems
- This method is applicable to Raspberry Pi systems. For other systems, please use the standard Linux system configuration method
- Create a
.networkfile. TheBitRatein this configuration can be adjusted as needed, for example, changing1000000to500000sudo tee /etc/systemd/network/99-can.network > /dev/null <<'EOF'
[Match]
Name=can*
[CAN]
BitRate=1000000
RestartSec=100ms
EOF - Create a
.linkfile. TheTxQueueLengthin this configuration is the CAN buffer and is not recommended to be modifiedsudo tee /etc/systemd/network/99-can.link > /dev/null <<'EOF'
[Match]
OriginalName=can*
[Link]
TxQueueLength=1024
EOF
- Reboot the device
sudo reboot
Things to check if the ID cannot be found
- If Klipper has configured a specific ID, you need to disable the ID in the system settings, then shut down and power off before restarting, or press the reset button on the mainboard.
- Whether the CAN speed of the host matches the mainboard, toolboard, etc.
- You can use the following code to confirm the CAN speed of the host
- Check for any disconnected cables
- Whether a
120Ωjumper is installed between the toolboard and the device (mainboard with USB bridge firmware or UTOC) - If a
120Ωjumper is installed, use a multimeter to measure the resistance between CAN H and CAN L with the device completely powered off. It should be around60Ω - Check for any disconnected cables
ip -details link show can0
- The circled area in the image below shows the CAN speed and buffer of the host
- The
1024above is the current CAN0 buffer - The
1000000below is the current CAN0 speed

-
If the UUID still cannot be found, carefully check the following items:
- Check if the mainboard or CAN toolboard is properly connected
- Ensure proper power supply, and connect the VCC power if using the mainboard
- Check if the host supports CAN networking
- Check if the CAN resistance is around
60Ω - Ensure the firmware is compiled correctly
Searching for ID
- Enter the following command to search for the ID
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
- If an ID appears and the
Application:at the end displaysKlipper, then this ID can be used directly - If an ID appears and the
Application:at the end displaysCANBOOTorKatapult, then firmware needs to be flashed before use
Loading...