mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-02 12:50:31 -07:00
Update CANBUS.md for Bookworm
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>
This commit is contained in:
parent
0114d72a6c
commit
5936bd0e60
1 changed files with 26 additions and 1 deletions
|
|
@ -25,7 +25,10 @@ mode") or that run the
|
|||
[candlelight firmware](https://github.com/candle-usb/candleLight_fw).
|
||||
|
||||
It is also necessary to configure the host operating system to use the
|
||||
adapter. This is typically done by creating a new file named
|
||||
adapter.
|
||||
|
||||
If you are using a Bullseye based system using ifupdown, this
|
||||
is typically done by creating a new file named
|
||||
`/etc/network/interfaces.d/can0` with the following contents:
|
||||
```
|
||||
allow-hotplug can0
|
||||
|
|
@ -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,
|
||||
two files need to be created, one to define the interface and another to
|
||||
set the txqueuelen, these are:
|
||||
`/etc/systemd/network/80-can0.network` with the contents:
|
||||
```
|
||||
[Match]
|
||||
Name=can*
|
||||
|
||||
[CAN]
|
||||
BitRate=1M
|
||||
```
|
||||
and `/etc/systemd/network/80-can0.link` with the contents:
|
||||
```
|
||||
[Match]
|
||||
OriginalName=can0
|
||||
|
||||
[Link]
|
||||
TransmitQueueLength=128
|
||||
```
|
||||
then enable the service with `sudo systemctl enable systemd-networkd --now`
|
||||
|
||||
|
||||
## Terminating Resistors
|
||||
|
||||
A CAN bus should have two 120 ohm resistors between the CANH and CANL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue