User Tools

Site Tools


toh:tp-link:tl-mr3040

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
toh:tp-link:tl-mr3040 [2014/08/08 15:08]
aind
toh:tp-link:tl-mr3040 [2015/03/01 08:02] (current)
svenno [Version 1.0] Fixed a Link
Line 10: Line 10:
 | v2.2          | October 2013|  | Confirmed working on v2.2 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 |  | | v2.3          | 2014        |  | Confirmed working on v2.3 hardware |  |
 +| v2.4          | Dec 2014    | Barrier Breaker | Confirmed working on v2.4 hardware | B.A.T.M.A.N. -adv also supported|
 ===== Hardware Highlights ===== ===== Hardware Highlights =====
 ^  CPU                  ^  Ram   ​^ ​ Flash  ^  Network ​  ​^ ​ USB   ​^ ​ Serial ^  JTag  ^ ^  CPU                  ^  Ram   ​^ ​ Flash  ^  Network ​  ​^ ​ USB   ​^ ​ Serial ^  JTag  ^
Line 35: Line 35:
 ===== Installation ===== ===== Installation =====
 ==== Version 1.0 ==== ==== Version 1.0 ====
- +  ​* Download the Barrier Breaker ​stable release from [[http://​downloads.openwrt.org/​barrier_breaker/14.07/​ar71xx/​generic/​openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin|here]]
-So you can either download a daily-built snapshot or build your own from sources. +
- +
-  ​* 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) +
- +
-{{:​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) ===
Line 54: Line 48:
   * 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.
   * By default the server is set to 192.168.0.100,​ you can check detail by '​printenv'​   * By default the server is set to 192.168.0.100,​ you can check detail by '​printenv'​
-  * The serial layout is **p1**: ->​[[toh:​tp-link:​tl-mr3040#​serial.console]]+  * The serial layout is **p1**: ->​[[toh:​tp-link:​tl-mr3040#​serial_console]]
   * Setup serial console 115200 8n1, for example: **screen /​dev/​ttyUSB0 115200 ixoff**   * Setup serial console 115200 8n1, for example: **screen /​dev/​ttyUSB0 115200 ixoff**
  
Line 95: Line 89:
  
 ==== Version 2.x ==== ==== Version 2.x ====
 +  * Download the Barrier Breaker stable release from [[http://​downloads.openwrt.org/​barrier_breaker/​14.07/​ar71xx/​generic/​openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin|here]]
  
-  * 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. 
  
 === Method Using Web GUI (Recommended) === === 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+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/​barrier_breaker/14.07/ar71xx/generic/​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 === === 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**.+Same as for v1.0, **but remember to use the v2 firmware image ([[http://​downloads.openwrt.org/​barrier_breaker/14.07/ar71xx/generic/​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 ==== ==== Upgrading OpenWrt ====
Line 166: Line 158:
  
 ===== Original Flash Layout ===== ===== 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:+Please read the article [[doc:​techref:​flash.layout|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 ​          ​^^^^^^ ^   ​TP-Link MR3040 ​ Flash Layout stock firmware ​          ​^^^^^^
Line 809: Line 801:
  
  
-^  GPIO  ^ Available ^  AR9331 Pin ^  Description ​                   ^ +^  GPIO  ^ Available ^  AR9331 Pin ^  Description ​                   ​^ desc.(tested on a V2 board) ​^  
-|      0 | R8        | A78   | Must have 0 value during bootstrap* ​   |  +|      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 | SPI_CS_0 ​ | B49   | Used by SPI Flash                     | +|      2 | SPI_CS_0 ​ | B49   | Used by SPI Flash                     ​| ​                  
-|      3 | SPI_CLK ​  | B51   | Used by SPI Flash                     |+|      3 | SPI_CLK ​  | B51   | Used by SPI Flash                     ​| ​                  ​
 |      4 | SPI_MOSI ​ | B50   | Used by SPI Flash                     | |      4 | SPI_MOSI ​ | B50   | Used by SPI Flash                     |
 |      5 | SPI_MISO ​ | A57   | Used by SPI Flash                     | |      5 | SPI_MISO ​ | A57   | Used by SPI Flash                     |
Line 829: Line 821:
 |     17 | LED2      | B64   | LAN LED                               | |     17 | LED2      | B64   | LAN LED                               |
 |     18 | USB_POWER | A28   | Control USB Host Power                | |     18 | USB_POWER | A28   | Control USB Host Power                |
-|     19 | NC        |       ​| ​                                      |  +|     19 | NC        |       ​| ​                                      | slide switch partA 
-|     20 | R15       | A27   | **unused** Pulled to ground ​          |+|     20 | R15       | A27   | **unused** Pulled to ground ​          | slide switch partB |
 |     21 | NC        |       ​| ​                                      | |     21 | NC        |       ​| ​                                      |
 |     22 | NC        |       ​| ​                                      | |     22 | NC        |       ​| ​                                      |
Line 840: Line 832:
  
 *GPIO_0 can be floating (i.e. resistors removed) during boostrap and the router still boots! //​TESTED!!!//​ *GPIO_0 can be floating (i.e. resistors removed) during boostrap and the router still boots! //​TESTED!!!//​
 +
 +**how to use GPIO 19,20**\\
 +  * R27 & R17 are 10k pullup resistors, should be desoldered in order to use GPIO19,20 as output
 +  * if you don't want to desolder the switch, then disassemble it, and solder a pin header on the solder side of pcb
 +  * truth table for slide sw1 and slide sw 2 \\
 +
 +^pin 19  ^ pin 20    ^ sw state  ^ 
 +|     ​0 ​ |      1    | 3G/4G     ​| ​   ​
 +|     ​1 ​ |      0    |  WISP     |
 +|     ​1 ​ |       ​1 ​  ​| ​  ​AP ​     |
 + \\
 +
  
 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]].
Line 868: Line 872:
 ^ BUTTON ^ Event ^ ^ BUTTON ^ Event ^
 | Slide switch | BTN_0 and BTN_1 |  | Slide switch | BTN_0 and BTN_1 | 
 +
 +The three postitions are labeld with "​3G/​4G",​ "​WISP"​ and "​AP"​.
 +
 Sample script: [[https://​forum.openwrt.org/​viewtopic.php?​pid=189097#​p189097]] Sample script: [[https://​forum.openwrt.org/​viewtopic.php?​pid=189097#​p189097]]
 +
 +<​code>​mkdir -p /​etc/​hotplug.d/​button</​code>​
 +
 +<​code>​vi /​etc/​hotplug.d/​button/​10-slider</​code>​
 +
 +<​code>​
 +#!/bin/sh
 +sleep 1
 +logger "log: $BUTTON -- $ACTION"​
 +
 +if [ $ACTION == "​released"​ ] ; then
 + if [ $BUTTON == "​BTN_1"​ ] ; then
 + logger "​Slider WISP"
 + #some actions here
 + elif [ $BUTTON == "​BTN_0"​ ] && grep -qe "​sw1.*in ​ lo" /​sys/​kernel/​debug/​gpio ; then
 + logger "​Slider 3G 4G"
 + #some action here
 + fi
 +elif [ $BUTTON == "​BTN_0"​ ] || [ $BUTTON == "​BTN_1"​ ] ; then
 + if grep -qe "​sw1.*in ​ hi" /​sys/​kernel/​debug/​gpio ; then
 + if grep -qe "​sw2.*in ​ hi" /​sys/​kernel/​debug/​gpio ; then
 + logger "​Slider AP"
 + #some action here
 + fi                  ​
 + fi
 +fi
 +</​code>​
  
 ===== Bootloader Mods ===== ===== Bootloader Mods =====
toh/tp-link/tl-mr3040.1407503316.txt.bz2 · Last modified: 2014/08/08 15:08 by aind