{"id":51,"date":"2017-06-21T10:09:41","date_gmt":"2017-06-21T10:09:41","guid":{"rendered":"https:\/\/raxp.ru\/?p=51"},"modified":"2026-02-10T17:07:11","modified_gmt":"2026-02-10T14:07:11","slug":"lede-for-wr841n-v13wr840n-v4-en","status":"publish","type":"post","link":"https:\/\/raxp.ru\/index.php\/2017\/06\/21\/lede-for-wr841n-v13wr840n-v4-en\/","title":{"rendered":"LEDE for WR841N v13\/WR840N v4"},"content":{"rendered":"<p><span style=\"color: #808080;\"><a href=\"https:\/\/raxp.ru\/index.php\/2017\/06\/21\/lede-for-wr841n-v13wr840n-v4-ru\/\">\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435<\/a><\/span><\/p>\n<p><strong>NOTE! As you may already know, recent OpenWrt have native wireless support for both WR841N v13\/WR840N v4. If you want to, you better install the official OpenWrt firmware. I still have WR841N v13 and it works stable on the official firmware. I actually strongly discourage you from using my version because it&#8217;s long outdated.<\/strong><\/p>\n<p><strong>This page is now saved for historical reasons.<\/strong><\/p>\n<hr \/>\n<p>Damn. I just wanted to start a blog and left it alone after the introduction post. It&#8217;s time to return.<\/p>\n<p>TP-Link continues to migrate onto the new Mediatek chipsets. They&#8217;ve released new versions of two popular routers recently: WR841N and WR840N.<\/p>\n<p>Some guy called <b>svobodavac <\/b>made a patch for wr840n v4 initial support by LEDE. That <a href=\"https:\/\/github.com\/lede-project\/source\/pull\/974\/files\">pull request<\/a>\u00a0was declined by LEDE and was temporary closed.<\/p>\n<p>Unfortunately, the mt76 wireless open-source driver is not able to provide a stable wireless connection. With this driver I had continuous disconnects, missing beacons, packet loses, low power signal (this was fixed with new EEPROM location in dts). I don&#8217;t know if it works or not properly for all mt76xx devices or just mt7603.<\/p>\n<p>So I decided to build LEDE with a proprietary MTK driver.<\/p>\n<p><!--more--><\/p>\n<p>All images are LEDE 17.01.<\/p>\n<p>For WR841N v13:<\/p>\n<p><a href=\"http:\/\/wrt.raxp.ru\/lede\/tplink-mtk\/17.01\/200617\/lede-ramips-mt7628-tl-wr841n-v13-squashfs-factory.bin\">lede-ramips-mt7628-tl-wr841n-v13-squashfs-factory.bin<\/a><\/p>\n<p><a href=\"http:\/\/wrt.raxp.ru\/lede\/tplink-mtk\/17.01\/200617\/lede-ramips-mt7628-tl-wr841n-v13-squashfs-sysupgrade.bin\">lede-ramips-mt7628-tl-wr841n-v13-squashfs-sysupgrade.bin<\/a><\/p>\n<p>For WR840N v4 (<b>WARNING! This firmware wasn&#8217;t tested on WR840N V4!\u00a0<\/b><em>I doubt that you&#8217;ll face any issues, because this two devices are similar, but I have warned you<\/em>):<\/p>\n<p><a href=\"http:\/\/wrt.raxp.ru\/lede\/tplink-mtk\/17.01\/200617\/lede-ramips-mt7628-tl-wr840n-v4-squashfs-factory.bin\">lede-ramips-mt7628-tl-wr840n-v4-squashfs-factory.bin<\/a><\/p>\n<p><a href=\"http:\/\/wrt.raxp.ru\/lede\/tplink-mtk\/17.01\/200617\/lede-ramips-mt7628-tl-wr840n-v4-squashfs-sysupgrade.bin\">lede-ramips-mt7628-tl-wr840n-v4-squashfs-sysupgrade.bin<\/a><\/p>\n<h3>FAQ:<\/h3>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>How to install?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">The installation is only possible via TFTP. Nothing special, just like on any other TP-Link. The file name must be\u00a0<strong>tp_recovery.bin<\/strong>.<\/p>\n<p>More info about using TP-Link TFTP recovery can be found <a href=\"http:\/\/www.trishtech.com\/2015\/06\/unbrick-tplink-wr740n-wifi-router\/\">here<\/a>\u00a0(Windows-only).<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>How to update from LEDE\/OpenWrt?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">You can do it via LuCI <strong>Backup\/Flash Firmware<\/strong>, or via\u00a0<strong>sysupgrade<\/strong> over SSH. Just use the sysupgrade image. The factory image flashing via OpenWrt\/LEDE won&#8217;t work for now.<\/p>\n<p>If you have installed a firmware WR840N v4 on WR841N v13 or vice-versa, it&#8217;s better to update via TFTP (more info in previous spoiler).<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Will I ever be able to flash this via stock web-interface?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">Probably, yes. There are some discussions about it in the pull request comments. It seems that new TP-Link firmware have a new header. Now all LEDE\/OpenWrt firmwares are built with empty header and because of that it can be flashed only via TFTP.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Where is the driver was taken from?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">The driver for 4.1.X.X kernel was taken from the <a href=\"https:\/\/bitbucket.org\/padavan\/rt-n56u\">Padavan for Asus RT-N56U<\/a>\u00a0firmware. Makefile for the kernel package was taken from\u00a0<a href=\"https:\/\/github.com\/presisco\/openwrt-mt7610e\/blob\/master\/Makefile\">here<\/a>. Some dependencies was taken from padavan firmware and from <a href=\"https:\/\/github.com\/mqmaker\/witi-openwrt\/tree\/master\/package\/ramips\/applications\">witi-openwrt<\/a>.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>How stable it is?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">It seems that it is very stable. I didn&#8217;t have disconnects or packet loss.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>What was tested and works?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">The wireless itself :), UCI control, MultiSSID.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>What does not work?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">Controlling via LuCI. This is because of iwinfo doesn&#8217;t work properly with this driver and can&#8217;t provide any information about device. Now you can only set SSID and WEP encryption via LuCI, any other setting can be changed over ssh.<\/p>\n<p>Also, the wireless LED doesn&#8217;t work too. You can set it to rai0 interface in LuCI LED Configuration to make it flash when data received or transmitted :).<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>What probably works?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">WDS and client mode. I haven&#8217;t tested it yet, but the driver supports it. Generally speaking, this driver must have full support of this device. The problems can be occurred during a UCI to .dat config translation.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>How to configure wireless via SSH?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">The documentation for all UCI params can be found\u00a0<a href=\"https:\/\/wiki.openwrt.org\/doc\/uci\/wireless\">here<\/a>. Right after the first boot wireless broadcasts with SSID &#8220;MT7628&#8221; and without encryption. It is connected to the br-lan bridge by default. So you can found the example configuration in \/etc\/config\/wireless file.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>'Wireless is disabled or not associated'!<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">This is because of iwinfo, which can&#8217;t provide any information. So, LuCI is unable to get real wireless status. The wireless itself should work and you should be able to see it on other devices.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>There is no wlan0 interface!<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">The driver creates rai0, rai1, rai2&#8230; interfaces instead of wlan0, wlan1, wlan2&#8230;<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>What about package repositories?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">I&#8217;ve replaced <strong>core<\/strong>\u00a0repo with my own repo, which will be hosted on my server. <strong>Core<\/strong> repo contains all kernel modules provided with LEDE. You can&#8217;t install kernel modules from the\u00a0<a href=\"http:\/\/downloads.lede-project.org\/releases\/17.01-SNAPSHOT\/targets\/ramips\/mt7628\/packages\/\">lede-project.org<\/a>\u00a0because of hashsum mismatch (this was done by OpenWrt developers). All other repos (base, routing, telephony&#8230;) are default, from\u00a0<a href=\"http:\/\/downloads.lede-project.org\/releases\/17.01-SNAPSHOT\/packages\/mips_24kc\/\">lede-project.org<\/a>. You only need to uncomment them in \/etc\/opkg\/distfeeds.conf.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>How long you gonna keep this repo?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">I&#8217;ll try to keep it as long as possible. All new builds will be in separate directories, so that way I&#8217;ll not break opkg when new build will be released.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Is source code or patch available?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">I&#8217;ve created the LEDE feed with this driver. It is available here: <a href=\"https:\/\/github.com\/worm202\/lede-mt7603\">https:\/\/github.com\/worm202\/lede-mt7603<\/a><\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Why don't you make a pull request to the LEDE repo?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">LEDE will not approve this, because MTK driver is non-free. To make LEDE officially support those devices we need to fix the open-source driver. Moreover, there was a problem with firmware header, this needs to be fixed too.<\/p>\n<p>I&#8217;m working on it. If I fix it, I&#8217;ll make pull request to LEDE.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Why wr840n v4 wasn't tested?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">It&#8217;s easy &#8211; I don&#8217;t have a device. Because of it&#8217;s similarity to wr841n v13 it probably work as well.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>What is the difference between wr841n v13 and wr840n v4?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">As I know, there is a difference in LEDs. WR841N v13 has 4 LAN LEDs, but WR840N v4 only one. Generally, this two devices are similar (or same). LEDE firmwares are compatiable, so WR841N v13 can work with WR840N v4 firmware.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Can this driver work with other Mediatek Wi-Fi chips?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">Probably, yes. It has support for multiple chips including, for example, MT7610E (802.11 AC chip, which isn&#8217;t available on LEDE\/OpenWrt yet). The problem with packages in my repo is that it was modified to build and work on this two devices specifically.<\/div><\/div>\n<div class=\"su-spoiler su-spoiler-style-default su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>It doesn't work \/ I didn't understand anything, how to revert back to the stock firmware?<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\"><a href=\"http:\/\/www.trishtech.com\/2015\/06\/unbrick-tplink-wr740n-wifi-router\/\">TFTP<\/a>.<\/p>\n<p>Stock TP-Link firmware without boot: <a href=\"http:\/\/wrt.raxp.ru\/stock\/wr840n-v4-stock.bin\">WR840N v4<\/a>, <a href=\"http:\/\/wrt.raxp.ru\/stock\/wr841n-v13-stock.bin\">WR841N v13<\/a>.<\/p>\n<p>(<strong>PLEASE DO NOT USE FIRMWARE FROM TP-LINK OFFICIAL SITE WHEN REVERTING OVER TFTP. YOU&#8217;LL BRICK YOUR DEVICE COMPLETELY!<\/strong>)<\/p>\n<p>The filename of firmware should be\u00a0<strong>tp_recovery.bin.<\/strong><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 NOTE! As you may already know, recent OpenWrt have native wireless support for both WR841N v13\/WR840N v4. If you want to, you better install the official OpenWrt firmware. I still have WR841N v13 and it works stable on the official firmware. I actually strongly discourage you from using my version&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/raxp.ru\/index.php\/2017\/06\/21\/lede-for-wr841n-v13wr840n-v4-en\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4,5],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-english","category-lede","category-routers"],"_links":{"self":[{"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":12,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":296,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions\/296"}],"wp:attachment":[{"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raxp.ru\/index.php\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}