Есть устройство, как запретить иксы обращаться к нему, сохранив доступ к нему через hipapi.
Я пробовал:
echo "0003:0EB8:EA00.0049" | sudo tee /sys/bus/hid/drivers/hid-generic/unbind
и
SUBSYSTEM=="usb", DRIVER=="usbhid", ATTRS{idVendor}=="0eb8", ATTRS{idProduct}=="ea00", ATTR{authorized}="0"
В обоих случаях терял доступ через hidapi.
[680907.803898] usb 3-1.2: new high-speed USB device number 86 using xhci_hcd
[680907.895167] usb 3-1.2: New USB device found, idVendor=0eb8, idProduct=ea00, bcdDevice= 1.00
[680907.895171] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[680907.895174] usb 3-1.2: Product: SevenCompact pH/Ion S220
[680907.895176] usb 3-1.2: Manufacturer: METTLER TOLEDO
[680907.895177] usb 3-1.2: SerialNumber: XXXXXX
[680907.898125] input: METTLER TOLEDO SevenCompact pH/Ion S220 as /devices/pci0000:00/0000:00:01.3/0000:02:00.2/0000:03:00.0/0000:04:00.0/usb3/3-1/3-1.2/3-1.2:1
==> /sys/bus/hid/drivers/hid-generic/0003:0EB8:EA00.0049/input/input81/name <==
METTLER TOLEDO SevenCompact pH/Ion S220
Bus 003 Device 086: ID 0eb8:ea00 Mettler Toledo SevenCompact pH/Ion S220
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0eb8 Mettler Toledo
idProduct 0xea00
bcdDevice 1.00
iManufacturer 1 METTLER TOLEDO
iProduct 2 SevenCompact pH/Ion S220
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 Full Speed Configuration
bmAttributes 0x80
(Self Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5 HID Interface
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 63
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 0x0008 1x 8 bytes
bInterval 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Self Powered)