Openwrt firmware for tp link wr841n. Step-by-step OpenWRT firmware for TP-LINK TL-WR741ND router

Hello! In this article we will take a detailed look at restoring a Tp-Link router after unsuccessful firmware. It often happens that during the router's firmware some kind of failure occurs, and the router simply stops working: Wi-Fi does not work, the power indicators do not light up as usual, it is impossible to enter the router settings, etc. In such cases, even reboot and reset settings to factory settings. If you unsuccessfully flashed your Tp-Link router and it looks like a brick, then you can try to restore it.

This method can restore the following Tp-Link models:

TL-MR3220v2, TL-WR842ND, Archer C7 AC1750 v2, TL-WR740Nv4, TL-WR941NDv5, TL-WDR4300ND, TL-WR1042ND, TL-WR940NDv2, TL-WR841NDv8, TL-WDR3600ND, TL-WR741NDv4, TL- MR3420v2,TL -WR940N V2

If your router is not on the list, then most likely it can only be restored with a soldering iron and a special cable. In this case, it is better to contact the service center.

All the models that I listed can be restored programmatically, which is what we will do now. True, you can bring back to life those devices that were last flashed with special firmware with recovery support. But you don’t need to delve into it, it’s easier to try.

Patient:

I thought it would be wrong to prepare instructions without checking everything myself. Therefore, I took my Tp-Link TL-MR3220v2 router (I don't use it now), which, in principle, is fully working, but for some reason it point-blank refuses to see any 3G modem. Well, for the purity of the experiment, I decided to turn it into a brick. This is not very easy to do (when necessary :)). First, I tried to upload the firmware for a different hardware version, it didn’t work, it gave me an error. Then, I decided to flash it via Wi-Fi - it was flashed. Well, I had no choice but to turn off the power during the firmware update :) Never do that! After all, it may not be possible to restore it.

It turned out that I have a non-working Tp-Link TL-MR3220v2, which only has two indicators (power and gear).

It did not respond to resetting the settings, and of course it was impossible to enter the settings.

You can try before starting to restore the router:

  • Check out the article from possible reasons, according to which . Perhaps you have some other problem, but the router is working.
  • Before restoring your Tp-Link, try.

Tp-Link router recovery process

1. First of all, we need to download special program Tftpd. You can download it from this link - (size - 467 kb). Save the archive with the program on your computer. Create a folder with any name. I created it on the desktop, named "325". Extract the program itself, the file, to this folder tftpd32.exe.

2. Next, we need to download special firmware. You can download this firmware from the official Tp-Link website. Find the firmware for your model and hardware version - this is important! And one more important point, The firmware name should not contain the word boot. If you don’t know where and how to look for firmware, then look at the article.

In the name of the firmware on the website, you will not see the word boot. Whether the firmware is suitable or not can only be seen by downloading it to your computer and opening the archive. See the name of the .bin file itself, which is located in the archive. For my TL-MR3220v2, I downloaded the first firmware on the list (on the website), and it worked.

Extract the firmware file from the archive and rename it. The name should be like this: "mr3220v2_tp_recovery.bin"- this is for the TL-MR3220v2 model. For example, for TL-WR841ND v8 the name will be: "wr841ndv8_tp_recovery.bin". It all depends on what model you have.

Then place the firmware file in the folder with the tftpd32.exe program. You should get something like this:

3. You need to change the connection IP address by local network. Click right click mouse on the Internet connection icon and select Network Control Center and shared access . In the new window, on the left click on Change adapter settings.

Right click on the adapter "LAN connection" and select Properties. Next, select the item "Internet Protocol version TCP/IPv4" and press the button Properties. Place the switch near "Use the following IP address".

Now attention! For router models TL-WR1042 and TL-WR842 V1, write in the IP address field 192.168.1.66 . For all other models, write - 192.168.0.66 . (If both addresses do not work, try 192.168.0.86.) The subnet mask should be registered automatically - 255.255.255.0. Let's leave her. Press the button Ok.

Preparations are complete, let's begin.

Disable your antivirus, firewall, and other programs that may be blocking the connection.

dr.web asked me for permission for the program.

4. Connect your router to your computer via network cable. On the router, the cable can be connected to one of 4 LAN connectors.

5. Open the folder in which we put the firmware and program. Run the tftpd32.exe program as an administrator. Right-click on it and select Run as administrator.

6. In the Tftpd program, on the contrary Server interface select required adapter. There will be an IP that we specified above. Next, click on the button Show Dir, and see if our firmware is on the list. In my case it is "mr3220v2_tp_recovery.bin".

If everything is fine, then the program is simple leave it open. You don't need to press anything to start recovery.

7. We take our router (which should already be connected to the computer), turn on the power, and quickly press and hold the WPS/RESET key.

We hold it until the recovery process begins in the program. Everything worked out for me right away. If it doesn’t work, try this: turn off the router’s power, press and hold the WPS/RESET key and turn on the power.

We wait and don’t press anything until the router reboots. You will understand this by the indicators. My router started working and I had no problems.

If you want, you can flash the router using the usual method according to these instructions -. Just look carefully :) well, you’ll have to configure the router. You can.

