1

I have a USB flash drive which is plugged into a USB port on a B+. On startup I'm running:

sudo mount -o uid=pi,gid=pi,rw /dev/sda1 /mnt/usb

Sometimes it works, but it's intermittent. The times it doesn't work the Pi doesn't seem to acknowledge the drive is even there, i.e. there is no /dev/sda1, or any sda devices in the dev folder.

Could it be that the Pi isn't powering the device properly? It should be getting enough power, and the USB wifi adapter is working perfectly every time. There are no other USB devices and it has a power supply capable of 3A.

If I unplug the device and plug it back in, it is then recognised.

So my question(s)

  1. Is there a way to force the device to be recognised on startup?
  2. Is there a way to simulate unplugging and plugging the device in?

1 Answer 1

1

It seems that your RPi is not powering it properly. Make an Y-cable or try using externally powered USB hub. To replug on RPi you will need to use a physical breakers controlled via GPIO, I'm afraid : USB hub in RPi design is not so smart as far as I know

2
  • By Y cable do you mean one that plugs into two of the pi's USB ports and then to the USB drive? Will that provide additional power to the pi?
    – wnbates
    Commented Mar 23, 2016 at 18:06
  • one(data part) you're plugging to RPi, second - to your RPi's power source, the same one that powers the RPi. If you need to use a separate power source - use a diode for making common GND with the source that powers your RPi or you're risking to damage the SoC chip Commented Mar 23, 2016 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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