Support for TP-LINK TL-WR940N Ver 6.0

I'm building now, should take a little while and be done. Am I to understand that all you needed to do was add tl-wr940v6 into platform.sh , or did you make other changes as well?

That is not the only one.
That is just last commit.
Take a look at other commits,this was just quickly done.
If it works,I will squash them and open a PR with proper comment

SUCCESS. Fully booted and operational. Thank you @robimarko I need to buy you a beer. I cannot overstate how useful these "little routers that could" can be for specific use cases.

Awesome,gotta clean up branch and make a PR

While we're at it, Version 5.0 flashes fine with Ver 4.0, but only via webgui, because TFTP gives this error (maybe we can add ver 5.0 via tftp by a simple add to whatever it is you added.

This is Version 5.0 error on TFTP (Version 6.0 works great with your latest commit on robimarko git)

original_product_id = 155189253, original_product_ver = 1   
recovery_product_id = 155189252, recovery_product_ver = 1
auto update firmware: product id verify fail!

Three versions, exact same firmware, LEDs change on the last one, the one before that, NO changes at all. Stupid of them, IMHO. (TPLINK)

Its due to v5 having different Product ID in stock firmware and bootloader checks it.
Sure,adding v5 would not be hard.

TP-Link usually rolls new revisions as soon as any compatible component has a cheaper version,its like resistor with different footprint dropped 0.05 cents and they will roll new board

Can you post v6 bootlog?

U-Boot 1.1.4 (Jul  4 2017 - 14:43:31)

ap151 - Dragonfly 1.0

