Need Help - file backed storage driver

Hi all
I have been working on Beagleboard with angstrom linux on it to show a
backing file as a storage through usb ...on windows Xp.

I have done that successfully using g_file_storage driver.

But i was stuck at finding that ...

I need to capture event on BB when windows xp safely removes usb .....
and need to handle that event on BB by removing g_file_storage ............

But am unable to do that ...while googling i came across another driver ...
f_mass_storage ...which gives some eject capture facility ...........
but i am unable to find some supporting document how to use it ....

can some one please tell me ...
whats difference between g_file_storage and F_mass_storage ...can i
use f_mass_storage for my purpose of exposing a backing file as
storage ...on windows XP....

how do i capture eject event on BB ....

please help ...
Nidhi

Hi all ,

I have got hint that there is a concept of composite driver where mass storage class can be used along side say uart interface
using the same physical usb communication path to send commands from host to beagle board which can aid the above operation.

But not able to find any link on how to use it …that is using usb_multi gadget driver …

My required steps of operation are as below :

Step 1 : I acquire some data on beagle board on angstromlinux and send to
SD Card by mounting it on Beagle Board.
Now I unmount the card from beagle board and use gadget driver to mount the
sd card on host.

Step2 : Now after Host acquires the data from the sd card, Then i want to
remove driver & mount it on Beagleboard and use storage again on B.Board.
But How will the beagle board know when to again unmount the gadget driver
and again mount sd card on beagle board.

please help …if some one knows any thing abt usb multi driver …

Thanks
Nidhi

I have got hint that there is a concept of composite driver where mass storage class can be used along side say uart interface
using the same physical usb communication path to send commands from host to beagle board which can aid the above operation.

As an alternative, you could use the "uart" (USB virtual serial port) for sending data as well as commands. Define a command called "send data." On receiving the command, the BB reads data from the file and sends it via the virtual serial port along with the file name if needed. On the PC, store the received data in a file.

This way, the files are always under the BeagleBoard's control.

Jan

I have got hint that there is a concept of composite driver where mass
storage class can be used along side say uart interface
using the same physical usb communication path to send commands from host
to beagle board which can aid the above operation.

Composite drivers are possible, but getting them to enumerate cleanly
on a Windows host is a bit of a pain.

As an alternative, you could use the "uart" (USB virtual serial port) for
sending data as well as commands. Define a command called "send data." On
receiving the command, the BB reads data from the file and sends it via the
virtual serial port along with the file name if needed. On the PC, store the
received data in a file.

This way, the files are always under the BeagleBoard's control.

The MTP protocol is also setup to enable the target keeping control.

Personally, I like using networking over USB, then you can just
perform an scp or http transfer.

Jason Kridner wrote: