TP-LINK TL-MR3020 + E3372 dongle

Hello,
could you please help me with adding support for USB HiLink LTE dongle (Huawei E3372 150Mbps)?

I have started with flashing MR3020 via original GUI (with lede-17.01.4-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin file). It looks like everything is ok but standard image doesn't support 3G/4G USB modems and it has to be added.
I was trying to follow this link:
https://openwrt.org/docs/guide-user/network/wan/wwan/3gdongle
but when I was installing usb-modeswitch my free space disappeared :-/
Later I have checked on my PC and this donge is present a "Remote NDIS" so maybe I should use that method. There was "How To Use LTE modem in RNDIS mode for WAN connection" and it would be better, I think :wink:

But during mentioned installation I got these messages:

Collected errors:
 * opkg_conf_write_status_files: Couldn't close //usr/lib/opkg/status: No space left on device.
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/usb-modeswitch.list: No space left on device.
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/libusb-1.0.list: No space left on device.

Is it possible to configure this router to have USB 4G dongle for internet access and share it to LAN (printer) and WiFi?
Maybe there are some packages that can be removed in configuration described above to have more space available? At the moment there are:

base-files 	173.1-r3560-79f57e422d
busybox 	1.25.1-4
chat 	2.4.7-12
comgt 	0.32-29
dnsmasq 	2.78-1
firewall 	2017-05-27-a4d98aea-1
iw 	4.9-1
iwinfo 	2016-09-21-fd9e17be-1
kmod-ipt-conntrack 	4.4.92-1
kmod-lib-crc-ccitt 	4.4.92-1
kmod-nf-nat 	4.4.92-1
kmod-pppoe 	4.4.92-1
kmod-pppox 	4.4.92-1
kmod-usb-core 	4.4.92-1
kmod-usb-serial-option 	4.4.92-1
kmod-usb2 	4.4.92-1
libc 	1.1.16-1
libiwinfo 	2016-09-21-fd9e17be-1
libiwinfo-lua 	2016-09-21-fd9e17be-1
libpthread 	1.1.16-1
libubus-lua 	2017-02-18-34c6e818-1
libuci-lua 	2016-07-04-e1bf4356-1
luci-app-firewall 	git-17.290.79498-d3f0685-1
luci-lib-ip 	git-17.290.79498-d3f0685-1
luci-theme-bootstrap 	git-17.290.79498-d3f0685-1
netifd 	2017-01-25-650758b1-1
odhcpd 	2017-10-02-c6f3d5d4-2
opkg 	2017-03-23-1d0263bb-1
procd 	2017-08-08-66be6a23-1
rpcd 	2016-12-03-0577cfc1-1
swconfig 	11
uboot-envtools 	2015.10-1
ubus 	2017-02-18-34c6e818-1
ubusd 	2017-02-18-34c6e818-1

Thank you for any help.

Yes, not at all surprising. The TL-MR3020 falls into the category of low-flash, low-RAM devices that are challenging to impossible to run current firmware on.

https://openwrt.org/supported_devices/432_warning

For your application, I'd suggest purchasing a device with at least 16 MB of flash and 128 MB of memory. There are some out there for around US$20 that sound interesting in the What's your favourite cheap LEDE/OpenWrt device? thread.

I can't recommend any from personal experience (I buy used Archer C7 units for ~US$40) and I'm guessing you're looking for something small and compact. I've looked at the GL.iNet devices (mentioned in post #154) a couple times, but never gotten to the point of getting direct opinions about them from members that use them. The TRENDnet TEW-714TRU is interesting due to its plug-in format, but its 8/32 configuration would be very limiting for me.

https://openwrt.org/docs/guide-user/installation/after.installation#no_space_left_on_device

Ok, but I was hoping to use the one I have.
At the moment I was just a little bit upset because of unstable WiFi etc. so I have decided to give it a try.
I don't have any additional expectations other than doing good what it should do.

Maybe it's time to search for rollback then. I have to restore standard functionality in days which is probably too short to undestand more advanced aproaches :-/

Is the stripped firmware from this site proper to restore original firmware in my MR3020?
http://www.friedzombie.com/tplink-stripped-firmware/

As far as I understand I can "update" via LEDE GUI/website. Is it true?

If it doesn't fit with LuCI Included in an OpenWRT build, it isn't going to fit installing it afterwards as the pre-built images compress the packages and installing afterwards doesn't compress them. A self-built image would be your best hope.

I do have LUCI (website/GUI if I understand it correctly). 3G/4G dongles support is what can't be fitted.
Maybe you are right that with self-built image it could be slightly better but this "machine" seems to be too weak for any fun.
And this should serve family purposes. Maybe I will try on another device later, with more resources and more time. Now I have to restore everything very quick so there is no time to learning and going deeper.

The most important part of learning is now "how to restore it without bricking it" :wink: And I hope to learn it on successful story rather than "don't do that anymore" story :wink:

If you forego LuCI (ssh/command line only), you might be able to fit the dongle support, but otherwise, you will probably need to extroot your config in order to have enough space to run what you want. Either way you'll probably be best suited by building your own image so you can remove the things you're not using and add the ones you want. For the extroot process, you'll actually need to build an image that includes the extroot related packages and omit LuCI (there isn't room for both).

