[OpenWrt Wiki] TP-Link TL-WR741ND (2024)

TL-WR741ND is a lowcost (15€/25$) b/g/n wireless router, capable of running OpenWrt. It is very similar to TP-Link TL-WR740N, but this model has a removable antenna.

This device is NOT RECOMMENDED for future use with OpenWrt due to low flash/ram.
DO NOT BUY DEVICES WITH 4MB FLASH / 32MB RAM if you intend to flash an up-to-date and secure OpenWrt version onto it! See 4/32 warning for details.

1) This device does not have sufficient resources (flash and/or RAM) to provide secure and reliable operation.
This means that even setting a password or changing simple network settings might not be possible any more, rendering the device effectively useless. See OpenWrt on 4/32 devices what you can do now.

2) OpenWrt support for this device has ended in 2022.
19.07.10 was the last official build for 4/32 devices.

Supported Versions

[OpenWrt Wiki] TP-Link TL-WR741ND (1) For clarity and ease of use we should consider trimming below list. I have rebooted the hardware list which should help clearing the duplicates. For example, judging from the details available at WikiDevi, the v1.6 and v1.9 seem already identical. The fact OpenWrt images only cover major updates (ie v1, v2, v4) should be a further indicator. -- Bernini 2015-01-06

Model Version Launch Date OpenWrt Supported Since Model Specific Notes
v1.x - Backfire 10.03.1 v1.9 has a different flash chip compared to other v1.x models, see SVN r23712 and related ticket.
v2 - Backfire 10.03.1 Tested with r29614, working correctly.
v2.1 - [OpenWrt Wiki] TP-Link TL-WR741ND (2) trunk (r27195) notes
v2.3 - [OpenWrt Wiki] TP-Link TL-WR741ND (3) trunk (r28601) Tested Backfire revision 28601
v2.4 - Attitude Adjustment 12.09 Rounded chassis (box branded WR740N). Also works without issues with CC 15.05.1 release
v3 2011-08 ? WikiDevi only knows a v3.1, no v3. Confirms OpenWrt support though.
v3.1 (CN) - ? This forum thread suggests support, but user hacked a v1 OpenWrt image to test.
v4 2011-09 Attitude Adjustment 12.09 AR9331 chipset.
v4.20 2012-04 Attitude Adjustment 12.09 Working as of trunk r31273, note 4.20 is newer than 4.3.
v4.3 - Attitude Adjustment 12.09 Working as of trunk r31249, hardware reports “TP-LINK TL-WR741ND v4”.
v5.X - LEDE 17.01 Supported since commit 0e2d9769, hardware (functionally) identical to v4 and identical to TL-WR740N v5. Works well with 19.07.10 (custom build, since it is not built by default due to flash size constraints).

Hardware Highlights

Ver CPU RAM Flash Network Wireless USB Serial JTag Wikidevi FCC
1.6 Atheros AR7240 @ 350 MHz 32 MB 4 MB 1 WAN + 4x LAN (100 Mbit) AR9285 [bgn 1×1:1] mod only 1.1 Yes No Link FCC ID TE7WR741NX
1.9 Atheros AR7240 @ 350 MHz 32 MB 4 MB 1 WAN + 4x LAN (100 Mbit) AR9285 [bgn 1×1:1] mod only 1.1 Yes No Link
2.4 Atheros AR7240 @ 350 MHz 32 MB 4 MB 1 WAN + 4x LAN (100 Mbit) AR9285 [bgn 1×1:1] mod only 1.1 Yes No Link FCC ID TE7WR741NDV2
3.1 Atheros AR7240 @ 350 MHz ? 4 MB 1 WAN + 4x LAN (100 Mbit) AR9285 [bgn 1×1:1] ? Yes No Link Presumedly FCC ID TE7WR741NDV2 as well
4.3 Atheros AR9331 @ 400 MHz 32 MB 4 MB 1 WAN + 4x LAN (100 Mbit) AR9331 [bgn 1×1:1] mod 2.0 Yes No Link FCC ID TE7WR741NDV4
5 Atheros AR9331 @ 400 MHz 32 MB 4 MB 1 WAN + 4x LAN (100 Mbit) AR9331 [bgn 1×1:1] ? Yes No ? FCC ID TE7WR741NXV5

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

