Overclocking router devices

SFE is enabled, via LAN it's 700~800M, via WLAN it's capped ~350Mbps with sirq maxed out.

ath10k non-ct.

Cheers.

Can someone maybe share a uboot with @psyborg overclock values for QCA9533. My device is TP-LINK WR810v2 and pepe2k uboot don't contain additional overclock values. I must admit I am not able to compile myself.

The source code is hosted here:

My model is TP-Link wr810n v2

Thank you in advance

Someone can help / assist me?

after more experimenting i got archer c7 v1 booting at 1320 MHz.

but clock drift starts to appear at 1280 MHz (at least 1240 MHz is still good, havent tried 10 or 20 MHz steps in between the two) and gets horrible at 1360 MHz so much that the booting firmware is twice slower

this time clock drift appears to be hardware related.

all the squashfs decompress errors, usb and wifi issues dissapeared after increasing CPU and RAM voltage, but i think CPU voltage was critical here, not RAM as it can run just fine with lower memory voltage.

anyway, memory couldnt be overclocked on this unit, 640 MHz was max and sometimes unstable so i just left it at 600 and didnt bother with it.

AHB also seems to do fine at 400 MHz and USB works fine

heatsinks or fans are needed only if doing heavy load on the device, e.g. load a 30Mbps stream from USB device, decrypt it with the CPU and stream via builtin wifi

under these conditions device pulled about 7.2 watts from the wall. pci wifi card was not present during test and its power draw is thus excluded

1 Like

My Archer C7 v2 OC@960MHz will peak around 500Mbit/sec true iperf3 speed (running iPhone X as iPerf3 client), at that speed sirq is around 98%...

This is done on 866.7 Mbit/s, 80 MHz, VHT-MCS 9, VHT-NSS 2, Short GI.

Personally, I find 960MHz a sweet spot for Archer C7 v2 used as AP. There is no clock drift, and both CPU and phy are basically at max. Power consumption is only slightly elevated.

Sorry, just saw your quote.

I'll give you some iperf3 results (server on my main wired PC, client on a 2x2 android phone running LineageOS 18.1, all on the same network).

C7 v4 @ 1GHz + heatsink, on up to date master (r17391, gcc10.3, kernel 5.4.142, compiler settings: -O2 -march=74kc -mtune=74kc) using ath10k-ct-full firmware (no smallbuffers), dumb AP (no firewall, no dnsmasq, no odhcpd), 866.7Mbit/s, 80MHz, WPA2+CCMP

Best case results (~2m distance, line of sight to antennas), CPU sirq maxed out:

  • 1 TCP stream: ~350Mbps
  • 2 TCP streams: aggregate ~410Mbps
  • 4 TCP streams: aggregate ~490Mbps
  • 8 TCP streams: aggregate ~550Mbps
  • UDP, -b 0: ~394Mbps, 0 lost packets, 0.114ms jitter

I don't think there's much more left on these units, the radio (QCA9880) can probably do more, but we've hit a hard CPU wall here and I don't think there's any more useful non-breaking optimization left on the compiler settings.

Not too bad for what it is, actually. I've read reports of stock TPLink firmware and ddwrt doing better on 5GHz performance (>350-400Mbps), but then I'm satisfied with what the C7 v4 can do and okay with a performance hit for the flexibility openwrt provides. I should try non-CT firmware (no issues with CT firmware so far, running stable ever since it became default), see if it can squeeze some more performance out of these.

Anyway, 350-400Mbps best case is good enough for my what my ISP can offer and good enough for what my wireless devices need, so these APs aren't retiring any time soon, lol

I am using Zyxel NBG6716. The device has QCA9880 chipset. With openwrt, I reach a maximum speed of 350-360 mbps. When I checked with htop, I saw that the CPU was used 100%. Sorry, no overclocking for the NBG6716. I thought the QCA9880 could do more. I plugged it into Banana PI R2 device. And yes, I was able to reach 500 mbps speed. But the constant does not continue at 500. I'm getting fluctuating speeds between 400 and 500. The Banana PI R2 processor is using 25% CPU at this time.

Openwrt is installed on my Unifi HD device. It has QCA9994 chipset. Even though it has 4x4 MIMO, I get the same speed as the QCA9880. Maximum 500Mbps. When I set 160mhz the speed is lower so I use 80mhz set.

I got these results with Intel AX200 card in laptop.

ath10k non-ct will give you further 10% speed increase on 5GHz band on C7.
But around 1GHz OC, both radio and CPU are basically flat out.

500Mbit/sec is actually really good. I read lot of reviews of .ax gear and even with latest mobile devices supporting .ax there is not so much more usable bandwidth to be had. 800Mbit/s seems to be it.
So I see no reason to retire C7's as APs for a long time. Amazing considering they are 7 years old.

