how to turn your tp link tl-wrt740n router into a fully functional one using openwrt « phobosk’s...

25
2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 1/25 P hobosK’s Blog My personal weblog How to turn your TP Link TLWRT740N router into a fully functional one using OpenWRT i 6 Votes Recently i decided to acquire a full functional wifi router with as much as possible extra features like OpenVPN support, proxy running support etc. So i bought a very cheap and common TPLink 150Mbps Wireless N Router TLWR740N (http://www.tp link.com/en/products/details/?categoryid=241&model=TLWR740N) . It comes with many features by default, but not the one I needed, so I flashed it with the OpenWRT (http://openwrt.org) firmware images. Here I will describe the whole procedure. Hardware characteristics: The one I bought for around $20 turned out to be v4.23. It has a 400Mhz Atheros AR9330 rev 1 CPU, 4MB Flash and 32MB RAM. More info can be found on its product page here (http://www.tplink.com/en/products/details/?categoryid=241&model=TLWR740N) . Installing OpenWRT: The TLWR740N v4.23 works perfectly with the current unmodified Attitude Adjustment (12.09beta) generic WR740N v4 (http://downloads.openwrt.org/attitude_adjustment/12.09beta/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfs factory.bin) and Attitude Adjustment (12.09 Final) generic WR740N v4 images (http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfsfactory.bin) . The best installation method is flashing it through the stock TPLink web interface. So first download the openwrtar71xxgenerictl

Upload: pedjavgd

Post on 07-Feb-2016

79 views

Category:

Documents


0 download

DESCRIPTION

education

TRANSCRIPT

Page 1: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 1/25

PhobosK’s Blog

My personal weblog

How to turn your TP Link TLWRT740N router into a fully functionalone using OpenWRT

i6 Votes

Recently i decided to acquire a full functional wifi router with as much as possible extra features like OpenVPN support, proxy runningsupport etc. So i bought a very cheap and common TPLink 150Mbps Wireless N Router TLWR740N (http://www.tplink.com/en/products/details/?categoryid=241&model=TLWR740N).

It comes with many features by default, but not the one I needed, so I flashed it with the OpenWRT (http://openwrt.org) firmwareimages. Here I will describe the whole procedure.

Hardware characteristics:

The one I bought for around $20 turned out to be v4.23. It has a 400Mhz Atheros AR9330 rev 1 CPU, 4MB Flash and 32MB RAM.More info can be found on its product page here (http://www.tplink.com/en/products/details/?categoryid=241&model=TLWR740N).

Installing OpenWRT:

The TLWR740N v4.23 works perfectly with the current unmodified Attitude Adjustment (12.09beta) generic WR740N v4(http://downloads.openwrt.org/attitude_adjustment/12.09beta/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfsfactory.bin) and Attitude Adjustment (12.09 Final) generic WR740N v4 images(http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfsfactory.bin).The best installation method is flashing it through the stock TPLink web interface. So first download the openwrtar71xxgenerictl

Page 2: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 2/25

wr740nv4squashfsfactory.bin file from the above links (the 12.09 Final preferred). If there is a newer version of OpenWRT at thetime you read this, you may use it, but be sure to download the file ending in: tlwr740nv4squashfsfactory.bin, or you mayeffectively brick your router.

Note: Please reset your router to factory defaults if it has been previously configured/used.

1. Power up your router device.2. Connect the local PC to any of the LAN ports of the Router.3. Browse to http://192.168.0.1 (http://192.168.0.1) (alternatively you may use the URL – http://tplinklogin.net

(http://tplinklogin.net)).4. Choose the menu “System Tools → Firmware Upgrade”.5. Upload the openwrtar71xxgenerictlwr740nv4squashfsfactory.bin file to router. Be sure to chose a …….squashfsfactory.bin

file!6. Wait for the router to reboot.7. Make sure your router works ok as you unplug the LAN cable from your PC, plug it in back and browse to http://192.168.1.1

(http://192.168.1.1)

The OpenWRT firmware you’ve just flashed is a basic one and is missing the functionality i was talking about (like OpenVPN,proxying etc). So you need to prepare your own firmware and flash it over the generic OpenWRT firmware. Here is how you do it:

You will prepare the firmware image using Attitude Adjustment 12.09beta ImageBuilder (r33312)(http://downloads.openwrt.org/attitude_adjustment/12.09beta/ar71xx/generic/OpenWrtImageBuilderar71xx_genericforlinuxi486.tar.bz2) or Attitude Adjustment 12.09 Final ImageBuilder(http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrtImageBuilderar71xx_genericforlinuxi486.tar.bz2). Since TLWR740N v4.23 doesn’t have any stock USB, any USB stuff should be removed from the default genericOpenWRT firmware image. We will add the following functionality (incl. the web based configuration interface for them – LuCI):

QOS (incl. LuCI support)OpenVPN (incl. LuCI support for Attitude Adjustment 12.09beta r33312 only, ’cause in the 12.09 Final version it is broken)Tinyproxy (incl. LuCI support)UPNP (incl. LuCI support)

So, after downloading the Image Builder, extracting it, enter the extraction folder and then continue issuing the respective command:For Attitude Adjustment 12.09beta ImageBuilder (r33312):make image PROFILE=TLWR740 PACKAGES="base-files busybox dnsmasq dropbear firewallhotplug2 iptables iw jshn kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211kmod-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 libip4tclibiwinfo libiwinfo-lua libjson liblua libnl-tiny libubox libubus libubus-lua libucilibuci-lua libxtables lua luci luci-app-firewall luci-i18n-english luci-lib-coreluci-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-baseluci-theme-openwrt mtd netifd opkg ppp ppp-mod-pppoe swconfig uboot-envtools ubusubusd uci uhttpd wireless-tools wpad-mini luci-app-qos luci-app-openvpn luci-app-tinyproxy luci-app-upnp"

For Attitude Adjustment 12.09 Final ImageBuilder:make image PROFILE=TLWR740 PACKAGES="base-files busybox dnsmasq dropbear firewallhotplug2 iptables iw jshn kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211kmod-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 libip4tclibiwinfo libiwinfo-lua libjson liblua libnl-tiny libubox libubus libubus-lua libucilibuci-lua libxtables lua luci luci-app-firewall luci-i18n-english luci-lib-core

Page 3: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 3/25

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 uciuhttpd wpad-mini luci-app-qos luci-app-tinyproxy luci-app-upnp openvpn"

The command line we used for the preparation includes all default packages of the default firmware images except: kmodledtrigusbdev, kmodusbcore, kmodusbohci, kmodusb2; and adds these packages: luciappqos, luciappopenvpn (for AttitudeAdjustment 12.09beta r33312 only, ’cause in the 12.09 Final version it is broken), luciapptinyproxy, luciappupnp.When the process ends, you should have all the needed files in the <extraction folder>/bin/ar71xx/ folder. From there you need onlyone file – the openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin file. Use this file to upload it to your router and flash itwith it using the LuCI interface. So follow these steps:

1. Power up your router device.2. Connect the local PC to any of the LAN ports of the Router.3. Browse to http://192.168.1.1 (http://192.168.1.1) .4. Login LuCI with the default user: root and password: password5. Choose the menu “System → Firmware Flash/Upgrade”.6. Upload the openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin file to router. Be sure to chose a …….squashfs

sysupgrade.bin file!7. Do not select to keep configuration files and click the Flash button.8. Wait for the router to reboot.9. Make sure your router works ok as you unplug the LAN cable from your PC, plug it in back and browse to http://192.168.1.1

(http://192.168.1.1)10. Telnet to 192.168.1.1 and set a new root password, or browse to http://192.168.1.1 (http://192.168.1.1) and change the password

from within LuCI.11. Proceed with the basic configuration of your router. You may use the relevant documentation on the OpenWRT site

(http://openwrt.org).

That is all. Now you have achieved the targeted extra features for your TP Link TLWR740N v4.23

Note: If you are not comfortable with building your own modified image in the Image Builder, you may use the images I have preparedand tested. You can download them from here (http://gentoo.plexyplanet.org/openwrt/). Please use only the openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin (12.09beta) (http://gentoo.plexyplanet.org/openwrt/attitudeadjustment12.09beta/openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin) or the openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin (12.09Final) (http://gentoo.plexyplanet.org/openwrt/attitudeadjustment12.09final/openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin) firmware images from there! The factory.bin ones have not been tested, so you may effectively brick your router!

Serial cable for the TLWR740N

If for some reason you brick your router and the failsafe mode of the OpenWRT firmware doesn’t work, you will need to debrick yourrouter using a serial cable. Here is how you do it:

The v4.23 of the router uses the standard TPLink pinout, however the TX pin is not connected to the CPU. In order to make the TXline 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 of the board (look at the photos at the bottom of this post) are TXRXGND3V3(VCC) (from left to right). Afteryou solder all connections, you may use an USB to UART TTL convertor that you plug into your PC and use for example the cutecomapplication to connect to the /dev/ttyUSB0 device on your PC. Do not forget that you need to connect the TX pin of the convertor tothe RX pin of the board and the RX pin of the convertor to the TX pin of the board. In case you use the USB to UART TTL convertor,you do not need to connect the VCC pin. Another important thing to do is to set the convertor to work with 3.3V if it can work bothwith 5V and 3.3V ! For more info look at the images at the bottom of this post.

Page 4: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 4/25

After you are ready with your serial cable, you may proceed with the following steps:

1. Put the original openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin (12.09beta)(http://downloads.openwrt.org/attitude_adjustment/12.09beta/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin) or openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin (12.09 Final)(http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin) to your TFTP server.

2. Hook your router’s WAN Ethernet port up to your network/PC.3. Hook up the serial cable/console as explained in the section “Serial cable for the TLWR740N“, start your cutecom application,

open the /dev/ttyUSB0 device, fire up your router and send a “tpl” command when your router shows “Autobooting in 1 seconds”to get console access.

4. Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IPaddresses). You’d better use these as IP’s: ROUTERIP>192.168.1.111 and SERVERIP>192.168.1.100. Type in the console(substitute as needed):setenv ipaddr ROUTERIPsetenv serverip SERVERIPprintenv

5. Double check that the output of printenvlists the IP addresses you just set. Now we can load the firmware over TFTP with “tftpboot0×80000000 openwrtar71xxgenerictlwr740nv4squashfsfactory.bin”:

ar7240> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.binUsing eth0 deviceTFTP from server 192.168.1.100; our IP address is 192.168.1.111Filename 'openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin'.Load address: 0x80000000Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################doneBytes transferred = 3932160 (3c0000 hex)

6. Note the “3c0000” in the last line (your number may differ). Now execute the following commands, if necessary replacing3c0000with the number you got from tftpboot:erase 0x9f020000 +0x3c0000cp.b 0x80000000 0x9f020000 0x3c0000bootm 0x9f020000

7. You’re set, OpenWrt should now boot and you can set it up as usual.

More resources on OpenWRT and TLWR740N

Page 5: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 5/25

TLWR740N v4.23 case front

TLWR740N v4.23 case back whenopening

TLWR740N v4.23 case back

TLWR740N v4.23 board front TLWR740N v4.23 board back TLWR740N v4.23 board back with pinlayout

TLWR740N v4.23 board back with TLWR740N v4.23 with a serial cable

USB to UART TTL gadget

If you need more info about all these, it is best to look at the official OpenWRT pages.

There is a specialized page about TLWR740N (http://wiki.openwrt.org/toh/tplink/tlwr740n) there, so you can start with it first.

Final Notes

I have tested my TLWR704N v4.23 router with Gargoyle (http://www.gargoylerouter.com) and DDWRT (http://www.ddwrt.com)too, but I am not satisfied with the results at all.

Gargoyle versions were 1.5.7 (http://www.gargoylerouter.com/downloads/images/ar71xx/gargoyle_1.5.7ar71xxgenerictlwr740nv4squashfssysupgrade.bin) and 1.5.10 (http://www.gargoylerouter.com/downloads/images/ar71xx/gargoyle_1.5.10ar71xxgenerictlwr740nv4squashfssysupgrade.bin), but they were almost twice slower than the OpenWRT version. Theinterface is really quite clean and is closer to a stock one, thus being suitable for novice Linux users that do not have that muchknowledge about *nix as a whole. And though Gargoyle has some additional nice features, they do not really worth it. You shouldalso have in mind that it has no OpenVPN support in the firmware for this specific model.DDWRT was a testing version 101212r20119testing (http://ddwrt.com/site/support/otherdownloads?path=others%2Feko%2FBrainSlayerV24preSP2%2F2012%2F101212r20119testing%2Ftplink_tlwr740nv4%2F), and it wassupposed to work ok, but actually it bricked my router, so I needed to go to the serial console to fix it. In a word, i would notadvice you to test DDWRT at all, if you are not prepared for debricking

Photos of TLWR740N

Page 6: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 6/25

serial cable soldered in the case

You May Like

1.

21/10/2012 Posted by PhobosK | Linux, Tech, Tutorials | Linux, OpenWRT, Serial cable, TLWR740N, TP Link, Tutorial, USB toUART TTL, Wifi router

50 Comments »

1. 0

0

iRate This

I am coming from Ddwrt. Can I upgrade straight to openvpn or I need to go back to stock 1st?

Comment by Chan | 15/11/2012 | Reply

0

0

iRate This

Well you’d better stick to the ddwrt>stock>OpenWRT procedure.I have done it this way and it had no problems.

But if you have a serial cable, you may try:ddwrt>OpenWRT, and if things break, you can always fix them through serial. If you try it this way please leave a feedbackhere, so other users can benefit

Comment by PhobosK | 17/11/2012 | Reply

0

0

About these ads (http://en.wordpress.com/abouttheseads/)

Page 7: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 7/25

iRate This

Sorry to bother again, for openwrtar71xxgenerictlwr740nv4squashfsfactory.bin, does it include LuCI? Or do I need totelnet?

Comment by Chan | 20/11/2012 | Reply

1

0

iRate This

You are not bothering at all And yes both openwrtar71xxgenerictlwr740nv4squashfsfactory.bin and openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin (original and the custom build) contain the LuCI…The difference is that “factory.bin” is tweaked, so the real default factory firmware to accept it as a regularupdate/upgrade…

Comment by PhobosK | 20/11/2012 | Reply

0

0

iRate This

Thanks.

Comment by Chan | 21/11/2012 | Reply

2. 0

0

iRate This

My bad… I meant OpenWRT..

Comment by Chan | 16/11/2012 | Reply

3. 0

0

iRate This

Thanx for this tutorial worked like charm, although it does not explain how to set up a tftpdhpa server. Second thing is i reallywould need help to implement olsrd for a mesh network, because there is not enough space left to install it on this last version. Ifyou could help out it would be really great.Sincere regards d.

Page 8: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 8/25

Comment by d. | 17/11/2012 | Reply

0

0

iRate This

Well the configuration of TFTPD is different in the different distros, so i decided not to bloat the tutorial with more info on it….Configuring the tftpdhpa in Ubuntu is nothing special… Just “aptget install tftpdhpa”, edit the /etc/default/tftpdhpa if youneed. In it you will find the folder the TFTPD serves the files from. The folder by default is: /var/lib/tftpboot, so this is whereyou put your OpenWRT files… More info can be found here:http://processors.wiki.ti.com/index.php/Setting_Up_a_TFTP_Server#Using_tftpdhpa_in_Ubuntuhttp://wiki.openwrt.org/doc/howto/generic.flashing.tftp

As far as olsrd is concerned, to add it to the image you need to sacrifice some other package that you will not need so much…such as UPNP, QOS etc… Sadly v4.23 has a limit of 4MB flash as you know, so we cannot put everything we need in theOpenWRT image :SAnyway If you do have the same TLWR740N v4.23 as mine, I could prepare an image for you and test if it will work ok onmy serial cabled router… Just tell me what extra functionality (except the olsrd) you will need added to the default OpenWRTimage.

Comment by PhobosK | 17/11/2012 | Reply

4. 0

0

iRate This

Thanks for the great tut Phobosk ,it is a complete guide.But since I am a newbie to openwrt I have many doubts I will try to ask asmuch less as possible.hope you dont mind the naive questions.

I have got a new wr740n v4.23

1) After installing openwrt which is the simplest way to go back to go back to stock firmware ?

2) Does openwrt store bandwidth statics even after rebooting the router?

Comment by Rick | 08/01/2013 | Reply

1

0

iRate This

Do not worry to ask… less or more questions… it doesn’t matter to me. If I can, I will try answering any question And now about your specific questions:

1. The easiest way to go back to stock firmware is to use the update firmware page of OpenWRT itself (System>Backup/FlashFirmware>Flash new firmware image – uncheck the “Keep settings” option before that), and select the stock image that youhave previously downloaded from the original vendor site… In this particular case (v4.23) the link is: http://www.tplink.com/en/products/details/?categoryid=241&model=TLWR740N#down (look at the software section and download “V4

Page 9: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 9/25

Firmware”). That is a viable solution ONLY if your OpenWRT installation works without any problems. If your OpenWRTinstallation has some problems then this method may not help and you should refer to the sections “Debricking your router”.More on How to revert to the original firmware can be found here: http://wiki.openwrt.org/doc/howto/generic.uninstall (theeasiest method is #2 – and is the one i am talking about here)

2. Generally speaking the default configuration of OpenWRT does not permanently store any logs or stats. But if you needsome of those, that may be altered, though it will require some good knowledge of the processes and config options ofOpenWRT. As an extra, there is an option in the WebUI to do the logging on a remote server – System>System>Logging

Comment by PhobosK | 08/01/2013 | Reply

5. 1

0

iRate This

Thanks for the reply Phobosk,I have downloaded the required files and ready to flash it pls say if my understanding is correct and correct me if I am wrong

I have named and checked md5a)Unmodified factory.bin ==>1ab6b2d08ba49b5c2c97bfdb1f93f8fdb) sysupgrade.bin ==>faa342271647476e4b7e7e93b530e3e9c)Altered factory.bin ==>5527e0d42dd6e08b05eb91851f5ee2e8

1) I must avoid c)altered factory.bin since it may brick my router

2) first I should flash a) Unmodified factory.bin and it will have luci interface.I can use this without flashing b) sysupgrade.bin

3) If I need QOS , OpenVPN , Tinyproxy, UPNP I can flash b) sysupgrade.bin after flashinga)Unmodified factory.bin

4) After flashing b) sysupgrade.bin if I feel I dont need that 4 features can I flash a) Unmodified factory.bin

