OpenWrt Forum Archive

Topic: TP-Link TL-MR3020 Support

The content of this topic has been archived between 16 Jun 2013 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Ok, now things are interesting: it worked just fine on the older (v1.8) MR3020.

I have three MR3020s:

- 2 are v1.9, and were bought less than a month ago.
- 1 is v1.8, bought around March/2014.

I was trying to run it on a brand-new v1.9, and I got all kinds of USB errors. Modem worked randomly, and connection wasn't stable.

Decided to try the same OpenWrt version (BB 14.07) on both. v1.9 still gave errors, v1.8 presented no issues.

I'll try it on the other v1.9 as soon as possible. That may shed some light on the real culprit of the issue - a unit issue or a version issue. (well, unless I was lucky enough to get TWO bad v1.9's...)

Will report back ASAP

There are signs that [some] TP-Link Routers have weak USB power:

http://www.draisberghof.de/usb_modeswit … amp;t=1850
http://www.draisberghof.de/usb_modeswit … amp;t=1191
http://dd-wrt.com/phpBB2/viewtopic.php?p=754966
https://forum.openwrt.org/viewtopic.php?id=43441

Search for "weak" in the above pages.

I think I saw a similar statement here in the openwrt forum, but can't find it any more.

Can you measure the USB voltage with and without load?

(Last edited by tmo26 on 1 Oct 2014, 17:32)

Well, I thought I was fine with the older one, but after being off for a while, got the same errors when I turned it on again:

[   36.860000] usb 1-1: device descriptor read/64, error -145
[   37.090000] usb 1-1: new high-speed USB device number 3 using ehci-platform
[   52.210000] usb 1-1: device descriptor read/64, error -145
[   67.440000] usb 1-1: device descriptor read/64, error -145
[   67.670000] usb 1-1: new high-speed USB device number 4 using ehci-platform
[   78.090000] usb 1-1: device not accepting address 4, error -145
[   78.210000] usb 1-1: new high-speed USB device number 5 using ehci-platform
[   88.630000] usb 1-1: device not accepting address 5, error -145
[   88.630000] hub 1-0:1.0: unable to enumerate USB device on port 1

Seems that, with OpenWRT, I'll have to supply extra power.
edit: weirdly enough, I got the same errors while supplying extra power too! It seems to be something else entirely. What baffles me is that it works with the original firmware without a hiccup.

tmo26, I have a USB power meter at home. Do you want me to measure the voltage that comes out of the PSU or USB port of the router?

(Last edited by john410 on 1 Oct 2014, 23:50)

USB port of the router

I still couldn't do the measurings, as I forgot my USB Power Meter in a friend's house. But I did some testing, and here's what I found out so far:

I can make it connect in LTE mode (blue light), but after a while it drops the connection and, after that, it:

1) only works in EDGE (green light)
2) connect, but doesn't ping a thing. Drops after a while.
3) repeat

To make it work again, I have to plug it in my PC. It opens the Huawei dialer and gets a EDGE signal. I have to go to options, change it from AUTO to LTE. Now it gets LTE signal again. Back to AUTO. Unplug from PC. Plug on the router.

Some extra info:

1) As I said before, I have two MR3020. One runs OpenWRT BB right now, the other runs stock. Modem run without a glitch on stock firmware (140610) for weeks on end.

2) If I try to plug it on the stock modem after getting the connection dropped and the whole EDGE issue on the OpenWRT router, it won't connect on the stock router also. I have to do the trick on my PC to make it work again.

3) After restoring the LTE thing on my PC, if I don't plug it anywhere else but the stock firmware router it works forever, just like it always did.

I've installed ROOter MultiWeb (from http://www.ofmodemsandmen.com) and it worked right out of the box. Two days straight with perfect connection. Even in low signal areas where the EDGE network is used, it switched back to LTE without needing the trick I described before.

Now I want to know what they did to vanilla OpenWRT to make this work, heh.

