Modify

Opened 4 years ago

Closed 3 years ago

#17323 closed enhancement (fixed)

Add 802.11ac support to luci UI

Reported by: anatolik Owned by: jow
Priority: normal Milestone:
Component: luci Version: Trunk
Keywords: 802.11ac Cc:

Description

I've got TP-LINK Archer C7 V2, installed OpenWRT and discovered that UI shows my router as 802.11n hw.

Here is what 'wifi detect' generates. It works. I am able to connect to this channel from my devices.

root@OpenWrt:/etc/config# cat wireless
config wifi-device  radio0
	option type     mac80211
	option channel  36
	option hwmode   11a
	option path	'pci0000:01/0000:01:00.0'
	option htmode   VHT80

config wifi-iface
	option device radio0
	option network lan
	option mode ap
	option ssid FOOBAR
	option encryption psk2
	option key foobar

admin/network/wireless shows my device as "Generic MAC80211 802.11n (radio0)".

If I edit wireless settings I see that it sets radio section to

root@OpenWrt:/etc/config# cat wireless
config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option path 'pci0000:01/0000:01:00.0'
	option txpower '17'
	option country 'US'

it loses 'hwmode' option.

Attachments (0)

Change History (31)

comment:1 Changed 4 years ago by anatolik

I am a newbe to openwrt sources but I spotted several places:

openwrt should add AC to hwmodelist

diff --git a/package/network/utils/iwinfo/src/iwinfo_lua.c b/package/network/utils/iwinfo/src/iwinfo_lua.c
index 9b7d655..b5842b2 100644
--- a/package/network/utils/iwinfo/src/iwinfo_lua.c
+++ b/package/network/utils/iwinfo/src/iwinfo_lua.c
@@ -499,6 +499,9 @@ static int iwinfo_L_hwmodelist(lua_State *L, int (*func)(const char *, int *))
                lua_pushboolean(L, hwmodes & IWINFO_80211_N);
                lua_setfield(L, -2, "n");
 
+               lua_pushboolean(L, hwmodes & IWINFO_80211_AC);
+               lua_setfield(L, -2, "ac");
+
                return 1;
        }

luci itself should add "ac" to several places, like this (?? not sure about the second file diff)

diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
index 97d900d..1d1eaa8 100644
--- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
+++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
@@ -36,6 +36,8 @@ You may obtain a copy of the License at
                                if bl.b then bands = bands .. "b" end
                                if bl.g then bands = bands .. "g" end
                                if bl.n then bands = bands .. "n" end
+                               if bl.ac then bands = bands .. "ac" end
+
                        end
 
                        local hw = dev.iwinfo.hardware_name
diff --git a/modules/base/luasrc/model/network.lua b/modules/base/luasrc/model/network.lua
index a409621..d504a03 100644
--- a/modules/base/luasrc/model/network.lua
+++ b/modules/base/luasrc/model/network.lua
@@ -1274,6 +1274,7 @@ function wifidev.get_i18n(self)
        if l.b then m = m .. "b" end
        if l.g then m = m .. "g" end
        if l.n then m = m .. "n" end
+       if l.ac then m = m .. "ac" end
 
        return "%s 802.11%s Wireless Controller (%s)" %{ t, m, self:name() }
 end

Anyway it would be really great if somebody who has more experience with OpenWRT look at this issue. I'll be glad to test it and provide feedback.

Last edited 4 years ago by anatolik (previous) (diff)

comment:2 Changed 4 years ago by xbarmar

I've posted two patches to address this (luci admin-full module):

If you could test it please and share your feedback.

Thanks

comment:3 Changed 4 years ago by anatolik

I've compiled the sysupgrade image with your changes for my Archer C7 V2. Luci looks really good. It properly recognizes my router as 802.11nac and allows me to modify properties (channel/VHT mode etc). Good job Bartosz!

Any estimation when other users can see the fixes in svn trunk & daily builds?

comment:4 Changed 4 years ago by swalker

  • Owner set to jow
  • Status changed from new to assigned

comment:5 Changed 3 years ago by noblem

I've also tested the above changes and confirm that to the wifi overview page, the device is show as a generic nac device. On the advance settings, the band is correctly displayed and the various VHT modes are availble and build the correct config.

All looks good from what I can see

comment:6 Changed 3 years ago by anonymous

Is there any reason why the changes still not merged? For me the patches look right and work as I expect. Using it for ~3weeks, no problems so far.

comment:7 follow-up: Changed 3 years ago by jow

The patch creates a deprecated wireless configuration (hwmode 11nac) while current trunk expects hwmode 11a + vhtmode ... - didn't find time to rework it yet.

comment:8 in reply to: ↑ 7 Changed 3 years ago by xbarmar

Replying to jow:

The patch creates a deprecated wireless configuration (hwmode 11nac) while current trunk expects hwmode 11a + vhtmode ... - didn't find time to rework it yet.

I've posted a v2 to address this:
http://patchwork.openwrt.org/patch/6205/
http://patchwork.openwrt.org/patch/6206/

comment:9 Changed 3 years ago by anatolik

I tested the latest changes and everything looks fine. The previous issue (channel got disabled on a property modification) is fixed. Thanks xbarmar!

comment:10 Changed 3 years ago by anonymous

Any news on a targeted release for these patches? I have a TP-Link Archer C7 V2 and would love to give this a shot.

comment:11 Changed 3 years ago by anatolik

I am also surprised by the fact that openwrt/luci team does not care about 11AC routers support. And it is a bit disappointing as all new routers mostly 11AC. "Archer C7 V2" is one of such highly popular routers.

Good news is that we have a patch for 11AC support in openwrt/luci. I use it for 2 months and no problems so far.
Bad news is that it requires openwrt compilation and not that many people ready to spend time to do this.