5) b) sysupgrade.bin should not be flashed directly from stock firmware

6) So for flashing the stock firmware can I do it directly from either a)Unmodified factory.bin and b) sysupgrade.bin or I should bein specific firmware

thanks

Comment by rick | 11/01/2013 | Reply

6. 0

0

iRate This

forgot to ask 7th point7) I am using firefox browser, have read sometimes it may cause problem during firmware flashing is this true if yes which browsershould I use

Comment by rick | 11/01/2013 | Reply

1

Page 10: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 10/25

0

iRate This

Now before I start answering I would like to give you some warnings and some notes:1. Be aware that installing/using OpenWRT on your router (although it may have the same version I describe here and althoughyou use everything as described above), may brick it and you may end up needing to prepare and use a Serial cable to debrickit. This may happen because of lots of reasons including the one that your v4.23 router may have some hardware changes madeby the vendor and not listed anywhere. So all warnings that the OpenWRT project gives about using their firmware should beconsidered. For example, if you read the “Notes” section on http://wiki.openwrt.org/toh/tplink/tlwr740n , you will see that:“Sometime around August 2011 (v4), TPLink began to use 16MB RAM / 2MB flash for the Chinese versions of many of theirdevices. International versions retain the 32MB RAM / 4MB flash. “… But that doesn’t mean the vendor may have not alteredlately the flash for the International versions too. So a big “fat” WARNING – you may brick your router If you are not ready toface that consequence, you’d better reconsider using any open source firmware for the router… no matter if it is DDWRT orOpenWrt or any other

