Skip to content

Commit

Permalink
Clone the udev rules of clearpath.
Browse files Browse the repository at this point in the history
  • Loading branch information
YuZhong-Chen committed Feb 22, 2024
1 parent 057b755 commit bf09fe1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions husky_ws/udev_rules/41-clearpath.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Udev rule for the Prolific Serial-to-USB adapter shipped standard with Clearpath Husky A200
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="Prolific*", SYMLINK+="clearpath/prolific clearpath/prolific_$attr{devpath}", MODE="0666"

# World-writeable permissions for the STM32 ROM bootloader.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0666"

# World-writeable permissions and a symlink for the Jackal J100 MCU.
SUBSYSTEM=="tty", ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", MODE="0666", SYMLINK="clearpath/j100"

# Recognize Clearpath flavoured FTDI cables.
SUBSYSTEM=="tty", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", ATTRS{product}=="Clearpath Robotics /*", MODE="0666", PROGRAM="/bin/echo '%s{product}'", SYMLINK+="clearpath%c{3}"

# Rule to enable low latency mode for FTDI adaptors, regardless if flavoured or not.
SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", RUN+="/bin/bash -c 'echo 1 > /sys$devpath/device/latency_timer'", SYMLINK+="ftdi_%s{serial}"

# Udev rule for the Logitech controllers
KERNEL=="js*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c21f", SYMLINK+="input/f710"
KERNEL=="js*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c219", SYMLINK+="input/f710"
KERNEL=="js*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c21d", SYMLINK+="input/f310"

# CAN rule for PCI CANBUS card
SUBSYSTEM=="net", KERNEL == "can0", RUN+="/bin/sh -c 'ip link set can0 type can bitrate 1000000; ip link set can0 up'"
SUBSYSTEM=="net", KERNEL == "can1", RUN+="/bin/sh -c 'ip link set can1 type can bitrate 500000; ip link set can1 up'"

0 comments on commit bf09fe1

Please sign in to comment.