WiFi repeater: enable station only if connected to main router

Hi,
I want to use my TP-Link Archer C7 as a repeater to extend the coverage of my main WiFi router.

I did it according to https://openwrt.org/docs/guide-user/network/wifi/relay_configuration and it just works fine.

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.

Thanks!

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.

Thanks badulesia for your reply!

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.

Fun fact I'm also using the repeater in a garden (for young people needing some privacy from their old folks :kissing_closed_eyes:)

Indeed it's more tricky that it seems. My guess is that you need a script. Try these threads.

2 Likes

Haha, thanks for pointing me to these threads

1 Like

Take a look at travelmate.

1 Like

Interesting, I'll be in a need of such case in a few months. I have already considered bringing my own router. Thank you.

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.

@psherman could you please elaborate how to use travelmate in this scenario

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.