Build for TP-Link TL-WR841N(D) [all versions]


#1

Sharing a custom build I've created for my own use:

  • LEDE Reboot
  • LuCI with https
  • IPv6 and PPPoE
  • MiniUPnP
  • OpenVPN with mbed TLS
  • QoS
  • DDNS
  • Wget with https
  • Reghack (WiFi channels 12 and 13)
  • Minified LuCI's CSS and JS
  • Compiled with GCC 6.3
  • Removed kernel debugging
  • Nothing else has been touched. Basically, it is a 'make defconfig' + profile + the mentioned above
  • Free ROM: 76 KB
  • OpenVPN AES-128-CBC speed: 12Mbs/12Mbs (measured on v8 downloading ubuntu via a torrent)

Download firmware:
dropbox

Build script:
github

Supported devices:
tl-wr841n-v1.5
tl-wr841n-v3
tl-wr841n-v5
tl-wr841n-v7
tl-wr841n-v8
tl-wr841n-v9
tl-wr841n-v10
tl-wr841n-v11

Changelog:

2017-02-25

  • r3218-bf53a83 (17.01 branch)
  • Added https for LuCI

2017-01-31

  • r3198-74ea99b
  • Added DDNS
  • Added libustream-mbedtls (https support for wget)

2016-12-25

  • r2672-9998bc5
  • Added QoS
  • Upgraded mbed TLS from 1.x to 2.x
  • Compiled with GCC 6.3 instead of 5.4
  • Increased squashfs4 block size from 256 to 1024
  • Disabled debugfs
  • Enabled sstrip to further reduce the size

2016-12-04

  • r2400-abedd71
  • Initial release

How to achieve the same build with the 'menu makeconfig' interface:

1. rm .config .config.old
2. make defconfig
3. make menuconfig
(use space to select, make sure you see a star after a selection, not an M; use esc to go back)

_Target Profile - Multiple devices
_Target Devices - TP-Link TL-WR841N*

Enable:
_LuCI - Collections - luci-ssl
_LuCI - Applications - luci-app-upnp
_LuCI - Applications - luci-app-openvpn
_LuCI - Applications - luci-app-qos
_LuCI - Applications - luci-app-ddns
_Network - VPN - openvpn-mbedtls
_Advanced configuration options (for developers) - Toolchain options - GCC compiler Version - gcc 6.x
_Global build settings - Strip unnecessary exports from the kernel image, Strip unnecessary functions from libraries
_Target Images - squashfs - Block size - 1024
_Libraries - ibustream-mbedtls

Disable:
_Global build settings - Enable support for printk, Crash logging, Support for paging of anonymous memory (swap), Compile the kernel with debug filesystem enabled, Compile the kernel with symbol tables information, Compile the kernel with debug information, Compile the kernel with SysRq support, Enable printk timestamps
_Kernel modules - Wireless Drivers - kmod-ath9k - Support for Ubiquiti Unify Outdoor+
_Kernel modules - Wireless Drivers - kmod-mac80211 - Export mac80211 internals in DebugFS
_Kernel modules - Wireless Drivers - kmod-ath - Force Atheros drivers to respect the user's regdomain settings, Enable DFS support
_Kernel modules - USB - everything

FAQs:

The maximum transmit power shows as 18 dBm

Manually change txpower to 20 in /etc/config/wireless

Afterwards, run wifi to apply the change

Cron doesn't work

/etc/init.d/cron start
/etc/init.d/cron enable

Should I use QoS together with OpenVPN?

Only if you are ok with a speed of 8000 kbit/s instead of 12000 kbit/s without QoS

OpenVPN starts, but seems to do nothing

Try disabling crl_verify

OpenVPN complains that aes-128-cbc or sha256 are not supported

Rename them to uppercase: AES-128-CBC and SHA256


TP-Link TL-WR841N(D), WA701N(D), WR740N(D), WR741N(D), WR743N(D), WR940N, WR941N(D) - LADUS / JULIA / Ultra Lite / VPN builds
Minimum/Lite Firmware for TPLINK-MR1XU-MR3XXX-WA7XX-WA8XX-WA901ND-WA7X10N-WR7XXN-WR8XXN-WR9XXND-WR1041N & NETGEAR-WNR612-WNR1000-WNR2000-WPN824N (4M Flash ONLY)
Build own LEDE for TL WR841N
[SOLVED]Build a WR840N v2 firmware failure : rootfs offset aligned to *** error: images are too big by ***
[HOWTO] Tested Build for TP-Link TL-WR941N(D)-v2.1(5.1)
TP-Link TL-WR841N(D), WA701N(D), WR740N(D), WR741N(D), WR743N(D), WR940N, WR941N(D) - LADUS / JULIA / Ultra Lite / VPN builds
Installing on TP-Link TL-WR841N(D) 9
OpenVPN tls-crypt not working
WR841N v11 after flashing firmware for WR841N v9
CONFIG_TARGET_ar71xx_tiny not very useful
#2

Thanks a lot, amq.

Installed on all my routers and everything is working great, a lot more stable than latest openwrt build.

A question : It´s possible include SQM or some kind of QoS on your release?
Or there isn´t enough space on the router?

