From: martin f krafft <madduck@madduck.net>
To: linux-hotplug@vger.kernel.org
Subject: usb: failure to obtain HID descriptor via usb_control_msg
Date: Tue, 13 Jan 2004 17:44:29 +0000 [thread overview]
Message-ID: <20040113174429.GA8118@piper.madduck.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]
Hi there,
First off, please apologise the cross-post. I will make sure to send
the solution to both lists. Please, if you identify the problem to
be with either project, take the other list out of the reply
recipients.
I am trying to get the HID descriptor of a HID device with
usb_control_msg:
udev = usb_open(dev);
usb_set_altinterface(udev, 0);
usb_claim_interface(udev, 0);
usb_control_msg(udev, USB_ENDPOINT_IN+1, USB_REQ_GET_DESCRIPTOR,
USB_DT_HID, 0, buf, 0x9, USB_TIMEOUT);
However, this fails with the following debug messages (level 3),
even though it was invoked by root:
Check that you have permissions to write to 002/004 and, if you
don't, that you set up hotplug
(http://linux-hotplug.sourceforge.net/) correctly.
USB error: could not claim interface 0: Device or resource busy
USB error: error sending control message: Device or resource busy
So I dived into hotplug and ended up adding a line to
/etc/hotplug/usb.usermap to effectively disable the device by
specifying a name unequal to all kernel module names, as advised on
the hotplug webpage:
nonexistant 0x0 0x06c2 0x0038 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
My reasoning is that I assume the device to be busy because the HID
kernel driver has assumed control over it (and it's in fact
accessible via /dev/usb/hiddev?). However, it may also be a libusb
problem that I am overseeing
However the result was not very pleasing:
usb.agent[7712]: Setup hid for USB product 6c2/38/300
usb.agent[7712]: kernel driver hid already loaded
usb.agent[7712]: Setup nonexistant for USB product 6c2/38/300
effectively, my addition caused the 'nonexistant' pseudo-driver to
be set up in addition to hid.
How can I disable hotplug setting up 'hid' for this very device?
Thanks for any pointers or tips.
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
"there are more things in heaven and earth, horatio,
than are dreamt of in your philosophy."
-- hamlet
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2004-01-13 17:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-13 17:44 martin f krafft [this message]
2004-01-13 19:09 ` usb: failure to obtain HID descriptor via usb_control_msg Greg KH
2004-01-13 22:12 ` Oliver Neukum
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=20040113174429.GA8118@piper.madduck.net \
--to=madduck@madduck.net \
--cc=linux-hotplug@vger.kernel.org \
/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.