Adding OpenWrt support for MikroTik cAP ac

I'm not sure what that means by certain devices. Perhaps https://github.com/openwrt/openwrt/pull/4679 is needed for some models?

What he meant is that it will work for devices that are from the same batch, ofhers may have reduced wlan performance without dynamic BDF PR

Hi robimarko,

Many thanks for your efforts.

Can the openwrt page for CAP AC be updated to reflect this addition to master branch? Or almost finished?

If it's not yet in master, can you provide a link to a build, and installation instructions to get from stock please?

Cheers

I just did thr dynamic BDF, not the entire cAP ac support

@alaraun are you responsible for updating the support page? If your PR is now merged, and robimarko PR is also merged, then we're good to go?

Helo everyone,

Came here to get 802.11r running on my MT devices.
I just tested the latest snapshot as of July 15th with a cap-ac and hap-ac3.
Well, with a 1Gbps Internet downlink, an a client connected via LAN, I can only get 345Mbps (both, cap-ac and hap-ac3).
When setting the device in dump-AP mode, adding eth1 and eth2 to the bridge, I get 590Mbps on the cap- ac and 745Mbps on the hap-ac3.

Wifi performance is at best at bit above standard MT wifi drivers, while wifiwave2 in ROSv7 on the hap-ac3 delivers up to twice the performance (280Mbps vs. 590+Mbps on 5Ghz band)

Am I doing something wrong or is this as good as it gets?

Hello VanillaFord,

could you please summarize your results?

2.4 GHz (20 MHz)

  • cAP ac with RouterOS 6.x / 7.x: ?
  • cAP ac with OpenWrt 22.03 snapshot: ?
  • hAP ac3 with RouterOS 6.x / 7.x: ?
  • hAP ac3 with OpenWrt 22.03 snapshot: ?
  • hAP ac3 with MikroTik´s wifiwave2 package: ?

5 GHz (80 MHz)

  • cAP ac with RouterOS 6.x / 7.x: ?
  • cAP ac with OpenWrt 22.03 snapshot: ?
  • hAP ac3 with RouterOS 6.x / 7.x: ?
  • hAP ac3 with OpenWrt 22.03 snapshot: ?
  • hAP ac3 with MikroTik´s wifiwave2 package: ?

...first I want to know why even LAN/WAN traffik can not saturate the 1Gbps Link, which both devices can on ROSv6 and v7 just fine.
Without that, using openWRT on these MT devices is pretty useless and WiFi performance will see a side effect from that, I am sure.

So, did I do something wrong? Is there a package, that installs as a dump AP right away, to rule out a possible user error?

as a teaser, this I did a while back, with my Samsung S20FE phone:

...openWRT 22.03 snapshot only gave me 280Mbps :zipper_mouth_face:

1 Like

So, I downloaded OpenWrt 22.03.0-rc6 and flashed it on to a cAP ac.
First insights:

  1. DSA is different
  2. VLANs on IPQ40xx is different

To cut a long story short, how can I use the cAP ac as a dumb access point with tagged VLAN for wireless traffic in and outgoing on its WAN interface?

Network / Switch

  • So, "CPU(eth0)" is a kind of master port, which has to be tagged as well when I want to tag the uplink interfaces, i.e. WAN (eth0.2)

    Network / Interfaces / Devices
  • After creating VLAN 1000, 2000 and 3000 on the switch, new devices appeared as devices, i.e. "eth0.2.1000", "eth0.2.2000", "eth0.2.3000"
    Network / Interfaces
  • I created new interfaces, unmanaged, with "eth0.2.1000", "eth0.2.2000", "eth0.2.3000"
  • For testing purposed I activated DHCP client on e.g. "eth0.2.1000" and it received an IP address from the layer 3 switch the WAN-port (eth0.2) is connected to within the VLAN 1000
    Network / Wireless
  • I setup an SSID on wlan0 selected the Interfaces of "eth0.2.1000" and saved.
  • When I connected to, the client didn´t receive any IP address from VLAN 1000
    Network / Interfaces / Devices
  • So I wanted to create a bridge and put in the WAN-port (eth0.2) and wlan0, except I couldn´t save it.

Has anyone succeded configuring a working SSID with tagged VLAN on the uplink port? If so, could you please share screenshots of your settings?

I did it like this (AP has only one eth port)

config device
        option name 'br-lan10'
        option type 'bridge'
        option bridge_empty '1'
        list ports 'eth0.10'

config interface 'lan-lan10'
        option proto 'none'
        option device 'br-lan10'
        option defaultroute '0'
        option peerdns '0'
        option delegate '0'

