TP-Link TL-WR740N
The TP-Link WR740N is an even lower-cost (around 20€/$20 retail in 10/2012) variant of the TP-Link WR741ND differing only in the non-removable antenna.
Since the hardware in WR740N is similar to WR741N, most of the contents in TP-Link WR741ND applies to this router too.
Supported Versions
| Model Version | OpenWrt Version Supported | Model Specific Notes |
|---|---|---|
| v1 (China) | BCM5356 SOC 2MB Flash/8MB RAM | |
| v2 (China) | BCM5356 SOC 2MB Flash/8MB RAM | |
| v1.1 | 8455 Gargoyle 1.5.1 | |
| v2 | Rounded chassis | |
| v2.4 | Rounded chassis, 350mhz cpu | |
| v3 | Rounded chassis | |
| v4 | AR9330 400Mhz CPU 4 or 2MB Flash/32MB RAM | |
| v4.23 | Attitude Adjustment 12.09-beta (trunk r33312) | SoC: Atheros AR9330 rev 1, 400Mhz CPU, 4MB Flash/32MB RAM |
| v4.24 | Attitude Adjustment 12.09 | SoC: Atheros AR9330 rev 1, 400Mhz CPU, 4MB Flash/32MB RAM |
| v5 (China) | AR9331 SOC 2MB Flash/16MB RAM |
Notes:
- Sometime around August 2011 (v4), TP-Link began to use 16MB RAM / 2MB flash for the Chinese versions of many of their devices. International versions retain the 32MB RAM / 4MB flash.
- International versions v4.2 and v4.3 work without apparent problems from trunk r29631 onward.
- International version v4.23 works without apparent problems from trunk r33312 (Attitude Adjustment 12.09-beta) onward.
- International version v4.24 works without apparent problems with Attitude Adjustment 12.09.
Your model version can be identified from the label: see this page for details.
Hardware Highlights
| CPU | Ram | Flash | Network | USB | Serial | JTag |
|---|---|---|---|---|---|---|
| Broadcom BCM5356@333MHz | 8MiB | 2MiB | 4 x 1 | ? | Mod | ? |
| Atheros AR7240@400MHz | 32MiB | 4MiB | 4 x 1 | mod | Yes | No |
| Atheros AR9330 rev 1@400MHz | 32MiB | 4MiB | 4 x 1 | mod | Yes | ? |
- Atheros AR9285 wireless chip
Installation
General installation instructions can be found here:
Flash Layout
Please check out the article Flash Layout for explanations.
Note: Below is the kernel log from the unmodified Attitude Adjustment (12.09-beta) generic WR740N v4 image firmware, showing the Flash Layout of the WR740N v4.23
[ 0.660000] 5 tp-link partitions found on MTD device spi0.0 [ 0.660000] Creating 5 MTD partitions on "spi0.0": [ 0.670000] 0x000000000000-0x000000020000 : "u-boot" [ 0.680000] 0x000000020000-0x000000108468 : "kernel" [ 0.690000] 0x000000108468-0x0000003f0000 : "rootfs" [ 0.720000] mtd: partition "rootfs_data" created automatically, ofs=2D0000, len=120000 [ 0.720000] 0x0000002d0000-0x0000003f0000 : "rootfs_data" [ 0.730000] 0x0000003f0000-0x000000400000 : "art" [ 0.740000] 0x000000020000-0x0000003f0000 : "firmware"
Specific Install Notes
Images from trunk
- The trunk WR740n hardware v1 image works unmodified and it can be flashed through the stock TP-Link web interface (another file exists for version 3). The v1 file was also successfully tested on hardware version 2.5.
- Hardware version 4.23 works perfectly with the unmodified Attitude Adjustment (12.09-beta) generic WR740N v4 image. The best installation method is flashing it through the stock TP-Link web interface.
- Hardware version 4.24 works perfectly with the unmodified Attitude Adjustment (12.09) generic WR740N v4 image. The best installation method is flashing it through the stock TP-Link web interface.
Customized OpenWRT firmware for WR740N
Hardware versions v2.4 and v3 ONLY
Managed to squeeze IPv6 packages (radvd, dhcp6 server and client) along with Luci web interface with english and romanian support into the 4 MB firmware ONLY for TP-LINK WR740N version 2.4 and 3. Along with the above packages config files also the kernel was stripped down for the exact WR740N hardware via buildroot "make kernel_menuconfig". Tested on romanian biggest ISP provider (RCS-RDS) for the IPv6 fiberlink services. http://www.ip6.ro/firmware (page is in romanian only so far..)
Hardware version v4.23 and v4.24 ONLY
These were prepared using Attitude Adjustment 12.09-beta ImageBuilder (r33312). Since HW version v4.23 or v4.24 doesn't have any stock USB, any USB stuff was removed from the firmware. Added functionalities include:
- QOS (incl. LuCI support)
- OpenVPN (incl. LuCI support)
- Tinyproxy (incl. LuCI support)
- UPNP (incl. LuCI support)
The command line used for the preparation was (all are the default packages, only these are changed: -kmod-ledtrig-usbdev -kmod-usb-core -kmod-usb-ohci -kmod-usb2 luci-app-qos luci-app-openvpn luci-app-tinyproxy luci-app-upnp):
make image PROFILE=TLWR740 PACKAGES="base-files busybox dnsmasq dropbear firewall hotplug2 iptables iw jshn kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer -kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-mac80211 kmod-nls-base kmod-ppp kmod-pppoe kmod-pppox -kmod-usb-core -kmod-usb-ohci -kmod-usb2 kmod-wdt-ath79 libblobmsg-json libc libgcc libip4tc libiwinfo libiwinfo-lua libjson liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-i18n-english luci-lib-core luci-lib-ipkg luci-lib-lmo luci-lib-nixio luci-lib-sys luci-lib-web luci-mod-admin-core luci-mod-admin-full luci-proto-core luci-proto-ppp luci-sgi-cgi luci-theme-base luci-theme-openwrt mtd netifd opkg ppp ppp-mod-pppoe swconfig uboot-envtools ubus ubusd uci uhttpd wireless-tools wpad-mini luci-app-qos luci-app-openvpn luci-app-tinyproxy luci-app-upnp"Notes:
- The proposed altered openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin firmware have not been tested, so you'd better first use the default Attitude Adjustment (12.09-beta) generic WR740N v4 image (r33312) to flash your brand new router and then use the proposed altered openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin that has been tested and working on my two WR740N v4.23 routers.
- The proposed altered openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin that has been tested and working with no problems on my two WR740N v4.23 routers.
- The space used by the modified firmware is as follows:
root@OpenWrt:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 320 240 80 75% / /dev/root 2816 2816 0 100% /rom tmpfs 14672 80 14592 1% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock3 320 240 80 75% /overlay overlayfs:/overlay 320 240 80 75% /You can download the proposed 12.09-beta firmware from here.
You can download the proposed 12.09 Final firmware from here. Since the luci-app-openvpn package is broken in 12.09 Final + wireless-tools is not used anymore this is the command line used for the preparation of the altered 12.09 Final firmware image:
make image PROFILE=TLWR740 PACKAGES="base-files busybox dnsmasq dropbear firewall hotplug2 iptables iw jshn kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer -kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-mac80211 kmod-nls-base kmod-ppp kmod-pppoe kmod-pppox -kmod-usb-core -kmod-usb-ohci -kmod-usb2 kmod-wdt-ath79 libblobmsg-json libc libgcc libip4tc libiwinfo libiwinfo-lua libjson liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-i18n-english luci-lib-core luci-lib-ipkg luci-lib-nixio luci-lib-sys luci-lib-web luci-mod-admin-core luci-mod-admin-full luci-proto-core luci-proto-ppp luci-sgi-cgi luci-theme-base luci-theme-openwrt mtd netifd opkg ppp ppp-mod-pppoe swconfig uboot-envtools ubus ubusd uci uhttpd wpad-mini luci-app-qos luci-app-tinyproxy luci-app-upnp openvpn"
- Everything said for v4.23 is applicable for v4.24 too (tested by user christoforos, did not cracked open the case though).
OEM easy installation
Note: Please reset your router to factory defaults if it has been previously configured/used.
- Power up your router device.
- Connect the local PC to anyof the LAN ports of the Router.
- Browse to http://192.168.0.1 (alternatively you may use the URL - http://tplinklogin.net).
- Choose the menu “System Tools → Firmware Upgrade”.
- Upload the openwrt-ar71xx-generic-tl-wr740n-vXXX-squashfs-factory.bin file to router. vXXX is the version that is known to work with your router (like for HW rev4.23 vXXX is actually v4). Be sure to chose a …….-squashfs-factory.bin file!
- Wait for the router to reboot.
- Telnet to 192.168.1.1 and set a root password, or browse to http://192.168.1.1 if LuCI is installed.
OEM installation using the TFTP method
Flashing using TFTP works with the steps descibed in TP-Link WR741ND TFTP Installation (it needs a working serial console!).
Bootlogs
OEM bootlog
This information is obtained from the serial interface:
U-Boot 1.1.4 (Mar 8 2010 - 10:29:42)
AP91 (ar7240) U-boot
DRAM:
sri
#### TAP VALUE 1 = 9, 2 = a
32 MB
id read 0x100000ff
flash size 4194304, sector count = 64
Flash: 4 MB
Using default environment
In: serial
Out: serial
Err: serial
Net: ag7240_enet_initialize...
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7014
eth0: 00:03:7f:09:0b:ad
eth0 up
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
Uncompressing Kernel Image ...
Type tpl in order to get into boot shell. This are the env parameters:
ar7240> printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.123
serverip=192.168.1.100
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
Environment size: 359/65532 bytes
OpenWrt bootlog
[ 0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Mon Sep 3 17:51:18 UTC 2012
[ 0.000000] MyLoader: sysp=4cc15e57, boardp=635a7dca, parts=0c7b9213
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR9330 rev 1
[ 0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00002000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00002000
[ 0.000000] On node 0 totalpages: 8192
[ 0.000000] free_area_init_node: node 0, pgdat 802ec430, node_mem_map 81000000
[ 0.000000] Normal zone: 64 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 8128 pages, LIFO batch:0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: board=TL-WR741ND-v4 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 29136k/32768k available (2198k kernel code, 3632k reserved, 412k data, 208k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[ 0.080000] pid_max: default: 32768 minimum: 301
[ 0.080000] Mount-cache hash table entries: 512
[ 0.090000] NET: Registered protocol family 16
[ 0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[ 0.100000] MIPS: machine is TP-LINK TL-WR741ND v4
[ 0.510000] bio: create slab
Hardware
Photos
WR740N v2.4
WR740N v4.23
Serial
The general information and steps of using serial port, serial port cable, serial console etc, can be found at Serial Console.
Below is the specific information about the different hardware versions of TL-WR740N.
UART on v1.10
The serial headers are not completely connected (a voltage divider and capacitor are left out, so the headers are dead), but a serial connection can still be established by soldering directly to two of the empty pads. The result is a bit unstable (router output is often partially lost) and can probably be improved electrically.
UART on v3.0
UART on v4.23
The v4.23 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. The pin at the SOC is labeled TP18, the one at the serial connector is labeled TP28. The RX line is 5V intolerant! So the connection needs a 3.3V RS232 level shifter. Pins on the connector on the photo are TX-RX-GND-3V3(VCC) (from left to right).
- Hook your routers WAN ethernet port up to your network
- Hook up the serial console as explained in the section "serial console" and do the "tpl" trick to get console access
- Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IP addresses). Type in the console:
setenv ipaddr ROUTERIP setenv serverip SERVERIP printenv
- Double check that the output of printenv lists the IP addresses you just set. Now we can load the firmware over TFTP with "tftpboot 0x81000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin":
tftpboot 0x81000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin erase 0x9f020000 +0x3c0000 cp.b 0x81000000 0x9f020000 0x3c0000 bootm 9f020000
USB to UART TTL gadget
Debricking
General debricking advices are described here.
I did not managed to discover any method that is able to recover a bad firmware without soldering the serial cable.
For debricking with a working serial cable using TFTP follow the steps descibed in TP-Link WR741ND TFTP Installation.
For the (box branded) WR740N v2.4 and v4.23 the below works for recovery from nasty stuff like dropbear lockout, mtd overlay size problems or other software misuses :
- 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/back 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.
- /rom/sbin/reboot - will reboot even without a mounted filesystem.
Notes
Links
Tags
toh/tp-link/tl-wr740n.txt · Last modified: 2013/05/26 17:58 by phobosk
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.













