Has anyone already solved "If Wi-Fi connection is lost, try to get it back"?

I have noticed over the years that sometimes if a Mac is only connected to Wi-Fi (and not wired Ethernet), the connection can "drop".

When I go to the Mac, I can see the Wi-Fi / AirPort signal in the menu bar, but the lines are grey instead of black.

It seems like at least 95% of the time, this can be fixed by turning Wi-Fi off, counting to ¿5?, and then turning Wi-Fi back on.

This seems ripe for Keyboard Maestro automation, but before I reinvent the Keyboard Maestro wheel, I wondered if someone had already tackled this one.

(To be honest, I thought I had written a macro to take care of this, but I don't seem to find it now, which is odd. It's also possible that it didn't work for some reason and I deleted it.)

So there are two steps to this;

  1. Trigger based on loss of WiFi.
  2. Reconnect.

I’ve no idea how to do either but it strikes me Step 1 is the difficult one.

(I have a similar problem called “occasionally I’m connected to the wrong WiFi” - which might be amenable to similar treatment.)

Well, there is this…

Screen Shot 2020-08-07 at 4.11.07 AM

  • This wireless network
  • any wireless network
  • is disconnected

I wonder if the best thing to do is just have Keyboard Maestro turn off the Wi-Fi for 10 seconds and then turn it back on. That would probably cover most cases.

As for yours… I assume there's a reason that you don't just tell your Mac to forget the network that is the "wrong" one…

But you could have Keyboard Maestro tell you when you are connected to that Wi-Fi network, and maybe prompt you to do something about it?

2 Likes

Well, the "wrong" wifi is a valid one - Router "D" hangs off the back of cr*ppy-router/modem "G" - via Ethernet. Sometimes Mac connects to "G" instead of the more powerful "D". I would want to detect that condition and try to fall back to "D". But occasionally I need to use "G" - like if "D" fails in some way.

But thanks for telling me of the trigger.