2. Always flash firmware using a cable connection… Using wifi for the flash is dangerous.

3. The difference between factory.bin and sysupgrade.bin is that in factory.bin there is some info that makes the stock firmwareupgrade utility think it is an official stock upgrade That is why when you first start flashing your router from a stock firmware,you need to start with factory.bin, so you may “cheat” the official firmware to do the upgrade.

And now about your questions:Your downloaded sysupgrade.bin is actually my altered sysupgrade.bin, not the official OpenWRT one. Not that it matters, but Iwanted to clear this out So when I speak in my answer about sysupgrade.bin, I will mean my altered sysupdgrade.bin…

1. You’d better avoid the altered factory.bin just because i have not tested it if it works ok. In theory it should not have anyproblems, but since i have not tested that I cannot advice using it in the first place:)

2. Totally true. In fact I would advice after doing this (installing official OpenWRT factory.bin), to test and “play” a bit with thenew OpenWRT luci interface, so you can get the picture of what it is all about.

3. Totally true. You should have in mind that stock firmware has UPNP and QOS (though not that configurable as inOpenWRT) and the reason (one of the reasons infact) you may want to use the OpenWRT official image is the bunch ofconfigurable options it has…Though the official OpenWRT doesn’t have any UPNP and QOS, but here is where the alteredsysupgrade.bin image comes in place.

