TL-MR3020 Internet Access at LAN & WLAN?

Hi,

I have an old small TP-Link TL-MR3020 V1 Travel Router with a ZTE MF833U1 USB LTE Stick. I know that these routers are to old and not recommended for Openwrt 18.06 or later in due to less memory 4MB / 32 MB RAM but this is ok for me. Installed firmware version 17.01.7 from this URL and the following packages:

https://downloads.openwrt.org/releases/17.01.7/targets/ar71xx/generic/lede-17.01.7-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin

LAN interface is configured with a static IP 192.168.100.1
LEDE WLAN AP interface is enabled and started.

opkg update
opkg install kmod-usb-net-cdc-ether usb-modeswitch

and then I createed the following "lte" WAN interface

vi /etc/config/network

config interface 'lte'
option ifname 'usb0'
option proto 'dhcp'
option metric '100'

The USB LTE Stick is detected by the driver as eth1 interface. When I replug the stick in usb port and enable the lte interface it get's a 192.168.0.178 IP address with default route IP 192.168.0.1

Then I added the lte interface to the wan firewall zone.

Internet Access is available only to LEDE WLAN connected Clients. They get dhcp addresses from 192.168.0.0/24 Scope. I like to get internet access with the LAN interface too but it is in 192.168.100.0/24 network and cannot reach the default router (LTE USB Stick) on 192.168.0.1

I believe that I have the double NAT problem. How can I get Internet Access with WLAN connected Clients and for example, a notebook that is connected with a cable to the LAN port of the TL-MR3020 router ? Adding the LAN interface to the wan firewall zone is not an option because I lost access to the luci web interface on http://192.168.100.1 and have to go into recovery mode and reset the complete configuration with firstboot && reboot now.

Who can help ?

Regards,
Frank

It seems like you have 2 options:

  • Just bridge everything together and call it LAN. The obvious disadvantage is management and everything available from LTE side, though it still should not be accessible from internet as it is behind another router.
  • Bridge ethernet and wifi together and call it LAN, move LTE to WAN, then you'll make 3020 act as proper router and have double NAT, but as long as you do not need to forward ports should not be too much of an issue.

Also modern OpenWRT can run on this thing, just need extroot for which theoretically microSD slot on LTE stick (if it has one) can be used:

1 Like

Hi,

thank you for your quick answer. I will try extraroot with a newer openwrt release. Can you tell me where I can get a 22.03 factory image that is pepared for extraroot installation, a tiny Image with only the needed packages for installation? Have found a 19.x image and flashed it, installed extraroot but this image has problems with his user defined repository and cannot install packages due to key and dependency problems :unamused:

I installed an openwrt image builder on a virtual host and downloaded an openwrt 19.x image but I don't find a profile for my tr-ml3020. This profile is only available up to release 17.x image builder. How can I create the same Profile like 17.x in openwrt 19.x Image builder (FAQ or something else helpful) ?

The factory Images that I create are up to 8 MB and don't fit the tl-mr3020 boot partition

Regards,
Frank

First of all you do not strictly need new version, it could probably work with old one too, even if potentially insecure.

If you want new one though - it might be somewhat tricky. You can get image builder from here and it should contain mr3020 profile. You can then build very minimal image sufficient to boot and create extroot configuration, but the issue is - "tiny" images have swap support disabled in kernel, and running 22.03 on 32MB RAM without swap would not be a good idea. Not sure that opkg or luci would work at all, for example...

Because of that i had to compile it from source, basically follow this instructions and if you are familiar with linux it should not be too hard:

The only thing that needs to be changed is you have to enable swap. If you want extra packages you probably want to enable them as modules so that they get compiled, because with custom kernel you are not going to be able to install kernel modules from regular 22.03 repository and because of this will not be able to install any packages which have modules in dependencies.

I've built the image like this:

make image PROFILE="tplink_tl-mr3020-v1" PACKAGES="-odhcp6c -ip6tables -odhcpd-ipv6only -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppox -kmod-pppoe -kmod-ipv6 -kmod-ip6tables -iwinfo -libiwinfo -libiwinfo-data -iw -hostapd-common -wpad-basic-wolfssl -wpad -dnsmasq -wireless-regdb -kmod-mac80211 -kmod-cfg80211 -kmod-ath9k -kmod-ath9k-common -firewall4 -nftables-json -nftables -kmod-nft-core -kmod-nft-nat -kmod-nft-offload -kmod-nf-conntrack -kmod-nf-conntrack6 -kmod-nf-flow -kmod-nf-log -kmod-nf-log6 -kmod-nf-nat -kmod-nf-reject -kmod-nf-reject6 -kmod-nfnetlink block-mount kmod-fs-ext4 kmod-usb-storage kmod-usb-ohci kmod-usb-uhci -ca-bundle"

This provides sufficiently small bootable image with everything needed for extroot apart from fs/partitioning tools, so flash drive/card has to be partitioned/formatted on another linux system. After extroot and swap is configured just install what's needed.

Would i recommend 22.03 on mr3020v1 for practical use? Well, it works for me, it is stable and delivers expected performance. It uses swap, especially if you actively use luci or/and opkg, so not sure about longevity. Luci is also somewhat slow, which is understandable, but not a huge issue.

