Archer C7 v1 hardware with v2 5GHz chipset

Huh, I have this error after reboot:

[   11.145959] ath10k_pci: unknown parameter 'debug_mask' ignored

I have came back to the latest stable of OpenWrt because the snapshot wasn't usable at all.

sorry, didn't check if the image was built with debug enabled, now i check it isn't. i have several build dirs for this device and this one was just for testing snapshot.

what you can try is download this backup image of c7 v2 Archer C7 V1 and V2 need ART dump for flash recovery
extract ART from it, make backup of ART from your device and copy calibration data from downloaded ART at offset 0x5000 to the same offset of your ART, save it and upload back to your device

My understanding was that on boot, the calibration part of ART is copied to e.g. cal-pci-0000:01:00.0.bin, which is later loaded by the ath10k driver along with the board and firmware files. Is this unnecessary or not done any longer? Please explain or refer me to this decision.

i am not sure, since i don't have C7 v2 to try this out, but it is possible @mk24 is partially right here.
and here's why: none of these cards have an EEPROM chip, but the OTP part of main chip is used to store cal data. and cards shipped with C7 v2 don't even have that OTP region programmed so they needed to store cal in ART

you can see QCA9862 card's empty EEPROM pads on the image https://fccid.io/PPD-QCWB342/Internal-Photos/Photos-Internal-2022096.pdf
and WLE900VX even don't have EEPROM pads https://fccid.io/png.php?id=2643308&page=0 - it is industrial version in the photo (QCA9890) but is otherwise identical to QCA9880 version

I did some real testing to try get some conclusion here.

TLDR: For me, quick testing shows wifi works with the cal-data from the wrong C7v2.

All tests run on an Archer C7v2 with the ath79 snapshot image from today. I tested connecting to the 5Ghz wifi and running a speedtest using https://www.dslreports.com/

Testcases:

  1. Clean boot, no changes => wifi works, as expected.
  2. Replace cal-data with zeros (dd if=/dev/zero of=/lib/firmware/ath10k/cal-pci-0000\:00\:00.0.bin bs=2116 count=1) => ath10k firmware crashed when starting, no usable wifi.
  3. Replace cal-data with file from another C7v2 => works with usable wifi, my quick test shows similar performance as the correct cal-data. This may be pure coincidence, but at least it is one data point.

Some other observations:

  • If the cal-data file is missing, it is read from the ART partition of the same flash chip as OpenWrt is present on by the /etc/hotplug.d/firmware/11-ath10k-caldata script.
  • Copying the cal-data file from another AP gets you the wrong mac address, this is fixable as seen in the script just mentioned.

Going back to this threads original issue, i think @davewut can get it to work by flashing a correct firmware and either be lucky with the cal-data from the flash, or use cal-data from a different AP.

1 Like

Hi guys,

Thanks for the help, really, this is appreciated.

I'm not enough experienced to know how to extract the ART from a bin file. This is a first for me. Could you guys guide me with some command line example? I've played a lot with Linux in general, so I think I have a good general knowledge of it, but that thing is past what I've tried on my free time! :stuck_out_tongue:

If I'm following you correctly, I think the problem is that there is no calibration data found in the ART of my currently installed firmware. I must had had the same problem with the ath79 snapshot firmware suggested by @psyborg this weekend.

Is it possible that either the firmware or board bin file currently installed isn't properly downloading the cal data because it thinks that there must be a v1 5GHz hardware installed? Or maybe there is a fail safe that prevents the Archer C7 v1 to complete that step altogether to avoid bricking the device?

I tried to manually run the script at /etc/hotplug.d/firmware/11-ath10k-caldata but wasn't able to get any interesting results. I though I could debug why the cal file won't extract itself from the ART. Maybe we could start with this and then I'll try again to flash an ath79 snapshot version onto the router and see the results? For you information, I've only tried the snapshot version provided by @psyborg, so that time, if I end up installing it a second time, I will try the latest build.

BTW, just to be completely sure, here are the packages I've installed in order to make the ath10 come up during the boot:


And as you know, still have difficulties loading the cal data:

