OpenWrt extend wifi to iphone hotspot running ios 11

I just recently installed openwrt 17.01 on tplink tp-mr3420 to function as wifi extender to an iphone ios 11 running hotspot. I set it up by first resetting to default openwrt (long press button), scanning for iphone hotspot (set channel to auto, also tick network wan, wan6 and wwan), then adding new network wifi (which says channel locks to the iphone channel). It works and I can connect to the wifi and use the internet.

Problem is when the iphone apparently turn off the hotspot (sometimes due to cellular changes or device restarts etc). Whenthe hotspot is back on, the openwrt fails to reconnect, even the wifi fails to bring up, can't connect at all. Then currently to solve, need to reset the whole router, and run the configuration again. Question is, is it possible to setup the openwrt to extend my iphone hotspot and make it still connect even when the hotspot is restarted. Many thanks in advance.

:warning:This is a very old version, obsolete and unsupported. It has numerous serious security vulnerabilities and should not be used anymore. This is old enough that many people also won't know/remember how to really help you (much has changed in the 3 major releases since), so don't expect much help here, although you might get a "best effort" response. It is time for you to get a new device that can support 21.02.

This is due to the fact that there is only one radio in your device. If the radio is configured in STA (client) and AP modes simultaneously, the client connection must be created first before the AP mode can come up. That is an unavoidable limitation.

Travelmate was designed to help deal with this situation -- it will attempt to connect to the upstream wifi, and if it fails, it will stop trying and then bring up the wifi in AP mode. I don't recall if this is supported on 17.01, or if your device will have enough space to install it (but either way, see my warning above).

something like this as a script or service maybe

while true
Status=$(ping -q -c 8 -W 5 > /dev/null 2>&1 && echo "ok" || echo "FAIL")
	if [ "$Status" = "ok" ]
	echo "Online"
		ifdown $INTERFACE
		sleep 2
sleep 5