4. Yes you can flash back the original OpenWRT image after you have used the altered sysupgrade.bin. That is very simpleusing the luci interface. In fact you may use directly the official sysupgrade.bin instead of factory.bin when you are flashingback (see the main difference between the two images above in this answer).

5. Totally true. The stock firmware will actually not allow you this, as it will spew some message like: “This is not a firmwareupdate” or something like this. But do not rely on that… Just use the factory.bin image when you have stock firmware on therouter….

6. You can flash back to stock firmware from any version (official or modified) of factory.bin or sysupgrade.bin firmware. Youcan do this from LUCI very easy.

7. I use only Firefox on my machines, and have done all the described in this article actions by FF (all latest versions), and I hadno problems at all, so FF is ok in my opinion.

So if you decide to give a try to OpenWRT and need further assistance, either use comments here or you may contact me by anyway (though I do not use Skype a lot, so I maybe offline there mostly) listed in my profile on Gravatar(http://en.gravatar.com/phobosk). If I am online I will do my best helping

P.S. And one final note: When you flash any new firmware (no matter stock, factory or sysupgrade – altered or official) be surethat you do NOT keep your old settings. It means you should check/uncheck the relevant option on the LUCI upgrade firmwarepage.

Page 11: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 11/25

Comment by PhobosK | 12/01/2013 | Reply

7. 0

0

iRate This

Thank you very much for the answers I installed the Unmodified factory.bin ==>1ab6b2d08ba49b5c2c97bfdb1f93f8fd .It took just2 mins and all is well.after using it for 2 days I feel its much rich in features and better than the stock firmware and I am here with a new set of questionsto trouble u.

1) The wifi link speed in stock firmware was 135mbps but now it shows as 65mbps.Does this mean the speed is decreased and willaffect video streaming?

2) I accidentally changed the lan protocol from static to dhcp client and I was unable to access router .I tried to reset using hardwarereset button and it didnt reset openwrt to default settings.Luckily I got another router and configured it as dhcp server and gainedaccess to 740n and changed it back to static.My question is while experimenting and accidentally changing some configuration canwe use rest hardware button to reset openwrt to default settings in case of not able to access it through browser.

3) In stock firmware there was an option in dhcp to give static ip based on mac address how can i do that in openwrt.

4) I would like to get the bandwidthstats either stored permanently in router or in my pc.I checked system >system>logging butcouldn figure out how to use it moreover it has whole system ,debug etc options but I need just bandwidth statistics.I guess garyolecan do that but read your comment about it being slow .I came to know about bmon and iftop but have no idea how to install or usethem.

Comment by rick | 14/01/2013 | Reply

2

0

iRate This

ok after playing more with the luci interface I found the solution for

3)for the benefit of other novice users it is under

Network=>DHCP and DNS =>Static Leases

Comment by rick | 14/01/2013 | Reply

0

0

iRate This

1. Stock firmware comes with propriety kernel drivers that use the “power” of the SoC best. On the other side – OpenWRT usesopen source, so the ath5k module for example is not that good in supporting Draft N as the stock one. So the transfer speed isreally slower, but in my basic comparative tests that is not that much slower than the stock firmware. All you can do is just test

Page 12: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 12/25

and compare the real transfers using stock and OpenWRT.

2. The reset in OpenWRT (of WRT740N) is done using the QSS (the small black button at the back panel). After powering onthe router when the red led starts blinking, press and hold the QSS button while the blinking becomes more frequent. More infocan be found here: http://wiki.openwrt.org/toh/tplink/tlwr841nd#failsafe.mode and here:http://wiki.openwrt.org/doc/howto/generic.failsafe

4. I’ve never needed that, so i do not have experience with it, but i digged a little bit and found a couple of solutions:a) using bmon, iftop etc (more info on: http://wiki.openwrt.org/doc/howto/bwmon). These are the best solutions in terms ofuseful info collecting and in terms of usage, but the problem is that you have to install these packages in order to use them. Bestway is not using the OpenWRT package manager, because the installation takes too much space and the available memoryconsidering WRT740N is not that much (installing even small looking packages on a default image can often brick your devicebecause of memfull problems). All that means you need to prepare a custom image that includes the utility of your choice… Butthis also means that if you decide to use other packages like OpenVPN, QOS etc, you cannot add them all to the image, ’causeyou will end up with no space for the file system that holds the config options of your router and that are with r/w access. Soyou have to choose what you will add exactly to the image.

b) using a script bound to a cron job to detect and save the statistics. This is tricky since most scripts available write to the flashtoo often in order to preserve the statistics between reboots. And that is definitely not a good solution considering the life of yourflash chip Anyway as I mentioned in my previous answers those available scripts could be altered and tailored for one’s specificneeds and made to write to /tmp and upload that content somewhere (or the statistics to be downloaded regularly from the /tmpfrom another PC). One could also use some online services for storing and live monitoring of the statistics (like in cosm.com forexample). Another problem with the scripts is that the more complex they are the more they put load on the router, so they candeteriorate it’s speeds. So here are the solutions I find valuable, listed in most to less preferred:– Using COSM. More info here: http://community.cosm.com/node/998– Using the router entirely – wrtbwmon: http://www.kallisti.net.nz/blog/2010/12/perusertrafficmonitoringonopenwrtOf course these scripts need to be tailored to your needs, they are not copy and run ready So maybe it is better to describe what exactly you need and we can figure out a proper tailoring for your needs

Comment by PhobosK | 15/01/2013 | Reply

0

0

iRate This