Hello. I need help.
It was fully functional 3020 v1 with mr3020nv1_en_3_17_2_up_boot(140408) firmaware.
I started flashing openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin via WebUI but something goes wrong. 3020 stopped responding. I expected two reboots but there was no one. After 20 minutes i powered off 3020 and than back on. It boots as usual - almost normally - but does not respond to telnet/ssh/http/ping.
If one looks at LEDs he could say that boot process looks absolutely normal. My wireless clients start seeing wi-fi network "TP-LINK_POCKET_3020_xxxxxx" with proper MAC digits, but when i try to coonect it ask key which i don't know (default is empty, but...). WPS button starts blinking when i press it, but still no connection.
Change "3G/WISP/AP" switch position causes reboot.
I tried to setup dhcp and feeds 3020 - no point.
I can't enter safemode because WPS button does not blinking while booting - it blinks only once.
I've got no serial adapter right now, so is it possible to do something else to revive 3020?
Thank you in advance.

0617 wrote:

Change "3G/WISP/AP" switch position causes reboot.

Which is a clear indication that your MR3020 is not running OpenWrt but is still on the manufacturer's firmware. I would recommend using the reset button and to start over.

metai wrote:
0617 wrote:

Change "3G/WISP/AP" switch position causes reboot.

Which is a clear indication that your MR3020 is not running OpenWrt but is still on the manufacturer's firmware. I would recommend using the reset button and to start over.

You are absolutely right! Thank you alot. Today i just powered it on - and it works!
...
And now it works on OpenWRT!

(Last edited by 0617 on 16 Oct 2014, 15:36)

OpenWRT on the version v1.1 somebody checked it works?

version 12.09 and 14.07 Stable Stable
which of these versions work without problems on the version hardware v1.1?

(Last edited by VecH on 1 Nov 2014, 18:02)

Hi:

I just installed 12.09-RC1 as suggested in 3020 openwrt support page in my MR3020 v1.7 and is working good.
I want now to extroot, but in this same topic, there are posts that indicates that it is possible and there are posts that indicates that because it is a stable release that includes luci, there is not free space left to do an exroot.

¿Can anyone confirm me that it is possible to extroot? I asume I have to install  block-mount kmod-usb-storage kmod-fs-ext4, and format in other computer an USB with an ext3/4 partition and an swap partition

In 12.09-RC1 ¿does the sliding switch have any function?

bye, and thank you

el_ric wrote:

I just installed 12.09-RC1 as suggested in 3020 openwrt support page

A common misunderstanding: The wiki page does not list the recommended but the earliest version that will work. You should definitely go with a stable release, not with an RC or with a trunk build.

I want now to extroot, but in this same topic, there are posts that indicates that it is possible and there are posts that indicates that because it is a stable release that includes luci, there is not free space left to do an exroot.

I haven't tried it myself but yes, it is possible that, ironically, the extroot packages might actually not fit anymore. A complete 14.07 image including LuCI leaves the MR3020 with something like 400 kB of free space. The extroot packages aren't that big, but the ext3/ext4 kernel module takes a huge toll (it's about 213 kB).

However, there's no harm in trying. There's nothing that breaks if the packages don't fit, worst case you'd have to restart configuration.

In 12.09-RC1 ¿does the sliding switch have any function?

Not by default, no.

(Last edited by metai on 24 Nov 2014, 09:28)

Hi:

First, I have to say that I was confused. I downloaded openwrt from the link "Download the latest Attitude Adjustment from here (recommended)", so I ended with "ATTITUDE ADJUSTMENT (12.09, r36088)", which I think is the stable release.

With this, I got

from df

      used             Ava
      212              876

and 13084 K free of ram.

to extroot I had to install kmod-usb-storage (it took 92 K), kmod-fs-ext4 (it took 196 K), and block-mount (it took 136 K).

So it is needed 424 K to extroot. I ended with 452 K free of Flash. I also ended with 11096 K free of ram.


But now, with the extroot (200 M of swap and 3,8 G of rootsf), I have almost 3,3 G to install programs :-)

As far as I know, my 3020 is working good.

