2

I'm trying to connect to my Raspberry Pi Zero W using SSH over USB. I've seen other people do it, and I have tried multiple different tutorials over the last few days, but none of them worked. I've seen this question being asked and answered many times, but all answers i found seem to be outdated, because none of them worked.
I have connected my Pi to my computer (yes, I have used the correct USB plug) with a modified image of the latest version of raspbian stretch lite.
What I modified:
-Added an empty file called "ssh" to the root dir
-Added dtoverlay=dwc2 to config.txt
-Added modules-load=dwc2,g_ether to cmdline.txt (after rootwait)

Now, when i plugged the pi into my PC, It got recognized as a "Serial COM port".
It should be recognized as an RNDIS Gadget, according to the tutorials.
I then downloaded and installed the "Acer Inc. Other hardware - USB ethernet RNDIS gadget" driver from here.
Now, when i plug in my pi, it shows up like this in the device manager:Device Manager Screenshot
But I still could not ping it / connect to it via PuTTY. ping raspberrypi.local
Sorry for the german. It says "could not find host raspberrypi.local".

I then tried to find the IP address of the Pi in the new network, and i noticed it had none. My PC has an address (192.168.137.1) on the new network, just not the Pi.
Any Idea what I could do?

I still can't figure this out. I hope my progress so far will help others with the same problem, since all online resources seem to be outdated by around 3 years.

1 Answer 1

0

I had the same problem on a linux system. For me the solution was to install "avahi-daemon". The underlying problem is the failing DNS for the USB-device (meaning: the name raspberrypi.local has to be resolved somehow) I hope this can point in the right direcetion:

On Windows, it seems, that you have to install something called Bonjour service.

Relating to this article:

Windows doesn’t have Zeroconf support out of the box, but a few popular applications slip it in for their own needs, including Skype, Apple’s iTunes and Adobe Photoshop CS3 or later. So you might not need to add anything at all!

Otherwise, it’s most easily installed using Bonjour Print Services for Windows 2.0.2.

... -> https://support.apple.com/kb/DL999?locale=en_US

4
  • On the used Raspbian Stretch Lite avahi is installed by default. As the OP wrote, the RasPi does not have an ip address so name resolution will not help.
    – Ingo
    Commented Apr 20, 2019 at 18:03
  • 1
    @ingo: "The Avahi mDNS/DNS-SD daemon implements Apple's Zeroconf architecture (also known as "Rendezvous" or "Bonjour"). The daemon registers local IP addresses and static services using mDNS/DNS-SD" ( die.net avahi-daemon(8)) "The Avahi daemon discovers network resources, allocates IP addresses without the DHCP server, makes the computer accessible by its local machine name by acting as a DNS server and facilitates sharing of files and printers" (ccm.net/faq/739-disabling-the-avahi-daemon) So if avahi is installed, it could be stopped or disabled
    – MacMartin
    Commented Apr 20, 2019 at 21:11
  • Yes, you are right. You explained zeroconf and multicast DNS, but you don't explain why the RasPi does not have an ip address.
    – Ingo
    Commented Apr 20, 2019 at 21:55
  • Thanks for answering. I already have Bonjour installed (and recently manually reinstalled it, just in case), but this still doesn't work. however, when I install github.com/MaMe82/P4wnP1 and run install.sh, i can ssh into it using the IP it gave itself. Something in there made it work, but i still need to find out what did, because if i need to use the pi for anything else than P4wnP1, I have to solve this exact problem again. Commented Apr 22, 2019 at 19:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.