[    0.000000] Linux version 4.9.184 (buildbot@2ccc8102e0c3) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7808-ef686b7292) ) #0 Thu Jun 27 12:18:52 2019
[    0.000000] MyLoader: sysp=e5ede3a7, boardp=952505af, parts=fde76865
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 8044c434, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=ARCHER-C7  console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 124940K/131072K available (3393K kernel code, 178K rwdata, 448K rodata, 324K init, 211K bss, 6132K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[    0.000008] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[    0.008301] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.071195] pid_max: default: 32768 minimum: 301
[    0.076194] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.083239] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.092903] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103401] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.110878] NET: Registered protocol family 16
[    0.116808] MIPS: machine is TP-LINK Archer C7
[    0.124624] ar724x-pci ar724x-pci.0: PCIe link is down
[    0.130127] registering PCI controller with io_map_base unset
[    0.136348] registering PCI controller with io_map_base unset
[    0.631940] PCI host bridge to bus 0000:00
[    0.636345] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    0.643659] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.649591] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.656806] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.665250] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.665351] PCI host bridge to bus 0000:01
[    0.669709] pci_bus 0000:01: root bus resource [mem 0x12000000-0x13ffffff]
[    0.677034] pci_bus 0000:01: root bus resource [io  0x0001]
[    0.682954] pci_bus 0000:01: root bus resource [??? 0x00000000 flags 0x0]
[    0.690179] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.698625] pci 0000:01:00.0: [168c:003c] type 00 class 0x028000
[    0.698663] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.698712] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.698779] pci 0000:01:00.0: supports D1 D2
[    0.698946] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.698969] pci 0000:01:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[    0.706785] pci 0000:01:00.0: BAR 6: assigned [mem 0x12200000-0x1220ffff pref]
[    0.714472] pci 0000:01:00.0: using irq 41 for pin 1
[    0.722442] clocksource: Switched to clocksource MIPS
[    0.728676] NET: Registered protocol family 2
[    0.734112] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.741534] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.748338] TCP: Hash tables configured (established 1024 bind 1024)
[    0.755179] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.761407] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.768312] NET: Registered protocol family 1
[    0.773007] PCI: CLS 0 bytes, default 32
[    0.775253] Crashlog allocated RAM at address 0x3f00000
[    0.781679] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.794323] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.800525] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.818664] io scheduler noop registered
[    0.822871] io scheduler deadline registered (default)
[    0.828678] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.837620] console [ttyS0] disabled
[    0.861493] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    0.870678] console [ttyS0] enabled
[    0.878096] bootconsole [early0] disabled
[    0.891406] m25p80 spi0.0: found s25fl064k, expected m25p80
[    0.908911] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.914250] 5 tp-link partitions found on MTD device spi0.0
[    0.919903] Creating 5 MTD partitions on "spi0.0":
[    0.924790] 0x000000000000-0x000000020000 : "u-boot"
[    0.931322] 0x000000020000-0x000000170910 : "kernel"
[    0.938013] 0x000000170910-0x0000007f0000 : "rootfs"
[    0.944361] mtd: device 2 (rootfs) set to be root filesystem
[    0.950140] 1 squashfs-split partitions found on MTD device rootfs
[    0.956454] 0x0000003c0000-0x0000007f0000 : "rootfs_data"
[    0.963669] 0x0000007f0000-0x000000800000 : "art"
[    0.970062] 0x000000020000-0x0000007f0000 : "firmware"
[    0.977724] libphy: Fixed MDIO Bus: probed
[    0.994847] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    1.691233] libphy: ag71xx_mdio: probed
[    2.323949] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.335307] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.612438] random: fast init done
[    2.964074] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    2.972035] NET: Registered protocol family 10
[    2.980054] NET: Registered protocol family 17
[    2.984654] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.997889] 8021q: 802.1Q VLAN Support v1.8
[    3.003610] hctosys: unable to open rtc device (rtc0)
[    3.014656] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.023014] Freeing unused kernel memory: 324K
[    3.027519] This architecture does not have kernel memory protection.
[    3.799071] init: Console is alive
[    3.802771] init: - watchdog -
[    4.770545] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.825344] usbcore: registered new interface driver usbfs
[    4.831010] usbcore: registered new interface driver hub
[    4.836511] usbcore: registered new device driver usb
[    4.846001] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.853910] ehci-platform: EHCI generic platform driver
[    4.859287] ehci-platform ehci-platform.0: EHCI Host Controller
[    4.865356] ehci-platform ehci-platform.0: new USB bus registered, assigned bus number 1
[    4.875637] ehci-platform ehci-platform.0: TX-TX IDP fix enabled
[    4.881738] ehci-platform ehci-platform.0: irq 48, io mem 0x1b000000
[    4.912479] ehci-platform ehci-platform.0: USB 2.0 started, EHCI 1.00
[    4.919751] hub 1-0:1.0: USB hub found
[    4.923861] hub 1-0:1.0: 1 port detected
[    4.928144] ehci-platform ehci-platform.1: EHCI Host Controller
[    4.934212] ehci-platform ehci-platform.1: new USB bus registered, assigned bus number 2
[    4.944504] ehci-platform ehci-platform.1: TX-TX IDP fix enabled
[    4.950608] ehci-platform ehci-platform.1: irq 49, io mem 0x1b400000
[    4.982466] ehci-platform ehci-platform.1: USB 2.0 started, EHCI 1.00
[    4.989745] hub 2-0:1.0: USB hub found
[    4.993851] hub 2-0:1.0: 1 port detected
[    4.998501] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.016209] init: - preinit -
[    5.805933] eth1: link up (1000Mbps/Full duplex)
[    5.844309] random: procd: uninitialized urandom read (4 bytes read)
[    9.123019] jffs2: notice: (445) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    9.141166] mount_root: switching to jffs2 overlay
[    9.169368] urandom-seed: Seeding with /etc/urandom.seed
[    9.371502] eth1: link down
[    9.389154] procd: - early -
[    9.392151] procd: - watchdog -
[    9.996373] procd: - watchdog -
[    9.999767] procd: - ubus -
[   10.115465] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.124264] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.131788] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.139139] procd: - init -
[   10.722257] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.732570] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.748114] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   10.756279] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   10.765493] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.777737] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   10.822572] xt_time: kernel timezone is -0000
[   10.873875] PPP generic driver version 2.4.2
[   10.880208] NET: Registered protocol family 24
[   11.185536] ath10k 4.13 driver, optimized for CT firmware, probing pci device: 0x3c.
[   11.194628] PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
[   11.200520] ath10k_pci 0000:01:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   11.478883] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:01:00.0.txt failed with error -2
[   11.489593] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.559956] firmware ath10k!fwcfg-pci-0000:01:00.0.txt: firmware_loading_store: map pages failed
[   11.569139] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   11.580020] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.715051] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.724381] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
[   11.734906] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.891407] firmware ath10k!cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.901371] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-5.bin failed with error -2
[   11.912522] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.091525] firmware ath10k!QCA988X!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   12.101141] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-2.bin failed with error -2
[   12.112286] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.312344] firmware ath10k!QCA988X!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   12.321948] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   12.332822] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.465574] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   12.474910] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-5.bin failed with error -2
[   12.485782] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.618147] firmware ath10k!QCA988X!hw2.0!firmware-5.bin: firmware_loading_store: map pages failed
[   12.627504] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-4.bin failed with error -2
[   12.638386] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.769920] firmware ath10k!QCA988X!hw2.0!firmware-4.bin: firmware_loading_store: map pages failed
[   12.779256] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-3.bin failed with error -2
[   12.790131] ath10k_pci 0000:01:00.0: Falling back to user helper
[   12.924680] firmware ath10k!QCA988X!hw2.0!firmware-3.bin: firmware_loading_store: map pages failed
[   13.548070] ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
[   13.557470] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   13.569809] ath10k_pci 0000:01:00.0: firmware ver 10.1-ct-8x-__fW-021-4fa9f30 api 2 features wmi-10.x,has-wmi-mgmt-tx,txstatus-noack,wmi-10.x-CT,ratemask-CT,get-temp-CT,tx-rc-CT,cust-stats-CT crc32 ca41d135
[   13.616138] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   13.626753] ath10k_pci 0000:01:00.0: Falling back to user helper
[   13.695809] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   13.706558] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   13.773223] ath10k_pci 0000:01:00.0: otp calibration failed: 2
[   13.779144] ath10k_pci 0000:01:00.0: failed to run otp: -22 (download-cal-data)
[   13.786566] ath10k_pci 0000:01:00.0: could not init core (-22)
[   13.792583] ath10k_pci 0000:01:00.0: could not probe fw (-22)
[   13.858961] ath: EEPROM regdomain: 0x0
[   13.858968] ath: EEPROM indicates default country code should be used
[   13.858971] ath: doing EEPROM country->regdmn map search
[   13.858983] ath: country maps to regdmn code: 0x3a
[   13.858988] ath: Country alpha2 being used: US
[   13.858991] ath: Regpair used: 0x3a
[   13.875291] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   13.878407] ieee80211 phy1: Atheros AR9550 Rev:0 mem=0xb8100000, irq=47
[   13.963248] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.849428] urandom_read: 5 callbacks suppressed
[   14.849435] random: jshn: uninitialized urandom read (4 bytes read)
[   23.418281] eth1: link up (1000Mbps/Full duplex)
[   23.423084] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   23.456471] br-lan: port 1(eth1.1) entered blocking state
[   23.461959] br-lan: port 1(eth1.1) entered disabled state
[   23.467809] device eth1.1 entered promiscuous mode
[   23.472720] device eth1 entered promiscuous mode
[   23.532632] br-lan: port 1(eth1.1) entered blocking state
[   23.538116] br-lan: port 1(eth1.1) entered forwarding state
[   23.543943] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   23.615550] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   23.652774] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   24.792495] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   24.799246] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.986968] eth0: link up (1000Mbps/Full duplex)
[   24.991822] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   25.102529] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   25.559268] ath: EEPROM regdomain: 0x807c
[   25.563381] ath: EEPROM indicates we should expect a country code
[   25.569555] ath: doing EEPROM country->regdmn map search
[   25.575001] ath: country maps to regdmn code: 0x3a
[   25.579860] ath: Country alpha2 being used: CA
[   25.584530] ath: Regpair used: 0x3a
[   25.588076] ath: regdomain 0x807c dynamically updated by user
[   28.399389] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[   28.505394] br-lan: port 2(wlan1) entered blocking state
[   28.510792] br-lan: port 2(wlan1) entered disabled state
[   28.516556] device wlan1 entered promiscuous mode
[   36.800067] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   36.806719] br-lan: port 2(wlan1) entered blocking state
[   36.812113] br-lan: port 2(wlan1) entered forwarding state
[   72.126195] random: crng init done