config wifi-iface 'wifinet1'
	option device 'radio0'
	option mode 'ap'
	option ssid 'lan10'
	option network 'lan-lan10'
      option disabled '0'
1 Like

First, thanks to the developers who got this image baked for us to download. It's really cool to get 802.11r on mikrotik with openwrt. I'm trying to get my device working with OpenWRT. I am a dev, but no experience with wifi or embedded. My goal is to use this as a dumb access point: I want to bring in tagged VLAN traffic on the wan port and split into three SSIDs. I have three other devices with this same vlan setup, each different hardware (archer a7, nighthawk 6700, eap615)

I'm having issues with my device crashing. It seems to happen when I use wifi. I first feared power issues, so used the OEM PSU. After reading logs, I see there are kernel warnings and after some amount of traffic the device becomes unresponsive on all interfaces. I can get some throughput some times, but generally it crashes before completing a web speed test.

my setup:

  • running openwrt-ipq40xx-mikrotik-mikrotik_cap-ac-initramfs-kernel.bin
  • ram fs; not flashed, netbooting each time
  • installing luci to get GUI since i'm not quick with scp/files/uci
  • wan port on a bridge
  • bridge vlan filtering; i think this is the "new" DSA technique

Log output:

Thu May 11 21:09:07 2023 kern.err kernel: [ 1954.481329] ath10k_ahb a000000.wifi: Cannot communicate with firmware, previous wmi cmds: 36965:165144 40859:165144 37004:164840 36965:164736, jiffies: 165449, attempting restart restart firmware, dev-flags: 0 x142
...
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.225691] ieee80211 phy1: Hardware restart was requested
Thu May 11 21:09:09 2023 kern.err kernel: [ 1956.227298] ath10k_ahb a800000.wifi: firmware crashed! (guid 62fde83e-073b-4519-8de9-b295182da434)
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.230223] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
Thu May 11 21:09:09 2023 kern.warn kernel: [ 1956.231933] ath10k_ahb a000000.wifi: removing peer, cleanup-all, deleting: peer 60374022 vdev: 0 addr: 18:fd:74:1c:b3:99
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.239152] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.255918] ieee80211 phy0: Hardware restart was requested
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.263192] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.279477] ath10k_ahb a800000.wifi: board_file api 1 bmi_id N/A crc32 6909f41a
Thu May 11 21:09:09 2023 kern.info kernel: [ 1956.301625] ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
client_loop: send disconnect: Broken pipe

Any answers would be helpful, also wondering...
Has anyone else gotten tagged vlans and 2+ SSIDs working with this hardware?
Has anyone seen similar output to this?
Is this a common failure mode?
Is this because I haven't flashed my onboard storage? I want to find out why I'm crashing before flashing if possible.
Do I need to post more info?

Quite possibly. ath10k is memory hungry. On devices with (relatively) little memory, a custom package kmod-ath10k-ct-smallbuffers is used which reduces ath10k memory usage, but because of OpenWrt build system limitations, it does not get used in the initramfs images built with buildbot (TARGET_PER_DEVICE_ROOTFS, maybe) settings. I cannot remember, but there may also be issues replacing packages in the initramfs build. Check with opkg list-installed | grep ath10k on device to confirm. Once you install, and reboot, you should get the smallbuffers variant.

There is some work being done to make this a module option, and/or automatic, rather than a different compiled ath10k build: https://github.com/openwrt/openwrt/pull/11584
If you build your own image, building for only this device may work, otherwise you can switch ath10k to the smallbuffers variant in the target level Makefile: https://github.com/openwrt/openwrt/blob/0ce356bbba44ae573aca7104ca4d547bcdf816c5/target/linux/ipq40xx/Makefile#L19.

ath10k-ct has some additional options for configuring the wifi firmware, but very few should need them: https://www.candelatech.com/ath10k-10.4.php

1 Like

Do you know where I can find an initramfs image with the firewall disabled?

I'm too lazy to remove the AP from the ceiling.

compile one ? :slight_smile:

1 Like

Hi, I have CAP AC with 256MB of memory, but when I compiled the firmware and use it, it only detects 128MB.
How to fix it?

The second value here is size in bytes 0x08000000/(2**20) == 128.0MiB

Hi, Thank you for the pointer, but apologies, I don't fully understand. So to change the memory value to 256MiB I need to replace the second hex to 0x10000000? Is it correct?

1 Like

Openwrt is now running at 256mb of ram

2 Likes

And if you did - do share. :slight_smile:

try using ath10k-firmware-qca988x and kmod-ath10k-smallbuffers (not CT, but GPL drivers)