TP-Link TL-WR741ND

TL-WR741ND is a lowcost (15€/25$) b/g/n wireless router, capable of running OpenWrt. (v1: tested v10.03 backfire and trunk from May 2010; v2/3/4: trunk)

Supported Versions

Model Version Launch Date OpenWrt Version Supported Model Specific Notes
v1 - Backfire 10.03 -
v1.3 - Backfire 10.03.1 r29592 tested & seems ok on TL-WR741ND(RU)v1.3 from fw:3.12.4
v1.4 - Backfire 10.03.1, Attitude Adjustment 12.09 Success
v1.5 - Backfire 10.03.1 (r22689) Success
v1.6 2011-10? Backfire 10.03.1 Success
v1.8 - Backfire 10.03 Success
v1.9 2010-10 Backfire 10.03.1 (r23714), Attitude Adjustment 12.09 8146; Attitude Adjustment (12.09 final) tested and seems OK.
v2 - trunk (r29614) Tested, working correctly. (r29614)
v2.1 -  Test at your own risk trunk (r27195) notes
v2.3 -  Test at your own risk trunk (r28601) Tested Backfire revision 28601
v2.4 - Attitude Adjustment 12.09 Rounded chassis (box branded WR740N). Using r30919 needed notes to access the router.
v3 2011-08  Test at your own risk untested
v3.1 -  Test at your own risk tested First report
v4 2011-09 Stability warning trunk (r28709) AR9331 chipset
v4.3 - trunk (r31249) Hardware reports "TP-LINK TL-WR741ND v4".
Works with trunk 31249, probably also works with earlier versions.
v4.20 2012-04 trunk (31273) Confirmed working with trunk 31273, probably working with earlier. Note: 4.20 is newer than 4.3
v4.21 - trunk (32793) Confirmed working with trunk 32793, probably working with earlier.
v4.22 - trunk (35240) Confirmed working with trunk 35240 and with Attitude Adjustment 12.09-rc1.
v4.23 - trunk (36884) Confirmed working with trunk 36884 and with Attitude Adjustment 12.09.
v4.27 - trunk (36669) Still AR9331 chipset; Confirmed working with Attitude Adjustment, r36669, probably working with earlier.

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
Atheros AR7240 @ 350 MHz 32 MB 4 MB 4 x 1 mod Yes No
  • Atheros AR9285 wireless chip

Version 4.x and above utilise the AR9331 chipset (Confirmed on UK v4.3 model). Chinese models may differ - TP-Link appear to have started using vxWorks and reducing the flash to 2MB and RAM to 16MB on some of their newer versions for the Chinese market.

Installation

This section details what is required to install and upgrade OpenWrt. First we link to software that you should download before you start reading the instructions on how to install.

WARNING: I just test r29507 firmware, jffs2 version BRICK your router, you need serial cable and a tftp server to restore it. Use a squashfs version that works well.

Important!Please double-check if the image revision you are downloading is newer than supported by the "Model Version" of your router.

  • Download a Install Image from this group if is the first flash from OEM firmware:
*-factory.bin Web interface X-Wrt DELETEME 1)
Version Branch None LuCI Gargoyle Default Extras 2) No pppoe
Backfire 10.03 DELETEME r20728 r20742 r20742 r20742
1.X Backfire 10.03.1 r29592 r29342
4.21 Attitude Adjustment 12.09-rc1 r34185
4.22 Attitude Adjustment 12.09-rc1 r34185
Trunk lastest 3) r29XXX r23885
2.X Trunk lastest 4) r29XXX
4.X Trunk lastest 5) r29XXX
  • Download a Upgrade Image from this group for already installed OpenWRT systems instead:
