The Raspberry Pi is a wonderful platform, not only because it’s well supported, but that’s as a result of it’s price and flexibility. Lots of USB ports on the 2 and 3 models, HDMI, Ethernet, and now it also includes wireless and Bluetooth onboard.
I have been meaning to experiment a build a wireless repeater using a Pi, and finally got a chance (and the courage) to attempt this feat. It wasn’t easy, and this is by no means a comprehensive guide, but rest assured that if you get it to work, you’ll understand why.
I started with a Pi 3, 16GB Kingston micro SD card, and an external Atheros AR9271 based adapter from TP-Link and made for a TCL television. I got this from an infamous friend, @d4rkm4tter of the #WifiCactus and it’s “high-gain” antenna gives it extra reach for connecting to distant APs.
Raspbian Stretch was used, the full version because I’m not a full cli master, starting with the April 2018 image, then eventually using the October 2018 installer (which is nicer).
My intention is to use the external USB adapter to associate with a remote AP and get a connection. This would be bridged by the Pi and dnsmasq with the built-in wireless adapter on the Pi. My testing shows that the 802.11n Atheros adapter with the external antenna does indeed have improved gain.
I followed the guide found here: <a href=”https://pimylifeup.com/raspberry-pi-wifi-extender/”>PiMyLifeUp</a>
All of this was very helpful, and the guide is extremely well written and intended for the Pi2/3 owners. My only change to this guide, or difficulty with, was that I wanted to invert the adapter role, so changing “wlan0” to “wlan1” and vice-versa throughout was necessary.
The packages called dnsmasq and hostpad are the real workers here, and to the heavy lifting, routing, and interfacing with the adapters. I had some success with just following this setup, but also found that it didn’t _just work_ so the tinkering and frustration curve began.
One neat trick that I did learn from elsewhere is that hostpad can be run with a config file as an argument, which means that you’ll start the service with a verbose console feed, but it will let you know if the config file is working and whether the AP has started. When you see “AP-ENABLED” and few, if any errors, you’ll finally know you’re there.
As of this writing, I’ve been running the AP for several days. Performance is weak for throughput, at less than 10Mbps, but the application this is meant for, or would be used in, is a location that has very poor cellular coverage for non-Verizon customers. This application of the Pi can be configured in a place or situation where _some_ connection is an improvement over _none_.
Interestingly, the PW-4210D adapter does have a removable antenna, so the use of a parabolic, omnidirectional, or yagi antenna with an adapter is possible for a very long run. There are also more solid, cheaper wireless bridges available online, but if you’re a tinkerer like I am, and have the spare hardware, there’s something special in feeling like you’ve made a bucket of parts do something interesting.
Go, do it.