Wireless Repeater (5 GHz) on WRT1200AC

I have a working 2.4 GHz WDS repeater setup, which looks like this:

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option htmode 'HT40'
        option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
        option legacy_rates '0'

config wifi-iface
        option device 'radio1'
        option mode 'sta'
        option wds '1'
        option ssid '...'
        option bssid '...'
        option network 'lan'
        option encryption 'psk2'
        option key '...'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option macaddr '...'
        option encryption 'psk2'
        option key '...'
        option wds '1'
        option ssid '...'
        option network 'lan'

On 5 GHz I'm this far:

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option htmode 'VHT80'
        option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
        option legacy_rates '0'

config wifi-iface
        option device 'radio0'
        option mode 'sta'
        option wds '1'
        option ssid '...'
        option bssid '...'
        option network 'lan'
        option encryption 'psk2'
        option key '...'

And this is far as I can get. Once I add an AP section:

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option macaddr '....'
        option encryption 'psk2'
        option key '...'
        option wds '1'
        option ssid '...'
        option network 'lan'

It won't work. I only get this:

Sat Nov 10 11:12:55 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sat Nov 10 11:12:55 2018 daemon.notice hostapd: wlan0-1: interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Nov 10 11:12:55 2018 daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
Sat Nov 10 11:12:55 2018 daemon.notice hostapd: wlan0-1: interface state COUNTRY_UPDATE->ACS
Sat Nov 10 11:12:55 2018 daemon.notice hostapd: wlan0-1: ACS-STARTED
Sat Nov 10 11:13:13 2018 daemon.notice hostapd: wlan0-1: ACS-COMPLETED freq=5260 channel=52
Sat Nov 10 11:13:13 2018 daemon.notice hostapd: wlan0-1: interface state ACS->HT_SCAN
Sat Nov 10 11:13:13 2018 daemon.notice hostapd: wlan0-1: interface state HT_SCAN->DFS
Sat Nov 10 11:13:13 2018 daemon.notice hostapd: wlan0-1: DFS-CAC-START freq=5260 chan=52 sec_chan=1, width=1, seg0=58, seg1=0, cac_time=60s
Sat Nov 10 11:14:18 2018 daemon.notice hostapd: wlan0-1: DFS-CAC-COMPLETED success=1 freq=5260 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5290 cf2=0
Sat Nov 10 11:14:18 2018 daemon.err hostapd: Using interface wlan0-1 with hwaddr ... and ssid "..."
Sat Nov 10 11:14:18 2018 daemon.notice hostapd: wlan0-1: interface state DFS->ENABLED
Sat Nov 10 11:14:18 2018 daemon.notice hostapd: wlan0-1: AP-ENABLED
Sat Nov 10 11:14:22 2018 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
Sat Nov 10 11:14:22 2018 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
Sat Nov 10 11:14:22 2018 daemon.err hostapd: Failed to set beacon parameters

So what's missing here? Why does it work on 2.4 GHz but doesn't on 5 GHz? The Client is coming up fine, just the Master isn't.

Have you tested without :

option wds '1'

Have you omitted channel settings on purpose or are they missing?
I would test it not on DFS channels to rule that out.

WDS is needed otherwise the repeater wouldn't work at all.

The channel is omitted as the Access Point upwards in the hierachy detects and sets the correct channel (and does the DFS as well). The repeater then moves with it. This works very well on 2,4 GHz.

All 5 GHz channels are DFS in my regulatory region. Nevertheless a client/repeater isn't supposed to do DFS.

I’m not aware of any region where that is the case. Can you provide the example?

A repeater should do its own DFS. It’s going to transmit on the frequency so it must check first. Do you have anything that says otherwise? Code or standards doc?

DFS is Dynamic Frequency Selection. A single radio repeater can't select it's own frequency, it needs to talk to the Master AP and therefore is locked to its frequency and moves with it.

For 2.4 GHz (where the repeating works as intended), it doesn't let you select a channel and says "Locked to channel x used by: Client" in LuCI.

So, I disabled DFS on the Master AP and moved it to channel 149 manually, which turned out to be a non-DFS channel. Now the WRT1200AC 5 GHz client doesn't get a connection at all. It seems that it can't work on channel 149 at all, even in STA mode:

                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)

At least on the other channels it gets a STA connection, it just fails to set up its own AP.

I use without WDS=1 in repeater mode ( relayd ) and no problem

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option htmode 'HT20'
        option country '00'
        option legacy_rates '1'
        option disabled '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
        option htmode 'VHT80'
        option channel '128'
        option country 'FR'
        option legacy_rates '0'

config wifi-iface
        option ssid 'Livebox-62XX_5GHz'
        option device 'radio1'
        option mode 'sta'
        option bssid '8C:F8:13:29:62:XX'
        option key '1234567890'
        option encryption 'psk2'
        option disassoc_low_ack '0'
        option network 'wwan lan'


config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option key '1234567890'
        option wpa_disable_eapol_key_retries '1'
        option encryption 'psk2'
        option network 'lan'
        option ssid 'WR1200JS-252'
        option disabled '1' **<----- i not use in AP mode only relayd**

You AP section has "option disabled '1'" is this intentional?

I also see that you set a fixed channel 128, but for country 'FR' this is a DFS channel. Therefore the Master AP is supposed to select a channel dynamically (which it does in my case).

I'm trying to reproduce the setup and (wrongly) fixated the channel to 128 on my WRT1200C, which by coincidence happens to be the channel the Master AP selected for itself with DFS enabled. And indeed the WRT1200C repeater AP comes up (for the first time ever).