*-sysupgrade.bin Web interface X-Wrt DELETEME 6)
Version Branch None LuCI Gargoyle Default Extras 7) No pppoe
Backfire 10.03 DELETEME r20728 r20742 r20742 r20742
1.X Backfire 10.03.1 r29592 r29342
Trunk lastest 8) r29XXX r23885
2.X Trunk lastest 9) r29XXX
4.X Trunk lastest 10) r29XXX
4.X Trunk lastest 11) r38570
4.X Trunk lastest 12) r39406
4.X Trunk lastest 13) r39755

OEM easy installation

This section deals with how you install OpenWrt from a device freshly opened. Plus the steps required such as reset to factory defaults if the device has already been configured

Note: Reset router to factory defaults if it has been previously configured.

Note: Newer TP-Link retail firmwares (confirmed on v2.4 devices, but definitely not on v2.0) include a crude mechanism to prevent you uploading unsuitable firmware. It does this by checking the filename, so you may need to rename the *-factory.bin file to the name of a TP-Link retail firmware file. e.g. wr741nv1_en_3_12_4_up(100910).bin (not necessary with firmware V4_120320)

  • Browse to your router at http://192.168.1.1/ or test with TP-LINK Simulator first. (Version 4.20 uses http://192.168.0.1 out of the box.)
  • Login with user name: admin password: admin
  • Use left navigation panel and go to System Tools
  • Important! Navigate to - Factory Defaults and click on Restore if it has been previously configured.
    • Confirm the pop-up dialog.
  • Then navigate to - Firmware Upgrade
  • Upload previously chosen -factory.bin file to router
  • Click on Upgrade button and wait for it to reboot
  • Important! Do NOT turn off the power during upgrade
  • Wait about 120 seconds to start up, see SYS LED activity.
  • If the router's IP (192.168.1.1) doesn't repond to ping, try clear ARP cache on your machine
    arp -d
  • Don't clear your browser cache! Please report here what you installed, if do http://192.168.1.1/ work anyway and which Untested link let you get in. Successful ones have Untested removed. This only happen once, so your input is important.
192.168.1.1 Alternate links that theoretically should work
Gargoyle Know to fail http://192.168.1.1/login.shUntested https://192.168.1.1/login.sh
LuCI Untested http://192.168.1.1/index.htmlUntested http://192.168.1.1/cgi-bin/luciUntested
X-Wrt Untested http://192.168.1.1/index.htmlUntested http://192.168.1.1/cgi-bin/webif/info.shUntested
  • Important! Clear your browser cache if you are sure some web interface is installed, but can't access to http://192.168.1.1/
  • Set a root password
    • Browse to http://192.168.1.1/ if LuCI, X-Wrt or Gargoyle web interface is installed.
      • Only for Gargoyle login with defaults user name: root password: password
      • After password has been setup login with user name: root password: previusly entered
    • telnet 192.168.1.1
      • Type:
        passwd root
      • Enter your new password twice.
  • Once password has been setup Telnet is no longer available, use SSH instead to connect.
    • ssh root@192.168.1.1
    • PuTTY SSH

OEM installation TFTPBOOT + RS232

Using the serial console, new firmware versions can be loaded via TFTP and flashed as follows. This assumes your TFTP server is reachable at 192.168.1.100. You can change IP addresses with:

setenv ipaddr a.b.c.d
setenv serverip e.f.g.h

Type "tpl" to escape automatic boot when "autoboot" appear.

Calc Size of firmware:

-rw-r--r-- 1 root root   3350532 Nov  1 01:22 openwrt-ar71xx-tl-wr740n-v1-squashfs-sysupgrade.bin

Dec 3350532 to Hex 0x332004

TFTP loading and flashing is done by issuing:

tftpboot 0x80000000 openwrt-ar71xx-tl-wr740n-v1-squashfs-sysupgrade.bin
erase 0x9f020000 +0x332004 # 0x332004: size of the firmware (be aware that you may have a different size thus bricking your router)
cp.b 0x80000000 0x9f020000 0x332004 # 0x332004: size of the firmware (be aware that you may have a different size thus bricking your router)

If successful, the firmware can now be started with