P.S. Can somebody test 3x3 802.11ac device and see whether it can go any faster? Most phones asre just 2x2.

1 Like

Well, the typical use of overclocking is with older devices to have them keep up.

I OC my tplink archer c7 v2, it was working well at 1ghz, but in one of my experiments, all the ethernet ports stopped working.
I can't use the clip to flash, because programmer isn't detected and since I had to desolder the flash chip, I decided to solder a socket.

[TL:DR]: I just want to share the flash chip socket photos:
https://www.aliexpress.com/item/1005001556442548.html
(There are more and different socket designs, but this was the cheaper.)

4 Likes

Hi. do you have any suggestion where could I find code of the u-boot which will work with Archer V7 v5 ? Thanks in advance and best regards, Patryk

Is this thread still alive? My successful overclocks of different routers:
ASUS RT-N18U:1200mhz core, 600mhz ram
ASUS DSL-AC68U:1200mhz core, 800mhz ram
I got an archer c7 v5 device, what are the safe overclocks for it? I heard people overclocks v2 ones to 950 safely.

Unfortunately it doesn't work for me

mtd -r write my-uboot-binary.bin u-boot
or
mtd -r write my-uboot-binary.bin /dev/mtd0
Can't open /dev/mtd0: Permission denied

run

opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1

first.

Could you please write the protocol how to compile C7v5 GPL sources and recompile the uboot-factory? I tried ubuntu 22.04, ended up in linker error. What linux distribution/version to use? what to install there to be able to do it? The openwrt code inside C7v5 directory is quite old I think. Thank you very much!

Long story short: ATTENTION FOR Archer C7 v5 : I managed to compile the sources from Tp-Link for C7V5, but after changing the factory-uboot of the router to the new one, it bricked. Now, TFTP still starts and searches for C7v4 factory restore file (strage, isnt it?) but do not accept any of the files for C7V5 from tp-link or any openwrt image. I was still thinking to look into serial (I guess no JTAG is possible here?) and see what about it complains. Is it possible to use serial and somehow put the old md0 back to the router? if not it is not the big deal, just for fun :slight_smile: . If someone wants to compile : I used virtualbox with ubuntu 14 lts 32bit, you need to unpack GPL sources inside of ubuntu, there are many linked files that will not work otherwise. You need to have latex installed there (better the full version), as well as couple of other things that the compiling will complain about. If some sources are not available, I did search them in google and did download them into openwrt/dl directory. Some proxy package was not available at all, was packing it from github by hand.

I was able to debrick my router.
After connecting serial to Archer C7V5, I have seen that u-boot is starting, and the web server on 192.168.0.1 is starting.
in the logs there were some errors about partitions, later I will repeat it again to copy it here.
I tried to upload images from tp link via web server, did not work, because again some errors in partitions in the image.
But this time I realized that the files are uploaded to the memory of the device, and from u-boot one can start them with the command "go" and address, where they are loaded into the memory.
Thus, I first tried to upload mtd0 with originaly backed up factory-uboot, it started but still said there is error in partitions. But when I uploaded mtd1 with u-boot file, and started it, openwrt did start. I was able to log into it with ssh (or one can do it via serial too, I found out it later) did copy of the backup file of mtd0 and performed

insmod mtd-rw i_want_a_brick=1
mtd write /tmp/mtd0-uboot-factory.bin factory-uboot

on the router. After reboot everything started to work.

I also have seen in kernel log after starting openwrt with the trick of uploading the file via web and starting it with go, that the frequency of the cpu was changed to what I entered in the config files before compilation:

