2

The internet is full of tutorials about using a Raspberry Pi as Router or how to set up a WiFi bridge but what I am looking for is something special I couldn't find any useful information about.

I have a Ethernet connection in my room but the WiFi from the router in the basement is not available here. However my tower PC is connected via the one single Ethernet connection anyway.

As I have a Raspberry Pi Zero W laying around I was wondering if it would be possible to plug the Pi Zero via USB to my PC and let it create a wireless network only for my room (something like an access point) that will route the data from my PC (which is obviously using the Ethernet connection) to the pi using its USB connection to the PC.

I would like to connect my smartphone to a wireless network in my room without buying new hardware.

I attached a primitive painting to explain what I am looking for.

possible?

  • You should be able to set the Zero as an AP then when you set up the bridge between the WiFi and eth0 replace the eth0 with the USB network name. Hopefully someone will be able to give full instructions and cover the Windows internet connection sharing process. – Andyroo May 4 at 1:30
  • You need to configure the tower pc and the Pi Zero. What operating system you are using on the tower pc? – Ingo May 4 at 19:48
  • @Ingo As I go with a dual boot configuration I use Ubuntu and Windows on the Tower PC. – zorrolo May 6 at 23:12
  • @Andyroo I have absolutely no clue how to replace eth0 with the USB network name (what is a USB network?) but thanks for the input I try to find more information about this topic. I would be glad if someone is able to give full instructions as well :) – zorrolo May 6 at 23:12
  • You first create a network between the Pi and PC along these lines desertbot.io/blog/headless-pi-zero-ssh-access-over-usb-windows – Andyroo May 7 at 18:22
1

There are mainly four steps to do:

  1. Create an ethernet connection over USB using OTG gadget mode
  2. Create an access point on the RPi Zero W
  3. Route traffic to the tower PC, recommended with Network Address Translation
  4. Setup routing or configure a bridge on the tower PC

Point 4. is out of scope here on Raspberry Pi, so I will look at the other points.

  1. To connect the RasPi by USB but have an regular ethernet network connection emulated, you can use OTG gadget mode. Then you will have a regular network interface usb0 that can be used like any other network interface, for example like eth0. Before continuing setting up the RasPi as access point you should ensure that you can connect to the RasPi from the tower PC with ping and ssh.

  2. and 3. You can look at Setting up a Raspberry Pi as an access point - the easy way following section ♦ Setting up an access point and with eth0, with NAT (recommended). Just replace everywhere interface name eth0 with usb0 (or what your interface name is from the usb connection).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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