5GHz Wifi AP does not show up (TL WDR4300)

(Reposting here for I did not get any answer in the "installing OpenWRT forum. Sorry for the cross-posting)

Hello all

I am trying to use a TL WDR4300 with OpenWRT 19.07 (TP-Link TL-WDR4300 v1, Atheros AR9344 rev 2, OpenWrt 19.07.2 r10947-65030d81f3 / LuCI openwrt-19.07 branch git-20.057.55219-13dd17f) to create some WiFi extensions in another building where I get the Internet only with WiFi. The main router is an Orange Livebox 4 (dual band).
I have set up the LAN interface of the OpenWRT device to be static (in another subnet than the main router's LAN/WLAN).
On the OpenWRT device, I have scanned the available WiFi networks and joined the OpenWRT to the WiFi networks of the main router: I then have 2 Wireless clients, one in the 2,4GHz and one in the 5GHz. The wireless clients do work.

I have then created 2 wireless access points, one in the 2,4GHz and one in the 5GHz.
I have configured the networks accordingly, configured the FW to allow all traffic between the WWAN and LAN networks, with masquerading enabled.
The 2,4GHz AP shows up and I can connect devices to it, and the traffic is correctly routed/NATed.

The problem I have is that the 5GHz AP does not show up and no device can use it.
I have set the country code for the 5GHz driver to be FR (this is where I live).
No change.
I have set it to be IN (INdia) and the AP then sometimes shows up, but it is not stable (and it is not allowed here anyway).

I understand that this is certainly related to channel assignments/configuration.
The 5GHz Wifi Client uses N mode, channel 100 and 20MHz width.
I tried to set the 5GHz AP to use the same settings, I tried to play with the parameters, with no luck so far.

I could use some help or resources. I have a decent understanding of the logical layers in the network config, but I may miss some understanding of the physical implications, especially with channel assignments...

Thanks in advance for your help!

I have moved the topic to the correct category, no worries.

Please post here the output of the following commands, copy and paste the whole block:

uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
wifi status ; iwinfo ; iw list

I found a workaround: I have managed to set the main AP (Orange Livebox v4) to use Channel 44 (it wanted to use channel 100 in automatic mode).
The TL WDR4300 joined the Livebox' 5GHz on Channel 44 and then, bim! My 5GHz wifi AP appeared. I am currently reading about DFS, I am pretty sure that this has something to do (but I can't understand what yet).

Here are the outputs of the commands:

root@OpenWrt:~# uci export network
package 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 'fd7c:080f:a7c2::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.4.1'
        option ifname 'eth0 eth0.1 eth0.2'

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

config device 'wan_eth0_2_dev'
        option name 'eth0.2'
        option macaddr 'e8:94:f6:cd:44:15'

config interface 'wan6'
        option ifname 'eth0.2'
        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 '2 3 4 5 0t'

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

config interface 'wwan'
        option proto 'dhcp'

config interface 'WWAN6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'

config interface 'WLAN'
        option proto 'static'
        option type 'bridge'
        option gateway '192.168.4.1'
        list ipaddr '192.168.4.2'
        option ip6assign '64'
        option ifname 'eth0'

root@OpenWrt:~# uci export wireless;
package wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ahb/18100000.wmac'
        option htmode 'HT20'
        option country 'FR'
        option txpower '20'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option key 'GHjgdebhuihahsajh'
        option ssid 'WifiDuGite'
        option encryption 'psk2'
        option network 'lan'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option txpower '21'
        option htmode 'HT20'
        option channel 'auto'
        option country 'FR'

config wifi-iface 'wifinet3'
        option ssid 'WifiDuChalet'
        option device 'radio0'
        option mode 'sta'
        option key 'ghgdghdhgh87'
        option encryption 'psk2'
        option network 'wwan'

config wifi-iface 'wifinet2'
        option ssid 'WifiDuChalet'
        option device 'radio1'
        option mode 'sta'
        option key 'ghgdghdhgh87'
        option network 'wwan'
        option encryption 'psk2'

config wifi-iface 'wifinet4'
        option encryption 'psk2'
        option device 'radio1'
        option mode 'ap'
        option network 'lan'
        option key 'GHjgdebhuihahsajh'
        option ssid 'WifiDuGite_5GHz'

root@OpenWrt:~# uci export dhcp
package dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option start '50'
        option force '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'NEWWIFI'
        option interface 'NEWWIFI'
        option ignore '1'
		
root@OpenWrt:~# uci export firewall
package firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option network 'lan'

config zone
        option name 'wan'
        option output 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option network 'wan wan6 WWAN6 wwan'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config include
        option path '/etc/firewall.user'

config forwarding
        option dest 'lan'
        option src 'wan'

config zone
        option network 'WLAN'
        option input 'ACCEPT'
        option forward 'ACCEPT'
        option name 'WLAN'
        option output 'ACCEPT'

root@OpenWrt:~# wifi status
{
        "radio0": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": false,
                "config": {
                        "hwmode": "11g",
                        "path": "platform/ahb/18100000.wmac",
                        "htmode": "HT20",
                        "country": "FR",
                        "txpower": 20,
                        "channel": "auto"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "ifname": "wlan0-1",
                                "config": {
                                        "mode": "ap",
                                        "key": "GHjgdebhuihahsajh",
                                        "ssid": "WifiDuGite",
                                        "encryption": "psk2",
                                        "mode": "ap",
                                        "network": [
                                                "lan"
                                        ]
                                }
                        },
                        {
                                "section": "wifinet3",
                                "ifname": "wlan0",
                                "config": {
                                        "ssid": "WifiDuChalet",
                                        "mode": "sta",
                                        "key": "ghgdghdhgh87",
                                        "encryption": "psk2",
                                        "mode": "sta",
                                        "network": [
                                                "wwan"
                                        ]
                                }
                        }
                ]
        },
        "radio1": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": false,
                "config": {
                        "hwmode": "11a",
                        "path": "pci0000:00/0000:00:00.0",
                        "txpower": 21,
                        "htmode": "HT20",
                        "channel": "auto",
                        "country": "FR"
                },
                "interfaces": [
                        {
                                "section": "wifinet2",
                                "ifname": "wlan1",
                                "config": {
                                        "ssid": "WifiDuChalet",
                                        "mode": "sta",
                                        "key": "ghgdghdhgh87",
                                        "encryption": "psk2",
                                        "mode": "sta",
                                        "network": [
                                                "wwan"
                                        ]
                                }
                        },
                        {
                                "section": "wifinet4",
                                "ifname": "wlan1-1",
                                "config": {
                                        "encryption": "psk2",
                                        "mode": "ap",
                                        "key": "GHjgdebhuihahsajh",
                                        "ssid": "WifiDuGite_5GHz",
                                        "mode": "ap",
                                        "network": [
                                                "lan"
                                        ]
                                }
                        }
                ]
        }
}