DRAM:  32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 141k for U-Boot at: 81fdc000
Reserving 192k for malloc() at: 81fac000
Reserving 44 Bytes for Board Info at: 81fabfd4
Reserving 36 Bytes for Global Data at: 81fabfb0
Reserving 128k for boot params() at: 81f8bfb0
Stack Pointer at: 81f8bf98
Now running in RAM - U-Boot at: 81fdc000
Flash Manuf Id 0xc8, DeviceId0 0x40, DeviceId1 0x16
flash size 4MB, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Dragonfly----> S27 PHY *
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Setting 0x181162c0 to 0x82
is_auto_upload_firmware=0
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 4.9.73 (maker@LEDE) (gcc version 5.5.0 (OpenWrt GCC 5.5.0 r5703+8-aa100b6) ) #0 Tue Jan 9 16:25:36 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros TP9343 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] OF: fdt:No valid device tree found, continuing without
[    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-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=TL-WR940N-v6  console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 27280K/32768K available (3245K kernel code, 171K rwdata, 820K rodata, 300K init, 213K bss, 5488K 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:750.000MHz, DDR:400.000MHz, AHB:250.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5096694524 ns
[    0.000007] sched_clock: 32 bits at 375MHz, resolution 2ns, wraps every 5726622718ns
[    0.008233] Calibrating delay loop... 373.55 BogoMIPS (lpj=1867776)
[    0.071112] pid_max: default: 32768 minimum: 301
[    0.076080] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.083060] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.093016] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103440] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.110450] NET: Registered protocol family 16
[    0.116694] MIPS: machine is TP-LINK TL-WR940N v6
[    0.611318] clocksource: Switched to clocksource MIPS
[    0.617754] NET: Registered protocol family 2
[    0.623136] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.630500] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.637266] TCP: Hash tables configured (established 1024 bind 1024)
[    0.644079] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.650250] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.657185] NET: Registered protocol family 1
[    0.665802] Crashlog allocated RAM at address 0x1f00000
[    0.672373] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.685303] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.691496] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.709916] io scheduler noop registered
[    0.714110] io scheduler deadline registered (default)
[    0.719928] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.727094] console [ttyS0] disabled
[    0.750965] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.760066] console [ttyS0] enabled
[    0.760066] console [ttyS0] enabled
[    0.767619] bootconsole [early0] disabled
[    0.767619] bootconsole [early0] disabled
[    0.779935] m25p80 spi0.0: found gd25q32, expected m25p80
[    0.787889] m25p80 spi0.0: gd25q32 (4096 Kbytes)
[    0.793146] 5 tp-link partitions found on MTD device spi0.0
[    0.798900] Creating 5 MTD partitions on "spi0.0":
[    0.803883] 0x000000000000-0x000000020000 : "u-boot"
[    0.810404] 0x000000020000-0x000000179ba4 : "kernel"
[    0.817218] 0x000000179ba4-0x0000003f0000 : "rootfs"
[    0.823937] mtd: device 2 (rootfs) set to be root filesystem
[    0.829825] 1 squashfs-split partitions found on MTD device rootfs
[    0.836272] 0x0000003a0000-0x0000003f0000 : "rootfs_data"
[    0.843396] 0x0000003f0000-0x000000400000 : "art"
[    0.849795] 0x000000020000-0x0000003f0000 : "firmware"
[    0.857721] libphy: Fixed MDIO Bus: probed
[    0.878969] libphy: ag71xx_mdio: probed
[    1.513382] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.523502] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.153172] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.205427] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.213008] NET: Registered protocol family 10
[    2.220660] NET: Registered protocol family 17
[    2.225492] 8021q: 802.1Q VLAN Support v1.8
[    2.237521] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.247076] Freeing unused kernel memory: 300K
[    2.251698] This architecture does not have kernel memory protection.
[    2.551370] random: fast init done
[    2.940464] init: Console is alive
[    2.944291] init: - watchdog -
[    3.801192] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.847789] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.866306] init: - preinit -
[    4.500482] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.583635] eth0: link up (100Mbps/Full duplex)
[    6.601031] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.796095] jffs2: notice: (360) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.813538] mount_root: switching to jffs2 overlay
[    7.845621] urandom-seed: Seeding with /etc/urandom.seed
[    7.995703] eth0: link down
[    8.009939] procd: - early -
[    8.013795] procd: - watchdog -
[    8.611454] procd: - watchdog -
[    8.614966] procd: - ubus -
[    8.707631] procd: - init -
Please press Enter to activate this console.
[    8.987583] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.997361] tun: Universal TUN/TAP device driver, 1.6
[    9.002654] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    9.013961] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.030790] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.039129] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.049170] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.062933] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.120926] xt_time: kernel timezone is -0000
[    9.181255] PPP generic driver version 2.4.2
[    9.188199] NET: Registered protocol family 24
[    9.257738] ieee80211 phy0: Atheros AR9561 Rev:0 mem=0xb8100000, irq=47
[    9.334779] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.789103] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   15.812657] br-lan: port 1(eth1.1) entered blocking state
[   15.818248] br-lan: port 1(eth1.1) entered disabled state
[   15.824270] device eth1.1 entered promiscuous mode
[   15.829229] device eth1 entered promiscuous mode
[   15.862822] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   15.902315] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   17.933065] eth1: link up (1000Mbps/Full duplex)
[   17.937875] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   17.945764] br-lan: port 1(eth1.1) entered blocking state
[   17.951407] br-lan: port 1(eth1.1) entered forwarding state
[   17.958803] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   18.023520] eth0: link up (100Mbps/Full duplex)
[   18.028252] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  119.434918] random: crng init done
1 Like

PR opened
https://github.com/openwrt/openwrt/pull/635

1 Like

LODI = IDOL to robimarko.....

It looks like the one LED is actually dual color.
Can you tell me which color it is in current image?
So I can also add second GPIO to be able to use second color for diagnosing purposes?

i got version 6 right now....am where can i download the firmware....is it ok to use the v4 or should i compile ....sorry !!! just a little confuse

No,do not use v4 one.
You can compile from here
https://github.com/robimarko/openwrt/tree/WR940N-v6

I opened a PR for it to be merged,but It wont be accepted until it is tested if WAN LED is multicolor.
Would you want to be the one testing it?

hayzz error missing libncurses...trying to compile...

Orange with no Wan and green with wan

Ok,so I can then add second GPIO for LED and we can use green one as standard and orange for diagnosing

Sorry. Yes it's multicolor. Orange and green.

Already in OpenWRT image from my source?

i finished compile but flashing through web and tftp error

Without bootlog not much I can do.
That is weird since @amaurynieto tested it and it works