-
Notifications
You must be signed in to change notification settings - Fork 7
/
99-cannectivity.rules
22 lines (17 loc) · 1.01 KB
/
99-cannectivity.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright (c) 2024 Henrik Brix Andersen <[email protected]>
# SPDX-License-Identifier: Apache-2.0
#
# 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"
# 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"