Differences

This shows you the differences between two versions of the page.

toh:tp-link:tl-mr3040 [2013/02/25 18:20]
doiga
toh:tp-link:tl-mr3040 [2014/08/08 15:08] (current)
aind
Line 1: Line 1:
====== TP-Link TL-MR3040 ====== ====== TP-Link TL-MR3040 ======
 +A portable router with an onboard 2000mAh [[#Tags|rechargeable_battery]]. See also [[toh/tp-link/tl-mr10u|TP-Link TL-MR10U]], [[toh/tp-link/tl-mr11u|TP-Link TL-MR11U]], [[toh/tp-link/tl-mr12u|TP-Link TL-MR12U]], [[toh/tp-link/tl-mr13u|TP-Link TL-MR13U]] and [[toh/tp-link/tl-mr3020|TP-Link TL-MR3020]], [[toh/tp-link/tl-wr703n|TP-Link TL-WR703N]].\\
 +Although it is marketed as a "3G/4G router", the TL-MR3040 does not include a 3G/4G modem. It simply means that the OEM firmware and GUI support a certain range of USB 3G modems, but, OpenWrt supports 3G modems too.
-A nice portable router powered through battery 2000mAh or included USB power adapter for micro-USB B socket. +===== Supported Versions =====
-Although it is marketed as a "3G router", the TL-MR3040 does not include a 3G modem. It simply means that the OEM firmware and GUI support a certain range of USB 3G modems, but, OpenWRT supports USB 3G modems too. +^ Version/Model ^ Launch Date ^ OpenWrt Version Supported ^ Model Specific Notes ^ Hardware differences ^ 
 +| v1.0          | May 2012    | [[https://dev.openwrt.org/changeset/31845|Trunk R31845]] | Confirmed working |-
 +| v2.0          | January 2013| [[https://dev.openwrt.org/changeset/37964|Trunk R37964]] | Confirmed working on v2.1 hardware | Mode Switch button | 
 +| v2.2          | October 2013|  | Confirmed working on v2.2 hardware | Mode Switch button | 
 +| v2.3          | 2014        |  | Confirmed working on v2.3 hardware |  |
-The [[toh:tp-link:TL-MR11U]] has very similar hardware and connections, which also has an onboard battery. +===== Hardware Highlights ===== 
-Other TP-Link routers with **only similar hardware** are the [[toh:tp-link:TL-MR3020]] and [[toh:tp-link:TL-WR703N]].+^  CPU                  ^  Ram  ^  Flash  ^  Network  ^  USB  ^  Serial ^  JTag  ^ 
 +| Atheros AR7240 @ 400MHz | 32 MiB | 4 MiB  | 1x 100MBit | 1x 2.0 | YES    | NO    |
 +  * SoC: Atheros AR9331 rev1
 +  * 802.11 b/g/n 150Mbps
 +  * Powered via mini-USB (5V) or Li-ion Battery included (4-5 hours)
 +  * Only 94g\\
-===== Supported Versions ===== 
-^ Version/Model ^ Launch Date ^ OpenWrt Version Supported ^ Model Specific Notes ^ +===== TL-MR3040 and TL-MR11U differences =====
-| v1            | May 2012    | Trunk [[https://dev.openwrt.org/changeset/31845|R31845]]  | Confirmed working | +
-| v2            | January 2013 | - | ? |+
-===== Hardware Highlights ===== +Althought MR3040 and MR11U seem similar on the outside, the inside isn´t that similar. Here are the differences: 
-^ CPU ^ Ram ^ Flash ^ Network ^ USB ^ Serial ^ JTag ^ + 
-| AR9331@400MHz |32 MiB |4 MiB | 1x 100MBit | 1x 2.0 | YES | NO |+ * MR11U is chinese only 
 +  * MR3040(v1.0/v2.0) doesn´t have QSS button 
 +  * USP_POWER GPIO is diferrent 
 +  * Some buttons are on different sides with different looks 
 +  * Also the layers printed on the PCB are different and also some connections 
 +  * [[http://wiki.openwrt.org/_media/media/mr3040.mr11u.jpg|MR3040 compared to MR11U photo]]\\
-  * SoC: Atheros AR9331 
-  * 802.11 b/g/n 150Mbps 
-  * Powered via mini-USB (5V) or Battery included (4-5 hours) 
-  * Only 94g 
===== Installation ===== ===== Installation =====
 +==== Version 1.0 ====
So you can either download a daily-built snapshot or build your own from sources. So you can either download a daily-built snapshot or build your own from sources.
-  * Download the latest Attitude Adjustment RC1 snapshot from [[http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin|here]] (recommended)+  * Download the Attitude Adjustment stable release from [[http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin|here]] (recommended)
  * Download the lastest trunk snapshot [[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin|here]] (risky)   * Download the lastest trunk snapshot [[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin|here]] (risky)
{{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} **WARNING**: Snapshot images are always risky. Check the forum discussion for latest opinions on available images. {{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} **WARNING**: Snapshot images are always risky. Check the forum discussion for latest opinions on available images.
-==== Method Using Web GUI (Recommended)====+=== Method Using Web GUI (Recommended) ===
As with most TP-Link Routers this one can be flashed using the TP-Link Webinterface. As with most TP-Link Routers this one can be flashed using the TP-Link Webinterface.
Line 40: Line 50:
Wait for the progress bar to finish twice (the device will reset itself in the process), and proceed with basic configuration as with any fresh OpenWRT install. Wait for the progress bar to finish twice (the device will reset itself in the process), and proceed with basic configuration as with any fresh OpenWRT install.
-==== Manual Flash under U-Boot Serial Console and TFTP (Experts)====+=== Manual Flash under U-Boot Serial Console ===
  * To install OpenWrt from the U-Boot console, you need to install a TFTP server on your computer.   * To install OpenWrt from the U-Boot console, you need to install a TFTP server on your computer.
Line 84: Line 94:
</code> </code>
-==== Upgrading OpenWrt ==== +==== Version 2.x ====
-->[[doc:howto:generic.sysupgrade]]+
 +  * Download the latest trunk snapshot [[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin|here]] (risky)
 +{{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} **WARNING**: Snapshot images are always risky. Check the forum discussion for latest opinions on available images.
-==== Failsafe Mode ====+=== Method Using Web GUI (Recommended) ===
 +Same as for v1.0 (that is, log into the OEM web interface, usually at [[http://192.168.0.1/]], and update the firmware via this interface), **but remember to use the v2 firmware image ([[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin|openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin]]) instead of the v1 image**. Default username/password: admin/admin
 +
 +=== Manual Flash under U-Boot Serial Console ===
 +
 +Same as for v1.0, **but remember to use the v2 firmware image ([[http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin|openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin]]) instead of the v1 image**.
 +
 +==== Upgrading OpenWrt ====
 +->[[doc:howto:generic.sysupgrade]]\\
 +
 +
 +==== Failsafe Mode ====
  - Switch on the router   - Switch on the router
  - Wait almost 5 sec   - Wait almost 5 sec
Line 97: Line 119:
  - You may access it by using telnet 192.168.1.1/24 or serial   - You may access it by using telnet 192.168.1.1/24 or serial
-**The LEDs won't flash in Failsafe Mode**+Keep in mind: **The LEDs won't flash in Failsafe Mode!**\\
===== Restoring Original Firmware ===== ===== Restoring Original Firmware =====
 +**If you have SSH access:**
 +  * It is possible to flash factory firmware (or other firmware like DD-WRT) via the "mtd" command as documented in the generic instructions:
 +      * The firmware **must** be 3,932,160 bytes
 +      * Get the file into /tmp on the router via wget from the web or scp from your PC
 +      * Command is:  "mtd -r write /tmp/filename.bin firmware" 
 +      * [[http://wiki.openwrt.org/doc/howto/generic.uninstall#via.openwrt.cli]]
 +  * **HOWEVER**, some of the firmware downloaded from TP-LINK are too big (4,063,744 bytes) as they include the "boot" along with the firmware (usually the filename says "boot", e.g. //mr3040v2_en_3_14_4_up_**boot**(121017).bin//). 
 +      * Those extra bytes can be removed before flashing with: <code>dd if=original_filename.bin of=modified_filename.bin skip=257 bs=512</code>Afterwards, the file should be the correct size for flashing.
 +      * This command removes the first 128.5KB (0x20200) from the file.  **Please note:** There is a //risk// that's not the proper location for all files.  You can double check by viewing address 0x20200 in a hex editor:  Just prior to 0x20200 you should see a large block of 00's.  At 0x20200 you should have a "01" followed by a few 00's and then "TP-LINK"). On Linux, use the following command to view the data just prior to and at 0x20200: <code>hexdump -C original_filename.bin | grep 00020200 -B 3</code> Example output:<code>0000bcb0  61 0a ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |a...............|
 +0000bcc0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 +*
 +00020200  01 00 00 00 54 50 2d 4c  49 4e 4b 20 54 65 63 68  |....TP-LINK Tech|
 +</code>
 +      * references:
 +        * [[https://forum.openwrt.org/viewtopic.php?pid=213398#p213398]]
 +        * [[http://wiki.openwrt.org/toh/tp-link/tl-wr741nd#back.to.original.firmware]]
 +  * When flashing with mtd, if you receive an error such as "failed to erase block", then DO NOT REBOOT your router.  Instead, flash a known good firmware of the proper size (e.g. flash the sysupgrade bin for the OpenWrt version you most recently had)
-{{:meta:icons:tango:48px-emblem-progress.svg.png?nolink}} 
-Work in Progress 
-===== Hardware =====+**If you don't have SSH access (router bricked, etc):** 
 +  * The process is similar to flash OpenWRT with U-boot serial console 
 +  * Download the original image 
 +      * v1: [[http://www.tp-link.com/Resources/software/TL-MR3040_V1_120328.zip]] 
 +      * v2: [[http://www.tp-link.com/Resources/software/TL-MR3040_V2_121017.zip]] 
 +  * Don´t forget to enter "tpl" as soon as U-Boot announces "Autobooting in 1 seconds"
 +<code>hornet> tftpboot 0x81000000 mr3040v1_en_3_12_11_up(120328).bin
 +...
 +hornet> erase 0x9f020000 +0x3c0000
 +...
 +hornet> cp.b 0x81000000 0x9f020000 0x3c0000
 +...
 +hornet> bootm 9f020000
 +</code>
 +
 +
 +===== Basic Configuration =====
 +
 +Since this part is identical to generic devices, see [[doc:howto:basic.config|Basic configuration]].\\
 +
 +===== Original Flash Layout =====
 +Please read the article [[doc:techref:Flash Layout]] for a better understanding. It contains a couple of explanations. Then let's have a view at flash layout of this particular device:
 +
 +^  TP-Link MR3040  Flash Layout stock firmware          ^^^^^^
 +^ Layer0      |                        spi0.0:            4096KiB          |||||
 +^ Layer1      |  mtd0            |  mtd1              |    mtd2          |  mtd3            |  mtd4        |
 +^ Size in KiB  |  128KiB          |  1024KiB          |  2816 KiB        |  64KiB          |  64KiB        |
 +^ Name        |  **//u-boot//**  |  **//kernel//**    |  **//rootfs//**  |  **//config//**  |  **//art//**  |
 +^ mountpoint  |  none            |  none              | /                |  none            |  none        |
 +^ filesystem  |  none            |  none              | SquashFS          |  none            |  none        |
 +
 +ART = Atheros Radio Test - it contains RF calibration data for the wifi. If it is missing or corrupt, wireless won't come up anymore.\\
 +
 +
 +===== Hardware =====
==== Opening the device ==== ==== Opening the device ====
Remove back cover, remove battery. Unscrew two screws, open case in the corner next to the ethernet port (there is a small triangle here). Push a screwdriver into the hole next to the battery (closest to ethernet port) and pull cover until it snaps open. Next push in the screwdriver in the next corner next to the battery. Remove back cover, remove battery. Unscrew two screws, open case in the corner next to the ethernet port (there is a small triangle here). Push a screwdriver into the hole next to the battery (closest to ethernet port) and pull cover until it snaps open. Next push in the screwdriver in the next corner next to the battery.
- 
==== Info ==== ==== Info ====
Line 121: Line 191:
|SDRAM| Zentel A3S56D40FTP | http://www.kean.com.au/oshw/WR703N/teardown/Zentel%20A3S56D40FTP%20DDR%20256Mb%20SDRAM.pdf |  |SDRAM| Zentel A3S56D40FTP | http://www.kean.com.au/oshw/WR703N/teardown/Zentel%20A3S56D40FTP%20DDR%20256Mb%20SDRAM.pdf | 
|Chipset (Wi-Fi controller)| AR9331 | http://see.sl088.com/w/images/6/69/AR9331.pdf | |Chipset (Wi-Fi controller)| AR9331 | http://see.sl088.com/w/images/6/69/AR9331.pdf |
- 
==== Serial Console ==== ==== Serial Console ====
Line 158: Line 227:
Once the original firmware has booted up completely, you can press **return** to activate the Linux login prompt. Once the original firmware has booted up completely, you can press **return** to activate the Linux login prompt.
<code>TL-MR3040 login: root <code>TL-MR3040 login: root
-password: 5up</code>+password: 5up</code>\\ 
-==== Photos ====+==== Photos (v1.0) ====
[[http://imageshack.us/a/img23/9454/mr3040front.jpg|Bigger front image, for better view]]. [[http://imageshack.us/a/img23/9454/mr3040front.jpg|Bigger front image, for better view]].
Line 167: Line 237:
{{:media:mr3040_back.jpg?800|Version 1.1 back}} {{:media:mr3040_back.jpg?800|Version 1.1 back}}
-{{:media:mr3040_battery.jpg?800}}+{{:media:mr3040_battery.jpg?800}}\\
 +==== Photos (v2.1) ====
 +{{:media:mr3040_v2.1-front1.JPG?800}}
 +
 +{{:media:mr3040_v2.1-back.JPG?800}}
 +
 +==== Hardware info (v2.1) ====
 +The stock firmware has a web-based command line interface (located at http://192.168.0.1/userRpmNatDebugRpm26525557/linux_cmdline.html - username/password is osteam/5up). The following info was obtained via this web interface.
 +
 +<code># cat /proc/version&
 +Linux version 2.6.31--LSDK-9.2.0.312 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #45 Wed Oct 17 17:14:17 CST 2012
 +</code>
 +<code>
 +# cat /proc/cpuinfo &
 +system type : Atheros AR9330 (Hornet)
 +processor : 0
 +cpu model : MIPS 24Kc V7.4
 +BogoMIPS : 266.24
 +wait instruction : yes
 +microsecond timers : yes
 +tlb_entries : 16
 +extra interrupt vector : yes
 +hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ffb]
 +ASEs implemented : mips16
 +shadow register sets : 1
 +core : 0
 +VCED exceptions : not available
 +VCEI exceptions : not available
 +</code>
 +<code>
 +# cat /proc/interrupts&
 +          CPU0     
 +  2:    226967          dummy  wifi0
 +  3:          0            MIPS  ehci_hcd:usb1
 +  4:          0            MIPS  eth1
 +  5:      26826            MIPS  eth0
 +  6:          0            MIPS  cascade
 +  7:    886122            MIPS  timer
 + 18:          0    AR7240 MISC  cascade
 + 19:        48    AR7240 MISC  serial
 + 28:        37    AR7240 MISC  gmac link intr
 + 43:          0    AR7240 GPIO  RESTORE_FACTORY_DEFAULT
 + 53:          0    AR7240 GPIO  Watchdog Reset
 +
 +ERR:          0
 +</code>
 +<code>
 +# ls /proc
 +1              42            533            diskstats      pagetypeinfo
 +147            43            534            driver        partitions
 +150            44            535            execdomains    self
 +151            45            538            filesystems    simple_config
 +152            5              542            fs            slabinfo
 +155            505            549            interrupts    softirqs
 +156            506            572            iomem          stat
 +16            507            66            ioports        sys
 +162            508            8              irq            sysvipc
 +165            511            93            kallsyms      timer_list
 +168            512            ath_gmac_stat  kmsg          tty
 +2              515            athdebug      loadavg        uptime
 +25            516            athversion    locks          version
 +3              527            buddyinfo      meminfo        vmallocinfo
 +324            528            bus            misc          vmstat
 +361            529            cmdline        modules        zoneinfo
 +384            530            cpuinfo        mounts
 +385            531            crypto        mtd
 +4              532            devices        net
 +</code>
 +<code>
 +# cat /proc/meminfo&
 +MemTotal:          29992 kB
 +MemFree:          11060 kB
 +Buffers:            2236 kB
 +Cached:            6860 kB
 +SwapCached:            0 kB
 +Active:            4364 kB
 +Inactive:          6932 kB
 +Active(anon):      2200 kB
 +Inactive(anon):        0 kB
 +Active(file):      2164 kB
 +Inactive(file):    6932 kB
 +Unevictable:          0 kB
 +Mlocked:              0 kB
 +SwapTotal:            0 kB
 +SwapFree:              0 kB
 +Dirty:                0 kB
 +Writeback:            0 kB
 +AnonPages:          2224 kB
 +Mapped:            1952 kB
 +Slab:              4908 kB
 +SReclaimable:        456 kB
 +SUnreclaim:        4452 kB
 +PageTables:          232 kB
 +NFS_Unstable:          0 kB
 +Bounce:                0 kB
 +WritebackTmp:          0 kB
 +CommitLimit:      14996 kB
 +Committed_AS:      5600 kB
 +VmallocTotal:    1048404 kB
 +VmallocUsed:        2116 kB
 +VmallocChunk:    1037128 kB
 +</code>
 +<code>
 +# cat /proc/softirqs&
 +                CPU0     
 +      HI:          0
 +  TIMER:    894576
 +  NET_TX:      1114
 +  NET_RX:      30910
 +  BLOCK:          0
 + TASKLET:    194810
 +  SCHED:          0
 + HRTIMER:          0
 +    RCU:      29923
 +</code>
 +<code>
 +# cat /proc/devices&
 +Character devices:
 +  1 mem
 +  4 ttyS
 +  5 /dev/tty
 +  5 /dev/console
 +  5 /dev/ptmx
 + 10 misc
 + 13 input
 + 21 sg
 + 77 AR7240_GPIOC
 + 90 mtd
 +108 ppp
 +128 ptm
 +136 pts
 +180 usb
 +189 usb_device
 +238 ar7240_gpio_chrdev
 +239 ar7240_flash_chrdev
 +
 +Block devices:
 +259 blkext
 +  8 sd
 + 31 mtdblock
 + 65 sd
 + 66 sd
 + 67 sd
 + 68 sd
 + 69 sd
 + 70 sd
 + 71 sd
 +128 sd
 +129 sd
 +130 sd
 +131 sd
 +132 sd
 +133 sd
 +134 sd
 +135 sd
 +</code>
 +<code>
 +# cat /proc/timer_list&
 +Timer List Version: v0.4
 +HRTIMER_MAX_CLOCK_BASES: 2
 +now at 3623494191688 nsecs
 +
 +cpu: 0
 + clock 0:
 +  .base:      80247490
 +  .index:      0
 +  .resolution: 4000250 nsecs
 +  .get_time:  ktime_get_real
 +active timers:
 + clock 1:
 +  .base:      802474b8
 +  .index:      1
 +  .resolution: 4000250 nsecs
 +  .get_time:  ktime_get
 +active timers:
 + #0: <80ddfea0>, hrtimer_wakeup, S:01
 + # expires at 3623587145038-3623587195038 nsecs [in 92953350 to 93003350 nsecs]
 + #1: <80ec3ea0>, hrtimer_wakeup, S:01
 + # expires at 3623592058218-3623592108218 nsecs [in 97866530 to 97916530 nsecs]
 + #2: <80dcfea0>, hrtimer_wakeup, S:01
 + # expires at 3623692053433-3623692103433 nsecs [in 197861745 to 197911745 nsecs]
 + #3: <81c63ea0>, hrtimer_wakeup, S:01
 + # expires at 3623692078218-3623692128218 nsecs [in 197886530 to 197936530 nsecs]
 + #4: <81c87ea0>, hrtimer_wakeup, S:01
 + # expires at 3623776060908-3623776110908 nsecs [in 281869220 to 281919220 nsecs]
 + #5: <81c89ea0>, hrtimer_wakeup, S:01
 + # expires at 3623776082598-3623776132598 nsecs [in 281890910 to 281940910 nsecs]
 + #6: <80eabea0>, hrtimer_wakeup, S:01
 + # expires at 3623776449078-3623776499078 nsecs [in 282257390 to 282307390 nsecs]
 + #7: <80dd7ea0>, hrtimer_wakeup, S:01
 + # expires at 3624452067673-3624452117673 nsecs [in 957875985 to 957925985 nsecs]
 + #8: <80eadea0>, hrtimer_wakeup, S:01
 + # expires at 3624452094108-3624452144108 nsecs [in 957902420 to 957952420 nsecs]
 + #9: <80e9fea0>, hrtimer_wakeup, S:01
 + # expires at 3624452139538-3624452189538 nsecs [in 957947850 to 957997850 nsecs]
 + #10: <80ec1ea0>, hrtimer_wakeup, S:01
 + # expires at 3624456056338-3624456106338 nsecs [in 961864650 to 961914650 nsecs]
 + #11: <81c29ad8>, hrtimer_wakeup, S:01
 + # expires at 3625300039373-3625302039369 nsecs [in 1805847685 to 1807847681 nsecs]
 + #12: <80c21ea0>, hrtimer_wakeup, S:01
 + # expires at 3625356006158-3625356056158 nsecs [in 1861814470 to 1861864470 nsecs]
 + #13: <80e89ea0>, hrtimer_wakeup, S:01
 + # expires at 3626220007808-3626220057808 nsecs [in 2725816120 to 2725866120 nsecs]
 + #14: <81c49ea0>, hrtimer_wakeup, S:01
 + # expires at 3629000002848-3629000052848 nsecs [in 5505811160 to 5505861160 nsecs]
 + #15: <80cdfa40>, hrtimer_wakeup, S:01
 + # expires at 3632620073878-3632630073853 nsecs [in 9125882190 to 9135882165 nsecs]
 + #16: <80edfa40>, hrtimer_wakeup, S:01
 + # expires at 3634616067468-3634646067446 nsecs [in 11121875780 to 11151875758 nsecs]
 + #17: <81c5fea0>, hrtimer_wakeup, S:01
 + # expires at 3678339169738-3678339219738 nsecs [in 54844978050 to 54845028050 nsecs]
 + #18: <81c6bea0>, hrtimer_wakeup, S:01
 + # expires at 3678680084893-3678680134893 nsecs [in 55185893205 to 55185943205 nsecs]
 + #19: <81c53a40>, hrtimer_wakeup, S:01
 + # expires at 7217260376833-7217260426833 nsecs [in 3593766185145 to 3593766235145 nsecs]
 +
 +
 +Tick Device: mode:    0
 +Per CPU device: 0
 +Clock Event Device: MIPS
 + max_delta_ns:  2147483647
 + min_delta_ns:  3840
 + mult:          858993459
 + shift:          32
 + mode:          3
 + next_event:    3623496000000 nsecs
 + set_next_event: mips_next_event
 + set_mode:      mips_set_clock_mode
 + event_handler:  tick_handle_periodic
 +</code>
 +<code>
 +# /sbin/lsmod
 +Module                  Size  Used by
 +umac 630496 0 - Live 0xc0a5e000
 +ath_dev 214688 1 umac, Live 0xc094a000 (P)
 +ath_rate_atheros 32512 1 ath_dev, Live 0xc08f3000 (P)
 +ath_hal 369264 2 umac,ath_dev, Live 0xc0886000 (P)
 +asf 9376 3 umac,ath_dev,ath_hal, Live 0xc080e000 (P)
 +adf 14512 3 umac,ath_dev,ath_hal, Live 0xc07ff000
 +nf_nat_rtsp 5328 0 - Live 0xc073d000
 +nf_conntrack_rtsp 7136 1 nf_nat_rtsp, Live 0xc0731000
 +nf_nat_h323 6720 0 - Live 0xc0720000
 +nf_nat_tftp 1280 0 - Live 0xc0715000
 +nf_conntrack_tftp 4192 1 nf_nat_tftp, Live 0xc070b000
 +nf_nat_ftp 2768 0 - Live 0xc0701000
 +nf_conntrack_ftp 7216 1 nf_nat_ftp, Live 0xc06f6000
 +nf_nat_pptp 2576 0 - Live 0xc06eb000
 +nf_conntrack_pptp 5904 1 nf_nat_pptp, Live 0xc06e0000
 +tp_domain 4352 0 - Live 0xc06c1000
 +athrs_gmac 54048 0 - Live 0xc02a3000
 +statistics 87056 0 - Live 0xc0273000
 +wlan_warn 2976 0 - Live 0xc0268000
 +pptp 10432 0 - Live 0xc025f000
 +pppol2tp 27760 0 - Live 0xc024d000
 +br_filter 1232 0 - Live 0xc023b000
 +ts_kmp 2208 1 - Live 0xc0232000
 +cls_fw 5088 0 - Live 0xc0227000
 +cls_basic 4944 0 - Live 0xc021b000
 +sch_sfq 6384 0 - Live 0xc020f000
 +sch_prio 5360 0 - Live 0xc0203000
 +sch_htb 18000 0 - Live 0xc01f4000
 +ipt_TRIGGER 3872 0 - Live 0xc01e5000
 +ipt_REJECT 2992 0 - Live 0xc01db000
 +ipt_REDIRECT 1520 0 - Live 0xc01d1000
 +ipt_MASQUERADE 2400 3 - Live 0xc01c8000
 +iptable_nat 4720 1 - Live 0xc01bd000
 +iptable_filter 2352 1 - Live 0xc01b2000
 +ip_tables 11824 2 iptable_nat,iptable_filter, Live 0xc01a6000
 +nf_nat_proto_gre 1984 1 nf_nat_pptp, Live 0xc0199000
 +nf_nat 15904 10 nf_nat_rtsp,nf_nat_h323,nf_nat_tftp,nf_nat_ftp,nf_nat_pptp,ipt_TRIGGER,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_proto_gre, Live 0xc018d000
 +nf_conntrack_ipv4 13184 9 iptable_nat,nf_nat, Live 0xc017c000
 +nf_defrag_ipv4 1648 1 nf_conntrack_ipv4, Live 0xc016e000
 +xt_state 1856 6 - Live 0xc0165000
 +xt_conntrack 4544 0 - Live 0xc015b000
 +nf_conntrack_h323 47328 1 nf_nat_h323, Live 0xc0146000
 +nf_conntrack_proto_gre 4976 1 nf_conntrack_pptp, Live 0xc012f000
 +nf_conntrack 59008 18 nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_conntrack_tftp,nf_nat_ftp,nf_conntrack_ftp,nf_nat_pptp,nf_conntrack_pptp,ipt_TRIGGER,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state,xt_conntrack,nf_conntrack_h323,nf_conntrack_proto_gre, Live 0xc0116000
 +ipt_multiurl 1936 0 - Live 0xc00fa000
 +xt_time 2704 0 - Live 0xc00f1000
 +xt_string 2208 0 - Live 0xc00e7000
 +xt_multiport 2848 0 - Live 0xc00dd000
 +xt_mac 1376 0 - Live 0xc00d3000
 +xt_iprange 2128 0 - Live 0xc00ca000
 +xt_comment 1296 1 - Live 0xc00c1000
 +xt_TCPMSS 3264 1 - Live 0xc00b8000
 +xt_MARK 1888 0 - Live 0xc00ae000
 +xt_tcpudp 2784 14 - Live 0xc00a5000
 +x_tables 16480 19 wlan_warn,ipt_TRIGGER,ipt_REJECT,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,ip_tables,xt_state,xt_conntrack,ipt_multiurl,xt_time,xt_string,xt_multiport,xt_mac,xt_iprange,xt_comment,xt_TCPMSS,xt_MARK,xt_tcpudp, Live 0xc0097000
 +</code>
 +<code>
 +# cat /proc/modules&
 +umac 630496 0 - Live 0xc0a5e000
 +ath_dev 214688 1 umac, Live 0xc094a000 (P)
 +ath_rate_atheros 32512 1 ath_dev, Live 0xc08f3000 (P)
 +ath_hal 369264 2 umac,ath_dev, Live 0xc0886000 (P)
 +asf 9376 3 umac,ath_dev,ath_hal, Live 0xc080e000 (P)
 +adf 14512 3 umac,ath_dev,ath_hal, Live 0xc07ff000
 +nf_nat_rtsp 5328 0 - Live 0xc073d000
 +nf_conntrack_rtsp 7136 1 nf_nat_rtsp, Live 0xc0731000
 +nf_nat_h323 6720 0 - Live 0xc0720000
 +nf_nat_tftp 1280 0 - Live 0xc0715000
 +nf_conntrack_tftp 4192 1 nf_nat_tftp, Live 0xc070b000
 +nf_nat_ftp 2768 0 - Live 0xc0701000
 +nf_conntrack_ftp 7216 1 nf_nat_ftp, Live 0xc06f6000
 +nf_nat_pptp 2576 0 - Live 0xc06eb000
 +nf_conntrack_pptp 5904 1 nf_nat_pptp, Live 0xc06e0000
 +tp_domain 4352 0 - Live 0xc06c1000
 +athrs_gmac 54048 0 - Live 0xc02a3000
 +statistics 87056 0 - Live 0xc0273000
 +wlan_warn 2976 0 - Live 0xc0268000
 +pptp 10432 0 - Live 0xc025f000
 +pppol2tp 27760 0 - Live 0xc024d000
 +br_filter 1232 0 - Live 0xc023b000
 +ts_kmp 2208 1 - Live 0xc0232000
 +cls_fw 5088 0 - Live 0xc0227000
 +cls_basic 4944 0 - Live 0xc021b000
 +sch_sfq 6384 0 - Live 0xc020f000
 +sch_prio 5360 0 - Live 0xc0203000
 +sch_htb 18000 0 - Live 0xc01f4000
 +ipt_TRIGGER 3872 0 - Live 0xc01e5000
 +ipt_REJECT 2992 0 - Live 0xc01db000
 +ipt_REDIRECT 1520 0 - Live 0xc01d1000
 +ipt_MASQUERADE 2400 3 - Live 0xc01c8000
 +iptable_nat 4720 1 - Live 0xc01bd000
 +iptable_filter 2352 1 - Live 0xc01b2000
 +ip_tables 11824 2 iptable_nat,iptable_filter, Live 0xc01a6000
 +nf_nat_proto_gre 1984 1 nf_nat_pptp, Live 0xc0199000
 +nf_nat 15904 10 nf_nat_rtsp,nf_nat_h323,nf_nat_tftp,nf_nat_ftp,nf_nat_pptp,ipt_TRIGGER,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_proto_gre, Live 0xc018d000
 +nf_conntrack_ipv4 13184 9 iptable_nat,nf_nat, Live 0xc017c000
 +nf_defrag_ipv4 1648 1 nf_conntrack_ipv4, Live 0xc016e000
 +xt_state 1856 6 - Live 0xc0165000
 +xt_conntrack 4544 0 - Live 0xc015b000
 +nf_conntrack_h323 47328 1 nf_nat_h323, Live 0xc0146000
 +nf_conntrack_proto_gre 4976 1 nf_conntrack_pptp, Live 0xc012f000
 +nf_conntrack 59008 18 nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_conntrack_tftp,nf_nat_ftp,nf_conntrack_ftp,nf_nat_pptp,nf_conntrack_pptp,ipt_TRIGGER,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state,xt_conntrack,nf_conntrack_h323,nf_conntrack_proto_gre, Live 0xc0116000
 +ipt_multiurl 1936 0 - Live 0xc00fa000
 +xt_time 2704 0 - Live 0xc00f1000
 +xt_string 2208 0 - Live 0xc00e7000
 +xt_multiport 2848 0 - Live 0xc00dd000
 +xt_mac 1376 0 - Live 0xc00d3000
 +xt_iprange 2128 0 - Live 0xc00ca000
 +xt_comment 1296 1 - Live 0xc00c1000
 +xt_TCPMSS 3264 1 - Live 0xc00b8000
 +xt_MARK 1888 0 - Live 0xc00ae000
 +xt_tcpudp 2784 14 - Live 0xc00a5000
 +x_tables 16480 19 wlan_warn,ipt_TRIGGER,ipt_REJECT,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,ip_tables,xt_state,xt_conntrack,ipt_multiurl,xt_time,xt_string,xt_multiport,xt_mac,xt_iprange,xt_comment,xt_TCPMSS,xt_MARK,xt_tcpudp, Live 0xc0097000
 +</code>
 +<code>
 +# ls /dev
 +ar7100_flash_chrdev  ram0                ttyS1
 +ar7100_gpio_chrdev  random              ttyS2
 +caldata              tty                  ttyUSB0
 +console              tty0                ttyUSB1
 +dk0                  tty1                ttyUSB10
 +kmem                tty2                ttyUSB11
 +mem                  ttyACM0              ttyUSB12
 +mtd0                ttyACM1              ttyUSB13
 +mtdblock0            ttyACM10            ttyUSB14
 +mtdblock1            ttyACM11            ttyUSB15
 +mtdblock2            ttyACM12            ttyUSB2
 +mtdblock3            ttyACM13            ttyUSB3
 +mtdblock4            ttyACM14            ttyUSB4
 +mtdblock5            ttyACM15            ttyUSB5
 +mtdblock6            ttyACM2              ttyUSB6
 +mtdr0                ttyACM3              ttyUSB7
 +null                ttyACM4              ttyUSB8
 +ppp                  ttyACM5              ttyUSB9
 +ptmx                ttyACM6              ttyp0
 +pts                  ttyACM7              ttyp1
 +ptyp0                ttyACM8              ttyp2
 +ptyp1                ttyACM9              urandom
 +ptyp2                ttyS0                zero
 +</code>
 +<code>
 +# /sbin/ifconfig
 +ath0      Link encap:Ethernet  HWaddr F8:1A:67:5B:D9:7C 
 +          UP BROADCAST RUNNING MULTICAST  MTU:2290  Metric:1
 +          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:456 errors:0 dropped:2656 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:0 (0.0 B)  TX bytes:200184 (195.4 KiB)
 +
 +br0      Link encap:Ethernet  HWaddr F8:1A:67:5B:D9:7C 
 +          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
 +          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +          RX packets:22657 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:26997 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:0
 +          RX bytes:2368073 (2.2 MiB)  TX bytes:19011533 (18.1 MiB)
 +
 +eth0      Link encap:Ethernet  HWaddr F8:1A:67:5B:D9:7B 
 +          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +          RX packets:22683 errors:0 dropped:4 overruns:0 frame:0
 +          TX packets:29239 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:2779389 (2.6 MiB)  TX bytes:19273038 (18.3 MiB)
 +
 +eth1      Link encap:Ethernet  HWaddr F8:1A:67:5B:D9:7D 
 +          UP BROADCAST MULTICAST  MTU:1500  Metric:1
 +          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 +
 +lo        Link encap:Local Loopback 
 +          inet addr:127.0.0.1  Mask:255.0.0.0
 +          UP LOOPBACK RUNNING  MTU:16436  Metric:1
 +          RX packets:2004 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:2004 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:0
 +          RX bytes:156312 (152.6 KiB)  TX bytes:156312 (152.6 KiB)
 +
 +wifi0    Link encap:Ethernet  HWaddr F8:1A:67:5B:D9:7C 
 +          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:0 errors:174 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 +          Interrupt:2 Memory:b8100000-b811ffff
 +</code>
 +<code>
 +# cat /proc/partitions&
 +major minor  #blocks  name
 +
 +  31        0        128 mtdblock0
 +  31        1      1024 mtdblock1
 +  31        2      2816 mtdblock2
 +  31        3        64 mtdblock3
 +  31        4        64 mtdblock4
 +</code>
 +<code>
 +# cat /proc/diskstats&
 +  31      0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0
 +  31      1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0
 +  31      2 mtdblock2 82 2127 4418 1028 0 0 0 0 0 1028 1028
 +  31      3 mtdblock3 0 0 0 0 0 0 0 0 0 0 0
 +  31      4 mtdblock4 1 0 8 0 0 0 0 0 0 0 0
 +</code>
 +<code>
 +# df
 +Filesystem          1k-blocks      Used Available Use% Mounted on
 +/dev/mtdblock2            2688      2688        0 100% /
 +</code>
 +<code>
 +# cat /proc/pagetypeinfo&
 +Page block order: 10
 +Pages per block:  1024
 +
 +Free pages count per migrate type at order      0      1      2      3      4      5      6      7      8      9    10
 +Node    0, zone  Normal, type    Unmovable      3      2      2      0      1      1      1      1      0      0      0
 +Node    0, zone  Normal, type  Reclaimable      0      1      1      1      0      0      0      1      1      1      0
 +Node    0, zone  Normal, type      Movable      1      1      1      1      0      1      1      0      0      1      0
 +Node    0, zone  Normal, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
 +Node    0, zone  Normal, type      Isolate      0      0      0      0      0      0      0      0      0      0      0
 +
 +Number of blocks type    Unmovable  Reclaimable      Movable      Reserve      Isolate
 +Node 0, zone  Normal            2            1            4            1            0
 +</code>
 +<code>
 +# cat /proc/vmstat&
 +nr_free_pages 2807
 +nr_inactive_anon 0
 +nr_active_anon 521
 +nr_inactive_file 1733
 +nr_active_file 541
 +nr_unevictable 0
 +nr_mlock 0
 +nr_anon_pages 527
 +nr_mapped 488
 +nr_file_pages 2274
 +nr_dirty 0
 +nr_writeback 0
 +nr_slab_reclaimable 114
 +nr_slab_unreclaimable 1108
 +nr_page_table_pages 52
 +nr_unstable 0
 +nr_bounce 0
 +nr_vmscan_write 0
 +nr_writeback_temp 0
 +pgpgin 2213
 +pgpgout 0
 +pswpin 0
 +pswpout 0
 +pgalloc_normal 75985
 +pgalloc_movable 0
 +pgfree 78792
 +pgactivate 542
 +pgdeactivate 0
 +pgfault 71708
 +pgmajfault 78
 +pgrefill_normal 0
 +pgrefill_movable 0
 +pgsteal_normal 0
 +pgsteal_movable 0
 +pgscan_kswapd_normal 0
 +pgscan_kswapd_movable 0
 +pgscan_direct_normal 0
 +pgscan_direct_movable 0
 +pginodesteal 0
 +slabs_scanned 0
 +kswapd_steal 0
 +kswapd_inodesteal 0
 +pageoutrun 0
 +allocstall 0
 +pgrotated 0
 +unevictable_pgs_culled 0
 +unevictable_pgs_scanned 0
 +unevictable_pgs_rescued 0
 +unevictable_pgs_mlocked 0
 +unevictable_pgs_munlocked 0
 +unevictable_pgs_cleared 0
 +unevictable_pgs_stranded 0
 +unevictable_pgs_mlockfreed 0
 +</code>
 +<code>
 +# cat /proc/zoneinfo&
 +Node 0, zone  Normal
 +  pages free    2771
 +        min      180
 +        low      225
 +        high    270
 +        scanned  0
 +        spanned  8192
 +        present  8128
 +    nr_free_pages 2771
 +    nr_inactive_anon 0
 +    nr_active_anon 550
 +    nr_inactive_file 1733
 +    nr_active_file 541
 +    nr_unevictable 0
 +    nr_mlock    0
 +    nr_anon_pages 556
 +    nr_mapped    488
 +    nr_file_pages 2274
 +    nr_dirty    0
 +    nr_writeback 0
 +    nr_slab_reclaimable 114
 +    nr_slab_unreclaimable 1107
 +    nr_page_table_pages 58
 +    nr_unstable  0
 +    nr_bounce    0
 +    nr_vmscan_write 0
 +    nr_writeback_temp 0
 +        protection: (0, 0)
 +  pagesets
 +    cpu: 0
 +              count: 0
 +              high:  0
 +              batch: 1
 +  all_unreclaimable: 0
 +  prev_priority:    12
 +  start_pfn:        0
 +  inactive_ratio:    1
 +</code>
==== TL-MR3040 Reverse Engineering ==== ==== TL-MR3040 Reverse Engineering ====
-The TL-MR11U has been [[https://forum.openwrt.org/viewtopic.php?id=41714|teared down]] by Jarocks, since this router is hardware similar to TL-MR3040 was very useful when checking the pinout. At the moment is still in investigation by doiga, also under the [[https://forum.openwrt.org/viewtopic.php?id=42466|forum]]+The TL-MR3040 has been [[https://forum.openwrt.org/viewtopic.php?id=41714|torn down]] by Jarocks, which was very useful to check the pinout. The investigation was complete thanks to doiga, also check the [[https://forum.openwrt.org/viewtopic.php?id=42466|forum]]\\
Line 179: Line 802:
-> [[doc:hardware:port.GPIO]] -> [[doc:hardware:port.GPIO]]
-The AR933x platform provides 28 GPIOs, some of them are used by the router for status LEDs, buttons and other stuff. The table below shows the results of the investigation, based on the AR9331 datasheet:+The AR933x platform provides 28 GPIOs, some of them are used by the router for status LEDs, buttons and other stuff.
 +**The TL-MR3040 provides 3 free GPIOs.**
-^  GPIO  ^ Available ^ AR9331 Pin ^ Description                     +The table below shows the results of the investigation, based on the AR9331 datasheet: 
-|      0 | R8        | A78  | Must have 0 value during bootstrap    | + 
 + 
 +^  GPIO  ^ Available ^ AR9331 Pin ^ Description                  
 +|      0 | R8        | A78  | Must have 0 value during bootstrap*   |
|      1 | R11      | A77  | Must have 1 value during bootstrap    | |      1 | R11      | A77  | Must have 1 value during bootstrap    |
-|      2 |           | B49  | Used by SPI Flash                    | +|      2 | SPI_CS_0  | B49  | Used by SPI Flash                    | 
-|      3 |           | B51  | Used by SPI Flash                    | +|      3 | SPI_CLK  | B51  | Used by SPI Flash                    | 
-|      4 |           | B50  | Used by SPI Flash                    | +|      4 | SPI_MOSI  | B50  | Used by SPI Flash                    | 
-|      5 |           | A57  | Used by SPI Flash                    |+|      5 | SPI_MISO  | A57  | Used by SPI Flash                    |
|      6 | NC        |      |                                      | |      6 | NC        |      |                                      |
|      7 | NC        |      |                                      | |      7 | NC        |      |                                      |
|      8 | NC        |      |                                      | |      8 | NC        |      |                                      |
-|      9 | SIN      | B68  | Serial INPUT                         +|      9 | SIN      | B68  | Serial INPUT (Rx)                   
-|    10 | SOUT      | A79  | Serial OUT                            | +|    10 | SOUT      | A79  | Serial OUTPUT (Tx)                    |
|    11 | RESET SW  | B48  | Soft Reset Switch                    | |    11 | RESET SW  | B48  | Soft Reset Switch                    |
|    12 | R84      | A56  | Must have 0 value during bootstrap    | |    12 | R84      | A56  | Must have 0 value during bootstrap    |
-|    13 | R12      | B66  | Must have 0 value during bootstrap    | +|    13 | R12      | B66  | Must have 1 value during bootstrap    | 
-|    14 | R9        | A76  |   ??                                +|    14 | R9        | A76  | **unused** Pulled to ground         
-|    15 | R10      | B65  |   ??                                |    +|    15 | R10      | B65  | **unused** Pulled to ground          |   
|    16 | R13      | A75  | Must have 0 value during bootstrap    | |    16 | R13      | A75  | Must have 0 value during bootstrap    |
-|    17 | LED2      | B64  |                                       +|    17 | LED2      | B64  | LAN LED                             
-|    18 | (R18?)    | A28  |   ??                                |+|    18 | USB_POWER | A28  | Control USB Host Power                |
|    19 | NC        |      |                                      | |    19 | NC        |      |                                      |
-|    20 | R15      | A27  | working                              |+|    20 | R15      | A27  | **unused** Pulled to ground          |
|    21 | NC        |      |                                      | |    21 | NC        |      |                                      |
|    22 | NC        |      |                                      | |    22 | NC        |      |                                      |
|    23 | NC        |      |                                      | |    23 | NC        |      |                                      |
|    24 | NC        |      |                                      | |    24 | NC        |      |                                      |
-|    26 | LED3      | A51  |                                       +|    26 | LED3      | A51  | Wireless LAN  LED                   
-|    27 | LED1      | B44  |                                       +|    27 | LED1      | B44  | 3G LED                               
-|    28 | (XLNA?)  | A74  | Must have 0 value during bootstrap    |+|    28 | N/A      | A74  | Must have 0 value during bootstrap    |
 +*GPIO_0 can be floating (i.e. resistors removed) during boostrap and the router still boots! //TESTED!!!//
To make the GPIOs available via sysfs, the required ones have to be exported to userspace, as it is explained on a page of the [[http://squidge.sourceforge.net/gpio/|Squidge-Project]]. To make the GPIOs available via sysfs, the required ones have to be exported to userspace, as it is explained on a page of the [[http://squidge.sourceforge.net/gpio/|Squidge-Project]].
-Kernel modules occupying that resource need to be removed before (e.g. "leds-gpio" and "gpio-buttons"). In output-mode, voltage levels of the GPIOs were measured against GND, after the value 1 or 0 had been written to /sys/class/gpio/gpioX/value. In input-mode, the value of the file /sys/class/gpio/gpioX/value was read when the GPIO was floating (initial state), pulled to GND or pulled to Vcc. +\\ 
==== LEDs ==== ==== LEDs ====
How to configure LEDs in general, see the LED section in the [[doc/uci/system]]. How to configure LEDs in general, see the LED section in the [[doc/uci/system]].
-The TL-MR3040 has 4 LEDs:+The TL-MR3040 has 5 LEDs: 
 + 
 +^ LED name      ^ LED color  ^ LED print      ^ Internal name      ^ Trigger        ^  
 +| Power (2 LEDs) | Green/Red  | Power/Charge symbol  | N/A (fixed supply)  | N/A      | 
 +| LAN            | Green      | LAN symbol    | tp-link:green:lan  | ''netdev:eth0'' | 
 +| Wireless LAN  | Green      | WLAN symbol    | tp-link:green:wlan  | ''phy0tpt''    | 
 +| 3G            | Green      | Internet symbol| tp-link:green:3g    | ''USB:1-1''    |\\ 
 + 
 + 
 +==== USB Port ==== 
 +Like other **devices using the ar933x platform**, this model suffers from problems when directly connecting USB 1.1 devices (specified for low speed or full speed; normally serial adapters). These problems can be circumvented by using a (passive) hub between the router and the USB devices. More information in the [[https://forum.openwrt.org/viewtopic.php?id=39956|forum]]. 
 + 
 +**This problem can also be circumvented** by using an external powered USB HUB 2.0 //HIGH-SPEED//. 
 +\\ 
 + 
 +==== Hardware slide switch (v2) ==== 
 +-> [[doc:howto:hardware.buttons]] 
 +The TP-Link TL-MR3040 has a slide switch with three positions: 
 +^ BUTTON ^ Event ^ 
 +| Slide switch | BTN_0 and BTN_1 |  
 +Sample script: [[https://forum.openwrt.org/viewtopic.php?pid=189097#p189097]] 
 + 
 +===== Bootloader Mods ===== 
 +  - you could read about [[doc:techref:bootloader]] in general and about [[doc:techref:bootloader:uboot|Das U-Boot]] in particular. 
 + 
 +==== U-Boot 1.1.4 modification for routers ==== 
 +Forum member [[https://forum.openwrt.org/profile.php?id=72549|pepe2k]] made a modification of **U-Boot 1.1.4** for **Qualcomm Atheros** SoCs based devices (the project is still being developed, so new devices and SoCs will be supported in the future). Up to date information, binary images and sources can be found on official [[https://github.com/pepe2k/u-boot_mod|GitHub repository]].
-^ LED name ^ LED print ^ Internal name ^ Trigger ^  +This modification started from [[http://code.google.com/p/wr703n-uboot-with-web-failsafe/|wr703n-uboot-with-web-failsafe]] project, but supports more devices, all modern web browsers, has a lot of improvements and other modifications (like U-Boot NetConsole, custom commands, overclocking possibilities etc.).
-| Power | Power symbol | N/A (fixed supply) | N/A | +
-| LAN | LAN symbol | tp-link:green:lan | ''netdev:eth0'' | +
-| Wireless LAN | WLAN symbol | tp-link:green:wlan | ''phy0tpt'' | +
-| 3G    | Internet symbol  | tp-link:green:3g| ''USB:1-1'' |+
-==== USB Issue ==== +More information:
-A problem has been detected with the USB interface on the device. When connected to different models of serial adaptor, it functions for a few minutes then fails. This can be resolved by putting a passive hub in-line with the device. Voltage and current testing will be performed to identify why this behaviour occurs.+
-**Edit**: Hi, I also tried with a webcam and make the router reset and even with a passive hub<-webcam also reset. But, then I remember to try with the battery on it(full charged) and doesn't reset, works perfectly, but if I remove the battery it resets again. Also with the USB cable removed and battery on it charged works good! +  * Official repository on GitHub: [[https://github.com/pepe2k/u-boot_mod|U-Boot 1.1.4 modification for routers]] 
-Maybe a power restrictions from USB only?+  * Discussion about this project on [[https://forum.openwrt.org/viewtopic.php?id=43237|OpenWrt forum]] 
 +  * An article (in Polish) about one of the first version of this project on [[http://www.tech-blog.pl/2013/03/29/zmodyfikowany-u-boot-dla-routerow-tp-link-z-atheros-ar9331-z-trybem-aktualizacji-oprogramowania-przez-www-i-konsola-sieciowa-netconsole/|www.tech-blog.pl]]
===== Bootlog ===== ===== Bootlog =====
Line 440: Line 1091:
</p> </p>
</div> </div>
-</HTML>+</HTML>\\ 
===== Resources ===== ===== Resources =====
 +  * Official TP-Link TL-MR3040 [[http://www.tp-link.com/en/products/details/?model=TL-MR3040|Website]]
  * The latest official firmware is available [[http://www.tp-link.com/en/support/download/?model=TL-MR3040|here]]   * The latest official firmware is available [[http://www.tp-link.com/en/support/download/?model=TL-MR3040|here]]
 +  * OEM source code available at: http://www.tp-link.com/resources/gpl/150Router.rar
  * [[http://www.disk91.com/2012/technology/systems/installation-of-a-piratebox-on-t-link-mr3040/|Installation of piratebox on T-Link MR3040]]   * [[http://www.disk91.com/2012/technology/systems/installation-of-a-piratebox-on-t-link-mr3040/|Installation of piratebox on T-Link MR3040]]
-  * Confirmed [[http://www.minipwner.com/|MiniPwner]] working [[http://www.minipwner.com/index.php/forum/4-community-edition-installation/833-minipwner-based-on-tl-mr3040|INFO]]+  * [[http://www.minipwner.com/|MiniPwner]] [[http://www.minipwner.com/index.php/forum/4-community-edition-installation/833-minipwner-based-on-tl-mr3040|confirmed working]] 
 + 
 +  * Althought [[toh:tp-link:TL-MR3020]] and [[toh:tp-link:TL-WR703N]] are ONLY hardware similar, most probably some modifications work, like External Antenna Hack!!! See [[http://minipwner.com/index.php/forum/7-hacks-and-enhancements/1892-mr3040-external-antenna-mod#1892|here]] for one example.\\ 
 + 
 +===== Custom OpenWrt image with LuCi integrated =====
-  * Althought [[toh:tp-link:TL-MR3020]] and [[toh:tp-link:TL-WR703N]] are hardware similar, most probably some modifications work, like External Antenna Hack!!!+http://www.superwrt.eu/en/firmware/tp-link-mr3040/
===== Tags ===== ===== Tags =====
---- ----
-{{tag>FastEthernet 1Port Serial integrated 802.11bgn 1Radio AR9331 ath9k 1Ant 32RAM 4Flash MIPS MIPS32 24k AP121}}+{{tag>FastEthernet 1NIC 1WNIC no_switch Serial integrated 1Ant 1USB 802.11bgn AR9331 ath9k 1Ant 32RAM 4Flash MIPS MIPS32 24k AP121 portable_router rechargeable_battery}}

Back to top

toh/tp-link/tl-mr3040.1361812810.txt.bz2 · Last modified: 2013/02/25 18:20 by doiga