Support for TL-WR841N v14

How can I do that? Were is any information? The new bootloader comes from TPLink or OpenWRT?
Upgrading the bootloader must be done in OpenWRT or not? Can I save the old one, how?

Anyone worked on a flash/ram upgrade?

I upgraded a WR841N v14.0 with 64MB Ram and 16MB Flash. I compiled openwrt with above config and patched for 16MB flash size. Flash upgrade is working. If anyone is interested, I can share how to upgrade. Ram upgrade does not work yet.

it would be interesting to see how you upgraded the RAM chip at least - do please share - this is what openwrt is about :slight_smile:
...
I'll also share my 18.06 built images:
https://www.dropbox.com/s/u14j8en3xgehepa/openwrt-ramips-mt76x8-tplink_tl-wr841n-v14-squashfs-tftp-recovery.bin?dl=1 (initial tftp flash image)
https://www.dropbox.com/s/9a0wrysxampxddn/openwrt-dnscrypt-mt76x8-tplink_tl-wr841n-v14-squashfs-sysupgrade.bin?dl=1 (dnscrypt built in)
https://www.dropbox.com/s/7u1ty2y4a37vzlq/openwrt-DoH-mt76x8-tplink_tl-wr841n-v14-squashfs-sysupgrade.bin?dl=1 (https-dns-proxy built in)

I'm trying to backport this device into my 17.01 fork ( [Testing] lede-17.01 security backports for 4/32 devices ) but currently built images enter reboot loop so I'll need a serial console debug...)

2 Likes

16M/64M upgrade was successful. My devices are running with 16MB flash and 64MB RAM now. One with latest OpenWrt and one with gluon (Freifunk Stuttgart firmware).

I used the following devices:
RAM: Hynix HY5DU121622DTP-D43
Flash: Winbond 25Q128FVSG

Ram upgrade procedure:

  1. Desolder old RAM
  2. Solder new RAM
  3. Now test the device. If you soldered the ram correctly, it works as before.
  4. RAM size is hard coded in boot loader. To use the 64M you need to flash a modified boot loader. Either
    a) use a modified OpenWrt image (with boot partition writable) and write it from OpenWrt
    or
    b) use serial console and flash with u-boot and tftp

I will upload modified u-boot binary and source later.

Flash upgrade is easier to solder but more firmware changes:

  1. Save your ART partition. It is individual for every hardware.
  2. Desolder old Flash
  3. Write bootloader, firmware and ART partition to new Flash.
    I use a cheap ch341a programmer with SOIC-8 clip.
  4. Solder the new Flash.

ART partition can either be saved from OpenWrt or read with ch341 programmer after desoldering flash.
It can then either be added to firmware image before writing the new flash or written with modified OpenWrt later.

OpenWrt with 64MB target is here: https://github.com/timowi/openwrt

1 Like

Forgot two points:

tftp recovery:
tftp recovery works on v14. press and hold reset button after power on. Device IP is 192.168.0.2, Server IP is 192.168.0.66, Filename: tp_recovery.bin

Serial console
I used the internal serial port for modification. It's 115.200 8N1 3,3V TTL, so use a ftdi adapter. Strangely I need a pullup resistor on RX (router side). Otherwise it does not get my inputs.
Pressing 't' after reset enters bootloader.
Original recovery commands are: ""tftp 0x80060000 tp_recovery.bin;erase tplink 0x10000 0x3d0000;cp.b 0x80070000 0x10000 0x3d0000"

I currently have v14.1 and it seems it's a lower cost variant as it uses normal ram chip (not BGA as in v14) see TP-Link WR841N v14.1 vs v14

Mine are V14.0 and look exactly the same. I think the BGA RAM chips are wr841 <v13. v14 have a TSSOP66 RAM chip.

1 Like

do you know how I can boot a initramfs image? "bootm" doesn't seem to get recognized - not even help

4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Jan 14 2020 - 17:47:19)
MT7628 # bootm
Unknown command 'bootm' - try 'help'
MT7628 # help
Unknown command 'help' - try 'help'

This is not possible without bootloader modification.