The situation you'll be facing is that you're going to need a USB hub in order to connect a USB flash drive (for the extroot) and still have a port available for the dongle. Most people would do this externally, there are some who have mechanically fit a small hub into the 3020's case.

Also keep in mind that you will likely need a beefier power supply to ensure that you don't have brown-outs with the MR3020 + USB hub + USB thumb drive + USB 3g/4g dongle.

Interesting, I have restored default image of LEDE because "Remove" links next to packages were causing errors and nothing was removed. Then I have installed kmod-usb-net-rndis and usb-modeswitch like described here: https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_rndis
And it fits! :slight_smile: Not much space left but maybe it's all that will be needed? :wink:

Could someone please explain how to configure that 4G stick as WAN?
I have configured my phone as AP so it was possible to use WWAN and download packages.
But when it comes to stick.. I have no idea what to set in LUCI.
I know, that under link above it is probably explained but via ssh and sounds a little bit like magic at the moment :wink:

When I put that dongle into USB port it looks like "enumerated" and LED blinks and finally is permanently on like it is connected to LTE. I have also found new interface "lan1" that can be selected in Interfaces->Add...
But when I select it doesn't work yet. I mean the PC says there is no internet connection.
Should I bridge this lan1 with lan0? :wink: Or what?

In Kernel log there is printed something like that:

[ 2264.645752] usb 1-1: new high-speed USB device number 4 using ehci-platform
[ 2265.267592] usb 1-1: USB disconnect, device number 4
[ 2265.795827] usb 1-1: new high-speed USB device number 5 using ehci-platform
[ 2265.963902] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[ 2265.978151] cdc_ether 1-1:1.0 eth1: kevent 12 may have been dropped
[ 2265.986453] cdc_ether 1-1:1.0 eth1: kevent 11 may have been dropped
[ 2266.001873] cdc_ether 1-1:1.0 eth1: kevent 11 may have been dropped

And in System Log:

Mon May 28 19:31:08 2018 kern.info kernel: [ 2264.645752] usb 1-1: new high-speed USB device number 4 using ehci-platform
Mon May 28 19:31:08 2018 kern.info kernel: [ 2265.267592] usb 1-1: USB disconnect, device number 4
Mon May 28 19:31:09 2018 kern.info kernel: [ 2265.795827] usb 1-1: new high-speed USB device number 5 using ehci-platform
Mon May 28 19:31:09 2018 kern.info kernel: [ 2265.963902] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
Mon May 28 19:31:09 2018 kern.err kernel: [ 2265.978151] cdc_ether 1-1:1.0 eth1: kevent 12 may have been dropped
Mon May 28 19:31:09 2018 kern.err kernel: [ 2265.986453] cdc_ether 1-1:1.0 eth1: kevent 11 may have been dropped
Mon May 28 19:31:09 2018 daemon.notice netifd: Interface 'stick_4G' is enabled
Mon May 28 19:31:09 2018 kern.err kernel: [ 2266.001873] cdc_ether 1-1:1.0 eth1: kevent 11 may have been dropped
Mon May 28 19:31:10 2018 daemon.notice netifd: Network device 'eth1' link is up
Mon May 28 19:31:10 2018 daemon.notice netifd: Interface 'stick_4G' has link connectivity 
Mon May 28 19:31:10 2018 daemon.notice netifd: Interface 'stick_4G' is setting up now
Mon May 28 19:31:10 2018 daemon.notice netifd: stick_4G (3566): udhcpc: started, v1.25.1
Mon May 28 19:31:11 2018 daemon.notice netifd: stick_4G (3566): udhcpc: sending discover
Mon May 28 19:31:11 2018 daemon.notice netifd: stick_4G (3566): udhcpc: sending select for 192.168.8.100
Mon May 28 19:31:11 2018 daemon.notice netifd: stick_4G (3566): udhcpc: lease of 192.168.8.100 obtained, lease time 86400
Mon May 28 19:31:11 2018 daemon.warn dnsmasq[2436]: no servers found in /tmp/resolv.conf.auto, will retry
Mon May 28 19:31:11 2018 daemon.notice netifd: Interface 'stick_4G' is now up
Mon May 28 19:31:11 2018 daemon.info dnsmasq[2436]: reading /tmp/resolv.conf.auto
Mon May 28 19:31:11 2018 daemon.info dnsmasq[2436]: using local addresses only for domain lan
Mon May 28 19:31:11 2018 daemon.info dnsmasq[2436]: using nameserver 192.168.8.1#53
Mon May 28 19:31:11 2018 daemon.info dnsmasq[2436]: using nameserver 192.168.8.1#53
Mon May 28 19:31:12 2018 daemon.info odhcpd[857]: Using a RA lifetime of 0 seconds on br-lan

