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.
Asked
Active
Viewed 1,137 times
1 Answers
1
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.

MByD
- 135,866
- 28
- 264
- 277
-
I am using 0x86 machine with linux kernel. Here I already have class drivers, scsi and file system. So with help of already existing functionalities can I achieve file transfer? – Geek Jun 16 '15 at 04:25
-
Hi, Geek. Yes, linux kernel has everything, but when using libusb you are leaving all kernel support out: to use `submit_bulk_transfer` you need to detach (disable) kernel usb driver, so you either has one or another. – Arks Sep 16 '15 at 08:13