Android Wi-Fi hotspot as WAN fallback

Hello everyone!

First of all a simple little blueprint:

BTS>---air--->ANTENNA>---rj45--->wan_eth1_FRITZ4040/
	/FRITZ4040_switch_eth0>---rj45--->SWITCH>---rj45--->DEVICES
	/FRITZ4040_radio1_wifi5ghz>---wifi--->SMARTPHONE

My ISP's antenna loses visibility to the main BTS with bad weather (rain, snow or even wind).
This happens a lot, sadly...

OTOH, cellular network coverage is always available and pretty stable (and fast).

All my devices are connected via ethernet cable (LAN-side).
Only the smartphone (Android) is connected via 5Ghz WiFi (LAN-side).

I'd like to swap the whole BTS>--->air<---<ANTENNA>---rj45--->wan_eth1_FRITZ4040 "chunk" with Android smartphone's Wi-Fi hotspot, as needed.
Good weather, normal setup >

  • BTS>---air--->ANTENNA>---rj45--->wan_eth1_FRITZ4040

Bad weather, fallback setup >

  • HOTSPOT>---wifi--->wan_radio1_FRITZ4040

Is it possible to create and store a fallback configuration as a file ready to use as needed?
I'd like to manually switch between the normal setup and the fallback one via the LuCi Web Interface from my smartphone.

About the normal setup, my config is pretty standard:

  • DHCP enabled
  • DNS forwarding via upstream resolver [LuCi/DHCP and DNS/General Settings/DNS forwardings]
  • custom WiFi 2,4Ghz_SSID and 5,0Ghz_SSID
  • 1* Port Forwarding rule for 1* DEVICE (LocalIPv4)
  • other settings are defaults, for what I remember

Sorry for not providing other useful infos, not at home ATM.

LOVE&PEACE!!

I'm not sure if I understand correctly but isn't usb tethering not something that can fix your issue? Provided your router has an USB port....

Hey @Falco !!
No, USB is not an option for me, because:

  • FRITZ!Box is installed inside a hidden wall-box behind my couch, therefore it is not conveniently accessible

  • I'd like to easily switch between the two setups from my smartphone (which I always have next to me) or while I'm at the PC

On my personal setup I'm using Android WIFI tethering as I do not have any other option.
This means for you, just setup a new interface that's taking the wifi hotspot and is using this as wan. Add this interface to your firewall wan zone.
Now you have 2 wan interfaces (wan and e.g. wan_wifi).
Depending on what you want to use, just enable/disable one of the wan interfaces.

Be sure to specify a different custom metric for the upstream interfaces.
Then you just need to manually start/stop the interface with the lowest metric.

What do you mean by that? Sorry, I'm a super n00b.
Can you please explain or point me to the relative documentation?

Thanks

Typically with a simple home router there is only one connection to the internet (wan interface). The router has a default route to send all traffic to the connected upstream device like a cable modem or similar. If you have two wan connections, you need to tell the router which one to prefer. This is done by setting a metric which works like a 'cost' lower is preferred.

Within Luci:
To add an additional wifi uplink, like your android phone. Go the Network>Wireless. Click the Scan button for one of your radios. Select the SSID, enter the password. Give the interface a new name like WWAN2.

Next update your metric settings.
Go to network>interfaces Select edit for your WWAN2, go to Advanced Settings Tab. For 'Use Gateway Metric' enter a value of 100. Save, Save & Apply.
Go to network>interfaces Select edit for your interface for Fritz, go to Advanced Settings Tab. For 'Use Gateway Metric' enter a value of 60 Save, Save & Apply.

Go to Status>Routing you should see something like this.

If you check your IP with a connected device you should see that the IP is from the service provider for Fritz.
As a test, unplug your network connection to Fritz. Now that route should no longer be available and the next one, the route thru WWAN2 should be working. Maybe it looks something like this.

Now check your internet IP and it should be your cellular phone carrier.

Reconnect your Fritz and the connection and route should reappear and router status should look like the first image.