Wireless Repeater


11 posts
by CortanaJPN » Wed Apr 17, 2013 8:10 pm
I need to increase the range of my wifi network, and, rather than buy an expensive range extender or wireless bridge, I was thinking of doing this with the R-Pi.

Could anyone let me know if this is possible?
Posts: 11
Joined: Wed Jul 04, 2012 8:29 pm
by SirLagz » Thu Apr 18, 2013 1:59 pm
Yes, you can do it with 2 USB wifi sticks.
Don't expect great throughput from them though, even if they are N spec.
The most you'll get is probably 50mbit throughput.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by CortanaJPN » Tue Apr 23, 2013 2:05 pm
Okay, do you know of tutorial or guide to do this?
Posts: 11
Joined: Wed Jul 04, 2012 8:29 pm
by PS1981 » Tue Apr 23, 2013 2:08 pm
Are you sure this is a cheaper and better option? You need an extra stick, a pi, a power supply? I see this getting easily as expensive as a range extender or am I wrong?
Posts: 446
Joined: Wed Dec 12, 2012 4:11 pm
by SirLagz » Tue Apr 23, 2013 2:14 pm
I don't have an exact guide, but I'll write up a general guide here and do a more indepth blog post later

wlan0 - Connected to your existing wlan network
wlan1 - Broadcasting a new wlan network

wlan0 needs to be configured to connect via /etc/network/interfaces, or a variant of this method.
e.g. wpa-ssid and wpa-psk in /etc/network/interfaces

wlan1 needs to be setup to broadcast a network via hostapd
then wlan1 needs to be bridged to wlan0 so that when a client connects to wlan1, packets are forwarded to wlan0

Check out this post -> viewtopic.php?f=27&t=17702
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by EnzioBrK » Tue Jul 02, 2013 8:20 pm
I also want to use my Pi as a wifi repeater, to increase the flying range of my drone. Any good tutorial? I could't find anything useful so far. many thanks in advance.
Posts: 18
Joined: Wed Jan 23, 2013 9:26 pm
Location: Luton, Bedfordshire
by bubblebobble » Thu Jul 04, 2013 10:00 pm
I've been doing something similar and likewise couldn't find a guide. However, I've had some success, I'll outline the basic steps.

the first key thing was wireless adapters. I first used two TPLink ones. However, while they would connect to an existing wifi network they wouldn't work as access points. So I abandoned one of them and bought one from 7dayshop.com. (SKU: W-3S01BLK). This would allow me to create an access point. (using the guide : http://www.raspberrypi.org/phpBB3/viewtopic.php?t=19120 ) - thats WLAN0 in my setup sorted.

However, when now using the TPLink to connect to the existing network it now wouldn't work. Pulled my hair out for a whole evening before ordering a second 7DAYSHOP.COM wifi adapter and trying again. Interestingly it worked fine. I don't know if its some conflict between the chipsets or what but this now worked.

So my advice here is find one that works as an Access Point and when you've got that working get an identical one and connect it to your existing wifi network. You can do that by adding/modifying the following lines in your /etc/network/interfaces file

Code: Select all
auto wlan1
iface wlan1 inet dhcp
   wpa-ssid "the_sid_of_the_network"
   wpa-psk "the_password"


Last but not least you need to route between the network cards, I wrote a little shell script that I'd manually run (because it suits me to route sometimes to eth0, but passing wlan1 to the script will route between the two wifi cards

Code: Select all
#!/bin/bash

if [ ${#1} -eq 0 ]; then
   echo "You must enter the destination interface, e.g. eth0 or wlan1"
   echo " "
   exit -1
fi

iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE
iptables -A FORWARD -i $1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o $1 -j ACCEPT

echo " "
echo "Routed to $1"
echo ""


Anyway, it worked. It isn't perfect by any means (bit slow, may be routing or just having the wifi cards next to each other) and requires a bit more work, but its as far as I've got so I'm happy to share it and hope it progresses you a bit further.
Posts: 2
Joined: Thu Jul 04, 2013 9:43 am
by dspolleke » Mon Jul 22, 2013 1:01 pm
an usb-extentsion cable should help ...
Please read: http://www.biblegateway.com/passage/?search=Matthew+7%3A7&version=NIV

Use loads of sunscreen, use the search, be elaborate in questions, paste commands and error messages, and remember google is your friend!
Posts: 112
Joined: Thu Feb 07, 2013 7:09 pm
Location: Netherlands
by pukster » Mon Dec 02, 2013 12:02 pm
Does a wireless repeater mean I can log in from any node or does it mean I can walk around and still have connectivity? Because I am looking for the latter
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am
by Gorrat » Thu Jul 10, 2014 4:06 pm
bubblebobble wrote:it suits me to route sometimes to eth0, but passing wlan1 to the script will route between the two wifi cards


Would routing to eth0 effectively create a WIRED access point to your wireLESS network? I have an old XBox360 without a wifi card and I would like to cut the cord between my XBox and router without buying the Microsoft attachment. This seems like it would do the trick if I connected the ethernet ports of the Pi and XBox (through a switch), then connected the Pi's wifi stick to my wireless network.
Posts: 1
Joined: Thu Mar 14, 2013 12:48 pm
by BBUK » Fri Jul 11, 2014 2:17 pm
See also here http://www.raspberrypi.org/forums/viewtopic.php?f=53&t=66673&p=489189 which is a little script to turn an Arch installation into a repeater as requested.

Have fun

BBUK
Posts: 96
Joined: Tue Dec 18, 2012 10:34 am