Using mobile hotspot as WAN backup-line

I find it very valuable if I could use my tethering-WIFI on a mobile phone as a WAN backup line.
I'm able to connect my LEDE router to my phone and my network client can now access the internet :slight_smile:
But if the clients connect to my LEDE router using WIFI, I do get a significant performance decline compared to connecting one of the client directly to my phone's tethering WIFI.

Any solution for this?

My setup:

My network config file:

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

config globals 'globals'
option ula_prefix 'fd26:1d7b:e57e::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config device 'wan_dev'
option name 'eth0.2'
option macaddr '84:16:f9:66:62:11'

config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 0t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 0t'

config interface 'MobileWAN'
option proto 'dhcp'

My wireless config file:

 config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/qca956x_wmac'
option htmode 'HT40'
    option noscan '1'
option country 'DK'
option channel '5'
option disabled '0'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option ssid 'LEDE'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'xxxxxxxxxx'

config wifi-iface
option device 'radio0'
option network 'MobileWAN'
option ssid 'BW-Mobil'
option mode 'sta'

option encryption 'psk2'
option bssid '02:1A:11:F4:66:4C'
option key 'xxxxxxxxxx'

Benchmark:
Client connected to router by LAN:
WAN on router connected to tethering-wifi on mobile:
Speeedtest: 18ms, DOWN: 32Mbs UP:36Mbs

Client connected to router by WIFI:
WAN on router connected to tethering-wifi on mobile:
Speedtest: 21ms, DOWN: 18Mbs UP: 18Mbs

wifi to wifi speed in your config is probably suffering from mode-switching (sta/ap) and buffering due to using the same wifi device.

you might check if your phone tethering-wifi uses the same channel as the ap (6 in your pic, 5 in your config ... dunno). channel switching will also make it worse with one radio.

better options include:

  • connect your phone via usb and use usb-tethering
  • buy a dedicated wwan-usb stick and put in your router
  • use a second radio in your router and have the tethering-wifi and client-network on different channels

Can you tell us what router you're using and wireless driver.

Router: TL-WR1043N v4.
I didn't even think about using USB connection.....didn't think it would be possible, but I now see I'm wrong. I'll give it try!

FYI: I actually tried to use two routers connected by lan-to-lan.
Connected client to router1 and phone to router2, but still the performance it not what I expected.
But nevermind.....USB might be to go :slight_smile:

I installed these packages "kmod-usb-net" and "kmod-usb-net-rndis" and enabled USB tethering on my phone (Motorola Moto G4+)
USB0 device is now visible in LuCI

I assigned it to the WAN interface and I was up and running :slight_smile:
And I don't even need a PSU for the phone :stuck_out_tongue:


Client connection to router by WIFI


Client connection to router by LAN

I now got a pretty good performance....good enough as a disaster backup option :slight_smile:

1 Like