Regards!


#3

There is not enough space for sqm/qos.

Removing OpenVPN would help, but you need to recompile the image for that.


#4

hi amq

could you please compile (an up2date) host image - with sqm|qos features inside?
In my opinion sqm|qos is more important, than an *vpn connection...

Thanks in advance

Frutti


#5

New build is up, with QoS :slight_smile:


#6

Thanks for this.... been struggling to get LEDE on my WR841N and eventually found this discussion. Made it much easier.

If you do have any spare time, the only thing that I am now struggling with, is manually installing is ddns-scripts and luci-app-ddns. :wink:

Cheers!


#7

@amq

I posted my problem here:

Do you have any advice for me?

SOLVED:


#9

It works perfect on my 841nd v9!

Many thanks for providing it!!! :+1:


#10

Build date 22.1.2017.
dropbox

Supported devices:
tl-wr841n-v1.5
tl-wr841n-v3
tl-wr841n-v5
tl-wr841n-v7
tl-wr841n-v8
tl-wr841n-v9
tl-wr841n-v10
tl-wr841n-v11

Changelog:
-Removed kernel debugging
-Disabled IPv6 and ppp pppoe
-squashfs block size 1024 Kib
-Compiled with gcc 6.3
-LuCI with Material theme
-Adblock with uclient-fetch instead of wget enabled out of the box with adaway, disconnect, winspy and yoyo blocklists
-SQM
-dnscrypt-proxy (needs configuring /etc/config/dhcp - wiki ). By default it uses opennic anycast DNS resolver
-nano

Adblock should work out of the box without any configuring needed. If you have special network configuration, reboot adblock service after setting up network and it should work. There is no space available for additional block lists so I decided not to include luci adblock app.
I will try to include IPv6 in next build.


#11

Nice work, thank you! Thumbs up for "how to achieve" and ipv6 removed, but thumb down for upnp removed (and not mentioning it) in last release :wink: I'm reverting back to older release because of upnp. Adblock is nice, but more and more pages won't let you browse when they detect adblock, so I prefer ublock in firefox.

Btw. how do you integrate jows reghack? Never managed to do it myself :frowning:


#12

If it helps, I just posted some useful information on how to enable channels 12 and 13. Have a look on the forum.


#13

@nozombian only releases in the first post come from me. Regarding reghack, it's this:

Disable:
_Kernel modules - Wireless Drivers - kmod-ath - Force Atheros drivers to respect the user's regdomain settings

@hmd61551 maybe it would be a good idea to create a separate topic for your release? Feel free to use anything from here (scripts etc).


#14

btw, I'll post a new release soon. No reductions compared to first post, just fresh LEDE + DDNS, if it fits.


#15

Thanks a lot amq...
Waiting for your release with LEDE + DDNS to upgrade all my routers.


#16

Oh now I see that hmd61551 is a new player in town :slight_smile: Thank you @amq, looking for your new "genuine" release :wink:

Thank you @deuteragenie, I was always compiling with "Force Atheros drivers to respect" for channels 12, 13, but I was unable to set country 00 and raise txpower to 20 with my past builds (lede has very weak signal in default build compared to stock), but with amq's release it works better, so I thought it has jow's reghack integrated. Nice to hear it works without it too, I have not tested to compile myself for a while now.

Btw. ppp-like packages can save some flash too, I always removed them, because I never needed them, but maybe someone uses them. @amq I'd not waste flash with ddns package, when the same can be done with mbed tls enabled uclient fetch (or even wget) and cron.


#17

New build is up - with DDNS and Wget with https support :sunny:

It is just unbelievable how much you can fit in 4MB...


#19

Hi, thanks for your effort. Are you sure this build is ok? There are a lot of strange messages in logread:
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-ath0
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wl0
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wlan1
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-ath1
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wl1
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wlan2
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-ath2
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wl2
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wlan3
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-ath3
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wl3
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wlan4
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-ath4
Sun Jan 29 16:49:01 2017 daemon.err modprobe: failed to find a module named netdev-wl4
Sun Jan 29 16:49:03 2017 daemon.err modprobe: failed to find a module named netdev-ath0
Sun Jan 29 16:49:03 2017 daemon.err modprobe: failed to find a module named netdev-wl0
Sun Jan 29 16:49:03 2017 daemon.err modprobe: failed to find a module named netdev-wlan1
Sun Jan 29 16:49:03 2017 daemon.err modprobe: failed to find a module named netdev-ath1
Sun Jan 29 16:49:03 2017 daemon.err modprobe: failed to find a module named netdev-wl1
etc.

Also I'm unable to set country 00 and raise tx limit, same as with build I make myself. Wish I could find a way how to integrate jow's reghack into build, because it eats a lot of space when installed additionally, so into your build it does not fit.


#20

"failed to find a module" is a cosmetic LEDE bug [1]

Reghack in my build only provides two additional channels (12, 13). It does not let you set the txpower higher than 20 (for that you'd need additional modifications anyway).


#21

New build is up. 17.01 stable branch + https for LuCI


#22

Feedback is highly welcome :slight_smile: