The 5GHz radio connects as a client to the main WiFi router and the 2.4GHz radio extends the main WiFi network as a station.
Now my question: is it possible to enable the station (access point) only if the OpenWrt router is connected to the main router?
...so there is no access point network enabled if the main WiFi is out of reach.
Hi.
I guess you should use a script that test the link to the main router, and enable/disable local wifi according.
Is your question related to security reason? If the main router can't be reached, it will not serve IP by DHCP, so any wifi client should not be able to communicate. You still can set manually an IP of course, but you will only reach the repeater.
Not strictly related to your question but, if you can, use WDS instead of relay (if your devices manage this).
It is suggested in the intro of the relay page.
I have tested both methods and WDS has better performance and easier configuration (no need of extra package). Furthermore you can use the 5GHz for both link to the main router and AP to local clients.
I'm using the same kind of configuration with a main router and a wireless repeater.
Maybe to clearify the setup: the repeater is located in the garden to improve coverage for multiple ESP32 nodes (send and receive data from the internet)
They are kind of on the boarder of the main 2.4GHz WiFi's coverage, sometimes they can connect sometimes not (I guess depends on the vegetation -> winter is much better than rest of the year).
The ESP nodes connect to the strongest network, which would be the OpenWrt repeater, in case they fail to connect, they will go back to sleep. The dilemma is, that if the OpenWrt router is not connected to the main router, the nodes always try to connect to this network...if it wouldnt be enabled in the first place (because the link of the repeater to main router is not up) they could try to connect to the main router.
But I saw same behaviour with my computer, selects the strongest network (repeater) even if there is no link between router and repeater.
I tried travelmate, its great for managing multiple connections as a client.
But it doesnt seem to affect the station status in case travelmate is not connected to any WiFi network.
It came to mind because it can detect the status of upstream connections and can take various actions. But that said, I haven’t tried doing this with travelmate, so I’m not entirely certain that it can be done.