1) Well I have a limited internet plan .I have installed networx in my pc and its enough to monitor the bandwidth usage inthe local pc but if I use the internet in my mobile or another laptop using wifi I do not know how much of the bandwidth Iuse .so I thought that getting the bandwidth usage from the router will be more accurate.I went through the link and I guess itnot good to write to the flash often so I think I can live with this set up.

2) I have scheduled the pppoe to redial at certain times using cron tab using the command “ifup wan” and “ifdown wan”. Isthere a way to write a script and save it in desktop so that I can do it manually whenever I want as I don’t like leaving myinternet connection ON all the time.I can do this via putty but I would like a one click solution like a batch file or somethingif it possible instead of typing all the credentials in putty.

3)Also what is the equivalent command of “ifup wan” and “ifdown wan” to turn on or off wireless I tried “ifup wireless” butit didnt work.

thank you

Comment by rick | 17/01/2013 | Reply

0

Page 13: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 13/25

0 iRate This

1. Getting the traffic from the eth1 interface of the router is the best way to watch your traffic really. Another option isjust to login to your ISP provider’s page and see the traffic there. I wrote a very simple bash script to upload statistics toCOSM but it requires additional curl package in the OpenWRT image and that makes the image too large to operatewell with OpenVPN, QOS etc, so when I have more free time I will try to find a solution that doesn’t require too muchspace and additional packages. Then I will let you know of the solution.

2. Considering you are talking about using putty I assume you use Windows as a main operating system. So you do notneed any additional script to automate. Just create an ssh key with putty, upload the public part of your key to the routerusing LuCI’s dropbear config page, and then configure a session with putty to start the necessary command(Connection>SSH>Execute command: “ifdown wan” – I may be wrong about the path where you can find theseoptions in putty but i haven’t used it for some time… but i guess you will find these options if i am wrong:) ). Nextcreate a Windows shortcut with a command line: putty –load “SESSION NAME YOU’VE USED” and you will have aone click solution for turning off routers WAN access. You can create a shortcut to “ifup wan” the same way…

3. The wireless should be controlled using ifconfig, since it has not got any mapping. I.e you should use a commandlike: ifconfig wlan0 down.

Comment by PhobosK | 19/01/2013 | Reply

8. 0

0

iRate This

Hi its me again ,thanks for the replies Phobosk. I have a couple more questions.

1) After testing with vanilla openwrt, I flashed your sysupgrade.bin its nice and liked the QOS feature.I want to enable speed limitfor WAN for a certain period of time only if possible. For example I would like to make wan speed limit of 1024 Kbits from 9 am to11 am then make is unlimited for the rest of the time.I searched but could not find any such option like time based connect withinthe interface. If there is a command to enable and disable QOS I can shedule it using cron just like ifup and ipdown commands.

2) I have downloaded Tftp and configured it to run as a syslog server and when I checked the logs I found it showing wrongbandwith stats sometimes for example in one particular instance I have downloaded about 5 gb and uploaded around 500mb and inthe log it is showing upload values correct but download values are vastly different this happens many times during large downloadswhere as short connect times with low bandwith usage are correctly logged and I am sure about the downloaded data .To verify thisis not a problem with tftp I checked in the router itself using luci and it showed exactly what was logged.

for download ~5GB and upload ~490MB .it shows wrong values for downloads as only near 1 GBpppd[3033]: Connect time 429.9 minutes.

pppd[3033]: Sent 465702676 bytes, received 999776246 bytes.

This issue was same with factory.bin also

3)Even though the beta altitude adjustment is pretty stable and I am more than happy with it .I would like to know when is the stablerelease going to come I hope you will make a custom sysupgrade.bin image in the stable version too.

Thank you

Comment by Rick | 27/01/2013 | Reply

Page 14: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 14/25

0

0 iRate This

1. The easiest way to enable/disable QOS at a schedule is use the commands “/etc/init.d/qos start” or “/etc/init.d/qos stop”. Inyour specific case, you should follow these steps:– Make sure you have “Network>QOS>Interfaces>WAN>Enable” is checked.– Fill in the necessary values for Upload and Download speeds in “Network>QOS>Interfaces>WAN”– Make sure in “System>Startup>qos” is disabled– Then put these two lines in the cron field (“System > Scheduled Tasks”)0 9 * * * /etc/init.d/qos start0 11 * * * /etc/init.d/qos stopThat is all and it should work ok now. The problem is that you will have QOS enabled only between 911 am everyday. If youneed only the bandwidth restriction to apply between 911 am and the QOS running at all time, you will need to prepare a scriptto change the value of “Network>QOS>Interfaces>WAN>Enable” and apply the changes + start the qos service again. Thestart script that you use as a cron command should look something like this:uci set qos.wan.enabled=1uci commit qos/etc/init.d/qos startAnd the stop script that you use as a cron command should look like:uci set qos.wan.enabled=0uci commit qos/etc/init.d/qos startHave in mind that the “/etc/init.d/qos start” actually does a stop first and then configures everything the right way. More infoabout QOS here: http://wiki.openwrt.org/doc/uci/qosDon’t forget that QOS puts load on your router and in time it may slow it if you do not reset/restart the router.