Also if you are willing to run stuff made by random people on the internet i suppose i could give you my image along with the packages...

The 32 MB RAM will be a real problem on 22.03 because several services now run wrapped in an instance of ujail, which takes quite a bit of RAM.

Consider buying one of the GL-inet mini travel routers, which are the same form factor as an MR3020 with a lot larger memory.

1 Like

Hi

you say: "The only thing that needs to be changed is you have to enable swap. If you want extra packages you probably want to enable them as modules so that they get compiled..."

Can you tell me how to do that? When I change into the openwrt-imagebuilder-22.03.0-ath79-tiny.Linux-x86_64$ directory and try to do a make menuconfig to set the compile options then I get

make: *** No rule to make target 'menuconfig'.  Stop.

make help has only this options

Available Commands:
        help:   This help text
        info:   Show a list of available target profiles
        clean:  Remove images and temporary build files
        image:  Build an image (see below for more information).

How can I set the swap space kernel options in the openwrt build image ?

Regards,
Frank

That's what i was talking about. Image builder uses precompiled packages, you can not change kernel options there.

You need to download sources and compile from them, there you will be able to change kernel options.

Wiki page about build system usage has steps how to download sources right in the beginning.

Hi,

I tried to compile it from the source with profile settings for tl-mr3020v1 and swap support , set it with make menuconfig but the build images are more than 5 MB in size. Don't want to flash such an image maybe it will brick the router.

Thought that make menuconfig is set the right options for a tiny image size lower than 4 MB that will fit the small flash space of this device. What is wrong here?

Regards,
Frank

It probably packed image builder too, simple solution would be to use that and make image with a bunch of packages excluded.

Otherwise you'd need to tweak the config to exclude the same packages from image before compiling, because you have to exclude a lot of packages both present by default in "tiny" and added by specific device profile (wireless drivers).

You also need to include a few extra packages for usb storage and ext4 support.

I've built my image using this:

make image PROFILE="tplink_tl-mr3020-v1" PACKAGES="-odhcp6c -ip6tables -odhcpd-ipv6only -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppox -kmod-pppoe -kmod-ipv6 -kmod-ip6tables -iwinfo -libiwinfo -libiwinfo-data -iw -hostapd-common -wpad-basic-wolfssl -wpad -dnsmasq -wireless-regdb -kmod-mac80211 -kmod-cfg80211 -kmod-ath9k -kmod-ath9k-common -firewall4 -nftables-json -nftables -kmod-nft-core -kmod-nft-nat -kmod-nft-offload -kmod-nf-conntrack -kmod-nf-conntrack6 -kmod-nf-flow -kmod-nf-log -kmod-nf-log6 -kmod-nf-nat -kmod-nf-reject -kmod-nf-reject6 -kmod-nfnetlink block-mount kmod-fs-ext4 kmod-usb-storage kmod-usb-ohci kmod-usb-uhci -ca-bundle"

what do you mean with "It probably packed image builder too, simple solution would be to use that and make image with a bunch of packages excluded"

when I build it from a source then the image builder is also compiled ? where can I find it in the build from the sources?
For me it would be ok when I compile a kernel wirth make menuconfig, enabled swap space and get an openwrt image builder that can create an image with

"make image PROFILE="tplink_tl-mr3020-v1" PACKAGES="-odhcp6c -ip6tables -odhcpd-ipv6only ........."

How can I get this from the soure building image creation tool? Hope that I understand it right ? :wink:

There is an option in configuration (when you do "make menuconfig") to build image builder, and it should be enabled by default. It should be right next to the images themselves in archive similar to those you can download.

Copy it somewhere, unpack and use as usual, just be aware that if you want any kernel modules you should compile them too, ones from official repos will not work.

It is more convenient this way anyway. Compiling takes time, making images with image builder is near instant - much faster/easier to experiment with...

Yes, I understand that compiling takes much more time but I have another problem when I want to compile in Swap support. If you change only one option in make menuconfig kerneloptions, than you cannot load additional modules from the official repositorys like

https://downloads.openwrt.org/releases/19.07.10/targets/ar71xx/tiny/packages/

this becomes a problem even if you change only one kernel option like "enable swap support"
you will run into this problem:

Installing openvpn-openssl (2.4.5-4.2) to root...
Downloading http://downloads.openwrt.org/releases/19.07.10/packages/x86_64/base/openvpn-openssl_2.4.5-4.2_x86_64.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for openvpn-openssl:
 * 	kernel (= 4.14.131-1-7f44b66739e15d9ee98957787ab1e200)
 * opkg_install_cmd: Cannot install package openvpn-openssl.

if you leave the kernel module options at default then the build image is able to load all additional options that you need. This is due to the vermagic value https://hamy.io/post/0015/how-to-compile-openwrt-and-still-use-the-official-repository

I tried this with no luck, especially to get extraroot for this device. Every time I change the kernel swap support to enabled, the modules will not load after build or the build stopped in the middle with an error message. Extraroot was only available one time after the first boot. When I cut of the power of the tr-ml3020 and reboot the device, extraroot was not loaded again. useless feature.

Don't wan't to spend more time and used the openwrt image builder with a tiny image setup for my tr-ml3020 without swap support and it's so far ok for me.