brick tplink problem wifi wdr4300

root@OpenWrt:~# dmesg
[    0.000000] Linux version 4.14.171 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10947-65030d81f3)) #0 Thu Feb 27 21:05:12 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is TP-Link TL-WDR4300 v1
[    0.000000] SoC: Atheros AR9344 rev 2
[    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 804fbf60, node_mem_map 81008b80
[    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] random: get_random_bytes called from 0x804ff740 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    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: 123300K/131072K available (4028K kernel code, 163K rwdata, 532K rodata, 1220K init, 212K bss, 7772K 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] CPU clock: 560.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.008316] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.084946] pid_max: default: 32768 minimum: 301
[    0.090058] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097118] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109253] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.119763] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.126332] pinctrl core: initialized pinctrl subsystem
[    0.134201] NET: Registered protocol family 16
[    0.142446] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    0.148943]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.154543]   IO 0x0000000000000000..0x0000000000000000
[    0.176848] PCI host bridge to bus 0000:00
[    0.181222] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.188586] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.194511] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.201751] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.210219] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[    0.210278] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    0.210334] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.210416] pci 0000:00:00.0: supports D1
[    0.210428] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.210671] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.210700] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.218534] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.229165] clocksource: Switched to clocksource MIPS
[    0.235568] NET: Registered protocol family 2
[    0.241142] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.248571] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.255386] TCP: Hash tables configured (established 1024 bind 1024)
[    0.262296] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.268524] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.275473] NET: Registered protocol family 1
[    0.280195] PCI: CLS 0 bytes, default 32
[    0.283102] Crashlog allocated RAM at address 0x3f00000
[    0.290012] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.302031] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.308233] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.328094] io scheduler noop registered
[    0.332314] io scheduler deadline registered (default)
[    0.338138] ar7200-usb-phy usb-phy: phy reset is missing
[    0.345915] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    0.354140] gpio-export gpio-export: 4 gpio(s) exported
[    0.360513] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.369758] console [ttyS0] disabled
[    0.373599] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.382829] console [ttyS0] enabled
[    0.390268] bootconsole [early0] disabled
[    0.408214] m25p80 spi0.0: en25q64 (8192 Kbytes)
[    0.412997] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.419470] Creating 3 MTD partitions on "spi0.0":
[    0.424339] 0x000000000000-0x000000020000 : "u-boot"
[    0.430215] 0x000000020000-0x0000007f0000 : "firmware"
[    0.436356] 2 tplink-fw partitions found on MTD device firmware
[    0.442422] Creating 2 MTD partitions on "firmware":
[    0.447474] 0x000000000000-0x000000185c43 : "kernel"
[    0.453271] 0x000000185c44-0x0000007d0000 : "rootfs"
[    0.459011] mtd: device 3 (rootfs) set to be root filesystem
[    0.464838] 1 squashfs-split partitions found on MTD device rootfs
[    0.471152] 0x0000003f0000-0x0000007d0000 : "rootfs_data"
[    0.477387] 0x0000007f0000-0x000000800000 : "art"
[    0.484102] libphy: Fixed MDIO Bus: probed
[    0.830965] libphy: ag71xx_mdio: probed
[    0.837655] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    1.488657] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    1.500193] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    1.509077] NET: Registered protocol family 10
[    1.518858] Segment Routing with IPv6
[    1.522751] NET: Registered protocol family 17
[    1.527308] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.540479] 8021q: 802.1Q VLAN Support v1.8
[    1.547209] hctosys: unable to open rtc device (rtc0)
[    1.557935] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.570571] Freeing unused kernel memory: 1220K
[    1.575173] This architecture does not have kernel memory protection.
[    2.330301] init: Console is alive
[    2.333975] init: - watchdog -
[    2.539211] random: fast init done
[    3.214806] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.306150] usbcore: registered new interface driver usbfs
[    3.311846] usbcore: registered new interface driver hub
[    3.317328] usbcore: registered new device driver usb
[    3.328413] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.336804] ehci-platform: EHCI generic platform driver
[    3.342421] ehci-platform 1b000000.usb: EHCI Host Controller
[    3.348214] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    3.356283] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    3.389216] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    3.396360] hub 1-0:1.0: USB hub found
[    3.400563] hub 1-0:1.0: 1 port detected
[    3.406027] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.416138] init: - preinit -
[    4.054702] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.312252] random: procd: uninitialized urandom read (4 bytes read)
[    4.319467] hub 1-1:1.0: USB hub found
[    4.327217] hub 1-1:1.0: 4 ports detected
[    4.451337] random: jshn: uninitialized urandom read (4 bytes read)
[    4.694022] random: jshn: uninitialized urandom read (4 bytes read)
[    6.316201] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.322263] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[    7.390443] eth0: link up (1000Mbps/Full duplex)
[    7.395206] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.404182] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[    9.659300] jffs2: notice: (487) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (2 unchecked, 4 orphan) and 17 of xref (4 dead, 0 orphan) found.
[    9.676581] mount_root: switching to jffs2 overlay
[    9.706198] overlayfs: upper fs does not support tmpfile.
[    9.718668] urandom-seed: Seeding with /etc/urandom.seed
[    9.844385] eth0: link down
[    9.866878] procd: - early -
[    9.870621] procd: - watchdog -
[   10.580480] procd: - watchdog -
[   10.583994] procd: - ubus -
[   10.666888] urandom_read: 5 callbacks suppressed
[   10.666897] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.679962] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.687859] procd: - init -
[   11.464149] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.493851] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.519948] Loading modules backported from Linux version v4.19.98-0-gd183c8e2647a
[   11.527630] Backport generated by backports.git v4.19.98-1-0-g8204eb99
[   11.561626] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.585280] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   11.702521] xt_time: kernel timezone is -0000
[   11.824516] PPP generic driver version 2.4.2
[   11.840172] NET: Registered protocol family 24
[   11.911929] ath: phy0: Unable to initialize hardware; initialization status: -5
[   11.919399] ath9k 18100000.wmac: failed to initialize device
[   11.925198] ath9k: probe of 18100000.wmac failed with error -5
[   11.931439] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   11.983283] ath: phy1: Unable to initialize hardware; initialization status: -5
[   11.990801] ath9k 0000:00:00.0: Failed to initialize device
[   11.996523] ath9k: probe of 0000:00:00.0 failed with error -5
[   12.012388] urngd: v1.0.2 started.
[   12.029595] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.369114] random: crng init done
[   25.841079] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   25.863106] br-lan: port 1(eth0.1) entered blocking state
[   25.868629] br-lan: port 1(eth0.1) entered disabled state
[   25.874457] device eth0.1 entered promiscuous mode
[   25.879367] device eth0 entered promiscuous mode
[   25.903678] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   25.982234] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   26.910862] eth0: link up (1000Mbps/Full duplex)
[   26.915620] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   27.019304] br-lan: port 1(eth0.1) entered blocking state
[   27.024797] br-lan: port 1(eth0.1) entered forwarding state
[   27.030828] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   27.139260] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
root@OpenWrt:~# ^C
root@OpenWrt:~#