2. PPPD calculations differ from kernels interface ones, ’cause it uses compression when communicating, so its bytes maybeless than the one reported by the kernel…. In your particular case it turns out that you have received 0.98 MB which is strangeanyway. Best way to get the real bytes sent/received is to look at the numbers for the specific interface on “Network>Interfaces>RX/TX” or if you are logged in using SSH – use “ifconfig” command and check “eth1″ interface (which actuallyis the WAN.

3. I dunno when the stable will be out, since I am not an OpenWRT developer… Right now there is already an RC1 release, butI have not tested it, since i do not see any big changes compared to the beta… But when the stable is out, I will definitely test itand make custom images. I may prepare any custom image you will need too. Just keep in touch….

Comment by PhobosK | 30/01/2013 | Reply

9. 0

0

iRate This

Thank you very much for your replies..It is only because of you I have confidentially installed openwrt in my router and made itworking as I wanted and I thank you sincerely for your help.continue your good work keep in touch….

Comment by Rick | 03/02/2013 | Reply

10. 0

0

Page 15: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 15/25

iRate This

Hi, very nice that post.. I have a question: sounds like that I did something wrong: I crashed the firmware ;( so, I can´t get accessvia web, telnet or ping the the router… I noticed this after I ran the ‘delete firmaware all’ command on uboot CLI… Is there sometool to recovery the WR740N firmware?

Comment by John | 12/02/2013 | Reply

0

0

iRate This

I do not quite get what you had done exactly, but I assume you mean you did use the OpenWRT BusyBox shell (not the UBoot CLI) with the command “mtd erase firmware” ??? If the answer is yes, it means this would have erased all OpenWRTfirmware from mtd5 (kernel and rootfs > see the TPLink WR1043ND Flash Layout table on:http://wiki.openwrt.org/doc/techref/flash.layout#partitioning.of.squashfsimages) and would have made recovering using thefailsafe mode of OpenWRT (see my comment #2 here > http://phobosk.wordpress.com/2012/10/21/howtoturnyourtplinktlwrt740nrouterintoafullyfunctionaloneusingopenwrt#comment78) impossible.

So if that is your case, your only viable and easy solution of the problem is to use a “Serial cable” as described in my mainarticle here. There is no a recovery tool in terms of an application or whatever like it. In a word, you need to get an “USB toUART TTL converter”, solder some wires to your router and then connect all this to your PC and thus flash any of the stock orOpenWRT firmware again.

Of course the JTAG solution is also available, but it is much more complicated to be done and requires more gadgets andknowledge…More info available here:http://wiki.openwrt.org/doc/howto/generic.debrickhttp://wiki.openwrt.org/doc/hardware/port.jtaghttp://wiki.openwrt.org/doc/start

If you had successfully applied the “Serial cable” solution, please remember to make a backup of your router MTDs, forresolving future possible problems > http://wiki.openwrt.org/doc/howto/generic.backup

Comment by PhobosK | 12/02/2013 | Reply

11. 1

0

iRate This

Thank you very much PhobosK.

I’ve managed to install OpenWRT easily reading your tut.

Have a nice day.

Comment by Nick | 22/02/2013 | Reply

12. 0

Page 16: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 16/25

0

iRate This

hey , been reading this giude for some days now , installed the generic openwrt trunk image on my router all is running good except, i tried removing the usb things and it wont let me then found out cant remove packages from squashfs so then thinking aboutmaking my own custom image ,can i use image builder on windows or i specifically need linux for that ??which is more stable the barrier breaker or atttitude adjustment

Comment by eddy | 04/03/2013 | Reply

1

0

iRate This

You need linux. Attitude Adjustment for wr740n

Comment by dj2tusk | 07/03/2013 | Reply

0

0

iRate This

I am sorry for the late response…

In this article I have described how to prepare your own OpenWRT image with or without the modules/packages you wish(especially the USB modules you do not need on WR740N v4.23). Just a very important WARNING: Be very careful whatmodules/packages you remove, because you may end up with a bricked router that will need a serial cable to be debricked…Never remove kmodledsgpio or any hotplug module/package… They are critical to the device…

As for the OS you need for the builder… Yes it is Linux… and I have tested Attitude Adjustment r33312 (as stated in thearticle)… So I cannot give you any prediction if any previous or later version/revision will work as expected… Generallyspeaking “Barrier Breaker” is trunk/bleeding edge, so not that well tested and is expected to have a lot of bugs… so I would notadvice using/testing it without having a secure way to debrick…

For now the revision of OpenWRT I’ve tested works perfectly with only 12 very minor bugs in LuCI that do not requireupdate to later version…There is a new beta and an RC1 version (http://downloads.openwrt.org/attitude_adjustment/12.09rc1/) but I am waiting for thefinal release to be published and then I will test that final and add the info here…

Comment by PhobosK | 07/03/2013 | Reply

13. 1

0

iRate This

Page 17: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 17/25

Thank you for the tutorial

I did my own image adding luciappmultiwan, flash ok but no jssf2 partition.Changes only succeed in ram.

So I did another without luciappqos. It worked fine, 150kb free space.Configured 1WAN repeater (client+master) 2WAN (adsl via eth1 port, pppoe) delivering internet at the same time.

http://img201.imageshack.us/img201/1855/open1.pnghttp://imageshack.us/photo/myimages/201/open1.png/

http://img22.imageshack.us/img22/4378/open2.pnghttp://imageshack.us/photo/myimages/22/open2.png/

Comment by jamce | 08/03/2013 | Reply

14. 0

0

iRate This

Thank you for the tutorial … I have done like this as you guided to unbrick my TPLINK tlwr740n router.Link : http://phobosk.wordpress.com/2012/10/21/howtoturnyourtplinktlwrt740nrouterintoafullyfunctionaloneusingopenwrtAll this steps works and at last steps I am facing problem with loading firmware….I have tried Some application as Putty andterminal on Windows 7 ….

This is what I have done like this :After you are ready with your serial cable, you may proceed with the following steps:1. Hook your router’s WAN Ethernet port up to your network/PC.2. Hook up the serial cable/console as explained in the section “Serial cable for the TLWR740N“, start your Putty application,open the /dev/ttyUSB0 device, fire up your router and send a “tpl” command when your router shows “Autobooting in 1 seconds”to get console access.3. Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IPaddresses). You’d better use these as IP’s: ROUTERIP>192.168.1.111 and SERVERIP>192.168.1.100. Type in the console(substitute as needed):setenv ipaddr ROUTERIPsetenv serverip SERVERIPprintenv4. Double check that the output of printenvlists the IP addresses you just set. Now we can load the firmware over TFTP with“tftpboot 0×80000000 openwrtar71xxgenerictlwr740nv4squashfsfactory.bin”:5. ar7240> tftpboot 0×80000000 openwrtar71xxgenerictlwr740nv4squashfsfactory.bin6. Using eth0 device7. TFTP from server 192.168.1.100; our IP address is 192.168.1.1118. Filename ‘openwrtar71xxgenerictlwr740nv4squashfsfactory.bin’.Load address: 0×80000000Loading: TTTTTTTTTTTTTT

AND error occurs as eth link down retry boot……….

Please guide me …

Regards

Comment by Suman Thapa | 07/04/2013 | Reply

Page 18: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 18/25

0

0 iRate This

This sounds to me like a problem with your PC’s eth device connection.First of all I have to say that all these are best done on a Linux box (the tftp server part, the serial console app etc). You said youused Putty which makes me think you are doing it on a Win box? (though there is actually a putty port to *nix) If so, it may bethat your Ethernet device of your PC disconnects at some stage, or the TFTP you are using brings some problem…. Anyway ifyou are on Win and cannot change to Ubuntu for example (the easiest Linux distro IMHO)… You need to have in mind these:1. Set the Ethernet device of the PC which you will connect to the router a STATIC IP (in the example above it should be192.168.1.100)2. Install a good tftp server like this one: http://tftpd32.jounin.net/3. Add the openwrtar71xxgenerictlwr740nv4squashfsfactory.bin in its GUI (you’d better rename the file before that tosomething more convenient for writing… like “firmware.bin”)4. Start your Putty (I think you’d better use: https://sites.google.com/site/terminalbpp/) preparing it with these values:Bits per second: 115200Data bits: 8Stop bits: 1Parity: NoneFlow control: None5. Connect the router and fire it up6. Connect the terminal(putty) and send the “tpl” when needed…7. Issue the “printenv” command and ensure the result is something similar to this:bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ar7240nor0:256k(uboot),64k(ubootenv),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)bootcmd=bootm 0x9f020000baudrate=1152008. Then again try transferring the fileIf all that fails, you may have a router with a different hardware (less RAM , diff mem layout etc), or try watching the stability ofthe eth0 on the router without any data transfer…

Alternatively if the problem persists, you may ask in the OpenWRT Forums for more help: https://forum.openwrt.org/

P.S. BTW how did you get your router bricked?

Comment by PhobosK | 08/04/2013 | Reply

15. 1

0

iRate This

thanks a lot for your guide & actively replying to comments.At last I took a leap and installed OpenWrt(satisfied with justfactory.bin). But recently I ran to problem of free space when, even after uninstalling packages(bmon,luci themes etc.. junk)installed via luci interface current free space is only 36% (420.00 KB) from original free space of 912 kb.

So in order to regain free space can I again REFlash with ‘squashfsfactory.bin file ‘ from Openwrt

PS : as of now every thing is working great but running low on space in order to install “wshaper” for limiting speed on guestWLAN.

Comment by OpenwrtRocks | 15/04/2013 | Reply

Page 19: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 19/25

1

0

iRate This

Thanks for the nice words about this blog entry…

Anyway back to your questions…Regarding the uninstall of the packages that go with the official image… Though they are uninstalled… the space is neverregained back… That is why custom images are made… There you just remove that packages you do not need and you getextra space…But since you are talking about extra installed packages (after the official image has been installed), the situation is a bitdifferent… they just leave traces in “/overlay” incl db files of the opkg, so an option would be to go manually through that dirand delete the leftovers… Be warned that something may get corrupted, but you still have the option to recover easily withoutthe need of the serial connection… (the so called “failsafe” mode and more info on opkg leftovers can be found here:http://wiki.openwrt.org/doc/techref/opkg#troubleshooting)…

One of the good ways to recover back the initial space you had is really use an official image file (but any …….squashfssysupgrade.bin file will suffice… i.e. you do not need the …….squashfsfactory.bin file once you have upgraded to OpenWRTfrom stock)… But in the process of flashing back the original image, be sure that you do NOT select to keep configuration filesand then click the Flash button. You will lose all configurations you had made, but this way you will have the initial free spaceuntouched…On the contrary.. if you keep the config files the flashing back will not gain any additional space… So that’s the trick

Of course there is an even easier way to gain back your space (but still losing all your configs)… by going into failsafe mode (ifyou cannot start normally) and issue:“firstboot” command…This command may be done in normal telnet/ssh session to the router too… More info:http://wiki.openwrt.org/doc/howto/generic.failsafe#in.failsafe.modeDo not forget to reboot the router after the changes…

Comment by PhobosK | 15/04/2013 | Reply

0

0

iRate This

thanks for providing such a detailed reply :), I’m completely new to OpenWrt. Can you please clarify these to me

1.After flashing back using ‘squashfssysupgrade.bin’ without keeping settings and if I try to restore using ‘OpenWrtRouter20130415.tar.gz’ is free space again lost?

2.Can we use attitude adjustment 12.09 rc2 from here http://downloads.openwrt.org/attitude_adjustment/12.09rc2/ar71xx/generic/openwrtar71xxgenerictlwr740nv4squashfssysupgrade.bin?

3.If again try to reflash with ‘squashfactory.bin’ from openwrt will my router get bricked?(read that ‘squashfactory.bin’ isa specially modified so that it can be flashed by skipping checks from Stock FW to OpenWrt)

4. we should never use ‘jffs2squash/factory.bin’ file for flashing

Comment by OpenwrtRocks | 16/04/2013 | Reply

Page 20: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 20/25

0

0 iRate This

one more thing that I forgot to ask. What does numbers mean “Load: 0.00 0.01 0.05″ on banner

Comment by OpenwrtRocks | 16/04/2013 | Reply

0

0

iRate This

1. The backup keeps only the config settings in /etc (from the overlay)… so generally it should regain the space, but ifyou happen to use large config files (like if your firewall rules are a lot etc)… it may take some more space than usual…but that should not be too much since all is stored compressed anyway2. I have not tried the rc2 yet, because my general rule of a thumb is that when something works for me, i do not touchit… I intend when the official release is out (not the next rc etc) to test that official release on the router I have a serialline on… So you can test the rc2, but you’d better be prepared for a brick of your router… i.e. if you decide to do it, youshould be prepared with a serial connection for debricking… ’cause things may not work as expected with the rc2…3. Using factory.bin or sysupgrade.bin is all the same when you do it from inside an already installed OpenWRT…. Asyou’ve already said the factory.bin is only used when you go from stock to any OpenWRT release… So you cannotbrick your router with a factory.bin if the same release of sysupgrade.bin is working ok for you…4. You’d better not use those since they are for advanced use and take much more space than usual5 The load thing is like the stats you get when you use the “top” or “htop” commands in any *nix box… for more infolook here for example: http://www.linuxjournal.com/article/9001 or Google for top/htop results….

And just one more note… the more you write to the flash (including different configs, like frequently changing theconfig of the router etc), the less life of the flash remains…

Comment by PhobosK | 17/04/2013 | Reply

16. 1

0

iRate This

I’ve got the version 4.23. I need to go back to factory firmware. I’ve tried all three versions TP Link has for the TLWRT740N V4.23. OpenWRT fails to update the firmware. Luci tells me:

The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for yourplatform.

Thoughts?

Comment by Bob Dole | 18/04/2013 | Reply

1

0

Page 21: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 21/25

iRate This

First of all I hope you are uploading the bin file to the router not the zip one…. (sorry just a reminder… no bad thoughts on yourskills)

Second the reason why you may get this error, is that all the three firmwares listed at TP Link right now contain a boot updatetoo… So you will not be able to actually use those images right away from OpenWRT… Instead you have two options:1. You need to cut out the boot update from the firmware… See this link http://wiki.openwrt.org/toh/tplink/tlwr1043nd#back.to.original.firmware (but first read the general page here: http://wiki.openwrt.org/doc/howto/generic.uninstall )2. Alternatively – the best way is to use their original first firmware for the 4.23 series… Sadly they’ve removed it from theirdownload pages… (it was this original first that i had used. I do not have any experience with the now available updates and Ithink it is very stupid from them to remove it )… So Google around for the file: TLWR740N_V4_111130.zip (md5 sum –7b14146cb107182af42cf25bbc087481 ) and inside it the original firmware file is: wr740nv4_en_3_12_11_up(111130).bin(md5 sum – d7ac664066bd294ffb9b2b2288863fc7) This firmware should work ok…. For legality reasons I cannot post the fileor any links to it here. This option (of using the oldest available firmware) is the best one….

So… I may test both options for you if they work ok and can post the results here… On the other hand if you already have aserial line attached to your router, and you are able to debrick the router… you may test them yourself…

Please let me know…

Comment by PhobosK | 19/04/2013 | Reply

1

0

iRate This

Just an update…. I found the link to the TLWR740N_V4_111130.zip deep buried inside some old site of theirs http://www.tplink.com/Resources/software/TLWR740N_V4_111130.zipPlease try it from within OpenWRT Luci …

Comment by PhobosK | 19/04/2013 | Reply

17. 0

0

iRate This

cool tutorial, what I was wandering is if 740n is compatible with the final release from openwrt.Care to try? I dont have a serialcable and I dont want to risk bricking my router.Thanx.

Comment by unualtu | 11/05/2013 | Reply

0

0

iRate This

Page 22: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 22/25

Sorry being a kinda late in my answer

I have tested the 12.09 Final (Attitude Adjustment 12.09 Final) and it upgrades and works just fine (incl. with keeping the oldconfiguration files).There are some bugs fixed and some tweaks for easier configuration done. The wirelesstools package is missing and the luciappopenvpn is removed as broken (that is if you prepare your own customized image).

I’ve tested the new Gargoyle 1.5.10 version (that uses Attitude Adjustment 12.09 Final) and it is a way faster than the olderversions but still I do not find any great advantages compared to the original OpenWRT.

I have updated the article as needed, so it reflects both 12.09beta and 12.09 Final versions of OpenWRT.

Comment by PhobosK | 26/05/2013 | Reply

18. 0

0

iRate This

follow this link : http://wiki.openwrt.org/toh/tplink/tlwr740n#debricking, it was helpful, thanks a lot for writer

Comment by ftoweren | 26/05/2013 | Reply

19. 1

0

iRate This

Thank you so much for releasing modified images based on the final release 12.09. You quite catch up with the latest trends,hehe^^. I am so going to install it today, again thanks a lot!

Comment by kaiomatico | 28/05/2013 | Reply

0

0

iRate This

Thanks for the nice words.Please have in mind that the OpenVPN LuCI GUI is broken in OpenWRT 12.09 Final, so the luciappopenvp package istotally missing (incl. in my modified 12.09 Final image). That means that you will not have a convenient GUI for OpenVPNand you will be only able to control the “openvpn” service start/stop/disable through the LuCI. It means also that you will needto control the OpenVPN configuration through the ssh/telnet console (using “uci” or “vi”).

On the other hand if you have already configured OpenVPN using my old modified image (the 12.09beta one) and youupgrade to the 12.09 Final one (keeping the old OpenWRT config files), everything will work ok using the old configuration, soyou will not need to modify any OpenVPN settings (except for coping your VPN provider’s .ca file back to“/overlay/lib/uci/upload”… though I strongly suggest moving the .ca file to “/overlay/etc/openvpn” and fixing the “option ca” inyour VPN config to the new path). Still for future changes of OpenVPN config you will need the ssh/telnet console (like usingfor example “uci show openvpn”, “uci set openvpn.NAME_OF_VPN …”)

Page 23: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 23/25

Comment by PhobosK | 28/05/2013 | Reply

0

0

iRate This

That’s no problem at all. I don’t mind using openvpn. I succesfully installed and configured your firmware on my 740nv4.23 and I’m very happy with it. Everything works as expected. The only “cosmetic” issue I found was that by default onthe “System>Startup” tab it says USB is enabled by default, tinyproxy is enabled by default (even though it isn’t in theservices tab) and miniupnpd is disabled by default.

But that sure is nothing serious^^ thanks a lot for the firmware

Comment by kaiomatico | 28/05/2013 | Reply

20. 0

0

iRate This

Hello Folks,

I have a bit of a situation that requires some attention.

I bought this router with the purpose the run the “AAP” script, or AutoAp,

Its a script that uses the router as a bridge that continous scans for open wifi sources and connects to themAfter connecting a vpn client should make a connection to my vpn server @ home.

thanks to this page i now know how to install openwrt on the router, but i haven’t got a clue how to proceed with installing the“open ap / aap” script

Can anyone help me with this?

your help is appriciated

Comment by cor | 29/05/2013 | Reply

0

0

iRate This

Hi,as far as my knowledge goes AAP is a script for DDWRT. If you are speaking about it (http://www.ddwrt.com/wiki/index.php/Autoap) then you cannot use it in OpenWRT without a rewrite from scratch since it uses commandsspecific to DDWRT.

Page 24: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 24/25

For OpenWRT version you may check these links: https://forum.openwrt.org/viewtopic.php?id=26116 andhttps://forum.openwrt.org/viewtopic.php?id=21636 or run a search inside the OpenWRT forum: https://forum.openwrt.org.Alternatively ask for help in the OpenWRT forum

Comment by PhobosK | 29/05/2013 | Reply

21. 0

0

iRate This

Hi,I want to try your mod but I’m not sure if it works for 4.27 (same as 4.21). Do you happen to have this information?Thanks.

Comment by pythonsnake | 15/10/2013 | Reply

22. 0

0

iRate This

HI,I upgade my Tplink wr740N router to openwrt and now i can not open my router admin panal by clicking 192.168.1.1

Pls help me,

Comment by Jigar | 10/01/2014 | Reply

0

0

iRate This

Hi,Could you please give me some more info on how exactly you did upgrade your router…1. Is it a TLWR740N v4.23 or the version of the router is different?2. What procedure did you use to upgrade?3. What image of OpenWRT did you choose?4. How do you try to connect to the new firmware of the router? Is it from Windows or Linux? Are all other networkconnections disabled? Is your cable plugged in the LAN ports or in the WLAN port?5. Have you tried other IPs for the router like: 192.168.0.1, 192.168.10.1 etc

Comment by PhobosK | 11/01/2014 | Reply

0

0

i

Page 25: How to Turn Your TP Link TL-WRT740N Router Into a Fully Functional One Using OpenWRT « PhobosK’s Blog

2/12/2014 How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT « PhobosK’s Blog

http://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt/ 25/25

Rate This

Hey, Now I connected to openwrt admin problem and try to restore origional TPLINK firmware,

But now when i power on my router all LEDs continiously blinking except power LED(means it not blinks its always stayon),

I’m using TLWR740N v4.23 router,

Please help me,

Thank You

Comment by Jigar | 12/01/2014 | Reply

About me

I am a nice and loving person when you get to know me

Ask me for more…

To err is human, to forgive divine

Alexander Pope

If you love someone, set him free.If he comes back he’s yours;If he doesn’t he never was.

Richard Bach

____________________________

Site info

PhobosK’s BlogThe Andreas04 Theme.

Follow

Follow “PhobosK's Blog”

Powered by WordPress.com