Skip to content

Commit 729b4db

Browse files
Fix linux can-utils bus numbering (commaai#637)
1 parent a3b95dc commit 729b4db

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

drivers/linux/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ usage:
1717

1818
You will need to bring it up using `sudo ifconfig can0 up` or
1919
`sudo ip link set dev can0 up`, depending on your platform.
20+
21+
Note that you may have to setup udev rules for Linux
22+
``` bash
23+
sudo tee /etc/udev/rules.d/11-panda.rules <<EOF
24+
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddcc", MODE="0666"
25+
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddee", MODE="0666"
26+
EOF
27+
sudo udevadm control --reload-rules && sudo udevadm trigger`
28+
```

drivers/linux/panda.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ static const struct usb_device_id panda_usb_table[] = {
8181
MODULE_DEVICE_TABLE(usb, panda_usb_table);
8282

8383

84-
// panda: CAN1 = 0 CAN2 = 1 CAN3 = 4
85-
const int can_numbering[] = {0,1,4};
84+
// panda: CAN1 = 0 CAN2 = 1 CAN3 = 2
85+
const int can_numbering[] = {0,1,2};
8686

8787
struct panda_inf_priv *
8888
panda_get_inf_from_bus_id(struct panda_dev_priv *priv_dev, int bus_id){

0 commit comments

Comments
 (0)