Unable to SSH to Pi Zero over USB (Ethernet Gadget)
-
I'm using the current version of Retropie and want to add emulators that aren't included. I now know how to do it, but it needs Internet access. The best solution I've found so far that doesn't quite work is to connect the Pi to a computer and get LAN over USB:
http://www.circuitbasics.com/raspberry-pi-zero-ethernet-gadget/I can ping the Pi; I know this for sure. But I cannot SSH into it. It refuses the connection. The firewall in Windows is fully disabled. I've switched things back so I can attach a keyboard and run raspi-config and turned on SSH and allow it to reboot, but this doesn't help. With a keyboard attached I can even successfully "SSH localhost". It's maddening.
I'd like to avoid having to get a Wifi dongle and USB hub. Is there any other way to add these extra emulators? Any reason I could ping it but not SSH into it?
-
@jrmymllr I think your topic title is not related to the problem you describe.
-
Discussed further at https://www.reddit.com/r/RetroPie/comments/54hjd1/getting_optional_emulators_on_pi_zero/ also
-
@jrmymllr I have had a little bit of a play with the Ethernet gadget mode on a pi zero and did eventually get onto it. You need to install bonjour services to get the 'raspberrypi.local' to be recognised by windows.
The pi0 will get an IP address, but it will be different to the one that you statically assign to the connection within windows.
So in theory you shpuld just be able to ssh to 'raspberrypi.local' once you have installed the bonjour services
-
@moosepr
I did notice much later that I didn't install Bonjour, but still no luck after installing that. I even tried rebooting. Do you recall if the Pi was in the same subnet as what is assigned in Windows? In Windows I'm seeing 169.something. I even tried pinging the entire class C subnet but only get a response from the IP address in Windows. -
@jrmymllr it does get assigned some random address (I don't remember what it is) although using the 'raspberrypi.local' is supposed to get round the issue of not knowing the address
does the device show up if you run 'ipconfig /all' in a command window (assuming windows)
-
@moosepr
Success! Sort of. I tried this with Raspian Jessie Lite image. Initially it wasn't recognized by Windows as a valid device. So I tried powering the Pi through the power jack, allowing it to boot, then connecting the USB data jack to the computer. I was then able to SSH to raspberrypi.local!I tried some commands, etc, then enabled Internet connection sharing. This is where things went crazy. Shortly after doing this, the computer locked up, screen went totally blank, and I had to hard reset it. I attempted to SSH again, however shortly after logging into the Pi the computer did the same thing. Nothing in the event log about it.
At least I'm making progress. However I wonder why the Retropie image didn't let me SSH, unless I need to power it first before connecting, but I never had a problem with the driver install like I did with bare Raspian.
-
@jrmymllr i did try it on a cctv camera distro but it didn't seem to want to connect on that. I think it depends on the kernel that is in use on the Linux distro, I know that have made some tweaks on Jessie to get it to work
The problem I had was that I couldn't get the internet sharing to work, it could ping google, know the IP address for google (so it was getting DNS) but then get nothing back form the ping (so it was getting blocked somewhere down the line)
-
Finally got something working. I was able to borrow a USB Wifi adapter, setup the Pi to automatically connect to network, and then I could SSH into it. Things are good.
-
try enable the ssh server on the pizero
====
sudo raspi-configScroll down to interfacing options then “ssh” option
Hit the Enter and then select “Enable”
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.