Read a Device in GNU/Linux or FreeBSD
I am wondering, do you need a specific device driver to read a usb device in Linux, or should it just be able to be read. If I connect my cell phone or iPod touch to my linux box, it is not found is /proc/partitions and thus is not a mountable device by fdisks standards, though gnomes nautilus does in fact mount the iPod but not the windows mobile touch pro cell phone.
So I am interested, If I just wanted to read a device(iPod touch) in linux, how can I do so. How can I g开发者_Python百科et a hold of a descriptor of a set usb device so I can read it.
Thanks all.
You can access raw USB endpoints under /dev/usbdev. There is user-space libusb that makes it easier.
Unfortunately there is no simple concept of "just read it" for USB devices (I am assuming that you are not referring to reading and writing the data on the USB bus that make up the USB protocol). In short, you always need a device driver for accessing a USB device and it is up to the driver to implement "the abstraction" of the device used by the system (disk, serial device, etc).
精彩评论