[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 825.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4633358656 ns
[    0.000001] sched_clock: 32 bits at 412MHz, resolution 2ns, wraps every 5206021118ns

and after restoring everything I got back to the stock:

[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 775.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[    0.000001] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns

If someone is able to help me how to find out what to change in the sources to make it start second u-boot properly (or maybe partition table is just wrong in this generated factory uboot), I would be very happy. It seems that the solution for C7V5 is somewhere there, and it is possible to overclock it.
Here is the list of partitions in the router:

dev:    size   erasesize  name
mtd0: 00020000 00010000 "factory-uboot"
mtd1: 00020000 00010000 "u-boot"
mtd2: 00010000 00010000 "partition-table"
mtd3: 00010000 00010000 "art"
mtd4: 00020000 00010000 "info"
mtd5: 00040000 00010000 "user-config"
mtd6: 00f00000 00010000 "firmware"
mtd7: 00238cf5 00010000 "kernel"
mtd8: 00cc730b 00010000 "rootfs"
mtd9: 008e0000 00010000 "rootfs_data"
mtd10: 00010000 00010000 "default-config"

here is the log with the factory-uboot from Tp-Link GPL:

U-Boot 1.1.4 (Jan 25 2024 - 20:25:40)

ap152 - Dragonfly 1.0

DRAM:  128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 395k for U-Boot at: 87f9c000
Reserving 16448k for malloc() at: 86f8c000
Reserving 44 Bytes for Board Info at: 86f8bfd4
Reserving 36 Bytes for Global Data at: 86f8bfb0
Reserving 128k for boot params() at: 86f6bfb0
Stack Pointer at: 86f6bf98
Now running in RAM - U-Boot at: 87f9c000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x87fba85c
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:00:2f:81:00:00
eth0 up
eth0
Setting 0x181162c0 to 0x264c2100
[NM_Error](nm_lib_parsePtnIndexFile) 00589: invalid partition-index-file para id.
[NM_Error](nm_lib_readPtnTable) 00703: Parsing Partition Table ... FAILED

[NM_Error](nm_api_checkInteger) 00345: factory boot check integer partition init fail.
Hit any key to stop autoboot:  0
Trying eth0
dup 1 speed 1000
HTTP server is starting at IP: 192.168.0.1
HTTP server is ready!

here are enviroment parameters:

ath> printenv
bootargs=console=ttyS0,115200 board=AP152 rootfstype=squashfs init=/etc/preinit mtdparts=spi0.0:128k(factory-uboot),128      k(u-boot),1152k(uImage),14912k(rootfs),64k@0xff0000(ART) mem=128M
bootcmd=bootm 0x9f040000
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
serverip=192.168.0.10
dir=
lu=tftp 0x80060000 ${dir}tuboot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f010000 +$filesize&&cp.b $fileaddr 0x9f010000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f300000 +$filesize&&cp.b $fileaddr 0x9f300000 $filesize
stdin=serial
stdout=serial
stderr=serial
ipaddr=192.168.0.1
ethact=eth0

here is the log from normal factory-uboot:

U-Boot 1.1.4 (Mar  8 2018 - 16:34:18)

ap152 - Dragonfly 1.0

DRAM:  128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 413k for U-Boot at: 87f98000
Reserving 16448k for malloc() at: 86f88000
Reserving 44 Bytes for Board Info at: 86f87fd4
Reserving 36 Bytes for Global Data at: 86f87fb0
Reserving 128k for boot params() at: 86f67fb0
Stack Pointer at: 86f67f98
Now running in RAM - U-Boot at: 87f98000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x87fbafdc
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:00:2f:81:00:00
eth0 up
eth0
Setting 0x181162c0 to 0x264c2100
[NM_Error](nm_api_checkInteger) 00384: extra-para:01 01


[393]factory boot check integer ok.

factory boot load fs uboot len 131072 to addr 0x80010000.
Hit any key to stop autoboot:  0
## Starting application at 0x80010000 ...


U-Boot 1.1.4-g4480d5f9-dirty (May 20 2019 - 18:45:14)

ap152 - Dragonfly 1.0

DRAM:  128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 125k for U-Boot at: 87fe0000
Reserving 16448k for malloc() at: 86fd0000
Reserving 44 Bytes for Board Info at: 86fcffd4
Reserving 36 Bytes for Global Data at: 86fcffb0
Reserving 128k for boot params() at: 86faffb0
Stack Pointer at: 86faff98
Now running in RAM - U-Boot at: 87fe0000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x87ff3f1c
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:00:2f:81:00:00
eth0 up
eth0
Setting 0x181162c0 to 0x264c2100
Hit any key to stop autoboot:  0
## Booting image at 9f0c0000 ...
   Image Name:   MIPS OpenWrt Linux-5.15.137
   Created:      2023-11-14  13:38:11 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2329781 Bytes =  2.2 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9f0c0040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728

Starting kernel ...

and enviroment parameters :

ath> printenv
bootargs=console=ttyS0,115200 board=AP152 rootfstype=squashfs init=/etc/preinit mtdparts=spi0.0:128k(factory-uboot),192k(u-boot),64k(ART),1536k(uImage),14464k@0x1e0000(rootfs) mem=128M
bootcmd=bootm 0x9f0c0000
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.0.2
serverip=192.168.0.10
dir=
lu=tftp 0x80060000 ${dir}tuboot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f010000 +$filesize&&cp.b $fileaddr 0x9f010000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f300000 +$filesize&&cp.b $fileaddr 0x9f300000 $filesize
stdin=serial
stdout=serial
stderr=serial
ethact=eth0

Environment size: 701/65532 bytes

Any ideas? it seems that bootargs are different here

I have C7V4 too, so I compiled uboot for it too, and it works :). because I need only 1 device that does nat and so on, I will put C7V5 as dump AP. I still have one more C7V5 for testing purposes, but would be good if anyone can tell me what and where to look with it. I was thinking to put some logs into the code of uboot, where the errors are comming to see what is happening there. not sure that I can printout there something to the console

Sorry wrong topic.