PhobosK’s Blog

My personal weblog

How to turn your TP Link TL-WRT740N router into a fully functional one using OpenWRT


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 TP-Link 150Mbps Wireless N Router TL-WR740N.

It comes with many features by default, but not the one I needed, so I flashed it with the OpenWRT 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.

Installing OpenWRT:

The TL-WR740N v4.23 works perfectly with the current unmodified Attitude Adjustment (12.09-beta) generic WR740N v4 and Attitude Adjustment (12.09 Final) generic WR740N v4 images. The best installation method is flashing it through the stock TP-Link web interface. So first download the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin file from the above links (the 12.09 Final preferred). If there is a newer version of OpenWRT at the time you read this, you may use it, but be sure to download the file ending in: -tl-wr740n-v4-squashfs-factory.bin, or you may effectively 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 (alternatively you may use the URL – http://tplinklogin.net).
  4. Choose the menu “System Tools → Firmware Upgrade”.
  5. Upload the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin file to router. Be sure to chose a …….-squashfs-factory.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

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.09-beta ImageBuilder (r33312) or Attitude Adjustment 12.09 Final ImageBuilder. Since TL-WR740N v4.23 doesn’t have any stock USB, any USB stuff should be removed from the default generic OpenWRT 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.09-beta 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.09-beta ImageBuilder (r33312):
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"

For Attitude Adjustment 12.09 Final ImageBuilder:
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"

The command line we used for the preparation includes all default packages of the default firmware images except: kmod-ledtrig-usbdev, kmod-usb-core, kmod-usb-ohci, kmod-usb2; and adds these packages: luci-app-qos, luci-app-openvpn (for Attitude Adjustment 12.09-beta r33312 only, ’cause in the 12.09 Final version it is broken), luci-app-tinyproxy, luci-app-upnp.
When the process ends, you should have all the needed files in the <extraction folder>/bin/ar71xx/ folder. From there you need only one file – the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin file. Use this file to upload it to your router and flash it with 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 .
  4. Login LuCI with the default user: root and password: password
  5. Choose the menu “System → Firmware Flash/Upgrade”.
  6. Upload the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.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
  10. Telnet to 192.168.1.1 and set a new root password, or browse to 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.

That is all. Now you have achieved the targeted extra features for your TP Link TL-WR740N 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 prepared and tested. You can download them from here. Please use only the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin (12.09-beta) or the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin (12.09 Final) firmware images from there! The -factory.bin ones have not been tested, so you may effectively brick your router!

Serial cable for the TL-WR740N

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

The v4.23 of the router uses the standard TP-Link pin-out, 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 of the board (look at the photos at the bottom of this post) are TX-RX-GND-3V3(VCC) (from left to right). After you solder all connections, you may use an USB to UART TTL convertor that you plug into your PC and use for example the cutecom application to connect to the /dev/ttyUSB0 device on your PC. Do not forget that you need to connect the TX pin of the convertor to the 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 both with 5V and 3.3V ! For more info look at the images at the bottom of this post.

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

  1. Put the original openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin (12.09-beta) or openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin (12.09 Final) 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 TL-WR740N“, 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 IP addresses). 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 ROUTERIP
    setenv serverip SERVERIP
    printenv
  5. Double check that the output of printenvlists the IP addresses you just set. Now we can load the firmware over TFTP with “tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin”:
    ar7240> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin
    Using eth0 device
    TFTP from server 192.168.1.100; our IP address is 192.168.1.111
    Filename 'openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin'.
    Load address: 0x80000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ######################################################
    done
    Bytes transferred = 3932160 (3c0000 hex)
  6. Note the “3c0000” in the last line (your number may differ). Now execute the following commands, if necessary replacing 3c0000with the number you got from tftpboot:
    erase 0x9f020000 +0x3c0000
    cp.b 0x80000000 0x9f020000 0x3c0000
    bootm 0x9f020000
  7. You’re set, OpenWrt should now boot and you can set it up as usual.

More resources on OpenWRT and TL-WR740N

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

There is a specialized page about TL-WR740N there, so you can start with it first.

Final Notes