bootm 0x9f020000

Upgrading OpenWRT

If you have already installed OpenWrt and like to reflash for e.g. upgrading to a new OpenWrt version you can upgrade using the mtd command line tool. It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing.

Web Upgrade Process

Terminal Upgrade Process

  • Download or compile yourself a sysupgrade binary.
    • Alternatively download it inside OpenWrt with wget and skip to last step.

cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.bin
mv openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.bin tplink.bin

  • SCP it to /tmp on your router:

scp openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
or
PSCP.EXE -p openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp

  • Type your root password when prompted and a slow upload will start.
  • Open PuTTY as SSH to 192.168.1.1 and perform the following commands:

cd /tmp
mv openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.bin tplink.bin

  • Flash via mtd

mtd -r write /tmp/tplink.bin firmware

Back to original firmware

  • Download, for example, TL-WR741ND_V1_100312 if you not already did. Make sure to get an image for the right hardware version. The example is for v1 hardware only.
  • Extract wr741nv1_en_3_11_1_up(100312).bin from the 2010422233510.zip archive downloaded.
  • SCP it to /tmp on your router:
PSCP.EXE -p wr741nv1_en_3_11_1_up(100312).bin root@192.168.1.1:/tmp

or

scp wr741nv1_en_3_11_1_up(100312).bin root@192.168.1.1:/tmp
  • Type your root password when prompted and a slow upload will start.
  • Open PuTTY as SSH to 192.168.1.1 and perform the following commands:
cd /tmp
mv wr741nv1_en_3_11_1_up(100312).bin tplink.bin

Warning!WARNING: Only perform the dd action below if your original firmware has the word "boot" in it, for example, wr741nv1_en_3_9_18_up_boot(100104).bin.

Important!Please do not dd your original firmware if it has no "boot" in its name, for example, wr741nv1_en_3_11_1_up(100312).bin, because if you do, you will brick your router! This was confirmed by supertom64

  • Cut first 0x20200 bytes from original firmware
cd /tmp
mv wr741nv1_en_3_9_18_up_boot(100104).bin orig.bin
dd if=orig.bin of=tplink.bin skip=257 bs=512
  • Flash via mtd
mtd -r write /tmp/tplink.bin firmware

Warning!WARNING: If you get the error "Writing from /tmp/tplink.bin to firmware … [e]Failed to erase block" after flashing via the mtd command , do not reboot or shutdown or you will brick your device! In tp-link site they say that if you have 110825 you should update to 111130 before upgrading to 120320, so it could be better to restore to 110914 and then upgrade "gradually" as they say.

Important! The latest TP-Link firmware wr741nv4_en_3_12_11_up(120320).bin doesn't have the word 'boot' in it. However, the 120320 firmware has also the bootloader (bigger file, 4063744 vs 3932160, it's 131584 bytes larger, equals to 0x20200 in hex, the amount you have to trim when flashing those files as described in wiki!) They used to add the word "boot" in the filename, now you have to pay attention to the file size.

Hardware

  • Dimensions ( W x D x H ) 6.9 x 4.6 x 1.3 in. (174 x 118 x 33 mm)

Photos

v1.x

Front:

Board:

v2.0

Case and board:

V2.0 Case V2.0 Board

Serial port is the two round joints just above the small surface mount chip in the centre. Take power from elsewhere.

v2.3 and v2.4

Case and board:

V2.3 and V2.4 Case V2.3 and V2.4 Board

nearly same case as v2.0 nearly same PCB as v2.0

v4.x

Case:

nearly same case as v2.0

Board: (Note the AR9331 chipset)

V4.x Board

Opening the case

Note: This will void your warranty!

These instructions will hopefully help you crack open your wr741nd without cracking it.

If you turn your wr741nd upside down you will see 4 rubber legs.

Under each of the 4 rubber legs is a screw.

Now unscrew the 4 screws.

