开发者

libusb communicate with USB mass storage

I'm currently writing a javax-usb (JSR-80) implementation using libusb 0.1 as a backend. I need to test the bulk transfer functionality and my guess is that the easiest way to do this is to communicate with a USB mass storage device like a USB flash drive. Unfortunately I have no idea how these devices are working. I guess there is some kind of protocol and I have to send some USB control requests before I can initiate a transfer on the bulk endpoints.

I'm not interested in writing a full USB mass storage driver or something like that so even file system stuff doesn't matter. My only purpose is to transfer some data via some bulk endpoint so I can compare my implementation with the reference implementation.

What I need is some example 开发者_如何学编程code (Language doesn't matter and most likely it even doesn't matter if it uses libusb or something different) or a specification of USB mass storage which is easy to understand for programmers (I'm no hardware specialist). I already searched the web but haven't found anything useful so far.


The USB device class specifications are really not all that difficult to read assuming you know the basics of USB (since you're writing a USB driver, I assume you do). Mass Storage Bulk Only v1.0 is probably the document you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