8

I know enough linux to be dangerous - apologies if my terminology is incorrect.

I have an electronic drumkit that has USB into which I can plug a flash drive with MP3s on it. The drumkit has no network connectivity. This means whenever I want to play along to a new song, I have to unplug the flash drive, plug it into a computer on my network, copy the MP3 from my NAS to the thumb drive, and plug it back into the drumkit. This is clearly a hassle.

I was thinking of getting a raspberry pi with wifi and mounting my music via NFS. I could then run a USB cord from the pi to the drumkit and....somehow have the drumkit "see" the contents of the NFS mount (would need to be FAT32, I'd imagine). Thing is, I don't really know how to do this bit. I'd imagine being able to mount the NFS at the USB mount point, so to speak, but that's probably naive.

Can anyone explain what I'd need to be able to pull this off?

4
  • Interesting idea! But that would mean to have your Rpi act as a FAT filesystem over USB while getting data from NFS (or some other filesystem, for that matter). I'm not aware that has ever been done... Search for "export filesystem as FAT over USB" and "Linux", perhaps something shows up.
    – vonbrand
    Commented Feb 7, 2014 at 0:59
  • What drum kit do you have? Model numbers etc.
    – slm
    Commented Feb 7, 2014 at 1:18
  • Roland TD-30K. And no, I'm not worthy of it.
    – me--
    Commented Feb 7, 2014 at 2:07
  • Possible duplicate of Serve files over USB Commented Feb 7, 2014 at 6:36

2 Answers 2

2

NOTE: This is all untested by me but sounds very similar to what you're asking about.

The idea seems very simple. In this blog post they're discussing the use of a Beagleboard as a mass storage USB device that would be presented to systems when tethered to them using a USB cable. It makes use of a feature I've never noticed before in the Kernel called "USB Gadget support".

    ss 1

    ss 2

If I'm understanding the approach correctly you'd need to create a single file, mount this file via loopback so that it's exposed as a mounted share, and then this file would be exposed out as a mass storage device mount, when something tethered "it" through a USB cable.

The only other thing I found as a potential lead was this SO Q&A titled: USB Mass Storrage on File Level. There were several methods discussed in that post which might prove useful to you as well.

Source: BeagleBoard as USB Mass Storage Device via USB OTG

References

1

You would need an inverse of the virtual file system - a layer translating existing file and directories hierarchy into a file system structure but on a different (or virtual) backing device.

While this could be done (as almost anything), you might be better off by introducing one step in between: create a FAT16 filesystem (I would be rather surprised if your drum kit supported FAT32 - see Wikipedia article on FAT for more details, more likely it understands VFAT on top of FAT16, yet that's not that important here) on R-Pi and export it over USB. Whenever you'll want to play new song, just transfer it (via network - you can export it as NFS on R-Pi) from PC to R-Pi. One copying more, but it's easier and you won't have to open your PC to additional connections from outside.

1
  • 1
    If the total size of the files that might be played is sufficiently small and all of them live below some dedicated folder not used for other things, you could also use rsync to keep the VFAT drive up to date automatically.
    – celtschk
    Commented Sep 30, 2014 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .