1

I'm a new user to Raspberry Pi and this is my first Pi project. I'm running the latest version of Raspbian.

Question:

How do I configure my Raspberry Pi 3 B+ to map one USB port to another? One port has a thumb-drive and the other would be connected to my vehicle radio.

Background:

I have a radio receiver in my pickup truck that can play mp3, mp4 content stored on a USB thumb drive when plugged into the radio. When I want to change the content it always takes me several days to remember to bring the thumb-drive in, several more to change the content, then several more to remember to take it back out. I thought putting Pi in between the radio and thumb-drive would be a cool hack.

What I've done so far:

I've permanently mounted a thumb-drive to the Pi. When I pull into the driveway, the Pi automatically connects to my home WiFi and shows up on my PC as a mapped drive.

  • I can manually drag and drop content to it or..
  • My NAS automatically backs up from a share to the USB drive on the Pi. I can sit at my computer in the evening, drop content into the share and overnight the NAS synchs the Share's content with what's on the Pi's thumb-drive.
  • Transfer rate is 8-10 MB/sec which is plenty fast enough for me.

Thanks!

  • 1
    you are asking the wrong question ..... you do not want to map any USB ports ..... all you want to do is to use an RPi to emulate a thumb drive – jsotola Dec 30 '18 at 22:23
  • As @goldilocks points out this is not possible with Raspberry Pi B models - because their USB connections are all USB-A type sockets which are connected to a USB hub which has to be the up-stream connection. However the Zero models only have a single micro USB A connection which has the feature that it is wired directly to the SoC at the heart of an RPi and can be switched to the On-The-Go mode. – SlySven Dec 31 '18 at 13:50
4

You can't.

Devices which have USB passthrough are slave devices -- keyboards, cases, etc. The Pi 3 cannot be used as a slave device. I'll repeat myself from here:

USB is not a symmetrical protocol, meaning the two parties in a relationship are not equals. One is the master, and one is the slave. This is controlled in hardware, and although I believe it would be pretty simple to make a standard USB A port serve either role, conventionally they do not, I presume to prevent accidents, since plugging a master into a master can cause physical damage to one or both machines -- which is why you should never plug an A port into another A port (male-to-male cables for which are in fact hard to find).

If your car stereo has a standard USB A jack that you can plug a thumb drive into, that port is a master. So are the ones on the Pi 3, end-of-story.

As per the quote, this is the exact same reason you cannot connect your laptop to your desktop using a USB cable for data exchange.

You could use a Pi Zero, which has OTG functionality (see the link above), to emulate a thumb drive, as jsotola suggests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.