Re: TP-Link TL-WR841N v8.0

LOL I connect my router via Arduino Due R3 to PC and got terminal smile

http://www.bankfotek.pl/image/1367249.jpeg

Message from terminal after router power on:

U-Boot 1.1.4 (Nov  1 2012 - 10:25:30)

U-boot AP123


DRAM:  32 MB
id read 0x100000ff
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
wasp reset mask:c03300
WASP ----> S27 PHY
file: ag934x.c,line: 179==: set LAN&WAN SWAP. --debug by HouXB
GMAC: cfg1 0x5 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
s27 reg init
athrs27_phy_setup ATHR_PHY_CONTROL 4: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4: 0x10
eth0 up
WASP ----> S27 PHY
file: ag934x.c,line: 179==: set LAN&WAN SWAP. --debug by HouXB
GMAC: cfg1 0xf cfg2 0x7214
eth1: ba:be:fa:ce:08:41
s27 reg init lan
ATHRS27: resetting s27
ATHRS27: s27 reset done
athrs27_phy_setup ATHR_PHY_CONTROL 0: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 1: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 2: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 3: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3: 0x10
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.39.4 (openwrtcn@openwrt) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #15 Thu Nov 17 13:34:11 CST 2011
bootconsole [early0] enabled
CPU revision is: 0001974c (MIPS 74Kc)
SoC: Atheros AR9341 rev 1
Clocks: CPU:525.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  board=TL-WR841N-v8 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29356k/32768k available (2012k kernel code, 3412k reserved, 395k data, 184k init, 0k highmem)
SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:80
Calibrating delay loop... 261.73 BogoMIPS (lpj=1308672)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is TP-LINK TL-WR841N v8
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: unrecognized JEDEC id 1c3016
ag71xx_mdio: probed
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Cannot open root device "(null)" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

What it mean? sad

Re: TP-Link TL-WR841N v8.0

This does not seem ok:

m25p80 spi0.0: unrecognized JEDEC id 1c3016

what flash is onboard? Take a macro picture or note here every code you read on it...

Also What hw.ver is on the label?

Re: TP-Link TL-WR841N v8.0

TL-WR851N VER. 8.2

Cannot make enough good photo of my board... Onboard flash? U mean the biggest "chip" on board?

Re: TP-Link TL-WR841N v8.0

gulweb wrote:

Flash chips now back in their respective boards, and I now have two working and identical routers.

wow congratulations!

Do they have same mac addresses?

Re: TP-Link TL-WR841N v8.0

I bricked my router to, i have a  8.2version.

It powers on, all the led light simultaneas and go off. There is nothing i can do to it to change it, 30/30/30 doesn't work.
It doesn't responds to ping, it repeatly conects for a second on lan, but the lan cable doesn't link.
It only lights up once and then it's over.

Any solutions?

Re: TP-Link TL-WR841N v8.0

you mean wr841 right??

flash it's this:

http://4.bp.blogspot.com/-ume9kTJ4fBs/U … bottom.jpg

Re: TP-Link TL-WR841N v8.0

omg another brick, there is something BAD going on..

Re: TP-Link TL-WR841N v8.0

Yes, wr841N v8.2 i see on the back of the router.

I am to blame for this, i was pushing the flashing over the limits.
I am not familiar with this procedure, can you please direct me to the right procedure?

Thanks!

Re: TP-Link TL-WR841N v8.0

@uqadwe what image you flashed (post specific link) and how? why you say that you are to blame???

Re: TP-Link TL-WR841N v8.0

Not sure, but my flash is: "cfeon q32b-104hip"

uqadwe wrote:

I bricked my router to, i have a  8.2version.

It powers on, all the led light simultaneas and go off. There is nothing i can do to it to change it, 30/30/30 doesn't work.
It doesn't responds to ping, it repeatly conects for a second on lan, but the lan cable doesn't link.
It only lights up once and then it's over.

Any solutions?

that same problem!

nebbia88 wrote:

omg another brick, there is something BAD going on..

yeah... sad

