I have a Raspberry Pi Zero (1.3) running Debian Jessie (full); the image name is 2016-05-27-raspbian-jessie.img. I've ran apt-get update && apt-get upgrade and updated the packages on it.

I have it connected to my laptop (Mac) with an OTG data cable, connected to the power port on the Raspberry Pi Zero. I connected a Wi-Fi adapter to the Raspberry Pi Zero data USB port, which I use to SSH into it (the Wi-Fi works fine).

I'm trying to make it act as a mass storage device, with g_mass_storage, following the instructions here. However, trying to do so, my Raspberry Pi Zero "hangs"—

$ sudo modprobe g_mass_storage file=/piusb.bin stall=0
packet_write_wait: Connection to port 22: Broken pipe

I have two questions.

  1. Is what I want feasible? Ie, can I use the power port to transfer data from a connected machine to the Raspberry Pi Zero in mass storage mode, while still using it to connect to the Wi-Fi by having a Wi-Fi adapter connected to the data port?
  2. Why does it hang, is this expected (ie, the data port must be used for USB mass storage, and cannot operate as a Wi-Fi adapter once the g_mass_storage module is loaded)?

1 Answer 1


can I use the power port to transfer data

Your plan on using the power port as data already failed. No, the power port is power only.

Here's another plan:

                     /-> Wifi Adapter
Pi Zero <-> USB hub <
                     \-> male-to-male USB cable plugged to the PC

OTG does not allow being a master and a slave at the same time, so a hub would not work.

Your best bet would be to do everything involving data over WiFi (FTP, Samba, etc.) An alternative would be via Ethernet. This will effectively turn your Pi Zero into a Wired/Wireless NAS.

  • Thank you @PandaLion. Theoretically, could it switch modes from host to slave at will? Ie, receive data while in slave mode, once transfer is complete, switch over to master mode to use the Wi-Fi? Commented Jun 11, 2016 at 17:07
  • @PiZeroUser That'll cause serious issues with the other plugged-in devices.
    – Aloha
    Commented Jun 11, 2016 at 17:34

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.