2

I'm looking for the cheapest solution for connecting a RPi Zero to internet using a Windows PC as a connection provider via USB.

As I have a USB male to USB male cable and OTG micro USB to 3 female USBs. I was wondering if there's a software or solution that allows a Windows PC to be used as an ethernet driver for a RPi and tether the connection to a RPi Zero over USB.

Is that even possible?

1
  • If I understand your question correctly, you want to directly connect a USB cable between your windows computer and the data micro usb port and gain network access on your pi? If that is the case, adafruit has a very nice tutorial on how to do exactly that.
    – Linus
    Mar 2, 2016 at 10:42

3 Answers 3

1

A long time ago I remember doing that on my Beaglebone Black. I seem to remember you install something on the PC and then connect the BBB micro USB to the PC USB. So I know it can be done using Debian.

1
  • There's no such thing on the Pi.
    – Aloha
    Mar 2, 2016 at 8:38
1

All these answers are wrong, you can, and it's not that difficult.

Raspberry uses OTG USB ports, it can act as a device or as a master. If you configure the USB ports to use the virtual OTG ethernet device, then you will have network between your rpi and the pc.

Then it's just a matter to configure appropiately the network interface to be routed to the external network.

Here is a link on how to set up the OTG modes on Raspberry: https://gist.github.com/gbaman/50b6cca61dd1c3f88f41

0

A male-male USB-USB cable won't work. You have to make your PC act as a USB slave which is not possible for regular users and/or because of the hardware. PCs are almost always master-only. The Pi also thinks it's a master. We can't have two masters or else one or both of them will break and/or literally burn or, in the best case, the connection simply won't work.

Also, going without adapters is not possible for regular users. You'll need adapters. Just go buy a cheap WiFi/Ethernet adapter if you want it cheap. It will save you the hassle. It's also cheaper considering you have to replace your PC/Pi when something breaks because of totally unnecessary tinkering (unless you're a hardware hacker, then I encourage you to do it). Going with adapters is the cheapest and the best way (if not the only way).

If USB is not your thing, there's ENC28J60. It connects using the SPI port on your GPIO pins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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