Re: How to enable hidraw driver for USB HID touchpad?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/7/4 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>:
> On Thu, Jul 04, 2013 at 01:30:48AM +0300, Bohdan Koval wrote:
>> Sorry, message subject was missing.
>>
>> 2013/7/4 Bohdan Koval <koval.bogdan@xxxxxxxxx>:
>> > Hi,
>> >
>> > I was trying to read raw HID input reports of a laptop touchpad (USB
>> > HID device) using /dev/hidraw* device file. I'm using Ubuntu 10.04 and
>> > looks like hidraw* file is not available for the touchpad. Also my
>> > laptop has a USB HID keyboard and corresponding hidraw file was
>> > successfully created for it at /dev/hidraw0.
>
> That's a really old kernel version, and distro, what happens on a more
> modern release?

I've found a way to enable hidraw device file for the touchpad - after
usbhid kernel module was removed and added once more, /dev/hidraw1
file appeared.   Also I've compiled an example program that uses
hidraw (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/samples/hidraw/hid-example.c?id=v3.10)
and it gives following output:

Report Descriptor Size: 113
Report Descriptor:
5 1 9 2 a1 1 85 2 9 1 a1 0 5 9 19 1 29 3 15 0 25 1 75 1 95 3 81 2 95 1
75 5 81 1 5 1 9 30 9 31 15 81 25 7f 75 8 95 2 81 6 c0 c0 5 c 9 1 a1 1
85 7f 6 0 ff 75 8 95 3 15 0 26 ff 0 1a 40 fc 2a 42 fc b1 2 85 7e 95 1b
1a 44 fc 2a 5e fc b1 2 85 7d 75 1 95 a 25 1 1a 5f fc 2a 68 fc 81 2 95
6 81 1 c0

Raw Name: HID 413c:8158
Raw Phys: usb-0000:00:1a.0-1.2/input0
Raw Info:
bustype: 3 (USB)
vendor: 0x413c
product: 0x8158
HIDIOCSFEATURE: Invalid argument
HIDIOCGFEATURE: Invalid argument
write() wrote 2 bytes
read: Resource temporarily unavailable

So it was able to get HID report descriptor, but reading reports
failed with "Resource temporarily unavailable". Does this mean that
hid device is captured by some other driver ("input" or some other)?

>
>> > Is there any way to enable hidraw driver for the touchpad?
>
> You should just be able to load the module and it should work.  Why do
> you need raw hid events for it, if it's working properly?

I'm trying to make a virtual bluetooth keyboard/touchpad by forwarding
HID reports, that's why raw hidraw access is needed. There are some
other possible options - like reading events from /dev/input/event*
files, but that involves deserialization of event input stream back to
HID report format. Also I've tried to capture all usb traffic with
"usbmon" facility, but "cat /sys/kernel/debug/usb/usbmon/0u" doesn't
give any output even through lsusb lists laptop keyboard/touchpad as
usb devices. So I'm also wondering why usbmon isn't able to capture
this traffic?

>
> thanks,
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux