Often that is caused by following old, obsolete guides, or improperly editing the cmdline.txt & config.txt files.
- Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
- Grab the Etcher software from https://etcher.io/
- Install Etcher and use it to write the Raspbian image to your SD card. You don't need to extract the image or format the card prior to writing. Just choose the Raspbian .zip, pick your SD card and write (if you have trouble, verify the SHA256 checksum of the download).
- Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card (labelled "boot").
If you get a message telling you the card must be formatted, cancel it.
- On the small FAT32 "boot" partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
Download the following .zip file, extract the contents and copy the appropriate files your SD card after completing the steps above.
USB Gadget mode edited files (3.31 KB)
Those are the files I used when creating a USB Ethernet Gadget with my Pi Zero v1.3, and they work. There are versions for Raspbian Stretch Desktop and Lite (only cmdline.txt is actually different). These were thoroughly tested with the 2017-11-29 release version of Raspbian Stretch, but they'll probably work on any recent version. After the files are copied (overwriting the default versions), safely eject the card from your PC.
If you have not done so already, install a Zeroconf network service. Apple's iTunes, Quicktime or Bonjour Printer Service will install Zeroconf. If you don't like installing extra, unnecessary software, use Winrar or 7-Zip to extract the Bonjour installer to a folder and just install Bonjour.msi (32 bit) or Bonjour64.msi for Zeroconf without all the other cruft.
Insert the SD card into your Raspberry Pi Zero and connect a normal micro-USB data cable to the Pi Zero's USB data port (the one closer to the HDMI port). Don't use an OTG cable, and don't connect anything to the micro-USB power port. Now plug the other end of the micro-USB cable into your main PC and the Pi Zero should start to boot up.
The first boot takes a bit longer, but after a moment Windows should install a new device, which looks like this in Device Manager.
If anything other than a USB Ethernet/RNDIS Gadget shows up, then something is wrong with your Windows system, as that is the driver that should install by default in Windows 7 or newer (assuming Windows since you didn't specify). If you want to try and install the driver manually, this should be the corresponding driver from the Microsoft update catalog. http://www.catalog.update.microsoft.com ... 009153023b
My password is the last 8 digits of Pi.