Only raspberry Pi zero support OTG setup.
What you need:
- Raspberry Pi Zero V1.3 or Wireless version
- Micro USB cable
- Download any Raspberry Pi Zero compatible OS, I prefer Raspbian Jessie Lite, download from raspberrypi.org/downloads
- Burn image to Raspberry Pi Zero
- Modify 2 files as follow:
- open up the boot partition and add to the bottom of the
dtoverlay=dwc2on a new line, then save the file.
open up the
cmdline.txt. Be careful with this file, it is very picky with its formatting! Each parameter is seperated by a single space (it does not use newlines). Insert
- Create empty file:
sshunder root folder with 0 bytes
- Insert Micro SD card into Raspberry Pi Zero and connect to your computer with data usb port.
- Raspberry Pi Zero will be able to access via hostname: raspberrypi.local
- If you use Windows PC, you need to install iTunes to enable auto name discover (easy way)
- If you want to have your Raspberry Pi Zero access internet, you should share your internet access with Raspberry Pi Zero, you will see one internet connection with type: USB Etherent/RNDIS Gadget, share internet connect with this.
Now you are good to use your Raspberry Pi Zero as a computer.