Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion docs/CANBUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 Debian 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
Expand All @@ -34,6 +37,28 @@ iface can0 can static
up ip link set $IFACE txqueuelen 128
```

In newer Debian 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
Expand Down