How to setup CAN-BUS for different OS from raspbery?

Basic Information:

Printer Model: Voron 2.4r2 300
OS: ubuntu-20.04-3.10-minimal-odroid-c1-20200519.img
CanBus: Bigtreetech U2C v1.0
MCU0: Odroid C1+
MCU1: BTT SKR 1.3 for Z axis
MCU2: BTT EBB 36 v1.2 SMT32G0B for extruder
MCU3: Havud 0.61 for gantry A/B motor not connected yet

The setup:

The idea is to use SKR 1.3 to control the Z axis and via canbus to control the XYcore and extruder.

Problem(s):

I managed to install klipper with some mishaps but it started working. But I’m facing a new problem that I can’t find a solution for. It’s about CANBUS, I managed to create the file for setting up and creating the network. I updated the BTT U2C as well as flashed the EBB36 firmware with a canbootloader. But when typing search command uuid it gives me an error. I entered a command to check IP network but canbus is missing.
When checking connected usb devices it is seen to be connected.
I tried different techniques to start the CANBUS like link here and this to.

How to setup correct the CAN-BUS for this OS and single board computer.

For me:

I’m an electronic engineer but linux is my weakness.

If I am not mistaken, you didn’t enable the CAN interface at all and skipped the first step in the Klipper CAN manual:

It is also necessary to configure the host operating system to use the adapter. This is typically done by creating a new file named /etc/network/interfaces.d/can0 with the following contents:

auto can0
iface can0 can static
    bitrate 500000
    up ifconfig $IFACE txqueuelen 128

I haven’t missed it. I have tried with her. I restarted several times but without success.

That’s odd, since it should be listed by ip addr list, i.e.

yes that’s what he should show me but he doesn’t want to. in VORON’s Discord channel they told me that ubuntu 20.04 is set up in a different way. it’s not like find out. there was something with NETPLAN, but I didn’t manage to do it

Going to go ahead a bump this because I have the same question with some new information. Don’t see any other posts about this.

Ubuntu has not used interfaces.d since 18.04. It now uses netplan to configure the network.
What we need to know is. What is the netplan version of…

allow-hotplug can0
iface can0 can static
  bitrate 500000
  up ifconfig $IFACE txqueuelen 128

Here is how you set it up.

sudo nano /etc/udev/rules.d/99-persistent-network.rules

SUBSYSTEM==“net”, ACTION==“change|add”, KERNEL==“can0” ATTR{tx_queue_len}=“128”

This is the txqueuelen 128 part.

sudo nano /etc/systemd/network/80-can0.network

[Match]
Name=can0

[CAN]
BitRate=500K

Then reboot

On a recent Ubuntu, you should be able to do:

[Match]
Name=can*

[CAN]
BitRate=1000000
TransmitQueueLength=1024

Should get activated with:
sudo systemctl restart systemd-networkd

All the documentation I read said TransmitQueueLength needed to be in a .link file. Which didn’t work for me.

sudo nano /etc/systemd/network/80-can0.link

[Match]
Name=can0

[Link]
TransmitQueueLength=128

They must have changed it. It is still a fairly new feature from what I read. I’ll try it out next week when I get some parts in and I am messing with it again.