Sat Nov 10 15:39:18 2018 daemon.notice hostapd: wlan0-1: interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Nov 10 15:39:18 2018 daemon.notice hostapd: wlan0-1: interface state COUNTRY_UPDATE->HT_SCAN
Sat Nov 10 15:39:19 2018 daemon.notice hostapd: wlan0-1: interface state HT_SCAN->DFS
Sat Nov 10 15:39:19 2018 daemon.notice hostapd: wlan0-1: DFS-CAC-START freq=5640 chan=128 sec_chan=-1, width=1, seg0=122, seg1=0, cac_time=60s
Sat Nov 10 15:40:23 2018 daemon.notice hostapd: wlan0-1: DFS-CAC-COMPLETED success=1 freq=5640 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5610 cf2=0
Sat Nov 10 15:40:23 2018 daemon.err hostapd: Using interface wlan0-1 with hwaddr ... and ssid "..."
Sat Nov 10 15:40:23 2018 daemon.notice hostapd: wlan0-1: interface state DFS->ENABLED
Sat Nov 10 15:40:23 2018 daemon.notice hostapd: wlan0-1: AP-ENABLED

Now what will happen when the upstream AP conforms to DFS and selects a new channel (which it occasionally does), I tested this by triggering a new DFS cycle on the Master AP. Well, the client loses its connection:

Sat Nov 10 15:47:15 2018 kern.info kernel: [12536.647600] wlan0: deauthenticated from ... (Reason: 3=DEAUTH_LEAVING)

and the repeater stops working, while happily signaling its AP on channel 128. So setting a channel makes the (repeater) AP work (somehow), but breaks the Client, because it doesn't follow the Master AP to its channel anymore (on 2.4 GHz it does BTW).

Findings so far:

Setting the channel to "auto" makes the Client work, but breaks the Master. Client successfully follows its upstream AP, if that changes frequency (as it is supposed to do).

Setting the channel to a fixed value, makes the Master work, but breaks the Client, unless its upstream AP accidentally happens to be on this channel. Once the upstream AP changes frequency, Client loses connection forever.

Yes, i use only in repeater ( relayd ) mode

My master router is a Orange Livebox4 and not support WDS

But technically this isn't a wireless repeater at all then, because the WRT1200AC then can't accept any wireless clients. Or do I miss something?

my network configuration in repeater mode ( relayd ) :
Mac Addr are fanciful


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 'fdb4:8fd7:e657::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0 eth0.1 eth0.2'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.1.1'
        option dns '192.168.1.1 8.8.8.8'
        option ipaddr '192.168.2.252'
        option macaddr 'D4:5F:25:EA:F9:96'
        option igmp_snooping '1'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'D4:5F:25:EA:F9:94'

config device 'wan_dev'
        option name 'eth0.2'
        option macaddr 'D4:5F:25:EA:F9:95'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 6t'
        option vid '2'

config interface 'wwan'
        option proto 'static'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '192.168.1.1 8.8.8.8'
        option ipaddr '192.168.1.252'

config interface 'stabridge'
        option proto 'relay'
        list network 'lan'
        list network 'wwan'
        option ipaddr '192.168.1.252'


WDS isn't the issue here, all my APs support WDS (works pretty well and as intended on 2.4 GHz).

At least by (incorrectly) setting the channel on the WRT1200AC I got the 5 GHz repeater to work. But it breaks down once the upstream AP does DFS and moves to another frequency, unless I manually adjust the channel on the WRT1200AC every time this happens.

Does your Orange Livebox4 never ever change the channel?

With my Livebox 4 the radio channel is automatic ( 100 ) for use DFS channels

Try setting up a 5 GHz AP on the WRT1200AC and see how it fails as well.

It's been a while since I used wds on my wrt1200, but it did work fine on both 2 & 5ghz. I think @lantis1008 was on the right track, have you tried setting master to one of the lower non-dfs channels (36-48)?

I have modified with AP -> option disabled '0' and run always no problem

--

Only a little bug -> no host IP address

The higher non DFS (149 up) channels don't work on the WRT1200AC (radio stays disabled, no client connection). Channel 36 (the only other non-DFS choice) is too congested and full of noise, AP-AP connection is worse than 2.4 GHz due too low transmit power and the Master AP quickly selects a new less congested channel.

Currently the (broken) configuration with manually setting the channel to 128 on the WRT1200AC at least brought the 5 GHz repeater AP up temporarily (only as long as the Master AP stays on channel 128).

So something in hostapd's or the drivers frequency selection is broken. While LuCI displays Locked to channel 128 used by: Client "..." that "lock" doesn't actually work. It has to read "option channel 128" from /etc/config/wireless file to be able to enable the WDS Slave (repeating) AP on correct channel, if I remove the channel or set it to "auto" it simply ends up with something like this:

hostapd: wlan0-1: DFS-CAC-START freq=5260 chan=52 sec_chan=1, width=1, seg0=58, seg1=0, cac_time=60s
hostapd: wlan0-1: DFS-CAC-COMPLETED success=1 freq=5260 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5290 cf2=0
hostapd: Using interface wlan0-1 with hwaddr ... and ssid "..."
hostapd: wlan0-1: interface state DFS->ENABLED
hostapd: wlan0-1: AP-ENABLED
hostapd: Failed to check if DFS is required; ret=-1
hostapd: Failed to set beacon parameters

DFS on a WDS Slave AP doesn't make any sense anyway, as the Master already controls access to the channel.

On 2.4 GHz option channel "auto" does the correct thing, it enables the 2.4 GHz WDS Slave (repeater) AP on the correct channel: that of the Client communicating to the Master and if the Master changes frequency, the WDS Client moves with it. Somehow this doesn't work at all on 5 GHz.

I'm a little lost on what your current settings are, but it still sounds like you're choosing auto for channel selection and I really think that's where the problem is, setting a non-dfs channel on the gateway router and the same non-dfs channel on the AP should work, as far as I know 128 is a dfs channel.