It is a little bit worrying that there is no message similar to the one from link:

[  847.610000] **rndis_host** 1-1:1.0: no of_node; not parsing pinctrl DT
[  847.620000] **rndis_host** 1-1:1.0 usb0: register 'rndis_host' at usb-101c0000.ehci-1, RNDIS device, 72:4d:eb:bb:e2:60

There is cdc_ether instead. Does it means that this stick is not a RNDIS type?

Ok, I have googled that I should install

kmod-usb-net-cdc-ether

instead of rndis. I wonder if there will be enough space for that :wink:

Hi,

for E3373 Hilink:

  1. install

opkg install usb-modeswitch

  1. change lan ip
    uci set network.lan.ipaddr=192.168.2.1
    uci commit network

  2. install CDC driver
    opkg install kmod-usb-net-cdc-ether

  3. WAN

uci set network.wan.ifname=eth2
uci set network.wan.proto=dhcp
uci commit network
reboot

that works for me: Linksys WRT1200AC + 3373 Hilink + lede David502 build.

1 Like

Ok, thank you. I will try that.
Is usb-modeswitch needed here?
I hope that both packages will fit my limited space.

I have checked your Linksys and I see that you can't complain about available resources :wink:

cdc_ether is the basis for RNDIS. RNDIS depends on cdc_ether. As it appears your device is purely cdc_ether, you can omit RNDIS, but not the other way around.

usb_modeswitch is for older devices. It is generally not needed for 4G modems that operate as cdc_ether or RNDIS. And this seems to be the case here since the cdc_ether driver took control of the modem already.

It appears that interface 'stick_4G' is created and obtains an IP address of 192.168.8.100 from the modem. You should be able to route to this interface (double NAT through the modem's internal router at 192.168.8.1) and have Internet. Your LAN IP must not be in the 192.168.8.X subnet.

It is easy to swap a 16 MB flash chip into most TP-Link devices and not have the 4 MB limitation, though the RAM being only 32 MB still somewhat limits what you can do.

Hello,

many thanks to all of you who are involved in this project. It’s great to see this little router is getting LEDE support.

Also, are there any known compatibility issues when using TL-MR3020(EU) V3.0, this Pulpstone/LEDE FW, Huawei E3372h and LTE FDD B20 (Band20, 800MHz)?

When i connect Huawei E3372h (HiLink) to TL-MR3020 with stock TP-Link FW it keeps dropping internet connection on LTE B20. If I use this combination on LTE B3 coverage (Band3, 1800MHz) all is well.

So I am about returning TL-MR3020 or flasing it to this Pulpstone/LEDE FW.

If I connect E3372h on LTE B20 to PC, Asus RT-N16 (stock FW) or RPi3 (ROOter FW) internet connection works without problems. If i connect E3372h to TP-Link TL-MR3020v3 (stock), TL-MR3220v2 (stock and ROOter) or Asus RT-51U (stock), connections drops after few seconds. When I’m on LTE B3 coverage, all mentioned routers works OK. I tried on different locations with two different mobile operators - situation stays the same.

Thanks for your help!

Ok, it turned out that kmod-usb-net-cdc-ether was already installed with kmod-usb-net-rndis, as @mk24 wrote.
I have connected via SSH because in many sources and even in your comments, configuration is done via text commands and not GUI. But I have to admit that my humble try was without luck :wink: Probably I was doing something wrong :slight_smile:

root@LEDE:~# logread | grep CDC
Mon May 28 19:11:53 2018 kern.info kernel: [ 10.725557] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
root@LEDE:~# set network.wan.ifname=eth1
root@LEDE:~# set network.wan.proto=dhcp
root@LEDE:~# commit network
-ash: commit: not found
root@LEDE:~# uci set network.wan.ifname=eth1
uci: Invalid argument
root@LEDE:~# uci set network.wan.ifname=eth1
uci: Invalid argument

First I realized that I forgot about "uci" but when I finally added it in front of commands I kept getting "Invalid argument" :star_struck: Was that because I haven't defined any interface named "wan"?
So I jumped back to GUI and I have added new Interface WAN pointing to eth1. I have no idea if it has to be WAN or it can work with any other name? Anyway, it works!

One more thing that I would like to set is something like "Connect on demand" for 4G stick. In interface settings I have found a tick with description "Bring up on boot". I assume it enables 4G stick on start and keeps it permanently on.
Is it possible to configure to turn off after some time of being idle (just like in standard firmware)?

LTE On demand? Anyone? :wink:

6 posts were split to a new topic: MR3020 with TP-Link firmware is not detecting the Huawei Dongle E3372

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.