(But I maked an mistake, I should have created 200 M of swap, 1 G of extroot and 2 G of /home). I wil fix it tomorrow.




Bye, and thank you for the help

TL-MR3020 / extroot on 3g modem Huawei E173 mSD card slot NOT WORKING PLEASE HELP

Hi all,

I'm facing difficulties at being able to mount my micro SD card embedded in my HUAWEI E173 3G dongle.

I'm not sure what's missing and i hope its not kmod-fs-ext4 because this is a rather huge package...
I've build my image with Image Builder but could not afford kmod-fs-ext4 due to router internal storage contrains..

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2014.11.24 09:54:06 =~=~=~=~=~=~=~=~=~=~=~=

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (14.07, r42625)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# block info
/dev/mtdblock2: UUID="5f8a6de9-857e23d0-223a368f-e4c61888" VERSION="4.0" TYPE="squashfs"
/dev/mtdblock3: TYPE="jffs2"
/dev/sda1: UUID="e7de8034-7061-4f39-9384-318469f79286" LABEL="1.42.6-4493" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# dmesg | grep -E "scsi|usb|sd"
[    4.100000] usbcore: registered new interface driver usbfs
[    4.110000] usbcore: registered new interface driver hub
[    4.110000] usbcore: registered new device driver usb
[    4.200000] usbcore: registered new interface driver usb-storage
[    4.640000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.840000] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.840000] scsi0 : usb-storage 1-1:1.0
[    4.860000] usb-storage 1-1:1.1: USB Mass Storage device detected
[    4.860000] scsi1 : usb-storage 1-1:1.1
[    5.860000] scsi 0:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[    5.880000] scsi 1:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
[    5.890000] sd 1:0:0:0: [sda] Attached SCSI removable disk
[   11.830000] usbcore: registered new interface driver usbserial
[   11.830000] usbcore: registered new interface driver usbserial_generic
[   11.850000] usbserial: USB Serial support registered for generic
[   12.200000] usbcore: registered new interface driver option
[   12.220000] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.580000] usb 1-1: USB disconnect, device number 2
[   21.940000] usb 1-1: new high-speed USB device number 3 using ehci-platform
[   22.110000] usb-storage 1-1:1.0: USB Mass Storage device detected
[   22.120000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[   22.150000] usb-storage 1-1:1.1: USB Mass Storage device detected
[   22.150000] usb-storage 1-1:1.2: USB Mass Storage device detected
[   22.180000] usb-storage 1-1:1.3: USB Mass Storage device detected
[   22.210000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[   22.210000] usb-storage 1-1:1.4: USB Mass Storage device detected
[   22.240000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[   22.270000] usb-storage 1-1:1.5: USB Mass Storage device detected
[   22.280000] scsi7 : usb-storage 1-1:1.5
[   22.300000] usb-storage 1-1:1.6: USB Mass Storage device detected
[   22.310000] scsi8 : usb-storage 1-1:1.6
[   23.280000] scsi 7:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   23.310000] scsi 8:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
[   23.370000] sd 8:0:0:0: [sda] Attached SCSI removable disk
[ 1319.570000] sd 8:0:0:0: [sda] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
[ 1319.570000] sd 8:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1319.590000]  sda: sda1
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# mount -t ext4 /dev/sda1 /mnt/sda1
mount: mounting /dev/sda1 on /mnt/sda1 failed: No such device
root@OpenWrt:~# mount -t ext4 /dev/sda1 /mnt/sda1
mount: mounting /dev/sda1 on /mnt/sda1 failed: Invalid argument
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# block mount
block: /dev/mtdblock3 is already mounted
block: mounting /dev/sda1 (ext4) as /mnt/sda1 failed (-1) - Unknown error -1
root@OpenWrt:~# logread -l 2
Mon Nov 24 08:55:58 2014 user.err syslog: /dev/mtdblock3 is already mounted
Mon Nov 24 08:55:58 2014 user.err syslog: mounting /dev/sda1 (ext4) as /mnt/sda1 failed (-1) - Unknown error -1
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# fdisk -l

Disk /dev/mtdblock0: 128 KiB, 131072 bytes, 256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock1: 1.1 MiB, 1107456 bytes, 2163 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock2: 2.8 MiB, 2889728 bytes, 5644 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock3: 320 KiB, 327680 bytes, 640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock4: 64 KiB, 65536 bytes, 128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock5: 3.8 MiB, 3997696 bytes, 7808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 1.9 GiB, 1967128576 bytes, 3842048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000640d9

Device    Boot Start       End  Blocks  Id System
/dev/sda1        256   3839534 1919639+ 83 Linux

root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# opkg list-installed
base-files - 156-r42625
block-mount - 2014-06-22-e0430f5c62f367e5a8e02755412977b02c3fc45e
busybox - 1.22.1-2
chat - 2.4.7-2
comgt - 0.32-23
dnsmasq - 2.71-4
dropbear - 2014.63-2
fdisk - 2.24.1-1
firewall - 2014-09-19
fstools - 2014-06-22-e0430f5c62f367e5a8e02755412977b02c3fc45e
hostapd-common - 2014-06-03.1-1
iptables - 1.4.21-1
iw - 3.15-1
jshn - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 3.10.49-1-0114c71ed85677c9c1e4911437af4743
kmod-ath - 3.10.49+2014-05-22-1
kmod-ath9k - 3.10.49+2014-05-22-1
kmod-ath9k-common - 3.10.49+2014-05-22-1
kmod-cfg80211 - 3.10.49+2014-05-22-1
kmod-crypto-aes - 3.10.49-1
kmod-crypto-arc4 - 3.10.49-1
kmod-crypto-core - 3.10.49-1
kmod-crypto-hash - 3.10.49-1
kmod-gpio-button-hotplug - 3.10.49-1
kmod-ipt-conntrack - 3.10.49-1
kmod-ipt-core - 3.10.49-1
kmod-ipt-nat - 3.10.49-1
kmod-ipt-nathelper - 3.10.49-1
kmod-ipv6 - 3.10.49-1
kmod-ledtrig-usbdev - 3.10.49-1
kmod-lib-crc-ccitt - 3.10.49-1
kmod-lib-crc16 - 3.10.49-1
kmod-mac80211 - 3.10.49+2014-05-22-1
kmod-nls-base - 3.10.49-1
kmod-ppp - 3.10.49-1
kmod-pppoe - 3.10.49-1
kmod-pppox - 3.10.49-1
kmod-scsi-core - 3.10.49-1
kmod-slhc - 3.10.49-1
kmod-usb-core - 3.10.49-1
kmod-usb-serial - 3.10.49-1
kmod-usb-serial-option - 3.10.49-1
kmod-usb-serial-wwan - 3.10.49-1
kmod-usb-storage - 3.10.49-1
kmod-usb2 - 3.10.49-1
libblkid - 2.24.1-1
libblobmsg-json - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libc - 0.9.33.2-1
libgcc - 4.8-linaro-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 51
libiwinfo-lua - 51
libjson-c - 0.11-2
libjson-script - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
liblua - 5.1.5-1
libnl-tiny - 0.1-3
libpthread - 0.9.33.2-1
librt - 0.9.33.2-1
libubox - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libubus-lua - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
libuci - 2014-04-11.1-1
libuci-lua - 2014-04-11.1-1
libusb-1.0 - 1.0.9-1
libuuid - 2.24.1-1
libxtables - 1.4.21-1
lua - 5.1.5-1
luci - 0.12+svn-r10530-1
luci-app-firewall - 0.12+svn-r10530-1
luci-base - 0.12+svn-r10530-1
luci-lib-nixio - 0.12+svn-r10530-1
luci-mod-admin-full - 0.12+svn-r10530-1
luci-proto-3g - 0.12+svn-r10530-1
luci-proto-ppp - 0.12+svn-r10530-1
luci-theme-bootstrap - 0.12+svn-r10530-1
mtd - 20
netifd - 2014-09-08-46c569989f984226916fec28dd8ef152a664043e
odhcp6c - 2014-08-25-0300fe7589a1701361735ac068e4b57bb1a1896f
odhcpd - 2014-08-23-24452e1e3e9adfd9d8e183db1aa589f77727f5a7
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
ppp - 2.4.7-2
ppp-mod-pppoe - 2.4.7-2
procd - 2014-09-15-c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d
swconfig - 10
uboot-envtools - 2014.04-4
ubox - 2014-09-16-5c45b560bc8c9e13682269ed963a8a4a65959518
ubus - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
ubusd - 2014-09-17-4c4f35cf2230d70b9ddd87638ca911e8a563f2f3
uci - 2014-04-11.1-1
uhttpd - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
uhttpd-mod-ubus - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
usb-modeswitch - 2014-07-18-01ecc3b9764d1dd89cf36ede0a2d98f9adb0cd33
wpad-mini - 2014-06-03.1-1
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# 

Thanks for your help,
regards,
m.

Well, I am new at OpenWrt, so I am not very shure, but I think you need some of the kmod-fs packages, depending on the type of filesesystem you are trying to mount.

But since you are building your own image, may be you could do it without luci to free flash memory (I see in your "list-installed" that it is there), and then install luci in the extroot.

bye, ricardo

Need help with non AP network configuration

Hi:

I am trying to configure my 3020 as a client only. I do not want to use it to provide internet to other machines.
There are some instructions in the web, but that refers to machines with both wan and lan ethernet ports, and as you know, in 3020 there are only a ethernet port. Situation is similar like in unifi ubiquity, and I have read the instructions for that device, but it was no help form me.

I would like my machine to get internet from the wifi interface, and to be able to access other machines in the same wifi net, and be accesed from the other machines.
I would like also to be able to adminsitrate my 3020 both from the wifi interface, or connecting a machine to the ethernet port.
I should be able to adminsitrate my 3020 (from the eth port), both when wifi connection is stablished and when it is not. I should be able to conect by ssh to my 3020 from the eth port, and then ssh from the 3020 to other machines in the wifi net.
the machine I connect through the eth port should get dhcp from the wifi connection. In any case the 3020 should provide dhcp.


This is my configuration:

/etc/config/network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth0 wwan'
    option tnype 'bridge'
    option proto 'static'
    option netmask '255.255.255.0'
    option ipaddr '192.168.1.10'

config interface 'wwan'
    option proto 'dhcp'
    option hostname 'OpenWrt'
    option peerdns '0'
    option dns '8.8.8.8 8.8.4.4'



/etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr 'XX:f3:c1:55:XX:XX'
    option hwmode '11ng'
    option htmode 'HT20'
    list ht_capab 'SHORT-GI-20'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option disabled '0'
    option channel '8'
    option txpower '20'
    option country 'US'

config wifi-iface
    option network 'wwan'
    option ssid 'XXXXXX'
    option encryption 'psk'
    option device 'radio0'
    option mode 'sta'
    option bssid 'XX:23:F8:D9:XX:XX'
    option key 'XxXxXxXxXxX'

Firewall is disabled. With this configuration, I can get internet from the wifi connection, and I can administer my 3020 from other machines in the wifi net. So this is ok. But eth0 has dissapeared, and then i can not connect a machine to my 3020 with eth0.

My eth port dissapears when I bridge eth0 and wwan.

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:176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12816 (12.5 KiB)  TX bytes:12816 (12.5 KiB)

wlan0     Link encap:Ethernet  HWaddr XX:F3:C1:55:XX:XX 
          inet addr:192.168.1.36  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1232 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1642 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:138644 (135.3 KiB)  TX bytes:214151 (209.1 KiB)




¿can anyone explain me what am I doing wrong? ¿why my eth port gets deactivated?.

bye, ricardo

Working /etc/config/network for a DIR-505 in client mode (which uses eth1 i/o eth0 as other routers):

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.33'
        option netmask '255.255.255.0'

config interface 'wwan'
        option proto 'dhcp'

Note that in the above example DHCP via wwan gives an IP in the range 192.168.178.xx, while LAN is 192.168.1.xx, which means: They LAN and WWAN have to be in different subnets.

Question regarding the switch configuration.
Got some trouble with the switch configuration (behaviour of UCI), I used the scripts from jefferyto (00-button) on github. They worked perfectly with AA but on BB the created Symlinks get overwritten when saving the configuration via LUCI and UCI.
Is there a simple way to bring back the old behaviour or do the Script needs to be modified to work again.
Somehow this looks a bit like a bug to me or is this by purpose.

The beauty of that Script was the Symlink to /tmp which pointed back to /etc/config/x depending of the position and the changes where saved there. Mounting or overlaying only two files does not work. A workaround is copying them back when they get changed via cron and diff but there should be an better option, I hope.

dddesign wrote:
novikorisnik wrote:

actually I have idea to start/stop playing the radio stream with one long push, and with one short push to change stations from playlist...and maybe with double click to go back trough playlist smile

buttons activate:
# opkg update
# opkg install kmod-button-hotplug
# mkdir /etc/hotplug.d/button

for WPS button:
add script in this directory:
/etc/hotplug.d/button/01-wps-button:

#!/bin/sh

#logger $BUTTON
#logger $ACTION
#logger $SEEN

if [ $BUTTON = 'wps' ]
then
    if [ $ACTION = 'pressed' ]; then
        # this is a solution to trigger long pushing:
        date +%s > /tmp/pressed
        /usr/bin/button_pressed &
    fi
    if [ $ACTION = 'released' ]; then
        0 > /tmp/pressed
        if [ $SEEN = 0 ]; then
            #here action for short push (eg next song in mpd):
            logger WPS: NEXT
            mpc next
        fi
    fi
fi

and in /usr/bin/ this script:
/usr/bin/button_pressed:

#!/bin/sh
pressed=`cat /tmp/pressed`
action_2="do" # after 2 sec, "do" it or not ""
action_4="do" # after 4 sec, "do" it or not ""
while [ "`cat /tmp/pressed`" -gt 0 ]; do
    now=`date +%s`
    if [ $now = $((pressed+2)) ] && [ $action_2 = "do" ]; then
        action_2="done"
        #action here (eg play/pause mpd):
        #use it carefully: this actions execute after 2s pressed button, there is no release necessary.
        if [ "$(mpc | grep play)" = "" ]; then
            logger WPS: play
            mpc play
        else
            logger WPS: pause
            mpc pause
        fi
    fi
    if [ $now = $((pressed+4)) ] && [ $action_4 = "do" ]; then
        action_4="done"
        #action here (eg play/pause replay)
        #if the button is still pressed, after the actions before (2sec), following actions execute in addtion
        #use it carefully, these actions are execute after 4s pressed button, no release necessary
        logger WPS: replay
        mpc pause
        mpc play
    fi
done
rm /tmp/pressed

for SLIDER add this script in /etc/hotplug.d
/etc/hotplug.d/button/02-slider:

#!/bin/sh
sleep 1
#logger "log: $BUTTON -- $ACTION"

if [ $ACTION == "released" ] ; then
    if [ $BUTTON == "BTN_1" ] ; then  
        logger "Slider 3G"
        #some actions here
        
    elif [ $BUTTON == "BTN_0" ] && grep -qe "sw1.*in  lo" /sys/kernel/debug/gpio; then
        logger "Slider WISP"
        #some action here

    fi
elif [ $BUTTON == "BTN_0" ] || [ $BUTTON == "BTN_0" ] ; 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

if you want to execute SLIDER scripts while/after booting add this script:
/etc/init.d/button_slider

#!/bin/sh /etc/rc.common

START=19
boot() {
    if grep -qe "sw2.*in  hi" /sys/kernel/debug/gpio ; then
        if grep -qe "sw1.*in  hi" /sys/kernel/debug/gpio ; then
            # AP
            logger AP
            #action here:

        else
            # WISP
            logger WISP
            #action here:

        fi
    else
        # 3G
        logger 3G
        #action here:

    fi
}

and enable it:
# /etc/init.d/button_slider enable

don't forget to make all script executable.

if you find a solution for double-press, let me know.
j

Could this be used to enable/disable a second wifi network. I have one where there are two networks on the same radio0 device, one is a client and the other is an AP. My problem with it is if my client wireless is out of range of its AP the second network will not show up either unless I disable the client manually. To do that I have to connect an ethernet which is inconvenient when I only have my phone. I've seen this done to disable wifi by device but not just by network...

mrdarkdragone wrote:

Could this be used to enable/disable a second wifi network. (...) I've seen this done to disable wifi by device but not just by network...

Yes, most if not all of the wifi enable/disable scripts disable a device, but they can just as easily be modified to enable/disable an interface. Substitute

wireless.device.disable

with

wireless.@wifi-iface[x].disable

where x is the number of the interface you want to disable (interfaces have no identifier, so they must be adressed by their number). For example

uci set wireless.@wifi-iface[1].disabled=1

disables the second wifi-iface.

(Last edited by metai on 25 Dec 2014, 17:21)

metai wrote:
mrdarkdragone wrote:

Could this be used to enable/disable a second wifi network. (...) I've seen this done to disable wifi by device but not just by network...

Yes, most if not all of the wifi enable/disable scripts disable a device, but they can just as easily be modified to enable/disable an interface. Substitute

wireless.device.disable

with

wireless.@wifi-iface[x].disable

where x is the number of the interface you want to disable (interfaces have no identifier, so they must be adressed by their number). For example

uci set wireless.@wifi-iface[1].disabled=1

disables the second wifi-iface.

ah ok, thanks, I had found the uci commands to do so but it seems the script doesn't run or something, i can see in the logread the buttons work but I dont see the code and the interface still remains enabled. I even put it the uci commit wireless in as well.

Quick n00b question- I searched this thread but could not see any mention of the question;

I presume it's not possible to set up the TP-Link TL-MR3020 as a USB client (so that it can serve as a USB Eth/Wi-fi adaptor for a laptop) instead of host?

I'm saying this because I believe that the Mini USB port is for power only and the type-A USB socket is, of course, a USB host, not client. Reverse tethering works for smartphones, but that's still serving as a USB host to the smartphone.

Does anybody know?

Thanks in advance.

ScreamingPict wrote:

Quick n00b question- I searched this thread but could not see any mention of the question;

I presume it's not possible to set up the TP-Link TL-MR3020 as a USB client (so that it can serve as a USB Eth/Wi-fi adaptor for a laptop) instead of host?

I'm saying this because I believe that the Mini USB port is for power only and the type-A USB socket is, of course, a USB host, not client. Reverse tethering works for smartphones, but that's still serving as a USB host to the smartphone.

Does anybody know?

Thanks in advance.


You are correct the mini usb is power only and is not wired in any way to be able to act as a usable data usb port.

maybe something like this will work: if there are working drivers... : http://www.ebay.com/bhp/usb-to-usb-transfer-cable

I am trying to add an USB WIFI device to the TL-MR3020 without success. lsusb show the device as :
Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
but it does not show up with ifconfig, and I do not know how to add it or enable it so that I can configure the interface.

I want to use the USB WIFI to connect to the internet when ethernet is not available.

Model    TP-Link TL-MR3020 v1
Firmware Version    OpenWrt Barrier Breaker 14.07 / LuCI Trunk (0.12+svn-r10530)
Kernel Version    3.10.49

Any help would be most appreciated.

yoyellow wrote:

You are correct the mini usb is power only and is not wired in any way to be able to act as a usable data usb port.

maybe something like this will work: if there are working drivers... : http://www.ebay.com/bhp/usb-to-usb-transfer-cable

Yoyellow- thanks. That confirms my thoughts. Guess I should go back to using my Asus WL-330NUL, or rather I would if the USB was still working on that!

I am about to flash mr3020.

In which position must the switch be to flash Openwrt, 3G/4G,WISP or AP?

Tnx