2

The question tells almost all. I have a Pi Zero W at my balcony. It's connected to my home router through wifi. For now it's running lighttp server, taking a picture every minute and measuring temperature and making a nice plot of last weeks temp measurements and showing them when asked.

Problem is that my home router gives a terrible wifi signal outside house (in balcony it works but 10 meters from there it dissappears) and I was thinking to turn that Pi Zero W to a wifi router because it is already out there and so I would be able to use my own internet connection when sitting in the park out there. I can always buy a usb-ethernet adapter and a long cable (10 m or more) and make it happen (I hope). But I have much nearer a small debian server running inside house just on the other side of the wall and would need only 2 m usb cable if I connect that Pi Zero W directly to it. That debian server does not have free ethernet ports but it has free usb ports.

As far as I understand it should be possible but I have had no luck in finding instructions how to do it. So any hints and links would be highly valued.

  • please clarify what you try to achieve. you can use OTG USB port on RPi, with USB to ETH adapter to achieve LAN, and it works with no further config. turning RPi into router is a different question and already answered on RaspBerry's site. Good luck – Guy . D Sep 5 '17 at 5:47
1

You can use USB Gadget Mode to use the OTG USB port on the Zero as a network port by adding dtoverlay=dwc2 to /boot/config.txt, and adding modules-load=dwc2,g_ether to the end of /boot/cmdline.txt. This will cause the Zero to emulate a USB network adapter if you connect to the Zero using the OTG USB port. Depending on the specifics of your debian server, this will work as a normal, albeit slow, network connection. By default, it's going to use lan-local (169.254.0.0/16) addresses, so you'll need to do some work to configure your debian machine indoors as a router.

The downside is that performance of both the on-board wifi and USB gadget-mode networking isn't the greatest. So yes, it certainly can be done, but the results may not be worthwhile.

|improve this answer|||||
0

If USB Gadget is enabled a virtual ethernet channel can be created over the USB interface. Adafruit have made a nice article about "USB gadget" that explains all steps in detail: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget

There is restrictions like the onboard antenna in form of coverage/range. I would guesstimate that the restriction would be in the air interface due to distance between AP (RPi Z W) and your laptop.

The steps to configure this is not so extensive and worth exploring and following the URL provided should get you going in a jiffy.

|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.