************************************************************** * Unbricking WAG354G * * v 0.2 * * Author: Marco Vedovati * * mailto: marco.v83[at]gmail.com * * Translation by toneworks * ************************************************************** * * * License: this doc is licensed under a * * Creative Commons Attribution-NonCommercial-ShareAlike 2.5 * * info @: http://creativecommons.org/licenses/by-nc-sa/2.5/ * * * ************************************************************** * As always, standard disclaimer: This is a free guide! * * I take no responsibility for any loss, damage or injury * * arising from the application of it. * ************************************************************** This guide is available in the following languages: [IT][EN] Versions: 0.2: restyling (2007/02/12) 0.1: initial release (2007/01/01) ------- Index: .Intro .Requirements .Actions .Other Knowledge ------- Intro Procedure for unbricking the WAG354G router (tested on v1) after a failed firmware flash. ------ Requirements * A tftp client. I suggest using the one in linux terminal can probably come preinstalled in your distro. * An ethernet cable between your pc and the Router (straight). * A (better if) official linksys firmware. ------ Actions Setup your ethernet network adapter with a static ip. My configuration is: IP: 192.168.1.10 netmask: 255.255.255.0 gateway: 192.168.1.1 Connect your network adapter and router with the ethernet cable (I have used router's port no.1). Plug in your router. At this point you will see the "power" led of the router flashing continiously (very frustrating!). Open a terminal window (the commands to enter are after "$" symbol): Enter the folder you have placed the firmware. My firmware is in /home/marco/Desktop: marco@helix:~$ cd Desktop Change firmware's filename to upgrade_code.bin: marco@helix:~/Desktop$ mv name_of_firmware.bin upgrade_code.bin Launch tftp: marco@helix:~/Desktop$ tftp tftp> Entering "?" will show you all available tftp commands: tftp> ? Commands may be abbreviated. Commands are: connect connect to remote tftp mode set file transfer mode put send file get receive file quit exit tftp verbose toggle verbose mode trace toggle packet tracing status show current status binary set mode to octet ascii set mode to netascii rexmt set per-packet retransmission timeout timeout set total retransmission timeout ? print help information I've enabled verbose and trace options, in order to get feedback about tftp transfer: tftp> verbose Verbose mode on. tftp> trace Packet tracing on. Set retransmit timeout in case of ACK not received by the server to 1: tftp> rexmt 1 The option binary is *necessary* to trasfer firmware as a binary file: tftp> binary mode set to octet At this point you need to use command "connect" to specify where to send the file. Notice that this command does not reply. Its only use is to specify server's ip and it does not transmit any data. tftp> connect 192.168.1.1 It's time to power off router, and enter the command that will start the file transfer, followed by the filename we send: tftp> put upgrade_code.bin Now plug the main and put your attention on the leds of the ethernet ports. You should see all of them light on and off in a short period. Now look at the led corresponding to the port where your pc is plugged. As soon as this led power on, you have to press "ENTER". Please consider that this is the most difficult part of the whole unbricking process. The "trace" option allow you to easily find the right timings. In fact if the file transfer has successfully started, you will see something like this: ..... sent DATA received ACK sent DATA received ACK sent DATA received ACK sent DATA received ACK sent DATA received ACK ..... tftp> The file transfer is 10-15s long, then your tftp client can accept new commands. You can exit tftp by entering "quit" or "q": !!ATTENTION!!. At this time, your job is finished. Please at this time be patient, because your router is still working for you, as it is writing the firmware you have send to the flash. WAIT patiently, don't ping, don't try to access web interface or something similar. Router will REVIVE on its own! You can begin tweaking the router when power led stops blinking and stays permanently lit up. ------ Other Knowledge 1)It is not necessary to connect a serial console cable. Although this cable can be useful to pause the bootloader and increase the time that it is waiting for a new firmware. 2)I have rescued my router, even if it didn't reply to pings. I truly though it was unrepairable. 3)In some cases the ethernet port led can turn on too late. To solve this problem, you have to put between your pc and the router a hub/switch, that can keep the link up. When file transfer fails, tftp client responds this: tftp> put upgrade_code.bin putting upgrade_code.bin to 192.168.1.1:upgrade_code.bin [octet] sent WRQ sent WRQ sent WRQ sent WRQ sent WRQ Transfer timed out. Good luck giving your router a second life!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~THE END!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~