cat /etc/config/wireless

Is this with the default configuration for this release? Or are you keeping the configuration from a previous install?

root@OpenWrt:~# cat /etc/config/wireless
root@OpenWrt:~#

there is nothing written

this is a new installation from the original tplink firmware, now the openwrt version 19.0.7.2 is installed. thanks

Here your wifi hw initializations failed most likely because of corrupted art partition.

Do you have any backup of your flash, especially the art partition?

no i have no backup, the only thing i have a wdr3600 can be useful?

I have a WDR4300, and can provide a backup from my ART partition, it somebody tells me how to extract it.

thanks !!!!!!! would you give me a great help, I hope it is a simple thing to do.

Verify mtd device of art partition from partition table:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 007d0000 00010000 "firmware"
mtd2: 001d140f 00010000 "kernel"
mtd3: 005febf0 00010000 "rootfs"
mtd4: 003d0000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "art"

Backup:
dd if=/dev/mtd5 of=/tmp/art.bin bs=64k

Restore:

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
mtd write /tmp/art.bin art

The package kmod-mtd-rw makes your read-only partitions temporarily (until next reboot) writeable.

@idris83 Please do a backup before you restore any other backup and store it on your computer.

This link should lead you to a file called "art.bin", generated according to @juppin instructions, on a "TP-Link TL-WDR4300 v1" running "OpenWrt 19.07.2 r10947-65030d81f3":

