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
-
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
-
Connect cables
-
Clone this repo. Then configure config.txt in pcRemoteUSBDrive and piRemoteUSBDrive
$ git clone https://github.com/aslan-mehmet/piUSBDrive
-
Copy piUSBDrive/piRemoteUSBDrive to home folder of raspberry pi
$ cd piUSBDrive $ scp -r ./piRemoteUSBDrive <username>@<raspberrypi IP>:/home/<username>
- Put your files in piUSBDrive/pcRemoteUSBDrive/usbShare
- Go to directory piUSBDrive/pcRemoteUSBDrive
- Execute connectUSB.sh
$ cd piUSBDrive/pcRemoteUSBDrive $ cp <somefile> ./usbShare $ ./connectUSB.sh # for connecting usb drive $ ./disconnectUSB.sh # for disconnecting