Unscrew the aerial, and then the nut and washer.

Use a flat object such as the head of a flat screwdriver and gently try to pry open the top and bottom covers. Gently push upwards where the red arrows are and you can lift the top lid off.

To remove the LED cover, pull it out in the direction of the arrows.
It's on

Now it's off!

Remove the black strip and now you can lift the board out.

GPIO mapping

In OpenWRT system there are 18 GPIOs available. However gpio0, gpio1 are used by system to control LEDs and gpio11, gpio12 as input buttons. To be able control these IOs directly it is necessary to unload modules leds_gpio (gpio0,gpio1) and gpio_buttons (gpio11,gpio12). Next step is to export control files of each pin:

echo N > /sys/class/gpio/export

Where N is GPIO number. This will create directories with control files in /sys/class/gpio/gpioN

I have discovered this IO maping:

name purpose pin
gpio0 QSS LED 107
gpio1 SYS LED 108
gpio11 Reset button 88
gpio12 QSS button 89
gpio13 LAN 1 ??
gpio14 LAN 2 ??
gpio15 LAN 3 ??
gpio16 LAN 4 ??
gpio17 WAN ??

On hardware revision 4.21 (similar in 4.27)

name purpose
gpio0 WIFI LED
gpio1 QSS LED
gpio7 TP10
gpio11 Reset button
gpio13 WAN LED
gpio14 LAN 1 LED
gpio15 LAN 2 LED
gpio16 LAN 3 LED
gpio17 LAN 4 LED (0=on,1=off)
gpio26 QSS button
gpio27 SYS LED (0=on,1=off)

Other GPIOs are not working for me. I am able to export all of them, I even could change the direction, but when I write new value, it never changes.

For versions v4.x using AR9331 see reverse engineered pinout on ar9331_pinout .

TL-WR741ND v1.5

I have this version and I found working out of the box only backfire r22689 http://downloads.openwrt.org/backfire/10.03.1-rc3/ar71xx/openwrt-ar71xx-tl-wr741nd-v1-squashfs-sysupgrade.bin

TL-WR741ND v1.9

Because of a change in the flash chip to the EON EN25F32 flash chip on the hardware version v1.9. A new patch to support this flash chip was created. You can either compile openwrt trunk or add this patch:

https://dev.openwrt.org/changeset/23058

To your openwrt 10.03 source files and compile openwrt.

TL-WR741ND v2.X

Device works with Backfire 10.03.01 and latest trunk image and also with**Gargoyle** build, no flaws discovered.

TL-WR741ND v4.x

Version 4.x has changed to use the AR9331 SoC, and is supported by the trunk version.
Probably the hardware of all v4.x versions is identical.

After installation of r31249 + LuCI, 604KB flash are free for additional packages.

/proc/cpuinfo

  system type             : Atheros AR9330 rev 1
  machine                 : TP-LINK TL-WR741ND v4
  processor               : 0
  cpu model               : MIPS 24Kc V7.4
  BogoMIPS                : 265.42
  wait instruction        : yes
  microsecond timers      : yes
  tlb_entries             : 16
  extra interrupt vector  : yes
  hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
  ASEs implemented        : mips16
  shadow register sets    : 1
  kscratch registers      : 0
  core                    : 0
  VCED exceptions         : not available
  VCEI exceptions         : not available

Power characteristics

  • Rotuer consumes between 0.5W and 1W, depending on the power supply voltage and load.
  • The power adapter is rated 9V @ 0.6A . The router can be powered from a battery.
  • V2 and V4.3 versions of the router contains an MP1482DS step down voltage regulator, with the voltage range from 4.75V to 18V. This are absolute maximum ratings, other components might not be able to withstand this voltage range. 5V to 15V should be a safe range (don't try this on other versions than V2 or V4.3 if you aren't sure)

Bootloader Mods

  1. you could read about bootloader in general and about Das U-Boot in particular.

U-Boot 1.1.4 modification for routers

Forum member pepe2k made a modification of U-Boot 1.1.4 for Qualcomm Atheros SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future). Up to date information, binary images and sources can be found on official GitHub repository.

This modification started from wr703n-uboot-with-web-failsafe project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.).

More information:

Hardware mods

Passive PoE mod

There are instructions for making PoE for WR741ND V2.x (not for 4.x!) on DDWRT Forum.

Serial port mod

To access the serial console of the wr741nd, you need to solder a serial header to the labelled pins.

Or if you prefer, you can solder 4 wires to the pins on the back of the board.
This is the right pinout.

Comment: to get the serial connection work reliably, I had to connect a 10k pullup resistor between the TX and the 3.3V pin. This is because the TX pin is connected to a voltage divider (2x5.6k) and a capacitor is put between the real pin and the TX connector.

In my case (ca42 cable), the tx pullup didn't work. I had to pull the rx pin (I don't know why)

Now connect a serial device (dku-5, ca-42) and away you go! The right settings for accessing the wr741nd serial console are as follows.

Device: ttyATH0
Bits per second: 115200
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None*
(*Note: No flow control did not work for my version 1.3, I had to use RTS/CTS)

Hint: it is possible to have a serial connector outside your router without drilling holes through your nice case. The trick is threading the 4 serial cables through the vent on the side of the router before putting back all the parts and closing the case. Below is an example.

WR741ND ver. 2
For this new revision its TP4→Tx and TP5→Rx in the center of PCB. On Chipset AR7240 they are pins 86→Rx and 87→Tx. (source)

WR741ND ver. 4
The version 4 of the board uses the standard TP-Link pinout, however the TX pin is not connected to the CPU. In order to make the TX line working, the two points on the bottom side of the PCB must be connected with a small wire.

Version 4.20 needs the same wire for TX, even if the layout is a tiny bit different. The pin at the SOC is labeled TP18, the one at the serial connector is labeled TP28. Output level is 2.5V with good flanks (measured with digital oscilloscope). Input is via a 1k/3k voltage divider, which does not make the RX line 5V tolerant! Connection needs a 3.3V RS232 level shifter, or can be directly done with, e.g., the Bus Pirate. Pins on the connector in the photo are from the left TX-RX-GND-3V3, as expected.

tl-wr741nd-v4-serial-fix.jpg.

For those who can take the risk of DESTROYING YOUR ROUTER an insane usb mod vor v4 devices is available here

USB Host mod

It is possible to attach a usb socket directly to AR7240. You need to solder directly to SoC pins and provide two 15k pulldowns on every line. D- is pin 73 and D+ is pin 74. USB power should come from somewhere else (e.g. an additional step-down 5V regulator connected to the main power source, LM2574 seems like a nice choice).

WR740/WR741 4.x USB mod

For WR741ND V4.x pins are not directly accessible so you need to use fine dremel tool get access to usb pins:

This is how it should be connected:

You can read detailed instructions on the forum.

You also need this minor kernel patch (verified against Attitude Adjustment 12.09):

Index: target/linux/ar71xx/patches-3.3/990-WR741ND-usb.patch
===================================================================
--- target/linux/ar71xx/patches-3.3/990-WR741ND-usb.patch	(revision 0)
+++ target/linux/ar71xx/patches-3.3/990-WR741ND-usb.patch	(revision 0)
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/Kconfig	2013-03-12 15:18:29.827389883 +0400
++++ b/arch/mips/ath79/Kconfig	2013-03-12 15:21:57.884753554 +0400
+@@ -506,6 +506,7 @@
+ 	select ATH79_DEV_AP9X_PCI if PCI
+ 	select ATH79_DEV_ETH
+ 	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_USB
+ 	select ATH79_DEV_LEDS_GPIO
+ 	select ATH79_DEV_M25P80
+ 
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c	(revision 36033)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c	(working copy)
@@ -16,6 +16,7 @@
 #include "dev-eth.h"
 #include "dev-gpio-buttons.h"
 #include "dev-leds-gpio.h"
+#include "dev-usb.h"
 #include "dev-m25p80.h"
 #include "machtypes.h"
 
@@ -97,6 +98,8 @@
 	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
 	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
 
+	ath79_register_usb();
+
 	ath79_register_m25p80(&tl_wr741nd_flash_data);
 
 	ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |

Here's how it works:

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ar71xx-ohci ar71xx-ohci: Atheros AR71xx built-in OHCI controller
ar71xx-ohci ar71xx-ohci: new USB bus registered, assigned bus number 1
ar71xx-ohci ar71xx-ohci: irq 3, io mem 0x1b000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new full speed USB device using ar71xx-ohci and address 2
usb 1-1: configuration #1 chosen from 2 choices
root@OpenWrt:/# cat /sys/kernel/debug/usb/devices 

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 1
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 2.06
S:  Manufacturer=Linux 2.6.32.10 ohci_hcd
S:  Product=Atheros AR71xx built-in OHCI controller
S:  SerialNumber=ar71xx-ohci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  2
P:  Vendor=1457 ProdID=5122 Rev= 3.12
S:  Manufacturer=Linux 2.6.29-GTA02_a-t-gta01-tweaks-mokodev with 
S:  Product=RNDIS/Ethernet Gadget
C:  #Ifs= 2 Cfg#= 2 Atr=c0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
root@OpenWrt:/#

Also firmware for 741nd is working in 743nd

WR741 V1, V2 USB mod on trunk (Barrier Breaker)

Note: Modification for V4 is not needed. The files are already patched.

