6

I know this topic has been discussed quite a few times, but I never seen a complete solution. So, again...

Is there any way to make an RPi emulate a USB mass storage device?

Please do not waste your discussion yelling, for example, that RPi lacks a USB device port, etc. I know this needs a proper hardware interface and OTG/gadget driver.

My goal is to let a black box device such as an STB (set-top box) that accepts and knows only an external USB mass storage device such as a flash drive connect to an RPi through some commercially available hardware device and think it is really using a USB mass storage. This way, the RPi can update and read the mass storage contents as the STB does so. I meant "black box" because it cannot be modified at all; it only knows about an external USB mass storage device.

I know there are issues like cache coherency on the STB side (i.e. the STB may not detect contents updates made by the RPi because the STB caches the contents and believes he is the only storage user), but it could be solved, for example, by emulating disconnecting the USB mass storage, period.

I am not particularly interested in developing such a thing by myself, for example, by using GPIO to emulate USB, etc. I am looking for a read-to-use solution.

Does anyone know what I am looking for?

Thanks. hiro

user347841
  • 81
  • 1
  • 3
  • 6
    Yes, we know what you are looking for. – joan Jul 17 '15 at 07:22
  • 1
    I know that this thread is quite old. I've tried to sketch a solution here: https://superuser.com/a/1613829/547193. You should be able to store files to and read files from a NAS. But Raspberry Pi alone works also - with the limited space of your flash memory. – Matthias W. Dec 31 '20 at 12:41

1 Answers1

3

Have a look at http://pi.gbaman.info/?p=699 which shows how to do the USB mass storage bit. But you might need an extra USB port from somewhere...

David Walters
  • 111
  • 1
  • 3