mjouni
mjouni

Reputation: 118

Accessing backing storage file from both Host machine and emulating machine when using USB Gadget

I have an embedded machine that is running g_file_storage. I would like to be able to access the backing store in read only mode from the machine while g_file_storage is running and a host machine is dropping files into this backing store.

Any idea how one can achieve that? I know that it is not advisable, but would like to try it anyway, and I simply need read access. Won't need to modify the backing store while it is connected

Upvotes: 0

Views: 341

Answers (1)

mjouni
mjouni

Reputation: 118

Was able to achieve this by creating a script that listens to specific events in dmesg that signals that a user has dropped a file on the USB. When that is done we unmount the drive, mount it as a drive on the machine , grab the file dropped by the user then remount the drive as a mass storage device

Upvotes: 1

Related Questions