-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy path99-cannectivity.rules
More file actions
25 lines (20 loc) · 1.17 KB
/
99-cannectivity.rules
File metadata and controls
25 lines (20 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) 2024-2025 Henrik Brix Andersen <henrik@brixandersen.dk>
# SPDX-License-Identifier: Apache-2.0
#
# NOTE: These udev rules are only strictly needed for Linux kernels prior to v6.15-rc1 and for
# running the CANnectivity test suites with user access.
#
# 1. Copy this file to /etc/udev/rules.d/99-cannectivity.rules
#
# 2. Activate the new rules by running the following commands:
# sudo udevadm control --reload-rules
# sudo udevadm trigger
ACTION!="add", SUBSYSTEM!="usb_device", GOTO="cannectivity_rules_end"
# Replace VID and PID with CONFIG_CANNECTIVITY_USB_VID and CONFIG_CANNECTIVITY_USB_PID values
ATTR{idVendor}=="1209", ATTR{idProduct}=="ca01", RUN+="/sbin/modprobe -b gs_usb" MODE="660", GROUP="plugdev", TAG+="uaccess"
SUBSYSTEM=="drivers", ENV{DEVPATH}=="/bus/usb/drivers/gs_usb", ATTR{new_id}="1209 ca01 ff"
# Replace VID and PID with SB_CONFIG_CANNECTIVITY_USB_DFU_VID and SB_CONFIG_CANNECTIVITY_USB_DFU_PID values
ATTR{idVendor}=="1209", ATTR{idProduct}=="ca02", MODE="660", GROUP="plugdev", TAG+="uaccess"
# Used for pytest suites
ATTR{idVendor}=="1209", ATTR{idProduct}=="0001", MODE="660", GROUP="plugdev", TAG+="uaccess"
LABEL="cannectivity_rules_end"