On 5/13/05, Dmitry Nezhevenko <dionua@...> wrote:
> On Saturday 14 May 2005 00:47, Charles Lepple wrote:
> > On 5/13/05, Dmitry Nezhevenko <dionua@...> wrote:
> > > Possible you need root privilegies to do this. Or usbfs must be mount=
> > > with RW acces for current user.
> > Very likely.
> > If I recall, usbview uses /proc/bus/usb/devices (not libusb), but that
> > file only has a couple of string descriptors (Manufacturer, Product
> > and SerialNumber).
> I don't know about usbview, but sample in libusb use libusb. Also if you =
> to modify sample's code (add usb_strerror() calls), you get error like
> "Operation is not permitted"
So have you tried changing permissions on the /proc/bus/usb/???/???
nodes, or running as root?
I confirmed that the reason why usbview would work (when libusb-based
solutions would not, possibly due to permission problems) is that
usbview is indeed reading /proc/bus/usb/devices. Since this is a text
file, you do not need anything more than read permission. However, to
send arbitrary control messages to a device (including the ones to get
string descriptors), you need read+write permissions.
- Charles Lepple