Hope this helps!

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 007d0000 00010000 "firmware"
mtd2: 00185c43 00010000 "kernel"
mtd3: 0064a3bc 00010000 "rootfs"
mtd4: 003e0000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "art"

thanks tonight when i get home i try because i am at work now. thanks

hello sorry I'm not an expert but could you give me a guide of how to do it? I don't know how to install it.thank

This are commands that you have to execute in a shell, most likely a ssh session.

  • Back up whatever is in the ART partition now:
    cat /dev/mtd5 > /tmp/oldart.bin
  • SCP the old ART to your PC, and SCP the new ART file to the router.
  • Unlock the mtd for writing with mtd-rw
  • Write the new ART: mtd write /tmp/art.bin art.

Very important make sure to back up whatever is in the ART now in case it turns out to be needed later.

1 Like
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/kmods/4.14.171-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/kmods/4.14.171-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/mips_24kc/telephony/Packages.sig
Signature check passed.
root@OpenWrt:~# opkg install kmod-mtd-rw
Package kmod-mtd-rw (4.14.171+git-20160214-1) installed in root is up to date.
root@OpenWrt:~# insmod mtd-rw i_want_a_brick=1
root@OpenWrt:~# dd if=/tmp/art.bin of=/dev/mtd5 o bs=64k
BusyBox v1.30.1 () multi-call binary.

Usage: dd [if=FILE] [of=FILE] [ibs=N obs=N/bs=N] [count=N] [skip=N] [seek=N]
        [conv=notrunc|noerror|sync|fsync]
        [iflag=skip_bytes|fullblock] [oflag=seek_bytes]

Copy a file with converting and formatting

        if=FILE         Read from FILE instead of stdin
        of=FILE         Write to FILE instead of stdout
        bs=N            Read and write N bytes at a time
        ibs=N           Read N bytes at a time
        obs=N           Write N bytes at a time
        count=N         Copy only N input blocks
        skip=N          Skip N input blocks
        seek=N          Skip N output blocks
        conv=notrunc    Don't truncate output file
        conv=noerror    Continue after read errors
        conv=sync       Pad blocks with zeros
        conv=fsync      Physically write data out before finishing
        conv=swab       Swap every pair of bytes
        iflag=skip_bytes        skip=N is in bytes
        iflag=fullblock Read full blocks
        oflag=seek_bytes        seek=N is in bytes

N may be suffixed by c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G
root@OpenWrt:~#

the last passage I don't know what to do

root@OpenWrt:~# mtd-rw
-ash: mtd-rw: not found
root@OpenWrt:~# mtd write /tmp/art.bin
Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]

The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        refresh                 refresh mtd partition
        erase                   erase all data on device
        verify <imagefile>|-    verify <imagefile> (use - for stdin) to device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
        jffs2write <file>       append <file> to the jffs2 partition on the device
Following options are available:
        -q                      quiet mode (once: no [w] on writing,
                                           twice: no status messages)
        -n                      write without first erasing the blocks
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
        -d <name>               directory for jffs2write, defaults to "tmp"
        -j <name>               integrate <file> into jffs2 data when writing an image
        -s <number>             skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"
        -p <number>             write beginning at partition offset
        -l <length>             the length of data that we want to dump
        -F <part>[:<size>[:<entrypoint>]][,<part>...]
                                alter the fis partition table to create new partitions replacing
                                the partitions provided as argument to the write command
                                (only valid together with the write command)

Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
         mtd -r write linux.trx linux

root@OpenWrt:~#

I can't even do this.thanks

Sorry there was a typo and a wrong command.
You have to use the mtd until.

Do a backup before and download your art.bin with winscp from your router.

Then upload the new art.bin with winscp to /tmp and restore it with:

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
mtd write /tmp/art.bin art

thanks and back to work :grinning:

thanks for your help you have been very kind. thanks thanks

1 Like