Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two routers, both running OpenWRT 10.04

The first is a WRT160NL router connected to my ISP. I am using it as an access point with the ESSID of "160AP". It's WEP password is "AAAAA" and it's broadcasting on on channel 5.

My purpose: extend the range of this first router with another router. My other router is an Asus WL500GPv2.

Documentation for bridging is on the OpenWRT wiki here.

Following Step 1 I edited /etc/config/wireless to look like this:

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'disabled' '0'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' '160AP'
    option 'mode' 'sta'
    option 'encryption' 'wep'
    option 'key' 'AAAAA'

Now I am trying to run the wifi command:

root@OpenWrt:~# wifi
Command 'set wepkey' failed: -1

What am I missing? The 5 character password for the WEP is good. The SSID and channel of the WRT160NL is good too.

If try to continue: (XX:XX:XX:XX:XX:XX is the MAC of the WT160NL wlan0):

root@OpenWrt:~# iwconfig wl0
wl0       IEEE 802.11-DS  ESSID:"160AP"  
      Mode:Managed  Frequency:2.432 GHz  Access Point: XX:XX:XX:XX:XX:XX
      Bit Rate=54 Mb/s   Tx-Power:32 dBm   
      RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality=5/5  Signal level=-52 dBm  Noise level=-92 dBm
      Rx invalid nwid:0  Rx invalid crypt:7  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

So does this mean that the "Command 'set wepkey' failed: -1" message was just a warning, and it actually connected?

So I continued as follows:

Editing /etc/config/network:

#### LAN configuration
config interface lan
    option type     bridge
    option ifname   "eth0.0"
    option proto    static
    option ipaddr
    option netmask

Disabled the firewall:

$ /etc/init.d/firewall stop
$ /etc/init.d/firewall disable

Edit /etc/config/dhcp

config dhcp lan
    option interface        lan
    option start    100
    option limit    150
    option leasetime        12h
    option ignore   1

Restarting DNS services:

$ /etc/init.d/dnsmasq restart

Then I rebooted the router and scaned the available wireless networks from my notebook. But here comes the fun part (At this point I've been trying to solve this for about ~2 hours now, so yes, very funny):

I can Only see the "160AP" Access Point which is the original WT160NL router. (I think this because the signal strength is the same... my notebook is next to the WL500GPv2).

What is the problem with my setup? What am I missing?

share|improve this question
I also posted it here: forum.openwrt.org/viewtopic.php?pid=137880#p137880 – LanceBaynes Jun 26 '11 at 8:59
do I have to do anything on AP side? the WRT160NL side?? – LanceBaynes Jun 26 '11 at 9:44
I think I'm missed to set the AP function, that's why I can't see the WL500GPv2: tonight i will append this: pastebin.com/raw.php?i=cmEVpjkV – LanceBaynes Jun 26 '11 at 9:54
and maybe this: pastebin.com/raw.php?i=jkBTjFYA – LanceBaynes Jun 26 '11 at 9:57
up vote 2 down vote accepted

The user fyi on the OpenWRT forum suggested that using WEP is a bad idea for bridges and that using WDS instead could fix this. Did you try that?

In reviewing your configs and comaring them to the tutorial you linked, it looks like you might be missing a whole section. In /etc/config/wireless you need two sections titled config 'wifi-iface'. Both of them are for the same device but one will have option 'mode' 'ap' and the other option 'mode' 'sta'. It looks like you only have the 'sta' one on your configs. Can you post a full config file dump from both units?

share|improve this answer

This video shows easy way to setup wireless repeater on OpenWrt: https://www.youtube.com/watch?v=3rbsh2zxPnk

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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