No Wireless Mikrotik RBD53iG-5HacD2HnD

I have installed the current 22.03.4 Version from https://downloads.openwrt.org/releases/22.03.4/targets/ipq40xx/mikrotik/ . When i click on network in the luci menu no Wireless item is showing up.
Log:

Sun Apr  9 12:27:57 2023 kern.info kernel: [   18.906088] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
Sun Apr  9 12:27:57 2023 kern.info kernel: [   18.906145] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Sun Apr  9 12:27:57 2023 kern.info kernel: [   18.918073] ath10k_ahb a000000.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
Sun Apr  9 12:27:57 2023 kern.info kernel: [   18.946397] ath10k_ahb a000000.wifi: Loading BDF type 0
Sun Apr  9 12:27:57 2023 kern.err kernel: [   19.362814] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
Sun Apr  9 12:27:57 2023 kern.err kernel: [   19.362879] ath10k_ahb a000000.wifi: failed to fetch board file: -12
Sun Apr  9 12:27:57 2023 kern.err kernel: [   19.371469] ath10k_ahb a000000.wifi: could not probe fw (-12)
Sun Apr  9 12:27:57 2023 kern.info kernel: [   20.339964] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
Sun Apr  9 12:27:57 2023 kern.info kernel: [   20.340034] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Sun Apr  9 12:27:57 2023 kern.info kernel: [   20.352138] 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
Sun Apr  9 12:27:57 2023 kern.info kernel: [   20.380258] ath10k_ahb a800000.wifi: Loading BDF type 0
Sun Apr  9 12:27:57 2023 kern.err kernel: [   20.788159] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
Sun Apr  9 12:27:57 2023 kern.err kernel: [   20.788239] ath10k_ahb a800000.wifi: failed to fetch board file: -12
Sun Apr  9 12:27:57 2023 kern.err kernel: [   20.796673] ath10k_ahb a800000.wifi: could not probe fw (-12)

from: https://github.com/greearb/ath10k-ct/blob/f808496fcc6b1f68942914117aebf8b3f8d52bb3/ath10k-5.10/core.c#L1838 type 0 is ATH10K_BD_IE_BOARD = 0,

#define ENOMEM12 /* Out of memory */

Will need to try to find why the BDF is not loading.

Could you please show the output of these:

find /sys/firmware/mikrotik/hard_config/wlan_data -type f -exec echo {} \; -exec sh -c "cat {} | wc" \; -exec hexdump -C -n 8 {} \;
dmesg | grep -i hardconfig
dmesg | grep -iE '(partition|0x000)'

. /lib/functions.sh
hexdump -C -s $((0x140)) -n 32 "/dev/mtd$(find_mtd_index hard_config)"

Could also try to unload the ath10k module, then modprobe it with debugging enabled: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k/debug

Output:

 OpenWrt 22.03.4, r20123-38ccc47687
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# find /sys/firmware/mikrotik/hard_config/wlan_data -type f -exec echo {} \; -exec sh -c "cat {} | wc" \;
-exec hexdump -C -n 8 {} \;
root@OpenWrt:~# dmesg | grep -i hardconfig
root@OpenWrt:~# dmesg | grep -iE '(partition|0x000)'
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000]   node   0: [mem 0x0000000080000000-0x0000000087dfffff]
[    0.000000]   node   0: [mem 0x0000000087e00000-0x0000000087ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff]
[    0.776637] 2 fixed-partitions partitions found on MTD device qcom_nand.0
[    0.784151] Creating 2 MTD partitions on "qcom_nand.0":
[    0.791016] 0x000000000000-0x000000a00000 : "kernel"
[    0.811554] 0x000000a00000-0x000008000000 : "ubi"
[    0.994858] 2 fixed-partitions partitions found on MTD device spi0.0
[    0.999743] OF: Bad cell count for /soc/spi@78b5000/flash@0/partitions
[    1.006090] OF: Bad cell count for /soc/spi@78b5000/flash@0/partitions
[    1.012662] Creating 2 MTD partitions on "spi0.0":
[    1.018886] 0x000000000000-0x000000080000 : "Qualcomm"
[    1.024320] 0x000000080000-0x000000100000 : "RouterBoot"
[    1.036457] 3 routerbootpart partitions found on MTD device RouterBoot
[    1.036496] Creating 3 MTD partitions on "RouterBoot":
[    1.041909] 0x00000000e000-0x000000010000 : "hard_config"
[    1.047574] 0x000000010000-0x000000017ea4 : "dtb_config"
[    1.053034] 0x00000003d000-0x00000003e000 : "soft_config"
[    6.961763] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000000002010010
root@OpenWrt:~# . /lib/functions.sh
root@OpenWrt:~# hexdump -C -s $((0x140)) -n 32 "/dev/mtd$(find_mtd_index hard_config)"
00000140  cc 02 00 00 00 00 00 00  16 00 d0 0a 37 37 5a 4c  |............77ZL|
00000150  03 23 a2 24 0a 00 18 44  85 f9 43 40 2f 96 0b 04  |.#.$...D..C@/...|
00000160

I have unload and reload the modul with debug parameter but when i want to create the trace.dat file with

trace-cmd record -e ath10k_log*

i get the following error

trace-cmd: No such file or directory
  opening '/sys/kernel/debug/tracing/tracing_on'

Thanks…

This is why…
The OpenWrt driver to unpack the Mikrotik board data (https://github.com/openwrt/openwrt/blob/e722b667c5a59bbd5aff787002f7f5457d0bf721/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c#L566) does not have the functionality to deal with this LZ77 data.
I think I previously worked out the block format for it, but I didn't have a need to build this into the driver: https://github.com/john-tho/routeros-wlan-lz77-decode.

It would help if you shared an image dump of your hard_config partition (does contain device-specific serial & MAC, but I would not share them, can PM me if wanting to keep private). That way we could test to see if my block format guess would still work for your LZ77 data. If so, someone would need to add this functionality to the driver, or (for now), you could extract the data, and add it to a board-2.bin file like was done before the Mikrotik per-device BDF PR: https://github.com/openwrt/openwrt/pull/4679

. /lib/functions.sh
dd if="/dev/mtd$(find_mtd_index hard_config)" of=/tmp/digga_hapac3_hard_config.bin iflag=fullblock

Thank you for your help, but i think i will do send back the Router and look for another device that run with OpenWrt.

If you are going to return it, this is a great time to provide us with the hard_config partition dump, so that someone can build the code to make the device work, please?
If you provide the hard_config partition dump, I should be able to make you a file (or an OpenWrt package) which should make wifi work for this device once you install it. Worth a try.

Devices only can run OpenWrt because people put it the effort to make them work.

1 Like

Hello all,

We do have a lot of this Mikrotik HAP AC3 in stock and we are facing the same issue.

I would like to help on this.
I can send you anything you need are give you access to a board by remote ssh.

Best regards,

@johnth Please find enclose the digga_hapac3_hard_config.bin in this link : https://5.182.168.144/digga_hapac3_hard_config.bin

Hope this can help

Best regards

Thanks jerome, yes, it did help, thanks. It had extra 0 bits after the last lz77 non-match group, so I had to include that possibility in my format.
You should get functioning wifi board/cal data via this draft PR (have had two successful tests now):

1 Like

Thank you to you for your investigation and commit. This is a great news and it's taking good way to keep support for mikrotik device and maybe the next one the ax2 model