Created
November 6, 2019 21:38
-
-
Save wesleyit/e3645f45fe1721c64d124eb8e77ca4bc to your computer and use it in GitHub Desktop.
UDEV Rule for Chinese RFID 125KHz R/W
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UDEV Rule for Chinese RFID 125KHz R/W | |
# Creating a fixed device when connecting to USB | |
ACTION=="add", \ | |
ATTR{idProduct}=="6850", \ | |
ATTR{idVendor}=="6688", \ | |
RUN+="/bin/sh -c 'rm -f /dev/ttyRFID0; mknod /dev/ttyRFID0 c $major $minor; chown root:root /dev/ttyRFID0; chmod 0660 /dev/ttyRFID0'" | |
# Removing after disconnecting | |
ACTION=="remove", \ | |
ENV{PRODUCT}=="6688/6850/101", \ | |
RUN+="/bin/sh -c 'rm -f /dev/ttyRFID0'" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment