OpenWrt Forum Archive

Topic: HOWTO: Install Openwrt on TP-Link TL-WR841ND VERSION 3

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

STANDARD DISCLAIMER: I'm not responsible for voided warranties, bricked routers, lost packets or money.   This worked for me, this is how I got openwrt working on mine.

HOW TO:
1. Download OpenWrt firmware http://downloads.openwrt.org/snapshots/ … uashfs.uni
2. Log in to tp link web interface and update firmware the same as you would the standard tp-link firmware
3. wait for the router to reboot (approx 2 mins)
4. Telnet into the router at 192.168.1.1

5. The wr-841nd apparently only has 4mb of rom (but 32mb ram!) so we need to make a little room by running these commands
OpenWrt being a full blown linux distro has its own package manager called opkg (fairly similar to apt-get in functionality/features)

opkg remove kmod-pppoe
opkg remove kmod-ppp
opkg remove ppp-mod-pppoe
opkg remove ppp

*Sorry to anyone who needs pppoe*

6. Get a current list of installable packages by running:

opkg update

7. Install the ath9k driver, hostapd-mini daemon (so the router can function as an access point, somewhat of a workaround for the ath9k drivers not supporting master mode), and the web interface   

opkg install kmod-ath9k
opkg install hostapd-mini
opkg install luci-admin-full   
opkg install luci-fastindex

* opkg-install luci-admin-full will probably give a warning/error message, ignore it and keep going (it sorts itself out on the next reboot)

8. Reboot the router by typing reboot at the prompt  (give it a minute or two to do so)

9.  When the router reboots wifi will still not work just yet. if you telnet back into the router and run the command

wifi up

it will promptly tell you that wlan0 is disabled.
to remedy this

cd /etc/config/
vi wireless

This will open the configuration for the wlan0 (wifi) interface.

for those of you who don't know how to use vi:

press i to enter insert mode


find the line that says 

#REMOVE THIS LINE TO ENABLE WIFI
option disabled 1

and change it to

option disabled 0

press the escape key to go back to command mode

type :wq and press enter to save the file and quit vi.


10.  now that your out of vi (and have just completed the hardest part of the whole process) run the command

wifi up

11. Now your tp link wr-841nd router is running openwrt and fully functional. You may log in to the web interface and config your wireless security from there, or if you wanna kick it oldschool telnet/ssh back into the router and edit the config file /etc/config/wireless accordingly.



-optional installs-

+For easy/lazy configging via web interface
      opkg install luci-app-firewall
      opkg install luci-app-upnp

+Tool for bandwidth/throughput testing.
      opkg install iperf


-tips and misc info-

you can  change the tx output  by running by:

iwconfig wlan0 txpower Nmw
-OR-
iwconfig wlan0 txpower Ndba

max 100mw or 20dba

Configuration files for the wired (lan) connections are located in /etc/config/ and if your digging around in there with vi i'll assume you know what your doing and won't waste the time to explain what everything does.

Most linux distros are perfectly happy with the dir command, OpenWrt isn't.  If that annoys you

alias dir="ls"

is your salvation.

opkg files (packagename)  will list all of the files associated with a package.

when you reboot the router opkg update is nullified, you need to rerun it if you want  to install something.

Most commands (such as opkg) will accept the --help flag and give you syntax hints.

if your tinkering around with openwrt and find yourself low on space  removing luci-theme-openwrt and replacing it with luci-theme-openwrtlight  is an easy way to squeak out some extra room (openwrt is 71.2kb openwrtlight is 6.16kb, doesn't sound like much when you've only got 4mb to work with every bit counts)  and installing luci-admin-mini instead of luci-admin-full  (or you could just remove luci altogether) will save a good bit space as well  but cut out some functionality of the web config as well.

If your really get into hacking around and want to see what packages are available (without setting your console scrollback to 2048 lines)  you can view them all here http://downloads.openwrt.org/snapshots/ … /packages/

Being that the board in this router does have a usb connection (solder required) and there are packages for various storage formats, cups (printing), torrent clients, and i even saw something about teamspeak2 in the package list , id say this thing has has  a pretty good hack value to it.


A few Screenshots:


cmdline banner
http://i30.tinypic.com/2irntpj.jpg
web interface
http://i28.tinypic.com/fc4dxs.jpg
cat /proc/cpuinfo
http://i25.tinypic.com/2wm2der.jpg
bandwidth tests
http://i31.tinypic.com/s1t3lt.png
NOTE: my wireless card is pure 802.11G 54mbs only, 802.11n cards should get much better results

to run the test pictured above you must have iperf installed
iperf  -c  <your pc's ip address>  -u -b 100m (if you have an 802.11n wireless card change the last part to 300m)

(Last edited by davidork on 17 Aug 2009, 11:23)

I've managed to brick two TL-WR841ND routers.
Here's how:

I followed this howto. It worked to the point that i would be configuring wireless. No joy there, it just didn't recognized the wifi module (spent about 5 days figuring). I did manage though to squeeze the pppoe and the html gui onto the box.
Then, i wanted the original firmware (wanted to actually use the router). tried to flash it with mtd -r blabla.img linux and other stuff, got some errors on erasing / writing -> Bricked.

After getting a new one (on warranty), wanted to go for it a second time ( i must have thought that i'm a moron and did something wrong the first time and this time maybe i can get the wifi working too ) .. No dice. Tried dd-ing the firmware directly to the mtd partitions by splitting and other ridiculous things... -> Bricked.


I have a brand new one now (on warranty again, this time the guys eyeballed me a bit when i said " It just doesn't power on.... I'm so unlucky sad ".
I'm waiting for

a) Solution to wireless.
b) Solution to get back to the factory OS.
c) Maybe solution to just telnet into the factory OS. [that would be very nice]


regards,

Bogdan Dumitru

Not working on the first try. But I'll try again.

** BUMP!!!! **

Still waiting for someone to clarify on this.

Can't configure wifi. It seems here that package is specified not (Ath9). And by the way the image is pinched with WR981ND.... So at all I do not know about wifi... + besides it is possible for different regions a different stuffing inside. How to define a stuffing? Somebody knows??

Is this howto good for the TL-WR741ND too?
Thank you very much.

Yes, this howto is also goos for TL-WR741ND. At least in my case:

root@WR741ND:~# cat /proc/cpuinfo
system type             : Atheros AR7240 rev 2
machine                 : TP-LINK TL-WR741ND
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 232.65
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x08e8, 0x0da8, 0x0248]
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Does this also apply to dlink dir-615 c1?
Thx from a noob!

dlbogdan: Are you sure its VERSION 3.  We sell these were I work, and version 3's have almost completely disappeared, haven't cracked any of the newer revisions open, but i'd assume like linksys they've changed them to prevent modding/cut down on manufacturing costs.  I've managed to brick one, and TFTP seems to work best, at least on mine. However you may not be at a total loss, with some soldering skills you should be able to get serial up and running and JTAG it back to life.

kofeckofec: Glad to hear it worked.


Ecoholic: No clue mate, Grab an extra, bite the bullet and see what happens.

davidork wrote:
opkg remove kmod-pppoe
opkg remove kmod-ppp
opkg remove ppp-mod-pppoe
opkg remove ppp

It's kinda pointless doing a remove. Squashfs is a read only file system. Openwrt overlays a journal (jffs2) on top to show your "current" file system.
The initial files in those packages are never removed from the read only squashfs file system and no space is freed up (the reverse happens, you're using some jffs2 space to say the files in those packages are unavailable).

Apart from that, this looks good.
I'm trying to get a stable TL-WR741ND image (compiled from trunk) myself.
I the serial console connections are SJ1 (on the right, just above "TP-LINK" when the ethernet ports are facing you)
From the bottom I the connections are VCC, GND, RX, TX

the console is 115200,8n1

(Last edited by Timothy on 3 Feb 2010, 16:17)

kofec wrote:

Yes, this howto is also goos for TL-WR741ND. At least in my case:

root@WR741ND:~# cat /proc/cpuinfo
system type             : Atheros AR7240 rev 2
machine                 : TP-LINK TL-WR741ND
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 232.65
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x08e8, 0x0da8, 0x0248]
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Just be warned that at some point the flash chip in these devices has changed.

It was a winbond chip identified by the kernel as s25sl032a

now it's an hynix 934A HY5DU561622FTP-5
Kernel sees this as
m25p80 spi0.0: unrecognized JEDEC id ef4016



update: these are now supported   more info in https://forum.openwrt.org/viewtopic.php?id=22045

(Last edited by Timothy on 3 Mar 2010, 17:28)

Now Supported By DD-WRT! 

DIR-615 Rev.  C1, D1 and D2 !!! Same as Trendnet!!!

(Last edited by Ecoholic on 19 Feb 2010, 19:33)

were you able to get WiFi running?
I tried opkg install kmod-ath9k but I have a feeling it's not proper driver for WR741ND

Thanks

kofec wrote:

Yes, this howto is also goos for TL-WR741ND. At least in my case:

root@WR741ND:~# cat /proc/cpuinfo
system type             : Atheros AR7240 rev 2
machine                 : TP-LINK TL-WR741ND
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 232.65
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x08e8, 0x0da8, 0x0248]
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Noerr wrote:

were you able to get WiFi running?
I tried opkg install kmod-ath9k but I have a feeling it's not proper driver for WR741ND

Thanks

https://forum.openwrt.org/viewtopic.php?id=22045

The wifi works fine, I've been compiling from trunk for a while. It can get a little tricky to fit everything into the space needed (the wifi is well over 500K when to take into account mac80211 and kmod-ath9k) if you're wanting anything more than a simple stock build.

Also there were some issues with the wan which on some builds would cause the wan to lock out (setting the mtu to about 1400 fixed it.

Timothy wrote:

[

Also there were some issues with the wan which on some builds would cause the wan to lock out (setting the mtu to about 1400 fixed it.

Cheers Timothy,
It works perfectly

for those (including myself trying to figure out how to put it in)

put following in /etc/config/network  under wan section

config interface wan
        option mtu      1400

Hi I have a problem with the router, I use a standard configuration
I can access from LAN1 LAN2 LAN3 LAN4 to the router.
But I can not access a computer on LAN1 to LAN2.
WAN routes to go, however. Does anyone have an idea?

   
config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'eth'
        option 'ifname' 'eth0'
        option 'proto' 'none'

config 'interface' 'lan'
        option 'ifname' 'lan1 lan2 lan3 lan4'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.4.2'
        option 'netmask' '255.255.255.0'
        option 'gateway' '192.168.4.1'
        option 'defaultroute' '0'
        option 'peerdns' '0'
        option 'bcast' '192.168.4.255'
        option 'dns' '192.168.4.1'

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'

Hi.
I have that router with the same version and I'm using PPPOE. If I flash using openwrt will the internet work? Of course without removing PPPOE or should I remove something else?
And can I get the original firmware if something goes wrong?
Thanks in advance.

(Last edited by Burned on 6 Jun 2010, 17:32)

i did everything written in the guide but i get "Errore 102 (net::ERR_CONNECTION_REFUSED): Errore sconosciuto." when i try to go to 192.168.1.1
i already tried to reinstall some packages like fastindex or luci-admin...
any suggestion?

thanks for helping!!!

SOLVED https://forum.openwrt.org/viewtopic.php … 00#p102400

(Last edited by maxidvd on 18 Oct 2010, 19:22)

New problem... i turned off the ap for some hours and after i can't connect to luci or telnet anymore...

Sorry, newbi-question, and possibly even in the wrong thread:
I have a TL-WR841 ND version 5.4 (Just new out of the box.)
I flashed Openwrt successfully via the original web interface.
The WAN and LAN ports are working fine. But no WIFI (wifi-control-lamp on the WR841 is off too.)
How can I configure Wireless enabled via the web interface?

BTW, under "System-Software" I get the following readout:

src/gz packages http://downloads.openwrt.org/backfire/1 … x/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

I would appreciate any hints very much. (I'm working with a MacBook, I don't even know, where I could get a console-window there. Even such hints would be appreciated.) Although LuCI seems to work fine for me.

Thank you!
Ralf

Try to install kmod-ath9k package.
I'll ask you for a favour. After bricking twice my v3 and v5, and having v5 again I wonder how does the new 10.03 rc3 works. I mean does it work fine because the last V5 I had bricked from itself(worked few hours and after reboot it didn't quite loaded fully)..

Hello everyone,
I have WR841 Router, and meanwhile I updating the firmware the electricity got cut off and then when I accessed the RS232 with the cable it booted, I tried to write a flash on the address of the firmware but ever since it didn’t boot and I bought a WR1043 instead and I tried to write a firmware on the WR841 flash but I don’t know exactly its address, and this is what I got:
erase 0xbf020000 +7c0000
tftpboot 0x81000000 code.bin
cp.b 0x81000000 0xbf020000 0x7c0000
So I thought of doing this, while it was working or on function, I dispatched the flash for the WR1043 and I’ve installed it on the WR841, I managed to write the WR841 and the file on the flash (wr841n_en_3_4_5_up_boot(090226) but it doesn’t boot because I wrote it on the wrong address, the file includes the boot sector (U-BOOT 1.1.4 feb 6 2009). So on what kind of address do I have to write it, can anyone help me out?

Just wanted to give this forum a feedback.
The last time i tried open-wrt on this router, back in 2009 it gave it a heart attack (see my post #2 on this thread)
Needless to say, replaced it in warranty (3 times or so) and stayed on official firmware.. till now.
Let's say i wanted an excuse to buy a new router at first smile), anyway, found this : http://wiki.openwrt.org/toh/tp-link/tl-wr841nd , dind't quite follow it, in the sense that i've downloaded a much newer version of openwrt witch wasn't confirmed working for v3.
The file is: http://downloads.openwrt.org/backfire/1 … actory.bin  witch is the latest release for it.

Flashed it by wireless (Didn't bother to get on the desktop computer for this, i was already sure my router will be completely fried in less then 15 minutes anyway) and surprise!!


EVERYTHING works perfectly! I'll never even try getting back to official firmware (the main reason i fried two routers back in 2009)

Later edit: Not at all a problem but i though you should know that my router now thinks it's a TP-LINK TL-WR941ND instead of 841ND.

Thank you very much OpenWRT!
FLAWLESS VICTORY!

(Last edited by dlbogdan on 24 Nov 2011, 22:35)

Another update. Very important if you want to play with different builds!

I've managed to lock myself out of the router pretty quick, so here's what NOT to do :
DO NOT update to trunk builds smile
I've done this by the means of gui update functionality and the effect was so nice: After the update, the router gave my network internet both on wired and wireless but there were no more http gui and apparently my root password has been changed.
The problem is that safemode booting even though it did trigger the fast flashing led when the button was pressed at the specified timing (see wiki) it didn't accept telnet. Actually I'm sure the network wasn't even up (tried both lan ports and wan)

What i did is solder a pl2303 mini board in the router (BTW, the board is identical to wr941nd v3 even though it clearly states wr841nd v3.5 on the box!!!!)  and drilled a hole to get the miniusb out. The serial term let me change the root password and then i could return to the working image of openwrt by flashing from command prompt (mtd firmware ..bla bla)

So, if you don't want this to be your story, stick to wikis, stick to releases and flash responsibly.

A question for gurus...
Now that i have the serial term available at all times (btw, it didn't work with the VCC connected, it sort of powered the unit from the USB!! )
Is there any reason for me to believe that i can brick my router with bad flashing ? (i.e. not recoverable even via serial terminal)

(Last edited by dlbogdan on 28 Nov 2011, 12:42)

I'm building a custom firmware for WR841ND v3/ WR941ND with IPV6 enabled.
Very excited about this.
Stay tuned.

EDIT: Excited over little i guess..
Managed to get IPv6 running well over openwrt but at this point a custom firmware release would be pointless because the configuration for each user would take place 80% on the terminal.
Luci alone is not ready for IPv6
(correct me if i'm wrong)

(Last edited by dlbogdan on 30 Nov 2011, 17:53)

The discussion might have continued from here.