Can Pi4 be used as WDS-range extender?

Hi all,

We have a TP-Link TL-WR1043N/ND v4 based OpenWRT network running well (TL-WR1043ND v4, OpenWRT 18.06.1) but am running into WiFi signal strength issues after changes in our living arrangements.

I'm trying to create a WiFi extender using OpenWRT on a Pi4 that was modded to have an SMA-jack antenna on its built-in WiFi. When running other OSes, it connects to the network just fine so I wanted that connection to be the bridge and strategically place it at a window. I have a 2nd USB dongle WiFi based on an RT3070 that I wanted to use for our remote AP in our new living area - but I haven't quite gotten it working trying both 21.02.0 rc4 and 21.02.1.

Does anyone know if this is even possible - or are there tests I can do to check? I understand WDS is preferable to relayd and also permits IPv6.

These settings seemed to get me the closest - I can connect via crossover cable and ssh into the device and get from there to the local network and internet (over wlan0 client WDS connection). At this point wlan1 isn't fully configured, but in general as soon as I try to bridge devices things break down (I can connect to wlan1 but can't get a DHCP lease or connect to internet):

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option cell_density '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0'
        option channel '8'
        option cell_density '0'
        option htmode 'HT40'

config wifi-iface 'wifinet1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'MnM-Remote'
        option encryption 'none'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'sta'
        option ssid 'MnM'
        option encryption 'psk2'
        option key 'XXXXXXX'
        option wds '1'
        option network 'wwan'

root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fda9:83c1:b08f::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'wlan0'

config interface 'XoverEth'
        option proto 'static'
        option device 'eth0'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'LAN'
        option proto 'static'
        option ipaddr '192.168.11.7'
        option netmask '255.255.255.0'
        option gateway '192.168.11.1'
        option broadcast '192.168.11.255'
        option device 'br-lan'
        option type 'bridge'

config interface 'wwan'
        option proto 'dhcp'

I originally tried following these instructions. With this configuration I can't connect from the Pi to the LAN or internet (no pings work), although my laptop connected via a crossover cable can connect to Luci on the Pi. This is that configuration:

root@OpenWrt:/# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option cell_density '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0'
        option channel '8'
        option cell_density '0'
        option htmode 'HT40'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option ssid 'MnM'
        option encryption 'psk2'
        option key 'XXXXX'
        option wds '1'
        option network 'lan'
        option mode 'sta'

root@OpenWrt:/# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fda9:83c1:b08f::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'wlan0'
        list ports 'wlan1'

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option device 'br-lan'
        option ipaddr '192.168.11.7'
        option gateway '192.168.11.1'

config interface 'wwan'
        option proto 'dhcp'

Any pointers would be welcome. I'm happy to provide any details I missed. Thank you all!
Markus

You might consider getting a cheap gigabit AC router, and use it as an Access Point.

Repeaters and extenders are not great options.

In my opinion, even with an external antenna, the pi4 is a poor choice as an AP, let alone a WDS-range extender

brcmfmac (afaik) doesn't support STA and AP mode concurrently, that said - even your TL-WR1043NDv4 (which is a decade old obsolete tech) would be much better (range and throughput, as well as reliability) than any RPi as a wireless device.

--
Disclaimer: I don't own any RPi, nor any other device using brcmfmac myself.

Thanks for the feedback. For the most part the existing network has been quite good, just that wiring our current location isn't practical and the wifi is lucky to hit 10MBps and can fluctuate to the point of having to tether at times. Even if the Pi just produces a fairly reliable 15-20MBps that would be good enough for every-day usage.

The Pi's hardware would be used to connect to the 1043 AP. The remote AP would be from the plug-in USB dongle - just to cover a single room. I can get both WiFi radios running, I just can't seem to bridge them (the remote AP fails to provide DHCP or connect to the internet). I'm not sure about the intricacies of WDS - is the connection always WDS or is the extra overhead only used when routing packets to downstream devices? I'm basically wondering if WDS is actually working - can I confirm this?

Thanks.

WDS/ 4addr is a combination of AP and STA features on the same radio, as mentioned before, brcmfmac can't do this.

A WDS client requires that the AP it connects with is also in WDS mode.

I don't think the Pi built in wifi supports WDS. It barely works as a regular client.

If you're going through windows to another building, a CPE is built for that. Also the heat-reflective coatings on modern commercial windows can seriously reduce WiFi signals.

Sharing my experience. Not even sure if this is relevant to you at all, but for my case WDS seems to have something to do with OpenWrt version...

I have two identical routers (Atheros AR7242 based), with one configured as AP(WDS) and the other Client(WDS). Both have been running on 19.07 and have been talking with each other with no (big) issue.

Decided to upgrade to 21.02. After I upgraded the master router, the client router stopped connecting to it and I couldn't get them to connect again... until I upgraded the client router also. With no config changes to either of these router, just like that they started connecting once again.

So it could just be a matter of making sure these routers / devices / Pi's are all running the same OpenWrt version? Not sure...

To extend on this, in many cases you get better signals through a solid wall, than through modern coated glass windows.

Thanks for the tips. I'm not sure what the opposite of "modern office building" is, but our living arrangement is probably close (100yo weatherboard cottage).

I think I'm going to start messing with double-NAT as a possible work-around. Not sure how easy it is to configure it to open and route all traffic between the intermediate LAN and my remote AP subnet (so I can access our LAN from the remote AP) - but I may just settle for internet as well.

I ended up going the double-NAT route. It's actually working quite well on pretty much the first attempt. A different subnet, but without any special effort I could continue to access our relevant LAN addresses without much effort (e.g. file transfer to our server) and so far everything seems to work fine, but at higher speeds with less variation. Just tested 2 mobile devices making a what's app video call to each other in fairly crap weather - not HD but acceptable. So I'm happy to be running 3 installs of OpenWRT. Thanks again to the community!

I'll mark this as the solution for now, but if anyone does get WDS working on a Pi - please share your experience.

I don't think it is though. You usually don't want to/can't reuse channels that way. My understanding is you need 2 radios on 2 channels - one for the STA link to the base AP and one to operate the remote AP. WDS adds routing data to make this work more seamlessly, but it's not fully standardized and fully interoperable.

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