hi i'm using openwrt on a pi4 as a wifi to ethernet bridge
all is working well, except sometimes the wifi connection loses it connection and i have to then go to network > wireless and press "restart" to get it working (even though wifi is showing as connected ok)
is there any way of "restarting the Wifi" automatically if the the connection to the internet is down for say a few mins (or even restarting the router)?
You should change your channel to auto so that it will search for the SSID without issue.
But the radio will only start if the upstream SSID is available. If not, the radio will simply be down, which means that your relayd configuration cannot work fully as intended.
A workaround for managing the device is to make an additional interface with an alias of eth0 (@eth0) and put a non-conflicting address on that interface (ideally it would be a different subnet entirely relative to your upstream/lan and the relayd intermediate interfaces). Add that interface to the lan firewall zone. Then, with a static IP configured on an ethernet connected device, you would be able to reach the Pi for management purposes.
the channel is fixed on the AP hence the static settings
i have luci/ssh access enabled on the wired interface (disabled on the wireless interface, as i only manage the wired side)
what i was thinking was a script i could run that would ssh in and restart the wireless radio automatically if pinging 8.8.8.8 say was down for more then 5 mins?
You’d have to know why the radio went down in the first place. If it is not available, out of range, or really poor signal, starting it again may or may not actually work.
what happens is that occasionally, several times a week, at random times, the connection just stops transmitting packets, even though it is showing as up
when i am at home, its fine to just login to luci and restart, just a pain when i am away from home as i loose remote access to the services i run at home until i return
ok will do, but its a commodity cheapo broadband router i am connecting too which i have no control over, and have a gut feeling error will be at that end
hence the desire to find a quick and dirty solution to my immediate problem