I figure this is the best place to ask. Many IOT devices need to be connected to a network, and sometimes require Internet access, but not 100% of the time. Usually it's fine to just connect them to your WiFi network and be done with it. As a user of mobile Hotspot, I don't use broadband. Is there a way to have a continuous wireless network while I'm away with my phone, then allow the phone to connect and provide its Internet connection?
It would be relatively easy to build something to do what you want.
A Raspberry Pi 3 with a extra WiFi USB dongle should be enough.
Set the Pi up with hostapd to act as a WiFi Hotspot using the built in WiFi adapter. It should probably also run something like dnsmasq to provide DHCP and DNS caching/forwarding.
Then set up the extra USB WiFi adapter to connect to the phone's WiFi hotspot.
Set up the Pi to act as a NAT gateway for any traffic on it's own hostspot and have a default route via the phone.
This should automatically connect to the phone when it's in range allowing access to the wider Internet while also providing a local always on LAN for devices while you are away.
(It is technically possible to do this all with just the build in WiFi adapter, but it's easier and you will get better through put with 2 adapters)
Of course this does mean that a lot of the benfits of most consumer IoT devices will be lost, as you will not be able to control any devices while away from home or receive alerts from them as they will have not connection.
This is certainly possible with a single consumer-grade wireless access point/router. Most have the ability to act in client mode, where the device's wireless card runs in managed mode and it connects to an existing wireless network. This network can then be bridged to the Ethernet switch and/or another wireless network that it hosts in master mode. The particular configuration will depend on the exact interface.
If the default firmware doesn't provide simultaneous client/master functionality, custom firmware likely will.
You will have to decide how you will want parts of the network to operate. If you run a DHCP server on both the phone (probably not able to turn off) and the access point, you would need it to act as a router instead of just bridging it. If the access point is just bridged, the entire network will rely on the phone providing DHCP, and devices might not be able to reconnect when the phone is not present unless they have a static address.
You could also accomplish the same with two access points connected via Ethernet cable. One could act as a client; the other as a master. You would just need to make