root@OpenWrt:~# iwinfo
wlan0     ESSID: "WifiDuChalet"
          Access Point: E8:94:F6:CD:44:13
          Mode: Client  Channel: 13 (2.472 GHz)
          Tx-Power: 17 dBm  Link Quality: 55/70
          Signal: -55 dBm  Noise: -95 dBm
          Bit Rate: 130.0 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

wlan0-1   ESSID: "WifiDuGite"
          Access Point: EA:94:F6:CD:44:13
          Mode: Master  Channel: 13 (2.472 GHz)
          Tx-Power: 17 dBm  Link Quality: 58/70
          Signal: -52 dBm  Noise: -95 dBm
          Bit Rate: 72.2 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

wlan1     ESSID: "WifiDuChalet"
          Access Point: E8:94:F6:CD:44:14
          Mode: Client  Channel: 44 (5.220 GHz)
          Tx-Power: 18 dBm  Link Quality: 47/70
          Signal: -63 dBm  Noise: -93 dBm
          Bit Rate: 6.0 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11an
          Hardware: 168C:0033 168C:A120 [Atheros AR9580]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

wlan1-1   ESSID: "WifiDuGite_5GHz"
          Access Point: EA:94:F6:CD:44:14
          Mode: Master  Channel: 44 (5.220 GHz)
          Tx-Power: 18 dBm  Link Quality: 54/70
          Signal: -56 dBm  Noise: -93 dBm
          Bit Rate: 65.0 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11an
          Hardware: 168C:0033 168C:A120 [Atheros AR9580]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

