Is there a way to have a RasPi present a drive to a device as a USB drive

Hello all, again. The basic question is, can a raspberry pi present a drive to another device as a usb drive?

I recently bought a 4k roku smart tv. Not a fan of the “smart” stuff, but it was cheap for the other specs. Previously I had a 1080p tv and I used a amazon fire box with VLC to stream over my network. The Roku doesn’t seem to have that funtionality. My fire box isn’t 4k capable. But the Roku TV can play files off of a USB drive. Which works, and is OK. However, I have a network that I have been painstakingly been putting in and learning a lot at the same time. Also breaking things, then fixing them. I would like to be able to use it somehow.

I was wondering if there was a way to use a USB A to USB A cable from a rasberry Pi to my new TV and have the RasPi present the drive attached as a USB device to the TV so the TV just reads files off of it? I am leaning towards this as the idea I want to try, if possible, since it will make the TV not be able to connect to the internet.

I think I read somewhere that a pi zero can be used to emulate a mass storage device - I haven’t tried it but imagine it would be fiddly.

Have you considered perhaps using minidlna and streaming directly to your TV.

2 Likes

First off I am not an expert on USB, but from my understanding there is a clear difference between an USB master and a USB slave. Generally a PC or RPI is a USB Master and devices like keyboards and thumb drives are slaves that tell the master what kind of device they are and then the master knows what to do with them. So regarding your question it all depends if you can tell the RPI to act as a slave device and then configuring it to present itself as a mass storage device.
A quick search on google lead me to this https://raspberrypi.stackexchange.com/questions/4448/using-usb-as-a-slave post. TLDR it is not straight forward and may depend on the RPI Model you are using. I hope this helps.

Kind regards,
Felix

2 Likes

after looking at the link from felix, I think the minidlna will be the solution.

Thanks to both you and felix for the input.

1 Like

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.