docs: Recommend allow-hotplug in CANBUS.md when using USB to canbus bridge

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-07-27 13:38:23 -04:00
parent 2005d4dbf4
commit dc012f8659
1 changed files with 14 additions and 8 deletions

View File

@ -4,9 +4,9 @@ This document describes Klipper's CAN bus support.
## Device Hardware ## Device Hardware
Klipper currently only supports CAN on stm32 chips. In addition, the Klipper currently supports CAN on stm32 and rp2040 chips. In addition,
micro-controller chip must support CAN and it must be on a board that the micro-controller chip must be on a board that has a CAN
has a CAN transceiver. transceiver.
To compile for CAN, run `make menuconfig` and select "CAN bus" as the To compile for CAN, run `make menuconfig` and select "CAN bus" as the
communication interface. Finally, compile the micro-controller code communication interface. Finally, compile the micro-controller code
@ -73,7 +73,7 @@ powered and wired correctly, and then run:
If uninitialized CAN devices are detected the above command will If uninitialized CAN devices are detected the above command will
report lines like the following: report lines like the following:
``` ```
Found canbus_uuid=11aa22bb33cc Found canbus_uuid=11aa22bb33cc, Application: Klipper
``` ```
Each device will have a unique identifier. In the above example, Each device will have a unique identifier. In the above example,
@ -118,7 +118,13 @@ Some important notes when using this mode:
menuconfig" and the bus speed specified in Linux is ignored. menuconfig" and the bus speed specified in Linux is ignored.
* Whenever the "bridge mcu" is reset, Linux will disable the * Whenever the "bridge mcu" is reset, Linux will disable the
corresponding `can0` interface. Generally, this may require running corresponding `can0` interface. To ensure proper handling of
commands such as "ip up" to restart the interface. Thus, Klipper FIRMWARE_RESTART and RESTART commands, it is recommended to replace
FIRMWARE_RESTART commands (or regular RESTART after a config change) `auto` with `allow-hotplug` in the `/etc/network/interfaces.d/can0`
may require restarting the `can0` interface. file. For example:
```
allow-hotplug can0
iface can0 can static
bitrate 500000
up ifconfig $IFACE txqueuelen 128
```