OpenWrt Forum Archive

Topic: Avalon TL-WR703 to standard OpenWrt: BRICKS ALL

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I bought a bunch of used 703's on ebay from a seller who kept getting them back as returns. They are all running the following openwrt firmware/software.
Problem is, trying to convert them back to standard openwrt so I can then use my own Image Builder build simply keeps bricking the units. Once they are sysupgraded, they always die. I re-power the units, they blink the LED once and that's it, nothing more from it. It doesn't try to get a DHCP address, doesn't set it's own address, it's just gone.

So far, I had done the upgrade using the my own sysupgrade and factory file. Both killed the device. I then used a default factory build mentioned in the wiki (can't recall which though, should have kept better track) and that just killed another one.

I'm using the image builder with pre-built images to make my own build. The build works perfectly on new devices which come with the Chinese firmware. With those, I use the web interface to upload a 'factory' build, then I install my own build. I have not had one problem with my builds or using factory found in the wiki.

Then I found original firmware to put it back to tp-link, did the upgrade and got myself another bricked unit.
I used the following file;

WR703N_CH_MR3020Nv1_EN_up(120320)_Webflash.bin

Which was inside of the following zip;
Original TP-LINK TL-WR703N (Chinese version).zip

Said to be the original firmware file for the 703n.

Which I found here;

http://www.siongboon.com/projects/2013- … index.html

Then someone ask if it would make more sense to use something directly from tp-link but they no longer seem to support this unit and I wasn't able to find any files for it.

I took the bricked ones apart and they are all v1.6. At least, there is a sticker on the Ethernet port which says 1.6.
All of them were running Bleeding Edge r38816. Hardware wise, sticker wise, they all look the same between NEW and the used ones I bought.

I found some additional info on the running openwrt device.

/tmp/sysinfo

board_name: tl-wr703n
model: TP-LINK TL-WR703N V1

What's the V1 mean?

Then in /etc

in a file called avalon_version
20131229
cgminer: 698d677
cgminer-openwrt-packages: aadd747+
luci: 346e3e7+

Looking on the net, this is a bit beyond me again. Looks like some other version of openwrt?

OpenWrt packages for Avalon firmware

https://github.com/Canaan-Creative/cgmi … t-packages

I can get into them using failsafe, hitting the reset while it's booting to get the fast flashing LED.
I can wget my custom build and stick it on the device but I'm really not sure what to do from this point on anymore. If it was clear I was doing something wrong, ok, but, I've spent hours reading and cannot confirm anything.

At this point, I've bricked six units total and I'm pretty confused about what is going on now.

In terms of building, I'm not doing anything all that special and my builds work on all new devices.

make image PROFILE=TLWR703 PACKAGES="at sysstat bash mtr curl kmod-ipv6 -dnsmasq -kmod-ath9k -kmod-usb-core -kmod-usb2 -uboot-envtools -wpa
d-mini" FILES=files/

Tried to build using the latest 14.7... Dead, just like the others. They don't even go into any kind of rescue mode. I've tried everything I can find. That same build works fine on all of the units I bought NEW because I tried upgrading some this morning and all went fine.

After I flashed it with 14.7, it lights the LED once then nothing else.
I did my build using the image builder and the command shown above.

I used the following file to upgrade.

3932160 Nov  6 15:54 openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin

The builder I am using is from;
http://downloads.openwrt.org/barrier_br … x/generic/

The file I am using is;

barrier_breaker/14.07/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64.tar.bz2

Here is /proc/mtd

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000f8910 00010000 "kernel"
mtd2: 002d76f0 00010000 "rootfs"
mtd3: 000b0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

Help!!!!

what command are you using to flash?

sysupgrade -n

I didn't know there is another one?

There is a test mode but it sure would be nice if there was a way of running through a 'fake' upgrade, to know if it would work or not before committing.

(Last edited by projects on 11 Nov 2014, 01:54)

What does the "-n" do? I didn't see it on the wiki page - http://wiki.openwrt.org/doc/howto/generic.sysupgrade

Alternatives to OpenWrt Sysupgrade
mtd
In case sysupgrade is not supported for your embedded device, you cannot use it. Use mtd instead:
mtd -r write /tmp/openwrt-ar71xx-generic-wzr-hp-ag300h-squashfs-sysupgrade.bin firmware

-n doesn't save files and configurations since first factory/sysupgrade.

mtd does exist on the device and so does sysupgrade.

Sysupgrade does run, and I see it go through the whole upgrade then reboot process.

Are you saying I should use mtd instead and this will finally work? If so, what version of openwrt would be safe? My versions which work on other similar hardware, a specific factory build, something else?

(Last edited by projects on 11 Nov 2014, 04:00)

Any chance someone else can shed some light on this? It seems like I have a lead for trying this on another unit.

Does the mtd partitions match your other 703n (working ones)?

Using mtd is worth a try. That's the way I flashed my 703n.

How do I check this?

Also, I don't have a problem trying mtd but I need to make sure I have the right info, the right build/fw file, etc so I don't brick yet another one.

(Last edited by projects on 12 Nov 2014, 06:39)

cat /proc/mtd

Compare output from a working device and your "brick lot".

I posted the output of one above, here it is again.

This is from an avalon unit;
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000f8910 00010000 "kernel"
mtd2: 002d76f0 00010000 "rootfs"
mtd3: 000b0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

This is from one of the new units;
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010e630 00010000 "kernel"
mtd2: 002c19d0 00010000 "rootfs"
mtd3: 00100000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

Well, it looks different, so my guess is they might have some tweaks in there uboot and/or image.

projects wrote:

I posted the output of one above, here it is again.

This is from an avalon unit;
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000f8910 00010000 "kernel"
mtd2: 002d76f0 00010000 "rootfs"
mtd3: 000b0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

This is from one of the new units;
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010e630 00010000 "kernel"
mtd2: 002c19d0 00010000 "rootfs"
mtd3: 00100000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

To compare, here is the avalon again;

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000f8910 00010000 "kernel"
mtd2: 002d76f0 00010000 "rootfs"
mtd3: 000b0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

Here is what another of my new ones look like;

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010e630 00010000 "kernel"
mtd2: 002c19d0 00010000 "rootfs"
mtd3: 00100000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

and yet another

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010e630 00010000 "kernel"
mtd2: 002c19d0 00010000 "rootfs"
mtd3: 00100000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

I am assuming you are looking at the rootfs?
It seems the kernel would change depending on which you had installed right?
So if you feel this has been modified, might you know the exact steps or a URL on what I need to try next.
I've seen plenty of blogs about fail safe stuff but I need a lead which gives the right one for sure.

(Last edited by projects on 12 Nov 2014, 22:26)

Looking in the wiki, I also found this command which returns the exact same thing on either new device or my avalon units.

# grep -a U-Boot /dev/mtd0ro | cut -d'I' -f1
U-Boot 1.1.4 (Mar 21 2013 - 10:09:15)

Same version, date, time.

Finally, a simple solution.

Do not use 'sysupgrade'

Download openwrt offical firmware, like this one:
http://downloads.openwrt.org/barrier_br … actory.bin

Use this command to reflash

mtd -r write /tmp/703n.bin firmware

No more bricks thank god!

That is rather interesting since "sysupgrade" is actually just a collection of shell scripts and, in the end, using mtd itself. If you're not saving configuration, it is issuing exactly your command (minus the -r which only reboots after flashing).

I still can't help but wonder if the solution wasn't really just using that official build image instead of all the other (self-built) images you tried up to this point.

(Last edited by metai on 18 Nov 2014, 11:19)

I used many builds and was told by the avalon developer NOT to use sysupgrade, that it was bircking my devices.
Sure enough, using mtd works like a charm.

Which of course makes me wonder about something else now.
Once I've converted back to standard openwrt, I am then using sysupgrade to upgrade to my own build.
Can mtd still be used when upgrading as well?

Hmm, who would know for sure I wonder? It would be nice to know if it is safe to always use mtd instead of sysupgrade.

Do you mean I should update the page? I am not sure I am qualified to give information. I've only been using openwrt for less than a year.

projects wrote:

Finally, a simple solution.

Do not use 'sysupgrade'

Download openwrt offical firmware, like this one:
http://downloads.openwrt.org/barrier_br … actory.bin

Use this command to reflash

mtd -r write /tmp/703n.bin firmware

No more bricks thank god!

Surprise surprise, that's what I recommended above.

projects wrote:

Do you mean I should update the page? I am not sure I am qualified to give information. I've only been using openwrt for less than a year.

Same for me, I don't really feel qualified for more than adding a link...
It was rather a note to everyone, than to you directly smile

But if you find out the answer and have tried it yourself, feel free to update the wiki.

Okay, but again, why does mtd work and sysupgrade doesn't? Sysupgrade is just a wrapper for mtd, and if you don't preserve settings it does the same thing as the quoted mtd command (except it pipes the image into mtd via stdin, afaikt).

The discussion might have continued from here.