136 (edited by uqadwe 2012-11-25 22:25:32)

Re: TP-Link TL-WR841N v8.0

I originally flashed an OpenWrt firmware(lucy)

and then tried to return to stock, it seemed blocked after an half an hour so i unpluged it.
I don't have the link anymore, i flashed it from the LUCY web interface

Re: TP-Link TL-WR841N v8.0

ok, uqadwe you have to connect to serial console, and your problem seems the usual "flashed an image including uboot in the WRONG way"..

search info in wiki for serial port, you need a ttl serial adapter, not a classic rs232 serial port.. and some soldering skills..

quorce, wiki said that wr841nd v8 has spansion FL032PIF (dunno if it's right), while your flash seems different...

you can try to flash back stock firmware with tftp method..

138 (edited by quorce 2012-11-25 22:37:52)

Re: TP-Link TL-WR841N v8.0

nebbia88 wrote:

ok, uqadwe you have to connect to serial console, and your problem seems the usual "flashed an image including uboot in the WRONG way"..

search info in wiki for serial port, you need a ttl serial adapter, not a classic rs232 serial port.. and some soldering skills..

quorce, wiki said that wr841nd v8 has spansion FL032PIF (dunno if it's right), while your flash seems different...

you can try to flash back stock firmware with tftp method..

Ok understand... Is this possible only with USB TTL Serial adapter?

PS. wr841n not wr841nd - if this is any difference smile

Re: TP-Link TL-WR841N v8.0

Wouldn't be more likely to resolv the problem to send it to warranty?
Do you think they will easily find out what really happened? Considering it will be probably get analysed by the retailer service, which is a big online shop.

Thanks for your guidance!

140 (edited by nebbia88 2012-11-25 22:41:53)

Re: TP-Link TL-WR841N v8.0

uqadwe, they can find out if they connect to serial.. it will be more useful and fun if you manage to unbrick by yourself ^^

quorce, you already got a serial terminal, you're good to go (you have mail!)!

Re: TP-Link TL-WR841N v8.0

nebbia88 wrote:
gulweb wrote:

Flash chips now back in their respective boards, and I now have two working and identical routers.

wow congratulations!

Do they have same mac addresses?

Yes!! So some more research needs to be done, and from my previos experience, doing the wrong thing here will disable
uboot and not only os loading, but I would love to save config or art , edit, and write back

Does uboot support setting mac? Does it subbort saveenv ?? I tried to get the source, to have a look at uboot, but GPL
kit is not a tar.gz.

142 (edited by gulweb 2012-11-25 23:56:48)

Re: TP-Link TL-WR841N v8.0

I think maybe there is something to analyse from this, which is the crash that happened on router #2, after flashing tplink firmware (without boot, 120552). This is the crash footprint, form tplink linux.



insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory

unlzma/peek_old_byte: position 9413459 out of range
unlzma/peek_old_byte: position 41992320 out of range
SQUASHFS error: crypto_decompress_update returned -85522, data probably corrupt
SQUASHFS error: squashfs_read_data failed to read block 0x1e4431
SQUASHFS error: Unable to read data cache entry [1e4431]
SQUASHFS error: Unable to read page, block 1e4431, size 8457
SQUASHFS error: Unable to read data cache entry [1e4431]
SQUASHFS error: Unable to read page, block 1e4431, size 8457
SQUASHFS error: Unable to read data cache entry [1e4431]

I think I get the insmod : harmony error on a working board, but it seems the next operation is trying to unpack the rest as LZMA, what if kernel command string is wrong, or FS type is something else? It is clear what Openwrt does, and how it views flash disk, but maybe THAT is something that changed in the tplink f/w and is a reason they have concatenated boot + firmware in the last two firmwares. But, it does not explain why I succeeded to reflash router #1, but bricked router #2, but I am not 100% sure both routers were at same f/w before I installed Openwrt on them, so there IS a small chance/risk that one router had an updated Uboot, and the other one not. Anyway this is possibly a footprint....

Also: My understanding of the boot procedure is that the cpu reads the spi-connected serial flash int ram before starting. How much it reads, and if there are any checks to the content I dont know, but if there is, it is most probably limited to something extremely simple, since we have not started executing instructions yet. Also, this "prologue" surely can handle many different flash roms,  but there IS some check on the contents that could explain why not even uboot started when I bricked my router.
Does anyone have access to the ar9341 data sheet, and could explain this, or even e-mail a copy?

Re: TP-Link TL-WR841N v8.0

hmm...

got next problem... im "in" router via serial and got problem with tftp...

which version is correct for wr841n? tftp 0x80000000 tplink.bin or 0x81000000? in both version i got checksum bad... sad

Re: TP-Link TL-WR841N v8.0

quorce wrote:

hmm...

got next problem... im "in" router via serial and got problem with tftp...

which version is correct for wr841n? tftp 0x80000000 tplink.bin or 0x81000000? in both version i got checksum bad... sad

Try to do a printenv, that is at least what Uboot thinks of the situation.

in my version it printed out some command abbreviations, and the addresses it wanted to use.

But I want to point out that I DO NOT know or understand this full out.

If you do print out, please post result, so we have something to discuss.

145 (edited by nebbia88 2012-11-26 09:17:12)

Re: TP-Link TL-WR841N v8.0

printenv said tftp=0x81000000 so i think it's right, and different from the wr841nd v7 (wiki says 0x80000000), but equal to the wr703nd (same chipset family?)

http://wiki.openwrt.org/toh/tp-link/tl-wr703n#back.to.original.image


we try to setenv ipaddr and setenv serverip, because the wifi NIC has same subnet, so conflict, but then it says "checksum bad" when tftpboot...

someone can verify if using setenv cause this problem??

we not had time to try WHITOUT USING SETENV, but adjusting ip of NIC accordingly...

146 (edited by quorce 2012-11-26 10:20:47)

Re: TP-Link TL-WR841N v8.0

on pc ethernet set on 192.168.1.2, router to pc via WAN port, than try:

wasp> tftpboot 0x80000000 tplink.bin
enet1 port0 up
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'tplink.bin'.
Load address: 0x80000000
Loading: T T T T T T T

wasp> tftpboot 0x81000000 tplink.bin
Using eth1 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'tplink.bin'.
Load address: 0x81000000
Loading: T T T T T T T T T T

and printenv:

wasp> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0xba:0xbe:0xfa:0xce:0x08:0x41
dir=
bc=ap123
lu=tftp 0x81000000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize;cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x81000000 ${dir}${bc}-squashfs&&erase 0x9f120000 +$filesize;cp.b $fileaddr 0x9f120000 $filesize
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
ipaddr=192.168.1.1
serverip=192.168.1.2

Environment size: 561/65532 bytes

ps. tftpboot via LAN port

wasp> tftpboot 0x81000000 tplink.bin
enet1 port0 down
enet1 port1 up
Using eth1 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'tplink.bin'.
Load address: 0x81000000
Loading: checksum bad
T checksum bad
checksum bad
T checksum bad
checksum bad
T checksum bad

Re: TP-Link TL-WR841N v8.0

try WITHOUT USING setenv, leave all default settings after bootup, so set PC NIC to 192.168.1.100

Re: TP-Link TL-WR841N v8.0

that same...

wasp> tftpboot 0x81000000 tplink.bin
enet1 port1 up
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.111
Filename 'tplink.bin'.
Load address: 0x81000000
Loading: checksum bad
T checksum bad
T checksum bad
T checksum bad
T checksum bad

149 (edited by nebbia88 2012-11-26 10:38:09)

Re: TP-Link TL-WR841N v8.0

I retire myself from this topic xD

only thing i have in mind is "try a different pc and different cable" (but i'm not hoping it makes a difference..)

Re: TP-Link TL-WR841N v8.0

nebbia88 wrote:

I retire myself from this topic xD

only thing i have in mind is "try a different pc and different cable" (but i'm not hoping it makes a difference..)

without effect... today got 3 other cables + other pc... still that same sad