panda/drivers/linux/README.md

29 lines
824 B
Markdown
Raw Normal View History

2021-10-27 17:54:15 +08:00
# Linux driver
Installs the panda linux kernel driver using DKMS.
This will allow the panda to work with tools such as `can-utils`
2021-10-27 17:54:15 +08:00
## Prerequisites
2017-11-13 11:36:20 +08:00
- `apt-get install dkms gcc linux-headers-$(uname -r) make sudo`
2021-10-27 17:54:15 +08:00
## Installation
2017-11-13 11:36:20 +08:00
- `make all`
2023-10-04 08:44:10 +08:00
- `make link` (optional, setup to build/install when kernel is updated)
2021-10-27 17:54:15 +08:00
## Uninstall
2023-10-04 08:44:10 +08:00
- `make clean`
2021-10-27 17:54:15 +08:00
## Usage
2017-11-13 11:36:20 +08:00
You will need to bring it up using `sudo ifconfig can0 up` or
`sudo ip link set dev can0 up`, depending on your platform.
Note that you may have to setup udev rules for Linux
``` bash
sudo tee /etc/udev/rules.d/11-panda.rules <<EOF
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddcc", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddee", MODE="0666"
EOF
2022-08-24 11:09:58 +08:00
sudo udevadm control --reload-rules && sudo udevadm trigger
```