I have tested my TL-WR704N v4.23 router with Gargoyle and DD-WRT too, but I am not satisfied with the results at all.

  • Gargoyle versions were 1.5.7 and 1.5.10, but they were almost twice slower than the OpenWRT version. The interface is really quite clean and is closer to a stock one, thus being suitable for novice Linux users that do not have that much knowledge about *nix as a whole. And though Gargoyle has some additional nice features, they do not really worth it. You should also have in mind that it has no OpenVPN support in the firmware for this specific model.
  • DD-WRT was a testing version 10-12-12-r20119-testing, and it was supposed 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 not advice you to test DD-WRT at all, if you are not prepared for de-bricking 🙂

Photos of TL-WR740N

21/10/2012 - Posted by | Linux, Tech, Tutorials | , , , , , , ,

77 Comments »

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

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

      But if you have a serial cable, you may try:
      dd-wrt->OpenWRT, and if things break, you can always fix them through serial. If you try it this way please leave a feedback here, so other users can benefit 😉 🙂

      Comment by PhobosK | 17/11/2012 | Reply

      • Sorry to bother again, for openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin, does it include LuCI? Or do I need to telnet?

        Comment by Chan | 20/11/2012 | Reply

        • You are not bothering at all 🙂
          And yes both openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin and openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.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 regular update/upgrade…

          Comment by PhobosK | 20/11/2012 | Reply

          • Thanks. 🙂

            Comment by Chan | 21/11/2012 | Reply

  2. My bad… I meant OpenWRT..

    Comment by Chan | 16/11/2012 | Reply

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

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

    • 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 tftpd-hpa in Ubuntu is nothing special… Just “apt-get install tftpd-hpa”, edit the /etc/default/tftpd-hpa if you need. In it you will find the folder the TFTPD serves the files from. The folder by default is: /var/lib/tftpboot, so this is where you put your OpenWRT files… More info can be found here:
      http://processors.wiki.ti.com/index.php/Setting_Up_a_TFTP_Server#Using_tftpd-hpa_in_Ubuntu
      http://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 the OpenWRT image :S
      Anyway If you do have the same TL-WR740N v4.23 as mine, I could prepare an image for you and test if it will work ok on my serial cabled router… Just tell me what extra functionality (except the olsrd) you will need added to the default OpenWRT image.

      Comment by PhobosK | 17/11/2012 | Reply

  4. 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 as much less as possible.hope you dont mind the naive questions.

    I have got a new wr740n v4.23

    1) After installing open-wrt which is the simplest way to go back to go back to stock firmware ?

    2) Does open-wrt store bandwidth statics even after rebooting the router?

    Comment by Rick | 08/01/2013 | Reply

    • 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/Flash Firmware->Flash new firmware image – uncheck the “Keep settings” option before that), and select the stock image that you have previously downloaded from the original vendor site… In this particular case (v4.23) the link is: http://www.tp-link.com/en/products/details/?categoryid=241&model=TL-WR740N#down (look at the software section and download “V4 Firmware”). That is a viable solution ONLY if your OpenWRT installation works without any problems. If your OpenWRT installation 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 (the easiest 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 need some of those, that may be altered, though it will require some good knowledge of the processes and config options of OpenWRT. 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. 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 md5
    a)Unmodified factory.bin ==>1ab6b2d08ba49b5c2c97bfdb1f93f8fd
    b) sysupgrade.bin ==>faa342271647476e4b7e7e93b530e3e9
    c)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 flashing
    a)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 be in specific firmware

    thanks

    Comment by rick | 11/01/2013 | Reply

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

    Comment by rick | 11/01/2013 | Reply

    • 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 although you use everything as described above), may brick it and you may end up needing to prepare and use a Serial cable to de-brick it. This may happen because of lots of reasons including the one that your v4.23 router may have some hardware changes made by the vendor and not listed anywhere. So all warnings that the OpenWRT project gives about using their firmware should be considered. For example, if you read the “Notes” section on http://wiki.openwrt.org/toh/tp-link/tl-wr740n , you will see that: “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. “… But that doesn’t mean the vendor may have not altered lately the flash for the International versions too. So a big “fat” WARNING – you may brick your router 🙂 If you are not ready to face that consequence, you’d better reconsider using any open source firmware for the router… no matter if it is DD-WRT or OpenWrt 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 firmware upgrade 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 I wanted 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 any problems, 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 the new 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 in OpenWRT) and the reason (one of the reasons infact) you may want to use the OpenWRT official image is the bunch of configurable options it has…Though the official OpenWRT doesn’t have any UPNP and QOS, but here is where the altered sysupgrade.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 simple using the luci interface. In fact you may use directly the official sysupgrade.bin instead of factory.bin when you are flashing back (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 firmware update” or something like this. But do not rely on that… Just use the factory.bin image when you have stock firmware on the router….

      6. You can flash back to stock firmware from any version (official or modified) of factory.bin or sysupgrade.bin firmware. You can 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 had no 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 any way (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 sure that you do NOT keep your old settings. It means you should check/uncheck the relevant option on the LUCI upgrade firmware page.

      Comment by PhobosK | 12/01/2013 | Reply

  7. Thank you very much for the answers I installed the Unmodified factory.bin ==>1ab6b2d08ba49b5c2c97bfdb1f93f8fd .It took just 2 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 questions to 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 will affect 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 hardware reset button and it didnt reset openwrt to default settings.Luckily I got another router and configured it as dhcp server and gained access to 740n and changed it back to static.My question is while experimenting and accidentally changing some configuration can we 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 but couldn figure out how to use it moreover it has whole system ,debug etc options but I need just bandwidth statistics.I guess garyole can 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 use them.

    Comment by rick | 14/01/2013 | Reply

    • 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

    • 1. Stock firmware comes with propriety kernel drivers that use the “power” of the SoC best. On the other side – OpenWRT uses open source, so the ath5k module for example is not that good in supporting Draft N as the stock one. So the transfer speed is really slower, but in my basic comparative tests that is not that much slower than the stock firmware. All you can do is just test 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 on the router when the red led starts blinking, press and hold the QSS button while the blinking becomes more frequent. More info can be found here: http://wiki.openwrt.org/toh/tp-link/tl-wr841nd#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 of useful info collecting and in terms of usage, but the problem is that you have to install these packages in order to use them. Best way is not using the OpenWRT package manager, because the installation takes too much space and the available memory considering WRT740N is not that much (installing even small looking packages on a default image can often brick your device because of memfull problems). All that means you need to prepare a custom image that includes the utility of your choice… But this also means that if you decide to use other packages like OpenVPN, QOS etc, you cannot add them all to the image, ’cause you 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. So you 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 flash too often in order to preserve the statistics between reboots. And that is definitely not a good solution considering the life of your flash chip 🙂 Anyway as I mentioned in my previous answers those available scripts could be altered and tailored for one’s specific needs and made to write to /tmp and upload that content somewhere (or the statistics to be downloaded regularly from the /tmp from another PC). One could also use some online services for storing and live monitoring of the statistics (like in cosm.com for example). Another problem with the scripts is that the more complex they are the more they put load on the router, so they can deteriorate 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/per-user-traffic-monitoring-on-openwrt
      Of 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

      • 1) Well I have a limited internet plan .I have installed networx in my pc and its enough to monitor the bandwidth usage in the 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 I use .so I thought that getting the bandwidth usage from the router will be more accurate.I went through the link and I guess it not 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”. Is there 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 my internet connection ON all the time.I can do this via putty but I would like a one click solution like a batch file or something if 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” but it didnt work.

        thank you

        Comment by rick | 17/01/2013 | Reply

        • 1. Getting the traffic from the eth1 interface of the router is the best way to watch your traffic really. Another option is just to login to your ISP provider’s page and see the traffic there. I wrote a very simple bash script to upload statistics to COSM but it requires additional curl package in the OpenWRT image and that makes the image too large to operate well with OpenVPN, QOS etc, so when I have more free time I will try to find a solution that doesn’t require too much space 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 not need any additional script to automate. Just create an ssh key with putty, upload the public part of your key to the router using 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 these options in putty but i haven’t used it for some time… but i guess you will find these options if i am wrong:) ). Next create a Windows shortcut with a command line: putty –load “SESSION NAME YOU’VE USED” and you will have a one 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 command like: ifconfig wlan0 down.

          Comment by PhobosK | 19/01/2013 | Reply

  8. 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 limit for 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 to 11 am then make is unlimited for the rest of the time.I searched but could not find any such option like time based connect within the 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 wrong bandwith stats sometimes for example in one particular instance I have downloaded about 5 gb and uploaded around 500mb and in the log it is showing upload values correct but download values are vastly different this happens many times during large downloads where as short connect times with low bandwith usage are correctly logged and I am sure about the downloaded data .To verify this is 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 GB
    pppd[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 stable release 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

    • 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”. In your 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 start
      0 11 * * * /etc/init.d/qos stop
      That is all and it should work ok now. The problem is that you will have QOS enabled only between 9-11 am everyday. If you need only the bandwidth restriction to apply between 9-11 am and the QOS running at all time, you will need to prepare a script to change the value of “Network->QOS->Interfaces->WAN->Enable” and apply the changes + start the qos service again. The start script that you use as a cron command should look something like this:
      uci set qos.wan.enabled=1
      uci commit qos
      /etc/init.d/qos start
      And the stop script that you use as a cron command should look like:
      uci set qos.wan.enabled=0
      uci commit qos
      /etc/init.d/qos start
      Have in mind that the “/etc/init.d/qos start” actually does a stop first and then configures everything the right way. More info about QOS here: http://wiki.openwrt.org/doc/uci/qos
      Don’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 maybe less than the one reported by the kernel…. In your particular case it turns out that you have received 0.98 MB which is strange anyway. 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 actually is 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, but I 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 it and 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. Thank you very much for your replies..It is only because of you I have confidentially installed openwrt in my router and made it working 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. 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 access via web, telnet or ping the the router… I noticed this after I ran the ‘delete firmaware all’ command on u-boot CLI… Is there some tool to recovery the WR740N firmware?

    Comment by John | 12/02/2013 | Reply

  11. 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. 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 about making 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

    • You need linux. Attitude Adjustment for wr740n

      Comment by dj2tusk | 07/03/2013 | Reply

    • 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 what modules/packages you remove, because you may end up with a bricked router that will need a serial cable to be de-bricked… Never remove kmod-leds-gpio 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 the article)… So I cannot give you any prediction if any previous or later version/revision will work as expected… Generally speaking “Barrier Breaker” is trunk/bleeding edge, so not that well tested and is expected to have a lot of bugs… so I would not advice using/testing it without having a secure way to de-brick…

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

      Comment by PhobosK | 07/03/2013 | Reply

  13. Thank you for the tutorial

    I did my own image adding luci-app-multiwan, flash ok but no jssf2 partition.
    Changes only succeed in ram.

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


    http://imageshack.us/photo/my-images/201/open1.png/


    http://imageshack.us/photo/my-images/22/open2.png/

    Comment by jamce | 08/03/2013 | Reply

  14. Thank you for the tutorial … I have done like this as you guided to unbrick my TPLINK tl-wr740n router.
    Link : https://phobosk.wordpress.com/2012/10/21/how-to-turn-your-tp-link-tl-wrt740n-router-into-a-fully-functional-one-using-openwrt
    All this steps works and at last steps I am facing problem with loading firmware….I have tried Some application as Putty and terminal 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 TL-WR740N“, 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 IP addresses). 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 ROUTERIP
    setenv serverip SERVERIP
    printenv
    4. 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 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin”:
    5. ar7240> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin
    6. Using eth0 device
    7. TFTP from server 192.168.1.100; our IP address is 192.168.1.111
    8. Filename ‘openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin’.
    Load address: 0x80000000
    Loading: TTTTTTTTTTTTTT

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

    Please guide me …

    Regards

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

    • 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 you used 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 be that your Ethernet device of your PC disconnects at some stage, or the TFTP you are using brings some problem…. Anyway if you 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 be 192.168.1.100)
      2. Install a good tftp server like this one: http://tftpd32.jounin.net/
      3. Add the openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin in its GUI (you’d better rename the file before that to something 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: 115200
      Data bits: 8
      Stop bits: 1
      Parity: None
      Flow control: None
      5. Connect the router and fire it up
      6. 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=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
      bootcmd=bootm 0x9f020000
      baudrate=115200
      8. Then again try transferring the file
      If all that fails, you may have a router with a different hardware (less RAM , diff mem layout etc), or try watching the stability of the 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. thanks a lot for your guide & actively replying to comments.At last I took a leap and installed OpenWrt(satisfied with just factory.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 RE-Flash with ‘squashfs-factory.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 guest WLAN.

    Comment by OpenwrtRocks | 15/04/2013 | Reply

    • 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 never regained back… That is why custom images are made… There you just remove that packages you do not need and you get extra space…
      But since you are talking about extra installed packages (after the official image has been installed), the situation is a bit different… they just leave traces in “/overlay” incl db files of the opkg, so an option would be to go manually through that dir and delete the leftovers… Be warned that something may get corrupted, but you still have the option to recover easily without the need of the serial connection… (the so called “fail-safe” 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 …….-squashfs-sysupgrade.bin file will suffice… i.e. you do not need the …….-squashfs-factory.bin file once you have upgraded to OpenWRT from stock)… But in the process of flashing back the original image, be sure that you do NOT select to keep configuration files and then click the Flash button. You will lose all configurations you had made, but this way you will have the initial free space untouched…
      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 (if you 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.mode
      Do not forget to reboot the router after the changes…

      Comment by PhobosK | 15/04/2013 | Reply

      • 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 ‘squashfs-sysupgrade.bin’ without keeping settings and if I try to restore using ‘OpenWrtRouter-2013-04-15.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.09-rc2/ar71xx/generic/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin?

        3.If again try to re-flash with ‘squash-factory.bin’ from openwrt will my router get bricked?(read that ‘squash-factory.bin’ is a specially modified so that it can be flashed by skipping checks from Stock FW to OpenWrt)

        4. we should never use ‘-jffs2-squash/factory.bin’ file for flashing

        Comment by OpenwrtRocks | 16/04/2013 | Reply

      • 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

        • 1. The backup keeps only the config settings in /etc (from the overlay)… so generally it should regain the space, but if you 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 anyway
          2. I have not tried the rc2 yet, because my general rule of a thumb is that when something works for me, i do not touch it… I intend when the official release is out (not the next rc etc) to test that official release on the router I have a serial line 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, you should be prepared with a serial connection for de-bricking… ’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…. As you’ve already said the factory.bin is only used when you go from stock to any OpenWRT release… So you cannot brick 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 usual
          5 The load thing is like the stats you get when you use the “top” or “htop” commands in any *nix box… for more info look 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 the config of the router etc), the less life of the flash remains… 😉

          Comment by PhobosK | 17/04/2013 | Reply

  16. 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 TL-WRT740N V 4.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 your platform.

    Thoughts?

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

    • 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 your skills)

      Second the reason why you may get this error, is that all the three firmwares listed at TP Link right now contain a boot update too… 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/tp-link/tl-wr1043nd#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 their download pages… (it was this original first that i had used. I do not have any experience with the now available updates and I think it is very stupid from them to remove it )… So Google around for the file: TL-WR740N_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 file or 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 a serial line attached to your router, and you are able to de-brick the router… you may test them yourself…

      Please let me know…

      Comment by PhobosK | 19/04/2013 | Reply

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

      Comment by PhobosK | 19/04/2013 | Reply

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

    Comment by unualtu | 11/05/2013 | Reply

    • 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 old configuration files).
      There are some bugs fixed and some tweaks for easier configuration done. The wireless-tools package is missing and the luci-app-openvpn 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 older versions 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.09-beta and 12.09 Final versions of OpenWRT.

      Comment by PhobosK | 26/05/2013 | Reply

  18. follow this link : http://wiki.openwrt.org/toh/tp-link/tl-wr740n#debricking, it was helpful, thanks a lot for writer

    Comment by ftoweren | 26/05/2013 | Reply

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

    • Thanks for the nice words.
      Please have in mind that the OpenVPN LuCI GUI is broken in OpenWRT 12.09 Final, so the luci-app-openvp package is totally missing (incl. in my modified 12.09 Final image). That means that you will not have a convenient GUI for OpenVPN and you will be only able to control the “openvpn” service start/stop/disable through the LuCI. It means also that you will need to 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.09-beta one) and you upgrade to the 12.09 Final one (keeping the old OpenWRT config files), everything will work ok using the old configuration, so you 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” in your VPN config to the new path). Still for future changes of OpenVPN config you will need the ssh/telnet console (like using for example “uci show openvpn”, “uci set openvpn.NAME_OF_VPN …”)

      Comment by PhobosK | 28/05/2013 | Reply

      • That’s no problem at all. I don’t mind using openvpn. I succesfully installed and configured your firmware on my 740n v4.23 and I’m very happy with it. Everything works as expected. The only “cosmetic” issue I found was that by default on the “System>Startup” tab it says USB is enabled by default, tinyproxy is enabled by default (even though it isn’t in the services 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. 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 them
    After 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

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

    • Hi,
      Could you please give me some more info on how exactly you did upgrade your router…
      1. Is it a TL-WR740N 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 network connections 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

      • Hey, Now I connected to openwrt admin problem and try to restore origional TP-LINK firmware,

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

        I’m using TL-WR740N v4.23 router,

        Please help me,

        Thank You

        Comment by Jigar | 12/01/2014 | Reply

  23. Hi PhobosK! Thank you for this useful information. I bought and received the $20 WR740N and went straight to flash it according to the instruction here. It only took me 5 minutes to get openwrt installed. The version of mine is 4.28 and I used the upgrade image you prepared. After the automatic reboot I got a new UI and got wifi signal when I enabled it. I think it was a success. Once I have it config I’ll test its functionality and performance. Your post is clear and concise and the files you prepared was so handy. Thanks again!

    Comment by king2178 | 19/09/2014 | Reply

    • Thanks for your feedback 🙂

      Comment by PhobosK | 19/09/2014 | Reply

  24. The links for the prebuilt images are broken. Can you please email me the links as well as correct them.
    s…@hushmail.com
    Thanks!

    PS I have V2.0 of the router. Would the aforementioned images work with it?

    Comment by Kouhai | 01/12/2014 | Reply

    • Sorry our server was down for a couple of days…
      Now the links to the prebuild images should work… Please let me know if there is still a problem…

      As for your question about if they will work with your V2 router… I suppose they will not… According to the “Supported versions” table here: http://wiki.openwrt.org/toh/tp-link/tl-wr740n there is a problem with most V2 routers…. Still if you are comfortable with the debricking process that uses serial line, you may give them a try…

      P.S. I have hidden your email that you used in your comment with Google recaptcha, so you don’t get bot spam 😉

      Comment by PhobosK | 01/12/2014 | Reply

      • Thanks!

        Yea that was a disposable email anyway 🙂
        I’m thinking of getting a v4.23 740n now. I don’t have a serial line so don’t want to brick it :p

        Comment by Kouhai | 02/12/2014 | Reply

  25. Still haven’t bought the v4.23 one yet. I was wondering if it was possible to build my own image for my 740n v2 having OpenVPN functionalities? Would that be possible? Any ideas? 🙂

    Comment by Kouhai | 17/12/2014 | Reply

    • Yeah of course you can build your own images for your 740n v2… But still that doesn’t remove the risk of bricking it since the problem with v2 is a kernel one… So be prepared to debrick using a serial line…

      Comment by PhobosK | 21/12/2014 | Reply

  26. Hi, really nice article. Can I use your images for wiki.openwrt.org ?

    Comment by Valent Turkovic | 20/12/2014 | Reply

  27. Hello again

    My old WR 740N died so I got another one. v4.27 . I was able to upgrade to your provided beta sysupgrade file but I can’t find the OpenVPN option anywhere 😦

    Any ideas?

    Comment by Kouhai | 02/03/2015 | Reply

  28. Hello there, try to check if it’s up and running with `/etc/init.d/openvpn status` while ssh’ing to the router. On a side note, I have the same router version and want to install it too, but didn’t have the courage to take the risk of incompatibility. Could you please tell me your install experience (you follow the tuto and used files for 4.23)? Thanks.

    Comment by pythonsnake | 02/03/2015 | Reply

    • Hi,
      v.4.27 of the router should not work with Attitude Adjustment 12.09 (incl. all the altered images I propose here). According to the OpenWRT specialized page ( http://wiki.openwrt.org/toh/tp-link/tl-wr740n ) you’ll need BARRIER BREAKER (Bleeding Edge, r39860) because of the hardware changes… So I would not advice you to try the listed altered images in my post here…
      Since I do not have any other version of the router (except v4.23), I cannot test if Barrier Breaker altered images would work ok… You’ll need just to risk 😉 Just follow my description on howto get the altered images (though some packages may have other names already in BB)…

      As for the OpenVPN – I’ve already answered that a few comments above… see my answer in comment 19 here…
      Thanks

      Comment by PhobosK | 02/03/2015 | Reply

    • It worked perfectly fine for my v4.27. I followed the tutorial by Phobosk word by word and used the provided files instead of generating my own.

      Comment by Kouhai | 03/03/2015 | Reply

  29. Being a bit of a noob at this, I still can’t figure out how to set up OpenVPN. I don’t know any linux commands so the simplest method using Luci would be preferred. @Phobosk I’ve skimmed through all the comments but still can’t find what I’m looking for 😦
    Thanks again and sorry for being persistent

    Comment by Kouhai | 03/03/2015 | Reply

  30. Amigo sem quere tirei a solda do pisitivo da antena desse roteador tplink 740 onde faço outro positivo existe outro canto?

    Comment by tulio | 14/08/2015 | Reply

    • Sorry I do not understand Portuguese…
      I do not quite understand what you are asking me…. even using Google translate from Portuguese :S
      As far as I get it, you unwillingly broke the connection of your antenna? If so, you can re-solder it where it was, or you can follow its path to some more convenient place…

      Comment by PhobosK | 14/08/2015 | Reply

  31. which one is better ddwrt or openwrt? i want to upgrade my tplink 7210n

    Comment by Kanwar | 30/08/2015 | Reply

  32. Hey Phobosk, can you confirm if openwrt gives full 150Mbps HT40? Cause DD WRT has a limitation that it can only give 72Mbps

    Comment by Kouhai | 30/08/2015 | Reply

  33. Configuring OpenWRT in Tp-TL WR740N V 5.0
    Hi ..I find difficult in configuring openwrt in tp link wr740N wireless router version 5.0..In openwrt they have packages only upto version 4.23 for this router.Can anyone suggest solution ,,so that i configure openwrt in tp link 740n router version 5.0.

    Thanks in advance:)

    Comment by Priyanka | 12/02/2016 | Reply

  34. location for serial console on tplink wr740n v5.0 (EU) is same as v4.23 ? If not please guide.

    Comment by ArslanAnjum | 16/05/2016 | Reply

  35. hey man, what’s up? 1st of all thank you for sharing your guide to install openvpn on this router, I didn’t read enough to know that it has 4MB Flash which is not enough for openvpn client.
    I have dd-wrt version installed on my router already and wanna revert back to stock firmware than flash your already compiled openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin (12.09 Final)
    my router version that have is v5.1, the one without power button, but I used ddwrt v5 for it and it worked, I even have pptp but no openvpn client. would you provide me the stock file and also let me know if I could do this at all and use your build? I don’t have the knowledge to compile one myself, I would really appreciate your effort in this.

    Comment by Sina | 24/06/2016 | Reply

    • I could install open wrt v5 factory, but when I wanted to upgrade to your sysupgrade file, it didn’t let me to, I guess I’m gonna need some one to make a new sysupgrade out of my sysugrade v5 from open wrt, would you do that for me please.

      Comment by Sina | 25/06/2016 | Reply

  36. HI, i follow your tutorial and install it on my router. i have a little problem, the openvpn inside this firmware is the official openvpn and it does not support CUSTOM-HEADER on http-proxy-option can you make it with the support of that? thanks.

    Comment by sgoloj09 | 21/06/2017 | Reply

  37. Hola, por favor, necesito el firmware 4.23 para el router TL-WR740N
    Gracias.

    Comment by CESAR SALAZAR | 02/04/2020 | Reply


Leave a reply to dj2tusk Cancel reply