In the properties of Local Area Connection, do not forget to set it back Obtain an IP address automatically. We changed it in paragraph 3 of this article. Otherwise, there may be problems connecting to the Internet via cable.

Conclusion

As you can see, everything works. We managed to restore a router that many would have simply thrown away or would have had a bunch of problems with service center for warranty service. Few people take routers for repairs. People usually think it's easier to buy a new one (in some cases, this is true).

Don't forget to write in the comments about the results, it's important! Especially if you managed to restore a Tp-Link router model that is not listed at the beginning of this article. Any information on the topic will be very useful!

Routers lose their native firmware for various reasons. The desire to add functionality, solder USB port or simply add stability to the router.

In my case, the router on the latest stable native firmware with 3 WiFi and 2 Ethernet consumers froze 4 times a week. It's not very scary, but it's also annoying to reboot. I wanted stability. After searching and reading reviews, the choice fell on OpenWRT. The article has already presented step-by-step instruction without the mistakes I had to go through.

Step 1, flash to the latest official firmware
The first thing to do is update and install the latest native firmware.
you can find latest firmware for TL-WR741ND, for the corresponding equipment version.
  • Turn the router over and check the version of the hardware in it using the sticker on the case.
  • Download the archive with the latest firmware.
  • Flash the router with firmware from the archive in the usual way. System Tools -> Backup copy& Recovery (System Tools -> Firmware Upgrade).
Step 2, download and install OPENWRT
Next, you need to select the OpenWRT firmware version.

You should use the exact file that matches the hardware version of your model. Don't neglect this rule! There are two file system options for booting: JFFS2 and SquashFS.

Before continuing with the description of the assembly, I’ll dwell a little on how the OpenWRT root file system is structured. It is a mini_fo file system that transparently combines the other two file systems: immutable SquashFS mounted on /rom and mutable JFFS2 mounted on /overlay. All files that are created or modified after installing the firmware are located in /overlay. When deleting files that were originally in the firmware, mini_fo simply marks them as deleted, while the files themselves remain in /rom and continue to take up space. Both SquashFS and JFFS2 use compression, but SquashFS gives better compression, so putting all the required packages in /rom at once results in smaller firmware. Excluding unnecessary packages from the firmware also allows you to save precious space on the flash drive.
alt

The word factory in the file name means that you must upload such a file to your device on top of the factory (native) firmware. a file with the word sysupgrade is only applicable for upgrading OpenWRT, i.e. uploaded after factory firmware.

We have native firmware, which means we need to install firmware with the factory tag.

Below is one firmware with different hardware versions of the device, select the one to which your router belongs, in order to determine the version, see Step 1:

Download the factory firmware and sew in the usual way. System Tools -> Backup & Restore (System Tools -> Firmware Upgrade).

Step 3, enter the WEB firmware interface
After successful firmware installation, we receive a working router with the web interface enabled. Therefore, we go to the firmware settings through the browser. The next steps are:

Enter in address bar router address 192.168.1.1

Press the key Enter and the router web interface appears. We will see what we were asked to enter Username and Password. In Username we enter root, leave the Password field empty. Click Login.


This is where the firmware is completed, you are in the web interface of the Openwrt firmware.

Step 4, set up an Internet connection
Click on Network -> Interfaces -> Wan -> Edit

We select the protocol we need, in my case it is PPPoE. Enter your internet login into the line PAP/CHAP username, and the password is in PAP/CHAP password. Click Save & Apply.

Let's go back to Interfaces, by clicking on this section, select the line WAN and press connect. The Internet is configured.

Step 5, set up a Wi-Fi connection
It is configured in almost the same way as an Internet connection, so I’ll tell you briefly.
Let's go to the section Network ->Wifi -> edit(if any) or Add(if not created). In chapter General Setup change ESSID, this is the name of your network, then go to Wireless Security. In line Encryption choose WPA-PSK/WPA2-PSK Mixed Mode. In line Key write the password from wi-fi networks. Click Save & Apply.


Returning to the section Wifi and press connect. Wi-fi is set up.
Step 6, Russify the firmware
In order to Russify the firmware we need to go to the section System -> Software-> and click on the button Update List.

