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 Wed, 3 Feb 2010, Martin Poupe wrote:

> Hello.
> I would like to something like:
> int fd = open("/sys/bus/usb/devices/5-1/<something>", O_RDWR);
> and then use fd for ioctl() calls (submit urbs, etc.)
> I was able to do the same on usbfs:
> int fd = open("/proc/bus/usb/005/007", O_RDWR);
> 
> 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() ?

The device files corresponding to usbfs are now located under 
/dev/bus/usb.  For example: /dev/bus/usb/005/007.

Alan Stern

--
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