Re: How to open USB device in user mode via sysfs path ?

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

 



On 3.02.2010 14:05, Andreas Mohr wrote:
On Wed, Feb 03, 2010 at 11:27:33AM +0100, Martin Poupe wrote:
Now I need to access the USB via sysfs, because not all Linux platforms
have usbfs available. I cannot open("/sys/bus/usb/devices/5-1", O_RDWR)
because this is a directory :-( What file in this directory (or
elsewhere) should be opened for ioctl() ?
Any specific reason not to use libusb instead of doing raw access?
(ok, if we're talking about nuts-and-bolts embedded OTOH...)

Andreas Mohr

Yes, some (embedded) platforms do not have libusb available. And moreover libusb (version 1.0) still uses usbfs for opening the device.
It uses sysfs only to enumerate devices.
Martin Poupe
--
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