After this, click on Available Packages, select a section L. We find a file named " luci-i18n-russian"press the button Install. When asked if you agree, click OK.

The language pack has been downloaded, now you need to apply it. Open the section System -> Language and Style-> Language -> Russian. After this, press the button Save & Apply.

Refresh the page (press on the keyboard F5) and see the Russian interface.

Step 7, set a password for the router
Go to the section System -> Control. Install Router password. Click save and apply.

Step 8 The final stage
-> Reboot.

This is not another guide where everything is chewed up; in this note I want to summarize my experience and leave some nuances as a keepsake for myself (pinout, wire colors, addresses, commands, etc.).

Show

An admin router I knew brought me, like this:

During a thunderstorm, his WAN and LAN1 ports were knocked out. A friend of mine had the hardware flashed with DD-WRT in order to reassign the WAN port to some LAN. I decided to install Open-WRT firmware on the router and successfully turned the device into a brick:

  • When turned on, only the power indicator lights up,
  • the remaining indicators light up simultaneously and go out after 1 second,
  • When connecting the router to the computer, the interface does not pick up the link and the router is not accessible over the network.

It is clear that the router now has completely erased or damaged firmware. When opening the device, an unsoldered serial port JP1 was found on the board:

Found it on the Internet electrical diagram cable:


The connector rang and found out the colors of the Vcc, GND, Tx and Rx wires (in my case they were yellow, red, blue and white, respectively). Full connector pinout:

On the router board, the serial port is soldered as shown in the figure (sequentially from left to right - not connected, red, white, blue):

The patch cord from the computer was inserted into a live LAN port (LAN3). On the computer’s network interface, I set the IP address 192.168.0.2/30 and configured the tftpd daemon, with which the firmware file will be uploaded to the device (Windows users recommend using the program). I downloaded the firmware from the official TP-Link website. Moreover (according to the instructions in the manuals) I downloaded the file without the word “boot” in the name. I placed the downloaded firmware file in the folder configured in the tftpd configuration, renaming it firmware.bin. I turned on the router and plugged the USB cable into the computer.

When I plugged the cable into the computer's USB port, it was identified as a new device /dev/ttyUSB0 (y Windows users a new Serial Data Cable device will appear, creating a virtual COM port and requiring driver installation). After running the command

Sudo minicom --device /dev/ttyUSB0

(Windows users can use HyperTerminal, PuTTY or) and setting the baud rate to 115200 baud 8N1, I saw diagnostic messages on the screen and the inscription “Autobooting in 1 seconds...” appearing periodically. Immediately after the next appearance of this message, I quickly typed on the keyboard tpl. The system went into command waiting mode, the router indicators stopped blinking and network connection, which was not active before, became active.

Then I entered the commands to upload the firmware to the hardware:

Setenv serverip 192.168.0.2

(setting the IP address from which the firmware file will be uploaded to memory)

Setenv ipaddr 192.168.0.1

(setting the IP address of the device to be revived)

Tftpboot 0x81000000 firmware.bin

