Is it possible to transfer a file to USB device using libusb?

1.1k views Asked by At

I am trying to transfer the file via libusb to the USB device (pendrive). I have seen submit_bulk_transfer function in libusb-1.0.6 package. If there is a way to transfer the file then can you please suggest me. I want to transfer the file not as raw data.

1

There are 1 answers

2
MByD On

It is possible, but you will need to implement Mass Storage, SCSI, and the file system that is used on the device in order to do so, which is a lot of work, and it is already done by the USB and FS drivers of all desktop (and many other) OSs.

See libusb FAQ.

BTW submit_bulk_transfer is a very low level functionality of USB, related to many device classes, not only Mass Storage.