TP-LINK TL-WR841ND
From DD-WRT Wiki
Revision as of 22:47, 24 January 2011 (edit) Simon94 (Talk | contribs) (→7.1) ← Previous diff |
Current revision (03:25, 25 February 2018) (edit) (undo) Ian5142 (Talk | contribs) (Added link to Where do I download firmware.) |
||
(20 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
- | + | {{Languages|TP-LINK TL-WR841ND}} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== | + | ==Hardware== |
+ | See the OpenWRT wiki for hardware and recovery: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd | ||
+ | |||
+ | Note: TP-Link TL-WR840N is similar to the 841ND. | ||
+ | Note: V13 is marvell based and is not currently supported. | ||
+ | |||
+ | ==Wifi Switch toggle script== | ||
+ | Taken from here: https://www.dd-wrt.com/phpBB2/viewtopic.php?t=312744 | ||
+ | <pre>#!/bin/sh | ||
+ | |||
+ | instance=`ps | grep [c]ustom.sh | awk '{print $1}' | wc -l` | ||
+ | instanceps=`ps | grep [c]ustom.sh | awk '{print $1}' | head -1` | ||
+ | while [ "$instance" -gt "2" ]; do | ||
+ | kill -9 "$instanceps" | ||
+ | sleep 2 | ||
+ | instance=`ps | grep [c]ustom.sh | awk '{print $1}' | wc -l` | ||
+ | instanceps=`ps | grep [c]ustom.sh | awk '{print $1}' | head -1` | ||
+ | done | ||
+ | |||
+ | while true; do | ||
+ | sleep 10 | ||
+ | gpio16=`cat /proc/gpio/16_in` | ||
+ | wstatus=`iw ath0 info | grep ssid` | ||
+ | |||
+ | if [ "$gpio16" -ne "0" ] && [ -z "$wstatus" ]; then | ||
+ | ifconfig ath0 up | ||
+ | sleep 5 | ||
+ | hostapd -B -P /var/run/ath0_hostapd.pid /tmp/ath0_hostap.conf | ||
+ | sleep 20 | ||
+ | wstatus=`iw ath0 info | grep ssid` | ||
+ | if [ -z "$wstatus" ]; then | ||
+ | ifconfig ath0 down | ||
+ | sleep 5 | ||
+ | kill -9 `ps | grep [h]ostapd | head -1 | awk '{print $1}'` | ||
+ | fi | ||
+ | fi | ||
+ | if [ "$gpio16" -eq "0" ] && [ -n "$wstatus" ]; then | ||
+ | ifconfig ath0 down | ||
+ | sleep 5 | ||
+ | kill -9 `ps | grep [h]ostapd | head -1 | awk '{print $1}'` | ||
+ | fi | ||
+ | done </pre> | ||
+ | |||
+ | ==Hacking== | ||
+ | ===Serial Port=== | ||
+ | In the pictures above there are schematics for soldering an Serial port. | ||
+ | The serial runs at 115200 8N1. | ||
+ | |||
+ | To get into the U-Boot prompt, you have to type >tpl< while booting. | ||
+ | |||
+ | ==Flashing an alternate firmware from TFTP== | ||
+ | First setup a TFTP server which is serving the firmware file. (Only flash "factory-to-"ddwrt/openwrt files). See [[Index:FAQ#Where_do_I_download_firmware.3F|Where do I download firmware?]] for links. | ||
+ | |||
+ | Then we have to setup the network settings. | ||
+ | Type the following things into the bootloader prompt. Replace ROUTERIP and SERVERIP with the right IPs. | ||
+ | |||
+ | ''setenv ipaddr ROUTERIP | ||
+ | |||
+ | setenv serverip SERVERIP'' | ||
+ | |||
+ | Now we have to load the firmware into the memory!. Replace FACTORY-TO-OPENWRT/DDWRT.bin with the right filename of the image! | ||
+ | |||
+ | ''ar7240> tftpboot 0x80000000 FACTORY-TO-OPENWRT/DDWRT.bin'' | ||
+ | |||
+ | You will read something like that. The size is very important. Note it. It can differ to the example. | ||
+ | |||
+ | |||
+ | ''Bytes transferred = 3932160 ('''3c0000''' hex)'' | ||
+ | |||
+ | The last steps are erasing the flash and writing the new image to the right address. Replace 3c0000 with the address you noted before. | ||
+ | |||
+ | ''ar7240> erase 0x9f020000 '''+0x3c0000''' | ||
+ | |||
+ | ar7240> cp.b 0x80000000 0x9f020000 '''0x3c0000''' | ||
+ | |||
+ | ar7240> bootm 0x9f020000'' | ||
+ | |||
+ | More instructions can be found on the OpenWRT link: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd#tftp_installrecovery_via_serial | ||
+ | |||
+ | ==Recovery== | ||
+ | See this OpenWRT Section for recovery of v8 and greater: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd#tftp_recovery_via_bootloader_for_v8_v9_v10_v11_v12 | ||
+ | ==Hardware Hacks== | ||
+ | I already managed to solder an USB Hub on that router, with an 7805 as power supply. | ||
+ | |||
+ | I'll write somthing about it, next time!! | ||
+ | |||
+ | [[Category:TP-Link guides]] |
Current revision
English • Deutsch • Español • Français • Italiano • 日本語 • Polski • Português • Русский • Svenska • 中文(中国大陆) • 中文(台灣) • |
Contents |
[edit] Hardware
See the OpenWRT wiki for hardware and recovery: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd
Note: TP-Link TL-WR840N is similar to the 841ND. Note: V13 is marvell based and is not currently supported.
[edit] Wifi Switch toggle script
Taken from here: https://www.dd-wrt.com/phpBB2/viewtopic.php?t=312744
#!/bin/sh instance=`ps | grep [c]ustom.sh | awk '{print $1}' | wc -l` instanceps=`ps | grep [c]ustom.sh | awk '{print $1}' | head -1` while [ "$instance" -gt "2" ]; do kill -9 "$instanceps" sleep 2 instance=`ps | grep [c]ustom.sh | awk '{print $1}' | wc -l` instanceps=`ps | grep [c]ustom.sh | awk '{print $1}' | head -1` done while true; do sleep 10 gpio16=`cat /proc/gpio/16_in` wstatus=`iw ath0 info | grep ssid` if [ "$gpio16" -ne "0" ] && [ -z "$wstatus" ]; then ifconfig ath0 up sleep 5 hostapd -B -P /var/run/ath0_hostapd.pid /tmp/ath0_hostap.conf sleep 20 wstatus=`iw ath0 info | grep ssid` if [ -z "$wstatus" ]; then ifconfig ath0 down sleep 5 kill -9 `ps | grep [h]ostapd | head -1 | awk '{print $1}'` fi fi if [ "$gpio16" -eq "0" ] && [ -n "$wstatus" ]; then ifconfig ath0 down sleep 5 kill -9 `ps | grep [h]ostapd | head -1 | awk '{print $1}'` fi done
[edit] Hacking
[edit] Serial Port
In the pictures above there are schematics for soldering an Serial port. The serial runs at 115200 8N1.
To get into the U-Boot prompt, you have to type >tpl< while booting.
[edit] Flashing an alternate firmware from TFTP
First setup a TFTP server which is serving the firmware file. (Only flash "factory-to-"ddwrt/openwrt files). See Where do I download firmware? for links.
Then we have to setup the network settings. Type the following things into the bootloader prompt. Replace ROUTERIP and SERVERIP with the right IPs.
setenv ipaddr ROUTERIP
setenv serverip SERVERIP
Now we have to load the firmware into the memory!. Replace FACTORY-TO-OPENWRT/DDWRT.bin with the right filename of the image!
ar7240> tftpboot 0x80000000 FACTORY-TO-OPENWRT/DDWRT.bin
You will read something like that. The size is very important. Note it. It can differ to the example.
Bytes transferred = 3932160 (3c0000 hex)
The last steps are erasing the flash and writing the new image to the right address. Replace 3c0000 with the address you noted before.
ar7240> erase 0x9f020000 +0x3c0000
ar7240> cp.b 0x80000000 0x9f020000 0x3c0000
ar7240> bootm 0x9f020000
More instructions can be found on the OpenWRT link: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd#tftp_installrecovery_via_serial
[edit] Recovery
See this OpenWRT Section for recovery of v8 and greater: https://wiki.openwrt.org/toh/tp-link/tl-wr841nd#tftp_recovery_via_bootloader_for_v8_v9_v10_v11_v12
[edit] Hardware Hacks
I already managed to solder an USB Hub on that router, with an 7805 as power supply.
I'll write somthing about it, next time!!