Skip to content

Use raspberry pi zero as a flash drive(g_mass_storage)

Notifications You must be signed in to change notification settings

aslansq/piUSBDrive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

piUSBDrive

Overwiev

These script allow to use raspberry pi zero wifi as a flash drive(g_mass_storage). Flash drive contents are updatable from your pc using ssh via wifi. Available on Windows and Linux. On Windows works via git bash

How To Setup

  1. Download raspberry pi OS. Write OS to SD card. Add line "dtoverlay=dwc2" at the end of /boot/config.txt. Eject SD card from your pc, then insert into raspberry pi.
    Hint: Dont forget to enable ssh server on raspberry pi

    $ echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt
    $ sudo systemctl enable ssh
  2. Connect cables

    Alt text

  3. Clone this repo. Then configure config.txt in pcRemoteUSBDrive and piRemoteUSBDrive

    $ git clone https://github.com/aslan-mehmet/piUSBDrive
  4. Copy piUSBDrive/piRemoteUSBDrive to home folder of raspberry pi

    $ cd piUSBDrive
    $ scp -r ./piRemoteUSBDrive <username>@<raspberrypi IP>:/home/<username>

How To Use

  1. Put your files in piUSBDrive/pcRemoteUSBDrive/usbShare
  2. Go to directory piUSBDrive/pcRemoteUSBDrive
  3. Execute connectUSB.sh
    $ cd piUSBDrive/pcRemoteUSBDrive
    $ cp <somefile> ./usbShare
    $ ./connectUSB.sh # for connecting usb drive
    $ ./disconnectUSB.sh # for disconnecting

Tests

Alt text
Alt text

About

Use raspberry pi zero as a flash drive(g_mass_storage)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages