-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CANBUS.md for Bookworm #6798
base: master
Are you sure you want to change the base?
Conversation
This is a PR to add the steps needed for bookworm installations to enable the can0 network for host hardware Thanks James Signed-off-by: James Hartley <james@hartleyns.com>
Thanks for working on this. For what it is worth, I'm not sure our audience will immediately know what "bookworm" and "bullseye" are. Can we just change to the new system and remove the old recommendations? (Or are there OS distros out there that don't support the new system?) Alternatively, is there some package on debian bookworm that could be installed so that it works with the old system? Cheers, |
I'm not sure if I recommended this as a general practice. From what I read, it depends on the Probably the easiest way to identify which approach to use is by checking Regarding the link file, I have noticed something a bit uncomfortable. Depending on the distribution and type of CAN adapter, the OS might automatically assign a link file. Probably this makes sense as the link files essentially are just some sort of
In this case, creating a Maybe a safe way to handle this:
|
Thanks @Sineos @KevinOConnor Unfortunately we are living in a two tier situation where people are still installing legacy or using pre made images like mainsailOS which is still Bullseye or installing newest bookworm versions of Debian. I am not sure how we deal with that. It is not the intention to provide instructions to completely change the networking system on someones device, that is likely way out of the docs remit IMO We tried 3 methods of setting up can0 in Bookwork, a)create the network file, and apply txqueuelength via a service that just runs b) Esotericals way of applying a UDEV rule c) using a link file as detailed here I went with c) for ease of setup more than anything, I was not aware that a link file would be applied if no can0 already exists though, @Sineos what distro is this? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into this issue yesterday while setting up CAN and was going to follow these instructions: https://github.com/Esoterical/voron_canbus/blob/main/Getting_Started.md
But will give this a try.
docs/CANBUS.md
Outdated
adapter. This is typically done by creating a new file named | ||
adapter. | ||
|
||
If you are using a Bullseye based system using ifupdown, this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bullseye -> Debian Bullseye
docs/CANBUS.md
Outdated
@@ -34,6 +37,28 @@ iface can0 can static | |||
up ip link set $IFACE txqueuelen 128 | |||
``` | |||
|
|||
In newer Bookworm installations it is necessary to use systemd-networkd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian Bookworm
Clarifying that these are Debian versions, as suggested. Thanks James
My recommendation is to avoid naming distributions completely, as it will either be incomplete or outdated. For me, the best approach is for the user to check the existence of the The machines I have set up using this approach all work pretty flawlessly with the As such, I'd recommend bringing up the interface with the With the command
you can both check for the queue length as well as any RX / TX errors, so it might be worthwhile adding it. |
Thats all well and good and makes sense, but we have to make it succinct and doable by the average uninformed user. i don't like giving them an "either or" in the first place, as they wont read the or and decide its broken because the first thing didnt work. It is a quandary how we best approach documenting multiple systems and ways Thanks |
I agree, but I'm afraid that there is no such thing as a free lunch. |
@JamesH1978, if your main concern is user-facing complexity, a potential solution could be to automate setting up the interface via a script. The description could reference the script as well as the manual approach for those who are interested or more advanced. FWIW, I hacked together a PoC. If it is deemed useful, please go ahead and add it to this PR. I'm not interested in any copyrights whatsoever. "Legacy" Method:
systemd with pre-allocated link file
|
Thanks for working on this. FWIW, I'd prefer not to add additional system installation scripts to the Klipper repo - it's too much of an ongoing maintenance burden. I'm not sure what the best way forward is.
Agreed.
Maybe use Esoterical's udev method for setting txqueuelength, and then alert the user to install either Not sure. |
From the user perspective, I see no benefit in making the ifupdown method more complex by introducing udev rules. Since all Debian and Debian-like distributions use systemd in their currently stable releases, I would describe systemd first and leave the ifupdown method as is. It will likely disappear sooner rather than later anyway. Finally, the Linux side of Klipper will always introduce additional complexity. Luckily, today KIAUH hides most of it, acting as an excellent Swiss Army Knife for Klipper installations. If it did not exist, the need for installation scripts and helpers would be much more prominent. |
As far as i know, and as you say @Sineos all current debian versions should be able to use systemd networkd, so we could just drop the old info completely. i will need to install a copy of mainsailOS on bullseye to check this works Thanks |
From my gut feeling and reading a lot about this topic, I'd not recommend doing this:
As such, I personally also do not agree with Esoterical's approach of recommending it unconditionally and mixing ifupdown-based distributions with the systemd approach. The ifupdown method is battle-tested and apparently stable. I'm not sure if a bit of documentation simplification is worth potentially introducing subtle issues. |
This is a PR to add the steps needed for bookworm installations to enable the can0 network for host hardware
Thanks
James