OpenWrt Forum Archive

Topic: Bricked WAG160Nv2 - bootloader says Download mode1111 ... press enter

The content of this topic has been archived between 2 Oct 2014 and 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

1955jmgs wrote:

Guys, I've followed this topic and remain amazed at all of your abilitys but can anyone answer the simple question re the WAG160N V1, Openwrt refers to this as supported under 10.0.3 with the name BRCM63XX, but there are a multitude of files there - which is the correct one. I have the converted CA42 connected to the serial port but have not got a clue which file to upload. I would rather not brick my router/modem but this is so obvious that I simply cannot see how to do it. Linksys Web firmware loader rejects all and if I stop the serial to enable upload firmware then it reject it too, as for TFTP no success either - AAAH, which file?
John

Please look into this thread, Virus posted a link to a running firmware. I don't own a version 1.

james.harper wrote:

I'm wondering if 'Download mode1111' might mean I have an opportunity to load a new firmware via the serial port.

Sorry for the long delay, I  was too busy with my job.
Yesterday I've successfully downloaded a vendor firmware into a WAG160Nv2 in download mode smile
You find the tool here.

Next step is to get rid of the pid2 error in the bootloader for OpenWRT images. As the bootloader searches in the
upper 2MBytes only and I don't want to restrict an OpenWRT image to squashfs, I'd love to put the pid2 into the nvram area at initial start. The kernel is usually smaller than 2 MByte and everything above is writable, except for the ath_data and nvram mtd.

(Last edited by jal2 on 17 Feb 2011, 15:34)

Hi everyone, I am successfull  flash OpenWRT Backfire into my Linksys WAG160Nv2.  But I have to "cut" jffs from image, so my change in system aren't  permanent. If I need permanent change I have to do before compiling source code. I write HOW-TO with everything needed in my freetime, it is available there: http://www.stud.fit.vutbr.cz/~xproch21/doku.php?id=openwrt-linksys-en. I hope that will be usefull.

Sorry for my english smile

xTomy wrote:

Hi everyone, I am successfull  flash OpenWRT Backfire into my Linksys WAG160Nv2.  But I have to "cut" jffs from image, so my change in system aren't  permanent. If I need permanent change I have to do before compiling source code. I write HOW-TO with everything needed in my freetime, it is available there: http://www.stud.fit.vutbr.cz/~xproch21/doku.php?id=openwrt-linksys-en. I hope that will be usefull.

I'm currently trying to incorporate the pid2 into an OpenWRT image for the WAG160Nv2 patching the imagetag tool. Have you ever tried to run a svn trunk based OpenWRT image on your device? Any idea if the nvram utility works with the nvram area of the WAG160Nv2?

ADDED:
Does WLAN works with your kernel - if yes, which driver?
We should put all the information about the WAG160Nv2 into a wiki page at openwrt.org - eventually splitting this one into two. I'd start this after the pid2 is added to the image.

BTW, the vendor firmware contains the pid2 at the end of the kernel area, but it has the kernel as the last part in flash, while OpenWRT has the rootfs there (to be able to let a jffs2 rootfs occupy the remaining space). So we either put the pid2 after the rootfs, which can be squashfs only in this case or put the pid2 e.g. into the nvram area.

Regards,
Jörg

(Last edited by jal2 on 19 Feb 2011, 00:25)

I would like to help with pid, but I don't know how you can add to image? With some imagetag tool? I don't have experience with this. I compiled release sources, don't tried developments sources.

Unfortunately, I don't tried my WLAN interface establish. I need only ethernets interfaces in my project, but if I have free time I should solve this.

Thanks for the clarification about pid. I have some question about tihs. Do you know value of pid2? I think that the pid have to be at exact place e.g. after rootfs, but you write that can be into the nvram area. Bootloader search in all flash memory? I don't understand this.

Thanks and cheers,
Tomas

jal2 wrote:
xTomy wrote:

Hi everyone, I am successfull  flash OpenWRT Backfire into my Linksys WAG160Nv2.  But I have to "cut" jffs from image, so my change in system aren't  permanent. If I need permanent change I have to do before compiling source code. I write HOW-TO with everything needed in my freetime, it is available there: http://www.stud.fit.vutbr.cz/~xproch21/doku.php?id=openwrt-linksys-en. I hope that will be usefull.

