TP-Link WR940N v3 as repeater. Cannot connect to host AP

Hey all,

I am trying to use a WR940N that I have lying around as a repeater. I have tried to use this tutorial:

https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

However, I cannot even connect to my original AP.

Here is my setup:

Modem is 192.168.1.1
Original AP (WRT1200AC with 18.06): 192.168.2.1

In the instructions it says, the LAN interface has to be in another subnet than the Wifi I want to connect to. So I set the LAN interface on my WR940N (Repeater from now on) to 192.168.3.1.

Then - as by the instructions - I tried to set up a Wifi connection to the Host AP. This will not work - the wireless shows up as "not associated".

In the instructions it tells me to set the firewall zone of the newly created wifi connection to "lan". This seems weird to me, should it not be set to WAN/WWAN?

So here is what I tried:

  • Set the LAN interface on the repeater to 192.168.3.1
  • Set the (newly created) WWAN on the repeater to static address 192.168.2.3/24 (I also tried DHCP client)
  • connect to the Host Wifi.

However, it will not connect. Can someone point me in the right direction? Sorry if I ask silly questions, the whole Interface/Firewall zone/subnet thing has me a bit confused...

Thanks!

Update: When I set the WWAN to Static Protocol and give it a 192.168.2.0/24 address, the wireless client connects and then disconnects again immediately, i.e. flicks on and off

You need to see if you are connecting through wds or just a routed client. In a routed client way you will set the AP as part of wan zone and provide a different subnet for lan but in wds mode you will set it as part of lan and give it an ip in the same range as tbe main router.
Can you post your current config for AP? Wireless and network files?

sure enough. Here goes /etc/config/network

config interface 'loopback'
     option ifname 'lo'
     option proto 'static'
     option ipaddr '127.0.0.1'
     option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd22:1f48:6434::/48'

config interface 'lan'
    option type 'bridge'
    option ifname 'eth1.1'
    option proto 'static'
    option ipaddr '192.168.3.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option type 'bridge'

config interface 'wan6'
    option ifname 'eth0'
    option proto 'dhcpv6'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 0t'

config interface 'wwan'
    option proto 'dhcp'

And here is /etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/qca956x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option channel '6'
    option country 'US'
    option legacy_rates '1'

config wifi-iface 'default_radio0'
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'OpenWrt'
    option encryption 'none'

config wifi-iface
    option ssid 'repeat'
    option encryption 'psk2'
    option device 'radio0'
    option mode 'sta'
    option bssid '62:38:E0:DB:08:4F'
    option key '_correct_key_'
    option network 'wwan wan'

I want to set it up as wds mode as I would like to be on the same subnet as my main lan if possible.

However, the TP-Link does not even connect as client to the original AP. I have tried reflashing the firmware - same thing

This is what you need to do for wds setup:

  1. Change wireless config and add option wds '1' to main router ap and client node ap.
  2. Change client network to lan and remove wan wwan from there
  3. Edit network configuration and change lan config as static: IP: 192.168.X.254 (same subnet as main, this is where you will access the AP), add netmask, add gateway 192.168.X.1, possibly add dns 192.168.X.1 so no connectivity problems. Also add option sta '1' to lan so it doesn't end up in network loop
  4. Disable dhcp on lan so main router handles everything.
  5. There's no need to disable firewall
  6. Apply config or reboot

It may take a couple of seconds to associate itself to main router.

Hmm, so I changed the config to the following:

config interface 'loopback'
     option ifname 'lo'
     option proto 'static'
     option ipaddr '127.0.0.1'
     option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd22:1f48:6434::/48'

config interface 'lan'
    option type 'bridge'
    option ifname 'eth1.1'
    option proto 'static'
    option ipaddr '192.168.2.254'
    option gateway '192.168.2.1'
    option dns '192.168.2.1'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option sta '1'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option type 'bridge'

config interface 'wan6'
    option ifname 'eth0'
    option proto 'dhcpv6'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 0t'

And dhcp disabled.

for wireless:

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/qca956x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option channel '6'
    option country 'US'
    option legacy_rates '1'

config wifi-iface 'default_radio0'
    option wds '1'
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'OpenWrt'
    option encryption 'none'

config wifi-iface
    option wds '1'
    option ssid 'repeat'
    option encryption 'psk2'
    option device 'radio0'
    option mode 'sta'
    option bssid '62:38:E0:DB:08:4F'
    option key '_correct_key_'
    option network 'lan'

After that I get no connectivity to either main router or the repeater. Only if I set the respective interface down (or unplug), can I reach the other router. Still no connection from the repeater to the main AP. Seems to me like an IP conflict, but 192.168.2.254 is not yet assigned...

First change the wireless config for main router and add wds config to main router AP. Then apply changes and try to connect to the router as normal from your phone etc. You should have no problem with that.

After a successful connection, connect to the repeater and change the config. You only need to set the wds option to main router AP from where you are going to connect and the client wifi-iface on repeater. Use accurate SSID and password to connect, also make sure the mac addreds you put in there is correct.

Thanks, that did the trick! weird that configuring the wds option does not show up on any of the tutorials..

Most tutorials provide configuration for routed AP and that does not include wds option. Have a look at WDS.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.