Install OpenWrt (generic explanation)

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.

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

  • [OpenWrt Wiki] TP-Link TL-WR741ND (4) 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

  • [OpenWrt Wiki] TP-Link TL-WR741ND (5) 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 [OpenWrt Wiki] TP-Link TL-WR741ND (6) link let you get in. Successful ones have [OpenWrt Wiki] TP-Link TL-WR741ND (7) removed. This only happen once, so your input is important.

192.168.1.1 Alternate links that theoretically should work
Gargoyle [OpenWrt Wiki] TP-Link TL-WR741ND (8) http://192.168.1.1/login.sh[OpenWrt Wiki] TP-Link TL-WR741ND (9) https://192.168.1.1/login.sh
LuCI [OpenWrt Wiki] TP-Link TL-WR741ND (10) http://192.168.1.1/index.html[OpenWrt Wiki] TP-Link TL-WR741ND (11) http://192.168.1.1/cgi-bin/luci[OpenWrt Wiki] TP-Link TL-WR741ND (12)
X-Wrt [OpenWrt Wiki] TP-Link TL-WR741ND (13) http://192.168.1.1/index.html[OpenWrt Wiki] TP-Link TL-WR741ND (14) http://192.168.1.1/cgi-bin/webif/info.sh[OpenWrt Wiki] TP-Link TL-WR741ND (15)
  • [OpenWrt Wiki] TP-Link TL-WR741ND (16) 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.dsetenv 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.binerase 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

  • Browse to Upgrade URL for your Web interface package installed:

    • luci and luci-light http://192.168.1.1/cgi-bin/luci/mini/system/upgrade/ LuCI Essentials

    • luci and luci-medium http://192.168.1.1/cgi-bin/luci/admin/system/upgrade/ LuCI Administrative

    • webif http://192.168.1.1/cgi-bin/webif/system-upgrade.sh X-Wrt

    • gargoyle http://192.168.1.1/update.sh Gargoyle

  • Upload *tl-wr741nd-v1-squashfs-sysupgrade.bin file

  • Confirm, check MD5 sum, confirm again.

  • Wait for reboot about 2 whole minutes.

Terminal Upgrade Process

  • Download or compile yourself a sysupgrade binary.

    • Alternatively download it inside OpenWrt with wget and skip to last step.

cd /tmpwget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v1-squashfs-sysupgrade.binmv 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 /tmpmv 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