comment:12 Changed 3 years ago by anonymous

So I have OpenWRT building properly from source for the Archer C7 V2 but I'm not sure where to drop the .patches. Guidance on the steps you took would be great!

comment:13 Changed 3 years ago by anonymous

So I have OpenWRT building properly from source for the Archer C7 V2 but I'm not sure where to drop the .patches. Guidance on the steps you took would be great!

comment:14 Changed 3 years ago by anonymous

Got the patches applied and rebuild from source. I can also verify they appear to work properly.

comment:15 Changed 3 years ago by beatstream

Plz change the title of ticket. There is no 801.11ac, we have 802.11ac =)

comment:16 Changed 3 years ago by florian

  • Summary changed from Add 801.11ac support to luci UI to Add 802.11ac support to luci UI

comment:17 Changed 3 years ago by anonymous

Is there anyone who can pull this patch to the newest version of the luci package? Ideally soon enough so that it could make its place into the final release of the Barrier Breaker?

comment:18 Changed 3 years ago by anonymous

Any word yet? I'd like for this to be applied, or a link that explains how to build with the patch.

comment:19 Changed 3 years ago by anonymous

I'd also like to get this merged, what is the reason now to not do it?

comment:20 Changed 3 years ago by anonymous

Think luci and openwrt are great projects and appreciate all the work the devs put into them. That said, I've been pretty excited waiting for ac support to get merged into trunk. :)

comment:21 Changed 3 years ago by fanthos

2 steps to apply the patch on 14.07

  1. Install new version of iwinfo_lua
    touch /usr/bin/default_postinst
    chmod +x default_postinst
    opkg install --force-checksum http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/base/libiwinfo-lua_51_ar71xx.ipk
    

2.Patch lua files manually
http://patchwork.openwrt.org/patch/6206/

Last edited 3 years ago by fanthos (previous) (diff)

comment:22 Changed 3 years ago by anatolik

I see that both commits were merged to the source repository. Is the issue can be closed now?

Can anybody confirm that 11AC UI works in snapshot version (https://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-archer-c7-v2-squashfs-sysupgrade.bin)?

comment:23 Changed 3 years ago by pdffs

@anatolik, the ath10k driver appears to be completely missing from that build right now, so I can't confirm anything about the UI without building a custom image.

comment:24 Changed 3 years ago by noblem

I'm not seeing any obvious issues using a custom build, Luci reports the wlan0 is 'Qualcomm Atheros QCA9880 802.11nac', the band is 5GHZ 802.111 n+ac and I'm able to select the appropriate VHT modes. Any changes result in a value wireless config file being built

comment:25 Changed 3 years ago by anonymous

I compiled HEAD version of openwrt and everything seems fine. I believe the ticket is resoled.

comment:26 Changed 3 years ago by anonymous

How can i apply these patches?

comment:27 follow-up: Changed 3 years ago by anatolik

The patches are already merged, so you don't need to apply/compile anything.

The easiest thing to try 11ac support is to use openwrt snapshot file from https://downloads.openwrt.org/snapshots/trunk/ar71xx/
As it was mentioned earlier the Archer-C7-V2 image file does not include ath10k (*) so you need to install it separately with opkg: "opkg install kmod-ath10k"

*) It worth filing a separate bug, the image should include ath10k module by default.

comment:28 in reply to: ↑ 27 Changed 3 years ago by pdffs

Replying to anatolik:

As it was mentioned earlier the Archer-C7-V2 image file does not include ath10k (*) so you need to install it separately with opkg: "opkg install kmod-ath10k"

*) It worth filing a separate bug, the image should include ath10k module by default.

When I tried it, the module was not compiled at all - it was not available in the repos either.

comment:29 Changed 3 years ago by mkhpalm

I just tried it from snapshots after "pkg install kmod-ath10k". I think you can close the ticket now. Luci shows 802.11nac just fine and iwinfo shows (something like):

wlan0 ESSID: "OpenWrt"

Access Point: E8:94:F6:92:43:5A
Mode: Master Channel: 157 (5.785 GHz)
Tx-Power: 30 dBm Link Quality: unknown/70
Signal: unknown Noise: -105 dBm
Bit Rate: unknown
Encryption: WPA2 PSK (CCMP)
Type: nl80211 HW Mode(s): 802.11nac
Hardware: 168C:003C 0000:0000 [Qualcomm Atheros QCA9880]
TX power offset: none
Frequency offset: none
Supports VAPs: yes PHY name: phy0

wlan1 ESSID: "OpenWrt"

Access Point: E8:94:F6:21:53:8B
Mode: Master Channel: 5 (2.432 GHz)
Tx-Power: 25 dBm Link Quality: 70/70
Signal: -34 dBm Noise: -95 dBm
Bit Rate: 58.5 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: phy1

comment:30 Changed 3 years ago by hlarsen

i can confirm this seems to be correct on an Archer C7 v2 running CC r45027 after installing kmod-ath10k:

LuCI displays Qualcomm Atheros QCA9880 802.11nac (radio1)

root@villa:~# iwinfo
wlan0 ESSID: "somessid"

Access Point: C4:6E:1F:73:50:C0
Mode: Master Channel: 157 (5.785 GHz)
Tx-Power: 30 dBm Link Quality: 49/70
Signal: -61 dBm Noise: -109 dBm
Bit Rate: 6.0 MBit/s
Encryption: WPA2 PSK (CCMP)
Type: nl80211 HW Mode(s): 802.11nac
Hardware: 168C:003C 0000:0000 [Qualcomm Atheros QCA9880]
TX power offset: none
Frequency offset: none
Supports VAPs: yes PHY name: phy0

...

comment:31 Changed 3 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.