Skip to content

Instantly share code, notes, and snippets.

@wesleyit
Created November 6, 2019 21:38
Show Gist options
  • Save wesleyit/e3645f45fe1721c64d124eb8e77ca4bc to your computer and use it in GitHub Desktop.
Save wesleyit/e3645f45fe1721c64d124eb8e77ca4bc to your computer and use it in GitHub Desktop.
UDEV Rule for Chinese RFID 125KHz R/W
# 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