OpenWrt Forum Archive

Topic: Linksys WRT54GL "Brick" Issue

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

Hi,

I seem to have successfully turned my router into a brick.  Here is a brief summary of how I got there:

Took a brand new WRT54GL (the new Linux one) and installed openwrt-wrt54g-squashfs.bin (RC5) via the Linksys web interface.  No problems, router booted, logged in via telnet on first boot and set a password.

Installed and configured a few packages and was using it successfully for a couple of days.

I decided to revert it back to the Linksys firmware for the purpose of going through the whole install process again so that I could document my setup.  As I am using RC5, I took the advice in the notes and used webif in OpenWrt to upload the Linksys firmware.  I got a copy of the Linksys firmware from the Linksys website following a link from linksysinfo.org site.  (Could not find the firmware on the UK website, had to get it off the US site, don't know if this should make a difference).  Went through the process of uploading the firmware making sure that I had ticked the "Erase the JFFS2 partition" box first.  The firmware appeared to load fine.  There were a total of 3 lines of messages.  Sorry I didn't take a note of them but none of the messages indicated any errors just information on the fact that Linux was being loaded.  I had a constant ping going and this stopped after the 3rd line of info and the browser had a "done" message in the status bar at the bottom.  I waited a good 5 minutes before manually rebooting the unit but still got no ping reply after it booted.  I also tried each port on the router but neither would respond.

As it dawned on me that I was in a "brick" scenario, I went through the troubleshooting section and tried the "failsafe mode" as I am using the SquashFS images.  I installed the recvudp utility but got no response from any of the router on any port.  This leads me to think that the Linksys firmware has loaded but can't boot.

I then found the "shorting out the flash" method which I tried before reading mbm's comments in post "id=5346" about this not being the correct way to go about things and this method had been removed from the OpenWrt wiki as it had messed up a lot of routers.  Nevertheless, I did get some progress.  Once I had shorted out the pin, I could then ping the router on 192.168.1.1.  I used Windows 2000 tftp to upload the Linksys firmware again.  The transfer was succesfull and according to the notes the router should reboot and let me access the Linksys web interface.  The router didn't reboot but now the power light is constantly flashing (even after several reboots) and it seems to be in a permenant tftp state but not able to accept firmware.  I also tried the OpenWRT firmware image which also didn't work.

After several scratches of the head, I think the problem may lie with some of my actions while I was using OpenWRT.  I want to be able to connect more than one router up to the unit so I decided to reverse the role of the switch and make the "Internet" port the single connection to the LAN and ports 1 to 4 separate vlans that I could attach routers to.  This would save having to use another switch to bridge 2 or more routers onto the Internet port.  When I made my changes, it all seemed to work fine.  The changes I made were as follows:

Old nvram Settings:
vlan0ports="3 2 1 0 5*"
vlan0hwname=et0
vlan1ports="4 5"
vlan1hwname=et0

New nvram Settings:
vlan0ports="4 5*"
vlan0hwname=et0
vlan1ports="3 5"
vlan1hwname=et0
vlan2ports="2 5"
vlan2hwname=et0
vlan3ports="1 5"
vlan3hwname=et0
vlan4ports="0 5"
vlan4hwname=et0


I have just grasped that flashing the router does not clear the nvram variables therefore I think this is my problem.   (By the way, I was connected to the "Internet" (new LAN) port when uploading the Linksys firmware).

I think that the Linksys firmware loaded successfully but it is booting and trying to use my custom vlanX nvram settings which are wrong for the correct operation of the Linksys software.

Also, I have noticed a note in the "Ethernet switch configuration" section that says:

"It's a good idea when choosing a vlan layout to keep port 1 in vlan0. At least the WRT54GS v1.0 will not accept new firmware via TFTP if port 1 is in another VLAN."

Does this mean Linksys firmware or OpenWRT firmware?  If it means the Linksys firmware, this may explain why my tftp is not working as my configuration changes have put port 1 into vlan3. 

If this is the case, can anyone suggest a way of resetting the nvram settings considering the state (I think) the router is currently in or am I way off the mark and there is something else that would be causing my problem?

Any help would be greatly appreciated and I hope I have included enough information.

regards,
Aidan

(Last edited by AidanAnderson on 20 Apr 2006, 18:08)

Hi,

you can try to reset NVRAM by pressing reset for at least five seconds while power-on.
This should reset NVRAM through the CFE. But search the WIKI "Reset NVRAM"
there are infos this might be not save on all models. But you bricked it already.

Axel

AidanAnderson wrote:

I then found the "shorting out the flash" method which I tried before reading mbm's comments in post "id=5346" about this not being the correct way to go about things and this method had been removed from the OpenWrt wiki as it had messed up a lot of routers.  Nevertheless, I did get some progress.  Once I had shorted out the pin, I could then ping the router on 192.168.1.1.  I used Windows 2000 tftp to upload the Linksys firmware again.  The transfer was succesfull and according to the notes the router should reboot and let me access the Linksys web interface.  The router didn't reboot but now the power light is constantly flashing (even after several reboots) and it seems to be in a permenant tftp state but not able to accept firmware.  I also tried the OpenWRT firmware image which also didn't work.

... and you've fallen into the classic problem that you've shorted the pins so well they've remained shorted.

dude, try making sure you havent permanently shorted the flash pins by lightly scraping the area between the contacts with a pin or needle. it is possible (as happened with me) that using a screwdriver flattened the soft metal and formed a constant short.

also, did you set binary mode?

--neg

mbm wrote:

... and you've fallen into the classic problem that you've shorted the pins so well they've remained shorted.

Exactly. The problem with this method is the that the commonly suggested tool (screwdrive or knife) is considerably harder than soft solder and rigid, which facilitates damage. If done properly by touching with a small guage soft copper wire (other end shorted to antenna block ground), the method is quite safe and very effective.

The damage can probably be repaired (with a hard tool!) by cleaning the bridge inadvertantly created between the pins.

- DL

(Last edited by dl on 21 Apr 2006, 09:29)

Thank you all for your replies, much appreciated!!!

I have tried scraping between the 2 pins to remove any short I have created but to no avail.  The power light continues to flash so it appears that I have permenantly shorted the unit.  A lesson well learned sad

If I hadn't been too hasty and not shorted out the unit, what should I have done to recover?

As the last action before I lost contact with the unit was to upload the Linksys firmare again, I tested the actual firmware file I used on another unit already running the Linksys software and it worked fine.  This at least tells me that the firmware I loaded wasn't corrupt.  Also, before I even installed OpenWrt, the unit had its original release firmware v4.30.0.  I could not find this version anywhere, only the current version v4.30.2.  Is is a requirement that you must go back to the same release you were running before you installed OpenWrt?

If the above shouldn't have caused a problem, is it the fact that I changed the NVRAM variables while the unit was running OpenWrt  that has caused my problem?  If this is the case, is it maybe safer not to permenantly change the nvram variables at all but just set them via a script on boot up so that they are changed in ram and never committed?

Sorry to harp on about this but I am a bit new to OpenWrt and want to get to grips with the fundamentals.  In any case, I am going to read through the entire documentation again in case there are some fundamental rules I have missed.  If the question you are asking yourself is "why is this guy bothering about this so much?", it is the fact that I want to be able to go back at any stage to the original Linksys software so that I can test the entire install process from original Linksys software right up to a fully customised version of OpenWrt.

regards,
Aidan

AidanAnderson wrote:

If the above shouldn't have caused a problem, is it the fact that I changed the NVRAM variables while the unit was running OpenWrt  that has caused my problem?  If this is the case, is it maybe safer not to permenantly change the nvram variables at all but just set them via a script on boot up so that they are changed in ram and never committed?

Changing the vlan variables really is trivial, you can set them to whatever you want provided that you don't need to do any network activity in the bootloader; if you need to tftp a new firmware you'll want at least one port in the lan vlan (typically vlan0), even if you aren't technically using the port as a lan port -- call it a management port if it makes you feel better.

So, the next question is usually "if I screw up my vlan variables can I still get into openwrt to fix them?". Yes, openwrt will override the vlan settings on bootup to allow failsafe access.

Still worried about the vlan variables? well, you can read and write the current vlan settings via /proc/switch/eth0; this gives you a way to test settings or change them dynamically. If you're thinking of writing a script to set these at bootup, don't -- what's the point? what we have now is just setting them based on the vlan variables anyways, you might as well just set the variables.

I think that the Linksys firmware loaded successfully but it is booting and trying to use my custom vlanX nvram settings which are wrong for the correct operation of the Linksys software.

Right, the linksys firmware will blindly use any variables you have and may not even give you an option to change them. It's not a bug of any kind, most people just don't realize or understand that reflashing doesn't reset nvram.

mbm wrote:

Right, the linksys firmware will blindly use any variables you have and may not even give you an option to change them. It's not a bug of any kind, most people just don't realize or understand that reflashing doesn't reset nvram.

Fantastic!  That makes me a lot happier now that I know for sure what caused my problem (and what do avoid doing in the future smile)

Thanks again for all your help.

regards,
Aidan

The discussion might have continued from here.