I'm currently trying to incorporate the pid2 into an OpenWRT image for the WAG160Nv2 patching the imagetag tool. Have you ever tried to run a svn trunk based OpenWRT image on your device? Any idea if the nvram utility works with the nvram area of the WAG160Nv2?

ADDED:
Does WLAN works with your kernel - if yes, which driver?
We should put all the information about the WAG160Nv2 into a wiki page at openwrt.org - eventually splitting this one into two. I'd start this after the pid2 is added to the image.

BTW, the vendor firmware contains the pid2 at the end of the kernel area, but it has the kernel as the last part in flash, while OpenWRT has the rootfs there (to be able to let a jffs2 rootfs occupy the remaining space). So we either put the pid2 after the rootfs, which can be squashfs only in this case or put the pid2 e.g. into the nvram area.

Regards,
Jörg

Couldn't you use the driver given in the official firmware source code there: http://homedownloads.cisco.com/downloads/gplcode/wag160nv2_v2.00.17_eu_annexA,0.tgz . I have an annex A and it seems you have an annex B but it exists for annex B too. I'm not used to work with openwrt but if you have an image i can make test and then bug report and maybe fix somes.

Regards,

Gaëtan

xTomy wrote:

I would like to help with pid, but I don't know how you can add to image? With some imagetag tool? I don't have experience with this. I compiled release sources, don't tried developments sources.

Unfortunately, I don't tried my WLAN interface establish. I need only ethernets interfaces in my project, but if I have free time I should solve this.

Thanks for the clarification about pid. I have some question about tihs. Do you know value of pid2? I think that the pid have to be at exact place e.g. after rootfs, but you write that can be into the nvram area. Bootloader search in all flash memory? I don't understand this.

Sorry for the delay.
Yes, I'm trying to use the imagetag tool (tools/firmware-utils/src/imagetag.c) to add the pid.
pid2 is "seRcOmM".
The bootloader searches the upper 2 MByte of flash for the pid2.

gaetronik wrote:

Couldn't you use the driver given in the official firmware source code there: http://homedownloads.cisco.com/downloads/gplcode/wag160nv2_v2.00.17_eu_annexA,0.tgz . I have an annex A and it seems you have an annex B but it exists for annex B too. I'm not used to work with openwrt but if you have an image i can make test and then bug report and maybe fix somes.

Thanks for the offer to help. I don't understand completely what driver you refer to - the one for WLAN?

I've managed to add the pid2 to the OpenWRT image, so that a reboot of the device is possible now.
You find my patches for the imagetag and Makefile here.
Just apply them in order to svn trunk (don't know if they work with any other branch).

They should produce two new images called openwrt-WAG160Nv2-annex_a-squashfs-web.bin  and
openwrt-WAG160Nv2-annex_b-squashfs-web.bin. You are able to either upload them using the vendor
firmware web interface or use the download mode of the bootloader and a sercomm tool,
e.g. the Linux one.
As the images contain a zeroed CFE area there is a slight chance that some other version of the flash update cgi
may overwrite the bootloader with the zeros (mine did not). In that case you need JTAG to revive the board. So the Linux sercomm tool
may be a bit safer. It's always a good idea to backup the whole flash (especially the ath_data area) as a first step.

With the above patch we are restricted to a squashfs rootfs and sizeof(kernel) + sizeof(rootfs) must be greater than 2MByte.

EDIT: The OpenWRT image overwrote the ath_data section, we need to add it to the flash layout of the WAG160Nv2. Be sure to
have a backup of it before trying to run OpenWRT!

(Last edited by jal2 on 26 Feb 2011, 02:16)

jal2 wrote:

EDIT: The OpenWRT image overwrote the ath_data section, we need to add it to the flash layout of the WAG160Nv2. Be sure to
have a backup of it before trying to run OpenWRT!

Fixed with the patch in ticket #8953

[s]I guess it's time to update the wiki page for the WAG160Nv2.[/s]
EDIT: Done. Please feel free to edit here

BTW, wlan isn't working here, as I miss some code to write the PCI config data into the AR9223. I know how it looks like for the
AR71xx SoC, but cannot figure out a good place to implement this on bcm63xx (see this thread)

(Last edited by jal2 on 28 Feb 2011, 01:11)

The discussion might have continued from here.