I tried something but it failed lamentably: I copied board.bin to board-2.bin just to see the behavior and after the reboot, there was an error saying "found invalid board magic".

The ART is written to flash during manufacture. It is not part of the firmware distribution.

that is for ipq and/or other newer chips. here is board.bin in use

i've extracted this using the command: dd if=C7V2.bin of=v2art bs=4 skip=4183040 count=529

you can try scp v2art to the router with the following command:

scp v2art root@192.168.1.1:/lib/firmware/ath10k/cal-pci-0000:01:00.0.bin

or if you are running ath10k-ct version it may possibly be:

scp v2art root@192.168.1.1:/lib/firmware/ath10k-ct/cal-pci-0000:01:00.0.bin

(that is if you flash ar71xx image, ath79 target use different pci name cal-pci-0000:00:00.0.bin)

and rebooting the device. if this fails check again after reboot that this file is still in /lib/firmware/ath10k directory

1 Like

This should be the only thing you need to do (the path might be slightly different, look in your kernel log):

Since you won't be able to get the correct cal-data from the broken AP anyhow. Here is a copy of my cal-data you can try. Put it on your AP as /lib/firmware/ath10k/cal-pci-0000:01:00.0.bin

i.e. download this, then scp cal-pci-0000:00:00.0.bin root@192.168.1.1:/lib/firmware/ath10k/cal-pci-0000:01:00.0.bin

