Ref: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd http://www.programering.com/a/MTM4kDMwATY.html TFTPD Settings -------------- Install the TFTP service sudo apt-get install xinetd sudo apt-get install tftp-hpa sudo apt-get install tftpd-hpa Modify the TFTP parameters -------------------------- sudo gedit /etc/default/tftpd-hpa # Modify the contents are as follows TFTP_USERNAME="tftp" TFTP_DIRECTORY="/opt/tftpdroot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure -c" TFTP_DIRECTORY: ***Permissions:***γ€€γ€€The TFTP service directory, free to specify, the need to pay attention to is the directory permissions, the best settings for RWX TFTP_OPTIONS: γ€€γ€€"-c" Options for a writable directory in the TFTP, if you do not set this, errors will prompt in the put command Note: between the two parameters must be spaces, otherwise it will cause the following error Error code 2: Only absolute filenames allowed -------------------------------------------------------------------------------- 1. TFTP recovery via bootloader for v8,v9,v10,v11 ------------------------------------------------- As most other current TP-Link routers this device can be flashed and debricked without serial access. Basically, the procedure is as follows: 0. Install and test a TFTP Server on your PC. 1. Set your PC to use the static IP address 192.168.0.66 (the router will have 192.168.0.86) 2. Put an OpenWrt **factory** image in the root directory of the TFTP server, named as follows: for v8 mr3420v2_tp_recovery.bin for v9 wr841nv9_tp_recovery.bin for v10 wr841nv10_tp_recovery.bin for v11 wr841nv11_tp_recovery.bin Remove other files from the directory. Make sure that the file and directory permissions are RWX Restart the TFTP server. 3. Press and hold the reset button and switch the router ON. Keep the Reset button pressed until the Lock LED lights up. 4. Immediately release the Reset button 5. Wait for the router to reboot For more details, see reset_button_method_no_serial_cable_needed https://wiki.openwrt.org/toh/tp-link/tl-wdr4900#reset_button_method_no_serial_cable_needed ----------------------------------------------------------------------------------- 2. Using Serial Port ----------------- Download an appropriate image to serve from your TFTP server (for example, openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin for v8). Hook your routers WAN ethernet port up to your network (for v8.2 it's LAN1 ethernet port) Hook up the serial console as explained in the section "serial console". At the prompt "Autobooting in 1 seconds" type "tpl" quickly to start a uboot console. Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IP addresses). Type in the console: setenv ipaddr ROUTERIP setenv serverip SERVERIP printenv For example: Configure this static ip for your LAN card 192.168.1.100. If your computer containing other LAN or Wifi card, disable it! Type in the console setenv ipaddr 192.168.1.111 setenv serverip 192.168.1.100 192.168.1.111 is the router ip, 192.168.1.100 is the TFTP server ip. Double check that the output of printenv lists the IP addresses you just set. Uboot needs the tftp server to be listening on port 69. Make sure your server is configured to listen to that port. Now we can load the firmware over TFTP with "tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin": ar7240> tftpboot 0x80000000 openwrt-ar71xx-generic-tl-wr841n-v8-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-wr841n-v8-squashfs-factory.bin'. Load address: 0x80000000 Loading: checksum bad ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ###################################################### done Bytes transferred = 3932160 (3c0000 hex) Note the "3c0000" in the last line (your number may differ). Now execute the following commands, if necessary replacing 3c0000 with the number you got from tftpboot [WR841N V10 -> 0x370004] Type: printenv bootcmd Take note of the address and use it as flash erase start address. [WR841N V10 -> 0x9f020000] For TL-WR841ND v3: ------------------ 1. Erase the flash: ar7100> erase 0xbf020000 +0x3c0000 [V10: erase 0x9f020000 +0x370004] First 0x2 last 0x3d sector size 0x10000 61 Erased 60 sectors 2.Copy RAM content to flash: ar7100> cp.b 0x80000000 0xbf020000 0x3c0000 Copy to Flash... write addr: bf020000 done [V10: cp.b 0x80000000 0x9f020000 0x370004] 3.Reset ar7100> reset Resetting... 4. Done. For TL-WR841ND v5, v7, v8, v9: ------------------------------ 1. Erase the flash: wasp> erase 0x9f020000 +0x3c0000 2. Copy RAM content to flash: wasp> cp.b 0x80000000 0x9f020000 0x3c0000 3. Set up the boot wasp> bootm 0x9f020000 ## Booting image at 9f020000 ... Uncompressing Kernel Image ... OK Starting kernel ... 4. Done. For TL-WR841ND v10: ------------------- 1. Erase the flash: ap143-2.0> erase 0x9f020000 +0x370004 2. Copy RAM content to flash: ap143-2.0> cp.b 0x80000000 0x9f020000 0x370004 3a. Reset and restart ar7100> reset Resetting... 3b. Boot from the image in RAM ap143-2.0> bootm 0x9f020000 ## Booting image at 9f020000 ... Uncompressing Kernel Image ... OK Starting kernel ... 4. Done. ------------------------------------------------------------------------------------------------