TP-link build a tiny u-boot to fit in one flash block(64kb). Only this commands are compiled in:

  • erase
  • cp
  • setenv
  • reset
  • tftpboot

For a fully featured u-boot it is necessary to change the flash layout.
It should be possible to add only bootm cmd if you are willing to flash a modified bootloader.

Here are the bootloader files:
Source:

unmodified:
https://github.com/timowi/wr841nv14boot/releases/download/original/uboot-unmodified.bin

64MB Ram version:
https://github.com/timowi/wr841nv14boot/releases/download/mod64M/uboot-mod64M.bin
WARNING: Only flash this image after soldering 64MB ram

2 Likes

support added in my LEDE fork https://github.com/maurerr/openwrt for TL-WR841N v14 see [Testing] lede-17.01 security backports for 4/32 devices

1 Like

Hello.
I want to try to replace the flash chip with 8MB. What do you need in the firmware?
Thanks.

I upgraded my router to 8M flash memory. RAM left 32M, I did not change this chip. Attached a patch for the current snapshoot. I used unmodified u-boot from Timowi (see up)

$ ssh root@OpenWrt                                                                                                            /var/opt/vanessa/router/tp-wr841-v14/timowi/openwrt
root@openwrt's password: 


BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r15004-4799810745
 -----------------------------------------------------
root@OpenWrt:~# cat /proc/cpuinfo 
system type             : MediaTek MT7628AN ver:1 eco:2
machine                 : TP-Link TL-WR841N v14 8M
processor               : 0
cpu model               : MIPS 24KEc V5.5
BogoMIPS                : 385.02
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp
Options implemented     : tlb 4kex 4k_cache prefetch mcheck ejtag llsc pindexed_dcache userlocal vint perf_cntr_intr_bit perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:~# df -hT
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            squashfs        3.5M      3.5M         0 100% /rom
tmpfs                tmpfs          12.9M    304.0K     12.6M   2% /tmp
/dev/mtdblock4       jffs2           2.6M    232.0K      2.4M   9% /overlay
overlayfs:/overlay   overlay         2.6M    232.0K      2.4M   9% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev
root@OpenWrt:~# uname -a
Linux OpenWrt 5.4.77 #0 Mon Nov 23 11:52:11 2020 mips GNU/Linux
root@OpenWrt:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00010000 00010000 "boot"
mtd1: 007e0000 00010000 "firmware"
mtd2: 001daf47 00010000 "kernel"
mtd3: 006050b8 00010000 "rootfs"
mtd4: 002a0000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "factory"

PS The question is not on the topic: what is the factory partition ?

this upgrade has a problem: the router reboots periodically, about once a day.

Hello maurer,

I've been using your firmware for my v14 but the config isn't kept after a reboot. I've tried several compilations from the source but can't find the right modules to activate. Can you share your parameters for the dnscrypt build?

Unfortunately I don't own a v14 anymore.
To compile stripped down builds just follow https://openwrt.org/docs/guide-user/additional-software/saving_space

Can I use the first one in my tlwr841 v14?

sure, go ahead

1 Like

Hello,

I have seen this thread to support the above router on OpenWrt. I have created my own image (based on official 18.06.9) which includes:

  • PPPoE
  • Luci
  • UPnP
  • opkg
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt76x8=y
CONFIG_TARGET_ramips_mt76x8_DEVICE_tplink_tl-wr841n-v14=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_IPV6 is not set
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_CRASHLOG is not set
# CONFIG_KERNEL_ELF_CORE is not set
# CONFIG_KERNEL_IPV6 is not set
# CONFIG_KERNEL_PRINTK is not set
CONFIG_LUCI_SRCDIET=y
CONFIG_PACKAGE_cgi-io=y
# CONFIG_PACKAGE_dropbear is not set
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libupnp=y
CONFIG_PACKAGE_libuuid=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-upnp=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_miniupnpd=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_u2pnpd=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_USE_MKLIBS=y
CONFIG_PACKAGE_kmod-nf-ipt6=y
CONFIG_PACKAGE_libip6tc=y

You can get .bin files here:

Screenshot:

Feedback apreciated.

Hello , I had tried your firmware it works but I can't SSH my device
is there a trick for that.
thank you