1. Setup you Buildroot (download the source, install the packages, make defconfig, make prereq, make menuconfig

2. Select the needed packages - kmod-usb-storage block-mount kmod-fs-ext4 e2fsprogs (you can add other kmod-fs modules for other file systems like NTFS and fat)

3. Run make (build the source).

4. Edit the following file (MUST BUILD FIRST!!!):

4.1 build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.10.32/arch/mips/ath79/mach-tl-wr741nd.c

After:

#include "dev-gpio-buttons.h"

Add:

#include "dev-usb.h"

After:

ath79_register_eth(0);

Add:

ath79_register_usb();
4.2 build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.10.32/arch/mips/ath79/Kconfig

Add:

select ATH79_DEV_USB

After:

config ATH79_MACH_TL_WR741ND
      bool "TP-LINK TL-WR741ND support"
      select SOC_AR724X
      select ATH79_DEV_AP9X_PCI if PCI
      select ATH79_DEV_ETH
      select ATH79_DEV_GPIO_BUTTONS
      select ATH79_DEV_LEDS_GPIO
      select ATH79_DEV_M25P80

5. Make (compile) once again. Now usb support should work.

Software mods

Buttons

I found that QSS button is BTN_1 and reset is BTN_0 See also http://eko.one.pl/?p=openwrt-button (in Polish, sorry)

Wifi on/off toggle by QSS button

(Thanks to obsy) Wifi toggle by QSS button Simply create a new file called 01onoff in /etc/hotplug.d/button/

vi /etc/hotplug.d/button/01onoff

and copy these lines inside (remember to push 'i' for insert)

#!/bin/sh

[ "$BUTTON" = "BTN_1" ] && [ "$ACTION" = "pressed" ] && {
 SW=$(uci get wireless.@wifi-device[0].disabled)
 [ $SW == '0' ] && uci set wireless.@wifi-device[0].disabled=1
 [ $SW == '0' ] || uci set wireless.@wifi-device[0].disabled=0
 wifi
}

Save and exit

(esc :wq)

Reboot by QSS button

Borrowed from Gargoyle:

uci set system.reboot_button=button
uci set system.reboot_button.button=BTN_1
uci set system.reboot_button.action=released
uci set system.reboot_button.handler='logger reboot ; reboot ;'
uci set system.reboot_button.min=3
uci set system.reboot_button.max=90
uci commit system

Press and hold QSS button for at least 3 seconds and router will reboot on release.

Specific configuration

Failsafe mode

Warning!WARNING: You may be unable to access even if you see fancy fast flashing of "SYS" LED due to a bug #6922

  • Unplug the router's power cord
  • Connect any router LAN port directly to your PC
  • Configure your PC with a static IP address: 192.168.1.2
  • Plug the power on to the router
  • Wait until the "SYS" LED starts flashing repeatedly
  • Press the "QSS" button (on the front of the router) – the "SYS" LED will now start flashing at a faster rate
  • Login to the router by using telnet to connect to the IP address 192.168.1.1 – there will be an immediate unauthenticated login to a root shell
Commands:
  • mount_root - will mount the normal root filesystem
  • firstboot - all settings will be reset
  • reboot -f - will reboot even without a mounted filesystem

Basic configuration

Since this part is identical for all devices, see Basic configuration.

OEM firmware features

Since this is the same for all TP-LINK products, see TP-LINK firmware features.

Connect stuff to the USB port

To connect stuff to the USB port, please see Connect stuff to the USB port.

Other Info

ImageBuilder recipes

After many cycles of:

opkg update
opkg install ... 
opkg remove ...
opkg install ... 
opkg remove ...
opkg install ... 
firstboot
sync
reboot
opkg update
opkg install ...

You will save precious flash space, preinstalling these packages and config files with ImageBuilder. The official download link is know to be broken so use ImageBuilder from lastest trunk instead.

Only your changed config files will be saved to /overlay/etc/ folder. So it's that what you exactly have to copy to /files/etc/ folder in your ImageBuilder root.

SCP will not work if you didn't passwd and if you don't want to do passwd before copy files: You can do passwd and avoid SCPing passwd file or simlink /overlay inside /www and download config files at http://192.168.1.1/overlay/

ln -s /overlay /www/overlay

FIXME List config files anyway…

Default Packages + Default Profile if what you get when downloading a image from trunk:

make info
Current Target: "ar71xx (Generic)"
Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg udevtrigger
	hotplug2 dnsmasq iptables ppp ppp-mod-pppoe kmod-ipt-nathelper firewall
	kmod-leds-gpio kmod-input-core kmod-input-polldev kmod-input-gpio-buttons
	kmod-button-hotplug swconfig
Available Profiles:
 
Default:
	Default Profile (all drivers)
	Packages: kmod-ath9k kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
		vsc7385-ucode-ap83 vsc7385-ucode-pb44 vsc7395-ucode-ap83
		vsc7395-ucode-pb44 wpad-mini
 
TLWR741NDV1:
	TP-LINK TL-WR741ND v1
	Packages: kmod-ath9k wpad-mini

If all stuff selected fit into your router, it will be in:

ls -la ./bin/ar71xx/

Take care of file time, if build fails the file you see is from a previous successful build.

qos-scripts

make -j2 FILES="~/OpenWrt-ImageBuilder-ar71xx-for-Linux-x86_64/files"
PROFILE="TLWR741NDV1" PACKAGES="kmod-sched kmod-ipt-filter kmod-textsearch kmod-ipt-ipopt 
kmod-ipt-conntrack-extra kmod-ipt-imq tc iptables-mod-ipopt iptables-mod-filter 
iptables-mod-conntrack-extra iptables-mod-imq qos-scripts" image

(I)relevant forum links:

Tags

1) , 6) Links down
2) , 7) includes qos-scripts, ntpclient, bandwidthd, miniupnpd, updatedd and webif of course
3) , 4) , 5) , 8) , 9) , 10) , 11) , 12) , 13) Release number vary more frequently than Wiki update

Back to top

toh/tp-link/tl-wr741nd.txt · Last modified: 2014/04/23 18:17 by valentt