-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
hidraw0 is not correct device all time.
What happens if PC used have Touch screen?
What if have also attached UPS?
# ll /dev/hidraw*
crw-rw-rw- 1 root plugdev 240, 0 юли 30 23:58 /dev/hidraw0
crw-rw-rw- 1 root plugdev 240, 1 юли 30 23:58 /dev/hidraw1
crw-rw-rw- 1 root plugdev 240, 2 юли 30 23:58 /dev/hidraw2what is what
#!/bin/bash
FILES=/dev/hidraw*
for f in $FILES
do
FILE=${f##*/}
DEVICE="$(cat /sys/class/hidraw/${FILE}/device/uevent | grep HID_NAME | cut -d '=' -f2)"
printf "%s \t %s\n" $FILE "$DEVICE"
donein case
# ./hid.sh
hidraw0 American Power Conversion Smart-UPS C 1500 FW:UPS 10.0 / ID
hidraw1 STMicroelectronics HID in FS Mode
hidraw2 HID TOUCH HID Touch Panel
# lsusb
Bus 001 Device 007: ID 13d3:5129 IMC Networks USB2.0 UVC VGA WebCam
Bus 001 Device 005: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 001 Device 002: ID 04ca:f001 Lite-On Technology Corp. TvTUNER
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 1bfd:1688 TouchPack Resistive Touch Screen
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial <<< INVERTER
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 051d:0003 American Power Conversion UPS
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Is it possible to have some automation for this cases?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels