Why does the firmware on the router crash? Software recovery of router firmware

Situation in which it is necessary to do restoring firmware on DIR-300 routers different revisions may arise due to various reasons. In addition to a malfunction in the firmware, when a WiFi router simply stops distributing the Internet and its web interface becomes unavailable, this could also be a simple rollback to the usual “stock” firmware after DD-WRT. Or it could be recovery after unsuccessful flashing when the router was fed firmware from a different hardware version.
In general, the developers - the D-Link company - foresaw a similar development of events on many modern devices made Emergency Web Server or Failsafe UI, which is essentially the same thing. Now let's figure out together how to use it.

Before doing anything with the router, you must first download the firmware from the official D-Link server - ftp.dlink.ru:

You can find out what hardware version of DIR-300 you have on the sticker on back cover housings:

After that we go to the desired folder on the server, look for the “Firmware” directory there and download latest version firmware and the previous one, just in case. After that, we begin to conjure with a piece of iron. We disconnect the provider’s cable from it and all clients, except the computer from which we will do the recovery.
Then we do this - go to the Connections settings local network and manually enter the IP address in the properties of the TCP/IPv4 protocol 192.168.0.2 , mask 255.255.255.0 and the gateway - 192.168.0.1 :

You can register the addresses of DNS servers, or you can not - this is not important, because they will not be used. Click on OK and close the settings.

We take our DIR-300 in our hands and press the button Reset:

Keeping it pressed, turn off the power to the router with your other hand and turn it on again. Wait 15 seconds and release Reset.

Now you need to launch an Internet browser and enter the address in the address bar - http://192.168.0.1. The result should be like this:

There may be another nuance here. Earlier DIR-300 models had a disaster recovery interface at a different address. Therefore, if your router does not respond to 192.168.0.1, then again go to the properties of the TCP/IP protocol and register the following IP:

IP: 192.168.20.80
mask:255.255.255.0

In the address bar of the browser you also need to enter the address 192.168.20.81:

The interface of Emergency Web Server and Failsafe UI is virtually identical - a file selection button, and a button to start flashing. Click on “Browse” and select the downloaded file with the firmware. Then click on “Upload” and wait for the process to complete.

What do we have as a result? Worker D-Link router DIR-300! All the best!

Perhaps you needed to update your router software, but something went wrong. As a result, the result was a completely lifeless device: wireless communication does not work, access to the router control panel is via address bar There is no browser either. And the router operating mode lights either don’t light up at all or are clearly not working correctly. Even life-saving ones in the majority similar situations reboot or hardware reset all parameters to factory settings using the button RESET they don't help out. Don't despair - you can still try to save the device.

All recommendations described below are relevant for the following Tr-Link routers:

TL-MR3220v2, TL-WR842ND, C7 AC1750 v2, TL-WR740Nv4, TL-WR941NDv5, TL-WDR4300ND, TL-WR1042ND, TL-WR940NDv2, TL-WR841NDv8, TL-WDR3600ND, TL-WR741NDv4, 3420v2.

If the desired model is not included in this list or you are afraid to carry out all the manipulations to restore the device yourself, then it is better in this case to contact specialists.

You can try to restore the devices listed above using special program, but, as a rule, it is possible to revive only those routers that were previously flashed with software with a recovery option.

If it is not possible to find out about all the previous manipulations, then the choice is yours: either, at your own peril and risk, still try to revive the router, or contact service center for help.

Preliminary data:

We will illustrate the recovery process with an example specific modelМR3220v2. Fully working device was deliberately flashed with third-party software to simulate a situation with a router ruined as a result of incorrect actions. To guarantee failure of the firmware process, the router was updated in wireless mode, and besides, his power was turned off before the upgrade process was completed.

Of course, there is no need to repeat these mistakes. Follow all the instructions and you will probably succeed.

In this article, we will begin to try to revive a non-working router, which, of all signs of life, has only two burning lights.

Nothing else can be done with it. Hard reset doesn't help either.

Before starting measures to save the router, you can try the following:

  • Possible solutions to the problem can be found in the article What to do if you can’t access the router settings. After all, it is possible that everything is fine with the device, but the reason lies in something else.
  • Can you do it again? different ways try resetting all parameters to .

Router recovery procedure

  1. First of all we need specialized program recovery Тftрd. The archive with this utility can be found at this link - for firmware. Pre-create it in a convenient place on your computer new folder and unpack all the files from the downloaded archive into it.
  1. Then you need to find the appropriate software to flash the router firmware. Official versions are located on the Tr-Link website. You can, of course, find different firmware on various file hosting services, torrent trackers, etc., but in this case, no one can guarantee you success and all actions to update the software are done at your own peril and risk.

In the list of available software For firmware on the official website, find the files for your version of the router and your software version. Please note that the name of the firmware file did not contain the word boot. Details and nuances for finding files for firmware can be found here.

One more thing - unfortunately, when choosing a file to download, it is not possible to immediately understand whether the word boot is present or not. This can only be seen after the file has already been downloaded. Only by opening the archive can you see whether this word is in the title or not. You need to search in a file with the extension . bin.

The firmware needs to be unzipped and rename. The name must contain the model designation: "mr3220v2_tр_reсoverу.bin"(relevant for this router). Accordingly, for another model it will look similar.

After renaming the file, you need to move it to the same computer folder where the tftрd32.exe program is already located. The figure shows an approximate diagram of what should be the result:

  1. Now you need to change the IP address of the network connection. To do this, find the Internet connection icon in the lower right corner of the desktop, click on it with the mouse and click on the inscription in the pop-up window Network and Sharing Center shared access . In the panel that appears after this, select the item Change adapter settings.

Now you need to call the context menu of the adapter "LAN connection" right click and press Properties.

Now select the line “Internet Protocol version TCP/IPv4” and after that you need to press Properties. Next action at this stage there will be an option selection "Use the following IP address".

Important point! The IP address that must be entered into the corresponding protocol properties field for different models routers will be different: for WR1042 and WR842 this value will be 192.168.1.66 . All other options correspond to the value IP address – 192.168.0.66 . (Alternatively, if both specified addresses will not work, you can try to register 192.168.0.86.) The subnet mask will be set independently - 255.255.255.0. In this option, save all changes by clicking the button OK.

The preliminary preparation process is completed. Now you can begin the main steps to restore the firmware.

  1. Connect the router to the computer using the standard cable included in the kit. On a device, this is any of the four yellow connectors, and on a computer or laptop, this is a socket network card.
  2. Now we go again to the computer folder where the firmware program files and the firmware itself are located. Select the tftрd32.exe file, then call up the context menu by right-clicking and select from the suggested options Run as administrator.
  3. In the Tftрd flasher window that opens, in the line Server interface We find the network adapter with the IP address set for this router in the previous step. After this, you need to look at the folder with the firmware, to do this, click Show Dir. Need to make sure that required file present.

If required firmware is in the folder, click Close. More on at this stage you don't need to do anything. We don’t close the flashing program itself yet.

  1. Turn on the power of the router connected to the computer and quickly press and hold without releasing the WPS/RESET button on the rear panel, until the firmware update starts in the firmware program.

If there are any errors, you can try turning off the router and at first press and hold the WPS/RESET button, and only Then turn on the router.

You need to hold the button until full reboot devices: this can be judged by the blinking lights. This usually ends the software update process. The router should be restored to working condition. All other settings can already be made.

There are very detailed guide according to the firmware, it can be viewed here - detailed instructions according to the firmware of tr-link/ routers. You can.

After completing the software update process, do not forget to return the adapter properties to the option " Obtain an IP address automatically" See paragraph 3 this manual, if you forgot how to do it.

Conclusion

The process of restoring the router after unsuccessful firmware simple if you do everything thoughtfully and slowly. As a rule, everything starts working properly after this.

During the flashing, unexpected situations occurred: the power supply was turned off, the microcode version was forcibly changed via the console, intended for a completely different device model or another hardware version of the device (hardware version) or simply during the update process everything froze, we waited for an hour hoping, and then turned off the power.

After turning on the power or rebooting, we observe constantly flashing lights at intervals of 2 seconds ( cyclic reboot) or simply all LED indicators are on, i.e. your router has turned into a blinking brick... A brick router arrived in our workshop TL-WDR4300ND inadvertently recorded in flash memory firmware for a completely different router model... without going into details, after deciding to change the firmware via the console (during the process of experimenting with installing various packages, it fell off WEB interface and didn’t want to install it anymore), the rush led to the fact that in the download command instead of the firmware version for the router WDR4300ND the version for WR1043ND, then the command to write to memory went. When flashing firmware via the console, there is no compatibility check, everything is simply written to memory and rebooted, the result is obvious - all blinking LED indicators router.

By the time you restore the router, there are already many articles on how to restore it popular model TL-WR1043ND. But no word on how to do this with the TL-WDR4300ND; as it turns out, there are several features in the recovery process.

Preparatory stage

Main Feature restoring the router via serial interface – this means you need to completely disassemble the device; you may have to work with a soldering iron. Process algorithm:

  1. the router connects to the serial interface of the router to issue commands via the console
  2. the router is connected via network interface LAN1 of the router is connected to the computer’s network card
  3. run on the computer TFTP server with firmware file
  4. by entering a certain sequence commands, the router downloads the firmware from the TFTP server into its RAM, after which it writes it to its flash memory, after which it reboots

If everything is done correctly, the device will be restored.

Obtaining working firmware for the router

Required for firmware working version firmware for your router model, for which you need to know exactly the router model and its revision.

If you want to restore the router's functionality alternative versions firmware ( , ) – need to be downloaded latest firmware or assembly based on alternative firmware for the router.

DD-WRT download from here ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2, select the current year and the latest release version, then find the section with the firmware files for your router model. Download the firmware file factory-to-ddwrt.bin

Open-WRT download the firmware file from here http://downloads.openwrt.org/snapshots/trunk/ar71xx.

The main thing is not to make a mistake with the version of the router!

4-pin Serial interface connector on board

Location of serial interfaces and their pinout.

Connection cable

To connect the device to the computer you will need a cable; there are several options:

  • use COM cable by cutting one end and soldering it to the serial interface on the board
  • use USB to SERIAL RS232 cable It is possible to use old mobile data cables Nokia phones, or order a cable from the Chinese online store

The cable used in this article PL2303HX USB To TTL COM.

Normally working drivers for of this device were downloaded from the official Chinese website, although it is written that they work in Vista, Windows 7, but in fact, they only work normally on Windows XP, so the restoration work was carried out specifically from this OS.

The driver is installed before the cable is plugged into the USB connector for the first time!

After installing the driver, we restart Windows, only after this is it possible to connect the wire, in the device manager we check the device; in our case it is COM3. Only 3 pins are needed GND, TX and RX.

For ease of connection, you can use a 4-pin connector from motherboard to power the fan, connecting only 3 contacts, connection method to the device (Table 1.5): connect the TX cable to the RX serial interface; RX cable to TX serial interface; GND cable to GND serial.

Table 1.5 - method of connecting the cable to the serial interface of the router

Terminal program

To enter commands, you need any terminal program, for example Putty, which can work via ssh, telnet, etc. To work with the terminal, it must be installed and configured:

  • Connection type: Serial
  • Serial line - number COM port, For example, COM3
  • Speed: 115200
  • Data bits: 8
  • Stop bits: 1
  • Flow control: none

Setting up Putty, you need to write your port (see device manager)

TFTP server

During the recovery process, it will contain a working version of the firmware for your router model. Anyone will do tftp server, for example, WinAgents TFTP Server, By downloading from the official website and starting the installation, virtually no settings are required. A firmware file is placed in the server folder, which we will write to the router’s flash memory (by default this is Documents and Settings - All Users - Application Data- Win Agents - TFTP Server - XT FTP Root). On the computer’s network card, set the default server IP address for TL-WR1043ND routers: 192.168.0.5 (192.168.0.2 ), and for the WDR4300ND router: 192.168.1 .100 although during the recovery process in the console it will be visible from where the router is trying to update the firmware.

During recovery activities, the TFTP server must be running, and the firmware file (*.bin) must be located in the root folder.

Disassembling the device and searching for an unsoldered serial interface on the board

Do the disassembly process as carefully as possible, do not rush or use excessive physical force. Model router TL-WDR4300ND It is quite easy to disassemble; you need to unscrew all the screws from the bottom of the device.

With the TL-WR1043ND router model, things are more complicated, firstly, you need to unscrew 2 screws, and secondly, unscrew the clamps from the antenna connectors wireless communication and recess them completely into the case, fourthly, pull out the black middle part of the case (U-shaped ribbed frame with holes for connecting devices and ventilation), snap off the two latches on the sides and open the case.

The process of restoring the router's functionality

Now we've reached the main part of this guide. What should happen at the moment:

  • disassembled and prepared router (possibly with a soldered connector to the serial connector on the board), network cable connected to computer via LAN1
  • cable (can be pre-connected, you can already turn on the router)
  • running TFTP server
  • working version of microcode (firmware) for your router, located in the root folder of the tftp server
  • terminal Putty program, configured and ready to connect

Connect the cable to the serial connector on the board

We connect the router and the computer with a network cable: LAN1 of the router and the computer’s network card. On the network card we register the IPv4 address 192.168.1.100 for the WDR4300ND router version.

Turn on the router and start the connection in Putty

If the contacts were connected correctly, then in the terminal connection window we will see the following periodically repeated lines:

U-boot DB120
DRAM: 128 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash: 8 MB
Using default environment
In: serial
Out: serial
Err: serial
Het: ag934x enet_initialize…
Ho valid address in Flash. Using fixed address
wasp reset mask:c03300
WASP --> S17 PHY *
: cfgl 0x7 cfg2 0x7114
athrs17_reg_init: complete
ethO up
ethO
Autobooting in 1 seconds

These lines are repeated every 1-2 seconds, and at the same time, the router flashes all LED indicators synchronously. To start entering commands, you need to have time to enter the command tpl and press enter for 1 second in the interval after the inscription Autobooting in 1 seconds and subsequent reboot of the router, I have this operation It happened about the fifth time. If everything is completed on the screen you will see a prompt for entering commands:

db12x>

Checking tftp servers

tftpboot

The console connection window should display next text, where we will determine exactly what address the computer’s network card should have; if it is not the one set, change it immediately.

dbl2x>tftpboot
dup 1 speed 1000
Warning: no boot file name; using '6F01A8C0.img'
Using eth0 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.111
Filename '6F01A8C0.img'.
Load address: x8100000
Log: *
TFTP error: ' Access violation’ (2)
Starting again

Downloading firmware by router from a tftp server

Enter the command:

Where factory-to-ddwrt4300.bin the name of the firmware file located on your running tftp server,

If everything is correct, the firmware download process will start:

dbl2x> tftpboot 0x81000000 factory-to-ddwrt4300.bin
Using ethO device
TFTP from server 192.168.1.100 our IP address is 192.168.1.111
Filename 'factory-to-ddwrt4300.bin'.
Load address: 0x81000000
Lg: ################################################# ##############

#################################################################

done
Bytes transferred = 8126464 (7c0000 hex)
dbl2x>

Last number 7c0000 It will come in handy for us, as a result we know that the firmware is in the router’s RAM.

Clearing the flash memory area needed for writing firmware

Usually, they advise you to first clear the area and then download the firmware, I think it’s better to play it safe and download the firmware first and then enter the rest of the commands.

Router command WDR4300ND: erase 0x9f020000 +7c0000

for router WR1043ND the address will look like this 0xbf020000: erase 0xbf020000 +7c0000

Something like this should happen:

dbl2x> erase 0x9f020000 +7c0000
First 0x2 last 0x7d sector size 0x10000
125
Erased 124 sectors
dbl2x>

Writing a microcode image to the router’s flash memory

Router command WDR4300ND:

For router WR1043ND: cp.b 0x81000000 0xbf020000 0x7c0000

The window will display the following:

dbl2x> cp.b 0x81000000 0x9f020000 0x7c0000
Copy to Flash… write addr: 9f020000
done
dbl2x>

If everything is so, then the process was successful!

Reboot the router

If the router blinked all the indicator lights once, and then it went successful loading, then Congratulations, the router has been restored, you can go to the WEB interface (if you restored it with ddwrt firmware or an open-wrt build with a web interface), then you can configure it according to my instructions.

Here is a simple process for restoring the functionality of routers using the serial interface. Helps in resuscitating routers during unexpected destructive actions with the router microcode (firmware).

Of course, there is another great way to restore via an equally unsoldered JTAG connector, but this method requires a programmer and much more knowledge and experience working with hardware.

Hope this instruction It will help someone restore their device, save time for studying a bunch of material, save nerves and financial resources. Everything is simple if you take everything calmly.

Happens after a failure D-Link firmware DIR-300/NRU B5, for some reason the router stops responding. Do not rush to throw it away or run to the D-Link service center. There are many proven methods self-recovery device, as well as returning it to the factory firmware.

Restoring a router can be described in several steps:

1. Download BIN firmware from 320NRU follow the link: http://ftp.dlink.ru/pub/Router/DIR-320_NRU/Firmware/DIR_320NRU-1.2.94-20110803.bin, and save the file. Exactly BIN firmware from 320NRU, restore the router directly through files original firmware the DIR-300/NRU B5 does not always work.

2. In the properties network adapter register the computer static address 192.168.0.10, subnet mask 255.255.0.0. To do this: Start -> Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings, select Connection and open its properties.

Next, you need to check “Internet Protocol version 4 (TCP/IP4)” and also select properties. In the properties window that opens, you need to activate “Use the following IP address” and enter the address 192.168.0.10, subnet mask 255.255.0.0.

3. Disconnect all cables, leaving only the router’s LAN1 –> PC connection from the router. We always use the “straight” wire (blue included in the kit).

4. Turn off the power to the router and press the button Reset devices ( small hole on the back of the panel) and don’t let go. We remove the power supply plug from the router, and without releasing the button, insert the power back in, wait for the router to boot for about 15 seconds and only then release the button.

5. Now quickly open the browser ( Internet Explorer, Firefox, Google Chrome), enter 192.168.0.1 and in front of us is the Emergency room. Through Failsafe UI, select the downloaded firmware file DIR_320NRU-1.2.94-20110803.bin and click “Submit”.

6. We wait 3-4 minutes during the flashing process and the router will come to life.

7. Same as in step 2. We return the automatic issuance of IP addresses.