Connect to Raspberry Pi, via USB ethernet/gadget mode


Connect to Raspberry Pi, via USB ethernet/gadget mode

Below is a complete guide on how to connect to a Raspberry Pi via USB cable, with a SSH connection. It converts the RPi to a USB dongle/gadget, that you can plug to any device (even smartphone) and login to that.

The thing is, that in the Internet, there are too many outdated guides or not well written, which frustrates you. This guide is the best, with just one step missing or just needs, a little bit better explanation, at least for me. You can find the guide here: https://forums.raspberrypi.com/viewtopic.php?p=2252557 It's also saved in file, which you will find below.

  • You have to use rpi-imager to write the Raspberry Pi OS image.
  • It's apply able to Raspberry Pi OS Bookworm

After making the steps of the guide, if you use an Ubuntu/Linux distro, make sure to do these steps, to be able, to make the connection:

  • Plug a micro-usb cable into the port closest to the HDMI port on the Raspberry Pi Zero. Plug the other end of the cable into your computer.
  • Wait two minutes for the Raspberry Pi Zero to finish doing it’s thing.
  • Open the Network panel in Settings and click the gear icon to open the settings for the Wired connection. In some Linux distributions, this is called Netchip Ethernet.
  • Go to the IPv6 tab and set the IPv6 Method to Disable.
  • Go to the IPv4 tab and set the IPv4 Method to Link-Local Only.
  • Click Apply.
  • Toggle the Wired connection off and then on again.
  • Ping the Raspberry Pi Zero: ping raspberrypi.local

You are ready!

File

Guide

References

  • https://forums.raspberrypi.com/viewtopic.php?t=376578
  • https://johnnymatthews.dev/blog/2021-02-06-connect-to-raspberry-pi-zero-over-usb-on-ubuntu/

Add a comment

Previous Next