All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arkadiusz Miśkiewicz" <a.miskiewicz@gmail.com>
To: linux-input@vger.kernel.org
Cc: Nestor Lopez Casado <nlopezcasad@logitech.com>,
	Jiri Kosina <jkosina@suse.cz>
Subject: logitech-djdevice and /sys
Date: Thu, 22 Mar 2012 18:44:54 +0100	[thread overview]
Message-ID: <201203221844.54688.a.miskiewicz@gmail.com> (raw)


Hi,

I'm detecting usb keyboards from shell using this simple script:

for i in /sys/class/input/input*; do
                [ ! -f $i/device/bInterfaceClass -o ! -f $i/device/bInterfaceProtocol ] && continue
                bInterfaceClass=$(cat $i/device/bInterfaceClass)
                bInterfaceProtocol=$(cat $i/device/bInterfaceProtocol)
                if [ "$bInterfaceClass" = "03" -a "$bInterfaceProtocol" = "01" ]; then
			module=$(readlink $i/device/driver/module)
                        module=$(basename $module)

			echo "found keyboard driven by $module"
		fi
done


but for keyboards hidden behind logitech unifying receiver
there seem to be no such information in /sys.

Any ideas on how I can detect such keyboards via /sys or other
scriptable method?

(note that I'm interested only in "regular" keyboards, so single buttons
and some other devices are not interesting)

dmesg:

[130816.672862] usb 6-2: new full-speed USB device number 4 using uhci_hcd
[130816.856173] usb 6-2: New USB device found, idVendor=046d, idProduct=c52b
[130816.856183] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[130816.856190] usb 6-2: Product: USB Receiver
[130816.856195] usb 6-2: Manufacturer: Logitech
[130816.868751] logitech-djreceiver 0003:046D:C52B.000F: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-2/input2
[130816.878201] input: Logitech Unifying Device. Wireless PID:4004 as /devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.2/0003:046D:C52B.000F/input/input14
[130816.878717] logitech-djdevice 0003:046D:C52B.0010: input,hidraw3: USB HID v1.11 Keyboard [Logitech Unifying Device. Wireless PID:4004] on usb-0000:00:1d.0-2:1

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2012-03-22 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 17:44 Arkadiusz Miśkiewicz [this message]
2012-03-30 13:25 ` logitech-djdevice and /sys Jiri Kosina
2012-03-31  5:50   ` Arkadiusz Miśkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201203221844.54688.a.miskiewicz@gmail.com \
    --to=a.miskiewicz@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=nlopezcasad@logitech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.