[OpenWrt Wiki] TP-Link TL-WR741ND (17)Remove the parenthesis and its content from the file name. i.e. file_to_load(1234).bin must be renamed to file_to_load.bin, this to avoid the “unrecognized ”(“ as command” during the mv steep below.

PSCP.EXE -scp wr741nv4_en_3_17_0_up_boot.bin root@192.168.1.1:/tmp

or

scp wr741nv4_en_3_17_0_up_boot.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 /tmpmv wr741nv4_en_3_17_0_up_boot40;14041041;.bin tplink.bin

[OpenWrt Wiki] TP-Link TL-WR741ND (18)WARNING: Only perform the dd action below if your original firmware has the word “boot” in it, for example, wr741nv4_en_3_17_0_up_boot(140410).bin.

[OpenWrt Wiki] TP-Link TL-WR741ND (19)Please do not dd your original firmware if it has no “boot” in its name, for example, wr741nv4_en_3_17_0_up(140410).bin, because if you do, you will brick your router! This was confirmed by supertom64

  • Cut first 0x20200 bytes from original firmware

[OpenWrt Wiki] TP-Link TL-WR741ND (20)If you already mv the original .bin (previous steep) it now is named tplink.bin so the code below will trow the “file not found” error. Please make sure to SCP your binary again (as in step 4) before executing the next code lines.

cd /tmpmv wr741nv4_en_3_17_0_up_boot40;14041041;.bin orig.bindd if=orig.bin of=tplink.bin skip=257 bs=512
  • Flash via mtd

mtd -r write /tmp/tplink.bin firmware

[OpenWrt Wiki] TP-Link TL-WR741ND (21)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.

[OpenWrt Wiki] TP-Link TL-WR741ND (22) The latest TP-Link firmware for V1 revision (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

Photos

v1.x

Case and board:

v2.0

Case and 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:

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

v4.x

Case (nearly the same case as v2.0) and board (Note the AR9331 chipset):

v5

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.

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

Version 2.4:
GPIO HIGH = 2.47 V, GPIO LOW = 0 V

name purpose SoC pin DESCRIPTION
gpio0 QSS LED 107 software controlled LEDs
gpio1 SYS LED 108
gpio2 SPI-SS0 75 multiplexed, connected to the SPI flash memory chip
gpio3 SPI-CLK 76
gpio4 SPI-MISO 77
gpio5 SPI-MOSI 78
gpio6 JTAG-TDI 81 multiplexed, R425 pulldown resistor
gpio7 JTAG-TDO 82 multiplexed, not connected
gpio8 JTAG-TMS 84 multiplexed, R426 pulldown resistor
gpio9 UART-RXD 86 multiplexed, serial IN, R612 pulldown resistor
gpio10 UART-TXD 87 multiplexed, serial OUT, direct to SoC
gpio11 Reset button 88 software controlled buttons
gpio12 QSS button 89
gpio13 LAN 1 LED 90 software controlled LEDs, can be hardware controlled if multiplexed
gpio14 LAN 2 LED 91
gpio15 LAN 3 LED 92
gpio16 LAN 4 LED 109
gpio17 WAN LED 110

Multiplexed pins cannot be software controlled. We can undo the multiplexing by writing some memory registers, allowing to recover the GPIO functionality.

Example, read the memory reg for GPIO mux (address 0x18040028)

devmem 0x18040028 32

this returns the value: 0x48002. The bit0 disables the JTAG pinmux, then we must write the value 0x48003

devmem 0x18040028 32 0x48003

Now we can control the GPIOs 6, 7 and 8 via software.

Version 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.

Versions v4.x using AR9331, see reverse engineered pinout on ar9331_pinout or the official pinout.

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

  • Router 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).

TFTP install via serial (unbricking)

There are two good blog posts, one for TP-LINK WR741ND V2.x, and TP-LINK WR741ND V4.x that explain steps needed.

An other good blog can be found here: http://wiki.villagetelco.org/Serial_Port_Access_and_Firmware_Recovery_for_TL_MR3020.

I would recommend you use Raspberry Pi for TFTP server.

And you need to connect to serial pins with USB to uart module, there are lots of cheap ones on eBay.

Here are commands you need to run once you have TFTP server running and serial console.

Turn on router, type tpl over serial terminal when the Autobooring in 1 second... message appears. You must be quick, or the router will continue bootlooping.

WR741ND V2.x

ar7240> setenv serverip <TFTP server IP>ar7240> setenv ipaddr <Temp IP address on my network>ar7240> tftpboot 0x80000000 openwrt-15.05-ar71xx-generic-tl-wr741nd-v2-squashfs-sysupgrade.binar7240> erase 0x9f020000 +0x330004ar7240> cp.b 0x80000000 0x9f020000 0x330004ar7240> bootm 0x9f020000

WR741ND V4.x AND V1.X

ar7240> setenv serverip <TFTP server IP>ar7240> setenv ipaddr <Temp IP address on my network>ar7240> tftpboot 0x80000000 orig.binar7240> erase 0x9f020000 +0x3c0000ar7240> cp.b 0x80000000 0x9f020000 0x3c0000ar7240> bootm 0x9f020000

Bootloader Mods

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

64MB RAM mod

Tested on v4.27 board with pepe2k U-Boot 1.1.4.Selected memory was Hynix HY5DU121622CTP-J, ripped from 256MB PC2700S-25330 module.Solder-and-play, no additional config needed.

16MB SPI-flash mod

Tested on v1.4 board.Selected flash was W25Q128FVSSIG.Backup ART partition, flash BREED uboot (using Arduino), solder, boot into uboot, flash ART, flash OpenWrt.

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.

  • Comment1: 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 (2×5.6k) and a capacitor is put between the real pin and the TX connector.

  • Comment2: In my case (v1.5), I had to pull down the TX pin with a 1k resistor. Also, I had to use the power cable, not the 3.3V on my serial.

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

  • Comment4: In my case (v4.22) because of the voltage divider on the RX line I had to pull up the RX-pin to 5V using a 2,2k resistor. A 1k resistor to 3,3V isn't enough. I used the 5V supply of the USB.

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.x

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.x

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.

.

For those who can take the risk of DESTROYING YOUR ROUTER an insane usb mod for 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.patch40;revision 041;+++ target/linux/ar71xx/patches-3.3/990-WR741ND-usb.patch40;revision 041;@@ -0,0 +1,10 @@+--- a/arch/mips/ath79/Kconfig2013-03-12 15:18:29.827389883 +0400++++ b/arch/mips/ath79/Kconfig2013-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.c40;revision 3603341;+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c40;working copy41;@@ -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 = 40;u8 *41; KSEG1ADDR40;0x1f01fc0041;; u8 *ee = 40;u8 *41; KSEG1ADDR40;0x1fff100041;;+ath79_register_usb40;41;;+ ath79_register_m25p8040;&tl_wr741nd_flash_data41;; ath79_gpio_function_disable40;AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |

Here's how it works:

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driverar71xx-ohci ar71xx-ohci: Atheros AR71xx built-in OHCI controllerar71xx-ohci ar71xx-ohci: new USB bus registered, assigned bus number 1ar71xx-ohci ar71xx-ohci: irq 3, io mem 0x1b000000usb usb1: configuration #1 chosen from 1 choicehub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedusb 1-1: new full speed USB device using ar71xx-ohci and address 2usb 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= 1B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1P: Vendor=1d6b ProdID=0001 Rev= 2.06S: Manufacturer=Linux 2.6.32.10 ohci_hcdS: Product=Atheros AR71xx built-in OHCI controllerS: SerialNumber=ar71xx-ohciC:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mAI:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hubE: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255msT: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 2P: Vendor=1457 ProdID=5122 Rev= 3.12S: Manufacturer=Linux 2.6.29-GTA02_a-t-gta01-tweaks-mokodev with S: Product=RNDIS/Ethernet GadgetC: #Ifs= 2 Cfg#= 2 Atr=c0 MxPwr=500mAI: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=32msI: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0msE: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0msC:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mAI:* 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=32msI:* 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=0msE: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0msroot@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.

Temperature sensor DS18S20/DS18B20

There is possibility to connect temperature sensor DS18S20/DS18B20 to QoS button or Reset button, read more on http://mujweb.cz/mrazik/router/index.html.

You need some packages for w1 sensor

opkg updateopkg remove kmod-input-gpio-buttonsopkg install kmod-w1-gpio-customopkg install kmod-w1-slave-therm

remove gpio-buttons modul and load new modules

rmmod gpio-buttons # this is needed, because modul is loaded from bootinsmod w1-gpio-custom bus0=0,12,0 # GPIO12 = QoS buttoninsmod w1-gpioinsmod w1_therm 

lsmod should be

lsmod | grep w1 w1_gpio 704 0 w1_gpio_custom 864 0 w1_therm 1808 0 wire 13776 2 w1_gpio,w1_therm

If you connect sensor to reset button with parasite power

insmod w1-gpio-custom bus0=0,11,1 # GPIO11 = reset button

You can read temperature by

cat /sys/devices/w1_bus_master1/10-0008765432b0/w1_slave# orcat /sys/bus/w1/devices/10-0008765432b0/w1_slave

Software mods

Buttons

I found that QSS button is BTN_1 and reset is BTN_0(in openwrt 12.09 on HW version 4.25 I have “wps” and “reset”)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 buttonSimply 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=buttonuci set system.reboot_button.button=BTN_1uci set system.reboot_button.action=releaseduci set system.reboot_button.handler='logger reboot ; reboot ;'uci set system.reboot_button.min=3uci set system.reboot_button.max=90uci commit system

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

Specific configuration

Failsafe mode

[OpenWrt Wiki] TP-Link TL-WR741ND (51)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 updateopkg install ... opkg remove ...opkg install ... opkg remove ...opkg install ... firstbootsyncrebootopkg updateopkg 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

[OpenWrt Wiki] TP-Link TL-WR741ND (52) List config files anyway...

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

make infoCurrent Target: "ar71xx (Generic)"Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg udevtriggerhotplug2 dnsmasq iptables ppp ppp-mod-pppoe kmod-ipt-nathelper firewallkmod-leds-gpio kmod-input-core kmod-input-polldev kmod-input-gpio-buttonskmod-button-hotplug swconfigAvailable Profiles:Default:Default Profile 40;all drivers41;Packages: kmod-ath9k kmod-usb-core kmod-usb-ohci kmod-usb2 swconfigvsc7385-ucode-ap83 vsc7385-ucode-pb44 vsc7395-ucode-ap83vsc7395-ucode-pb44 wpad-miniTLWR741NDV1:TP-LINK TL-WR741ND v1Packages: 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

Build OpenVPN client image

It is possible to build a restricted image without Luci and IPv6 but including OpenVPN client. [OpenWrt Wiki] TP-Link TL-WR741ND (53) It was tested on TL-WR741ND v4.2 only [OpenWrt Wiki] TP-Link TL-WR741ND (54)

Prepare build environment, you need at least 9 Gb of free space to build the image. As build requires gcc/g++ version 4.8 the simple way of getting it is using ubuntu:18.04 docker container:

docker run --name openwrt -ti ubuntu:18.04

Install necessary prerequisites debianubuntu, install GCC 4.8:

apt-get install gcc-4.8 g++-4.8

Switch to the proper GCC versions:

export GCC=gcc-4.8export GXX=g++-4.8

Clone OpenWrt code and checkout 18.06 tag:

git clone https://github.com/openwrt/openwrt.gitcd openwrtgit checkout openwrt-18.06

Download and unpack config [OpenWrt Wiki] TP-Link TL-WR741ND (55) version 4 [OpenWrt Wiki] TP-Link TL-WR741ND (56) tl-wr741nd-v4-openvpn-config.tgz, put it into openwrt git repo directory. This config is made from default one by removing all IPv6 and Luci packages and adding OpenVPN and OpenSSL.Finally build the image:

./scripts/feeds update -a./scripts/feeds install -amake

Find the result in ./bin/targets/ar71xx/tiny.

(I)relevant forum links

  • Is v1.4 supported?

  • Is v1.8 supported?

  • LEDS config

  • help bricked

  • Debrick Routers with AR724x processors Using JTAG

  • 64M Memory mod

  • USB Mod for WR740/WR741nd version 4.x

  • Non working images with backfire imagebuilder for ar71xx

Tags

How to add tags

AR7240, AR9331, 4Flash, 32RAM, 5Port, FastEthernet, Serial, integrated, 802.11bgn, 1WNIC, AR9271, ath9k, 1Ant, DetachableAntenna, USBmod, MIPS, MIPS32, 24k

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

[OpenWrt Wiki] TP-Link TL-WR741ND (2024)
Top Articles
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5517

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.