(downloading the firmware file from the computer into the device memory (into the temporary area, starting from the address 0x81000000). If when executing this command the line T T T T T T appears, then this means Timeout (no response from 192.168.0.2). There must be filling screen with ########## symbols.

Erase 0x9f020000 +0x3c0000

(preparing (cleaning) a memory block from address 0x9f020000 for firmware with a length of 0x3c0000 bytes (3932160 in the decimal system)

Cp.b 0x81000000 0x9f020000 0x3c0000

(copying a memory block from address 0x81000000 to address 0x9f020000 with a length of 0x3c0000 bytes)

Bootm 0x9f020000

(transfer of control to the program at address 0x9f020000)

The router rebooted and began responding to ICMP requests with the address 192.168.0.1. Half the job is done, I installed the hardware with native firmware, but with a non-working WAN port.

TL-WR-841N. In this situation, it is possible to designate one of the LAN ports as a WAN. In the stock firmware, unfortunately, you cannot reassign the ports, so we switch to alternative firmware.

The first thing you need to do is download the firmware for your router model, and start the firmware process.

After the update is complete, go to 192.168.1.1 and get to the updated web interface of the router.

To do this, go Network - Switch and create two vlans: 1 looks tagget on the CPU and untagget on the port that wants to become the new WAN, 2 vlan tagget on the CPU and untagget on all remaining ports.

Please note that Port 1 indicated as the new WAN is actually port 4 of the router.

Click Save&Apply

Creating a new NEWWAN interface

The next step is to open Network - Interfaces, delete the old WAN and create new interface NEWWAN and direct it to VLAN Interface: “eth1.1” and configure the connection, for example.

We return to Network - Interfaces, click edit LAN.

On the Physical Settings tab, check the boxes opposite:

  • VLAN Interface: "eth1.2"
  • Wireless Network: Master "OpenWrt" is

Open Network - Firewall, edit WAN in the Covered networks: NewWan section, allow everything on the General Settings tab, click Save&Apply.

Click System - Reboot and check.

The second option is to transfer the WAN port through the console

Example from a 5-port router:
# uci get network.eth0_0.ports
1 2 3 4 5
# uci get network.eth0_1.ports
0 5

You can view the current assignment like this:

uci get network.eth0_0.ports

uci get network.eth0_1.ports

View all network settings:

It's always like this. I wanted to start writing a blog and abandoned it after writing an introductory post. It's time to improve.

TP-Link continues to slowly migrate to new chipsets from Mediatek. This time the company has released new versions of the popular routers WR841N and WR840N.

Man with nickname svobodavac made initial support for the wr840n v4 router. on this moment not accepted into LEDE and temporarily closed.

Unfortunately, open source The driver for the Wi-Fi chip (mt76) is currently not behaving very adequately. Constant disconnects, ignoring beacons right at the moment of traffic transmission, packet loss, low signal strength (this was fixed by registering the correct location of the EEPROM in dts). I was unable to understand the scale of the problem (does this only apply to tplinks or is this a general problem for all mt76xx devices).

Therefore, it was decided to build LEDE with a proprietary driver from MTK.

All images are version 17.01.

For WR840N v4 ( ATTENTION! No testing performed on WR840N V4! Bet at your own risk!Although there should be no problems, the devices are similar, but I warned you):

FAQ:

How to install?

Installation is done via TFTP only. Everything here is standard, as for other taplinks. The firmware file name should be tp_recovery.bin.

More detailed instructions information on how to upload firmware via TFTP to TP-Link can be found, for example, (Windows-only).

How to update with LEDE/OpenWrt?

Via LuCI Backup/Flash Firmware, or sysupgrade via SSH. You can upgrade using the sysupgrade image. The factory image is not accepted yet.

If you previously installed LEDE firmware from wr840n v4 on wr841n v13, then it is better to install via TFTP (see previous paragraph).

Will the installation be done via a web interface?

Someday there will be. There were discussions about this in the pull request discussion, from which it is clear that new firmware has a new header format. At the moment, firmwares are compiled with an empty header and because of this they can only be uploaded via TFTP.

How stable is it?

Quite stable. No fatal disconnects or packet losses were observed.

What exactly works and has been tested?

Wi-Fi itself :), managing it via UCI, MultiSSID.

What does not work?

Control via LuCI. This is due to the fact that LuCI receives some parameters through iwinfo, which works, but is not friendly with the MTK driver and does not fully display all current information. Actually, you can actually configure the SSID, interface and WEP encryption through LuCI. For the rest of the settings you will have to go to the console :).

The Wi-Fi indicator itself also does not work. If you really want, you can configure it in LuCI LED Configuration to interface rai0 so that it blinks when data flows over Wi-Fi :).

What might work?

WDS and client mode. I haven't tested it, but there is support in the driver. In general, the driver must have full support for the Wi-Fi chip, that’s why it’s proprietary :). Problems may arise at the stage of translating the UCI config into the mt7628_ap config, which is located separately and from which, in fact, the configuration is read.

Wireless is disabled or not associated - this is the kind of garbage he writes!

Again, due to lack of information in iwinfo. In fact, Wi-Fi should work and you should be able to see it from other devices, it’s just not shown in LuCI yet.

No wlan0 interface!

Instead of wlan0, wlan1, wlan2... the driver creates interfaces rai0, rai1, rai2...

What about the package repository?

Repository core was replaced by a repository on my server. To the repository core includes all assembled modules available in LEDE. You will not be able to install kernel modules from lede-project.org due to a mismatch in the kernel hash sum (this was done specifically in OpenWrt). The rest of the repositories (base, routing, telephony...) are standard, from lede-project.org. Unless they have to be uncommented in the configs.

How long will the core repository last?

Repository core I will try to hold on as long as possible. When new builds are released, packages for it will be placed in a separate directory so as not to break opkg for anyone :).

I’ll post the turnip on GitHub a little later, it needs to be cleaned up a little and put everything in order.

Why not make a pull request to the LEDE developers?

LEDE does not accept solutions containing non-free components. The MTK driver is just one of these. For official support LEDE needs to edit the open source driver. Moreover, the problem with the firmware header has not been resolved, so you can forget about the pull request for now.

At the moment I am simultaneously dealing with the problems of the open source driver and the header. If the problems are resolved, I will make a pull request.