From b5b0977c5a8a8a39ddfed86a06457ddf80a07447 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 28 Sep 2013 18:35:08 +0200 Subject: [PATCH] udev rules for better Wiimote support This sets the group for all Wiimote devices (both the kernel ones and the virtual gamepad) to 'bluetooth', with 660 permissions. Symlinks are also created as appropriate. The list is incomplete. --- 70-wiimote.rules | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 70-wiimote.rules diff --git a/70-wiimote.rules b/70-wiimote.rules new file mode 100644 index 0000000..1ef7948 --- /dev/null +++ b/70-wiimote.rules @@ -0,0 +1,25 @@ +# udev rules for wiimotes tablets. +# These rules were compiled for the Debian GNU/Linux distribution, +# but others may, and indeed are encouraged to, use them also. + +ATTRS{name}=="Nintendo Wii*", ENV{WIIMOTE}="1" + +KERNEL!="event[0-9]*", GOTO="wiimote_end" +ENV{WIIMOTE}!="1", GOTO="wiimote_end" + +ATTRS{name}=="Nintendo Wii Remote IR", ENV{WIIMOTE_TYPE}="ir" +ATTRS{name}=="Nintendo Wii Remote Accelerometer", ENV{WIIMOTE_TYPE}="accel" +ATTRS{name}=="Nintendo Wii Remote", ENV{WIIMOTE_TYPE}="controller" + +MODE="0660", GROUP="bluetooth" + +# Port specific link for users of multiple tablets of the same type. +# The ID_PATH variable is set by the "path_id" script in an earlier rule file. +ENV{ID_PATH}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-wiimote" + +# Convenience links for the common case of a single tablet. We could do just this: +ENV{WIIMOTE_TYPE}=="controller", SYMLINK+="input/wiimote" +ENV{WIIMOTE_TYPE}!="controller", ENV{WIIMOTE_TYPE}!="", SYMLINK+="input/wiimote-$env{WIIMOTE_TYPE}" + +LABEL="wiimote_end" + -- 2.32.0.93.g670b81a890