root@OpenWrt:~# iw list
Wiphy phy1
        max # scan SSIDs: 4
        max scan IEs length: 2261 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Available Antennas: TX 0x7 RX 0x7
        Configured Antennas: TX 0x7 RX 0x7
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
                 * outside context of a BSS
        Band 2:
                Capabilities: 0x11ef
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-23
                Frequencies:
                        * 5180 MHz [36] (21.0 dBm)
                        * 5200 MHz [40] (21.0 dBm)
                        * 5220 MHz [44] (21.0 dBm)
                        * 5240 MHz [48] (21.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                        * 5500 MHz [100] (21.0 dBm) (radar detection)
                        * 5520 MHz [104] (21.0 dBm) (radar detection)
                        * 5540 MHz [108] (21.0 dBm) (radar detection)
                        * 5560 MHz [112] (21.0 dBm) (radar detection)
                        * 5580 MHz [116] (21.0 dBm) (radar detection)
                        * 5600 MHz [120] (21.0 dBm) (radar detection)
                        * 5620 MHz [124] (21.0 dBm) (radar detection)
                        * 5640 MHz [128] (21.0 dBm) (radar detection)
                        * 5660 MHz [132] (21.0 dBm) (radar detection)
                        * 5680 MHz [136] (21.0 dBm) (radar detection)
                        * 5700 MHz [140] (21.0 dBm) (radar detection)
                        * 5745 MHz [149] (13.0 dBm)
                        * 5765 MHz [153] (13.0 dBm)
                        * 5785 MHz [157] (13.0 dBm)
                        * 5805 MHz [161] (13.0 dBm)
                        * 5825 MHz [165] (13.0 dBm)
        valid interface combinations:
                 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
                   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Supported extended features:
                * [ RRM ]: RRM
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
                * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
                 * outside context of a BSS
        Band 1:
                Capabilities: 0x11ef
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
        valid interface combinations:
                 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
                   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Supported extended features:
                * [ RRM ]: RRM
                * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
                * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
                * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs

I am still very interested in the explanation regarding the problem with "DFS" channels... And of course, any misconfiguration one could see and correct in my config...

Thanks in advance

I don't think the ath9k driver allows sta and AP at the same time on a DFS channel.

Also it doesn't work to trivially make two wifi links in parallel hoping for more bandwidth. In your config, only one is going to come up and attach to the wwan network since wwan is not a bridge. So use one band (usually 5) for the link to the main router.

2 Likes

Thank you so much for your answer

In your config, only one is going to come up and attach to the wwan network since wwan is not a bridge.

Would you then recommend to create a bridged wwan network? If so, how should I proceed?

Something else: prior to forcing the 5GHz channel of the main router to 44 (non-DFS), I experienced freezes on the OpenWrt-powered TL WDR4300. I lost most of ICMP packets when this arrived (I tested with a continuous ping loop). I had to rescan the network using the WiFi menu in LuCI and everything went well again, until it happened later. Now that I am using channel 44, it seems not to freeze anymore (but I still have to wait for a longer time to be sure it does not happen again). My question is: could those freezes be caused by DFS negotiation? What seems weird to me is that rescanning the 2.4GHz WiFi networks seemed to have better "un-freeze" results than rescanning the 5GHz networks. If anyone has some hints or leads, I could use that.

Thanks in advance and for all!

A regular STA client of a standard AP cannot be in a bridge. In order to fully bridge you need WDS, which is almost never supported by stock firmware of ISP routers. So again you should choose a band and run only one link back to the main router.

I have not actually tried this lately, but I think it is still the case that 5 GHz ath9k can't run AP and STA at the same time on a DFS channel. Also any time you run AP and STA at the same time on the same radio, the AP will shut down if the STA loses its connection to the other AP.

Thanks for that answer. I'll try to have the 5GHz link to the main router and the AP only on the 2,4Ghz interface. In that case, do you suggest to have only one AP (in 2.4GHz) and only one STA link (on the 5GHz interface)?

I have not actually tried this lately, but I think it is still the case that 5 GHz ath9k can't run AP and STA at the same time on a DFS channel. Also any time you run AP and STA at the same time on the same radio, the AP will shut down if the STA loses its connection to the other AP.

Ah, OK, it makes things a little clearer.

Yes that is a typical setup.