Как добавить правило (udev/rules), при подключении планшета HUION в linux?

При подключении графического планшета HUION 640p через usb, хочу запускать скрипт в rules:

/etc/udev/rules.d/tablet.rules

ACTION=="add",
SYBSYSTEM=="input",
KERNEL=="mouse",
ATTRS{idVendor}=="0x256c",
ATTRS{idProduct}=="0x006d",
RUN+="/usr/bin/huion"

huion скрипт:

#!/bin/bash

xsetwacom set "HID 256c:006d stylus" Rotate half # Left handed orientation
xsetwacom set "HID 256c:006d Pad pad" button 1 key Delete
xsetwacom set "HID 256c:006d Pad pad" button 2 key Shift
xsetwacom set "HID 256c:006d Pad pad" button 3 key E
xsetwacom set "HID 256c:006d Pad pad" button 8 key Ctrl
xsetwacom set "HID 256c:006d Pad pad" button 9 key B
xsetwacom set "HID 256c:006d Pad pad" button 10 key Ctrl Z

вывод xsetwacom list

HID 256c:006d stylus                id: 14  type: STYLUS
HID 256c:006d Touch Strip pad       id: 15  type: PAD
HID 256c:006d Pad pad               id: 16  type: PAD

Вывод lsusb -v:

Bus 003 Device 009: ID 256c:006d
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x256c
  idProduct          0x006d
  bcdDevice            0.00
  iManufacturer           5
  iProduct                6
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      18
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      93
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               2

Но ничего не работает( Поможет кто?


Ответы (0 шт):