Best of luck :smiley:

1 Like

That's it! It works!

Thanks a lot guys! Really appreciated!

Question, if I do a factory reset, do files in the /lib/firmware/ath10 are wiped? I think I will do a backup of the cal files on my side just in case! :smiley:

1 Like

yes, the files are wiped. but if you patch your ART partition then it will be automatically created even after reset

How can I patch this partition? Also, will this works if I go from the ar71xx to ath79 image?

run dd if=/dev/mtd4 of=/tmp/mtd4 on your router, then transfer that file to your PC

on your PC run:

dd if=mtd4 of=newART bs=1 count=20480
and
cat cal-pci-0000:00:00.0.bin >> newART

upload newART to your router tmp and write it to mtd4 partition (you might need to unlock the partition first, to do that install mtd-rw tool)

I don't know how to write on the mtd4 partition. Do you have any command line examples?

Thanks for the help!

Make sure you have a good backup of the original ART on your PC and other safe places. Confirm with md5 sum of the file vs cat /dev/mtd4 | md5sum.
Install package kmod-mtd-rw
Type exactly this command: insmod mtd-rw i_want_a_brick=1
Prepare new file and copy to the router, e.g. under /tmp.
mtd write /tmp/newart.bin art

Well the argument i_want_a_brick really sums up the danger of doing that operation! :sweat_smile: Thanks, I'll try this! :slightly_smiling_face:

Overwriting the ART partition is pointless, as the archer c7-v1 (other than c7-v2 to c7-v5) has no means to read it back from ART anyways, which makes sense as it doesn't ship with a supported WLAN card.

i just check /etc/hotplug.d/firmware on my unit. it has 11-ath10k-caldata script there..

Correct, the script itself is there - but while it knows about how to deal with c7-v2, c7-4 and c7-5, it doesn't know anything about c7-v1 or c7-v3 and won't do anything at all on those devices (and that is correct behaviour).

1 Like

Adding the cal-data file to /etc/sysupgrade.conf is perhaps the easiest way to have it preserved over upgrades.