I have something of a workaround, at least on the grounds of having multiple USB to CAN interfaces present at once with their own IDs. I wrote a systemd network file /etc/systemd/network/10-usb-canbus.link
with the following content:
[Match]
Property=ID_VENDOR=Klipper ID_SERIAL_SHORT=E6614C309316842A
[Link]
Name=can_e6614c30931
It picks out the USB device based on the Klipper vendor ID and its serial listing and assigns it a unique ID specified below. The problem is this is fully manual so would have to be updated for any change in adapter. Doable, it just would be nice to autoname it. The NamePolicy
option is built entirely around assuming it’s an ethernet adapter unfortunately so I couldn’t get it to auto-generate a name for it. The one above is also specifically an RP2040 in USB to CAN mode, I don’t know if other ones have the same serial identifier. It might need to be set up case-by-case anyway depending on that.
Regardless of that then I put the defined interface name in the canbus_interface
option under the [mcu]
config block:
[mcu]
canbus_uuid: c96b2bea26b2
canbus_interface: can_e6614c30931
So, if I can’t have my single unified CAN network, I can still have multiple interfaces coexisting, hopefully.
edit - Something I forgot to mention I gleaned from the source/docs is that there are a number of “admin” messages that get sent out on the bus, which ALL nodes will intercept and respond to. They don’t normally get sent out except during initialization I think, so if one randomly shows up to a running node in a different instance it’s going to be a mess.