Tp link tl wr841n firmware openwrt. Step-by-step OpenWRT firmware for TP-LINK TL-WR741ND router. What will we flash from OpenWRT firmware to factory firmware?

Important. If you download the firmware from the TP-Link website and flash it, your TP-Link TL-WR1043ND router will most likely have to be taken to the service center if you don’t want to dance with tambourines. This is because the proprietary firmware includes a bootloader, which cannot be flashed in this situation, and in the special tplink.bin firmware it is cut out (you can read about this on the OpenWRT website).

And yet, for the TP-Link TL-WR1043ND router - NO the ability to start recovery mode when it is “Brick” without opening the case! Even if you open the router case, you will have to solder the COM port on the board or make a remote one (meaning 3 wires, as I did - a lover of experiments) and make a USB-COM adapter!!!

So, if you don’t want to get a “Brick”, don’t go in without sufficient knowledge!!!
(nevertheless, I went in and made a “Brick” out of the router due to initial inexperience, and later restored it).

What will we flash from OpenWRT firmware to factory firmware?

The process of returning from OpenWRT to TP-Link firmware

Turn off the router and remove the flash drive/hard drive if you are loading OpenWRT from external media and not from the router’s memory.

Important. The connection to the router must be via a network cable, not via Wi-Fi.

Next, turn on the router and log into the web interface of the router with OpenWRT via the IP address.
My router address is set to 192.168.1.1.
Next, you need to find the original TP-Link firmware for your router without boot on the Internet.

Important. The firmware must be without boot loader. From the TP-Link website, the firmware will definitely turn your router into a “Brick”. Therefore, we sew the firmware without boot, for the TL-WR1043ND we download the firmware

tplink WR1043ND.rar (firmware in archive - unpack it),

for other router manufacturers we are looking for firmware to rollback ourselves...

So, click on the “System” tab.
In the “System” tab, click the “Backup/Firmware” tab. At the bottom, uncheck “Save settings” and use the “Browse” button to indicate the path to the firmware without a bootloader (without boot) - tplink WR1043ND.bin.

The firmware process begins, wait for it to finish.
The process lasts less than 5 minutes, and you cannot turn off the power to the router.
Let's go pour ourselves some coffee...

The firmware process itself happens quite quickly, but you can’t definitively judge the completion of the process by the lit LEDs of the router, so we drink coffee and wait for the right time.

After 3 minutes of firmware have expired, dial the router’s IP address 192.168.1.1, an authorization window will appear, where we log in using the standard TP-Link login “admin” and password “admin”.

It may happen that the router does not respond after entering the IP address - then, go through another browser, but in theory, you just need to reset the browser cache, and you will enter the default web interface of the router.

Note. I could be wrong now, but in my opinion, the firmware without a bootloader has an English interface (unfortunately, the screenshot was not saved). But this doesn’t change the essence.

We go to the manufacturer’s website and download the latest firmware for your router. For TP-Link TL-WR1043ND ver.1.8 firmware can be downloaded here

wr1043nv1_ru_3_13_11_up_boot(121102).rar (firmware in archive - unpack it).

We flash the router with the latest firmware from the manufacturer’s website.

Well, we're back to the TP-Link firmware.

To do this, click the line “System Tools”, and then “Factory Resets” and click the “Restore” button.

A window will appear warning you to reset all settings to default, we agree.
We are waiting for the process of resetting the default settings and rebooting the router.

Congratulations! After rebooting the router, you have returned the router to the factory firmware.

Routers lose their native firmware for various reasons. The desire to add functionality, solder a USB port, or simply add stability to the operation of 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 already provides step-by-step instructions without any mistakes that 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 the latest firmware for TL-WR741ND, for the corresponding hardware 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 the firmware from the archive in the usual way. System Tools -> Backup & Restore (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 filesystem that transparently combines two other filesystems: the immutable SquashFS mounted on /rom and the 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 the router address in the address bar 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 for the wi-fi network. 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, final stage
-> Reboot.

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. is not currently accepted into LEDE and is temporarily closed.

Unfortunately, the open source driver for the Wi-Fi chip (mt76) does not behave very adequately at the moment. 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 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. To officially support LEDE, you need 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.

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:

I found an electrical diagram of the cable on the Internet:


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 (Windows users will have a new Serial Data Cable device that creates a virtual COM port and requires 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 the 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.