4

In the area where I live there are frequent power outages for a few seconds. I am connected via a router, which (of course) restarts each time. Unfortunately my Mac (2011 MB Pro) does not automatically reconnect to the WiFi after the router has restarted and I have to manually reselect the network.

Allan's answer below provided a temporary solution by simply trashing the airport preferences. Unfortunately this solution only worked for a short time and now my Macbook won't reconnect again. Does anyone have any further ideas?

I had assumed this was a problem of the router (and maybe it is) and therefore in the original question asked, whether it was possible to have some script or app run in the background that monitors whether WiFi is connected and when it's not it either tries to reconnect or to turn WiFi on and off or something that would ensure that I regain access.

Nonetheless, finding the root of the problem would obviously be preferred. Any help greatly appreciated!

2 Answers 2

3

The WiFi on your MBP is, by design, supposed to reconnect to known networks automatically without the intervention of the user and/or an automated script.

That said, WiFi issues seem to have been an ongoing issue for Apple: How do I connect my Mac to wifi automatically?

Now, I am assuming that this is a simple home network where you just have to select the network you want to connect to and provided you have the right passphrase or key, you get connected and away you go.

Given that you have a MacBook and it's portable, have you tried different networks - like gone over to a friends or a relatives home and see if the systems exhibit there? If so, then the issue is limited to your MB, and not the router.

Also, does anyone else report having the issue with your router? If not, it will again confirm that the problem is with your MBP and not the router itself.

What you can try: Delete the Airport .plist

To delete the plist file associated to the Airport,

  1. Disable Airport
  2. Delete the plist file; /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
  3. Re-enable airport and select your favorite network again

This will delete ALL connections of the connections in your saved WiFi networks. You will need to save all of the passwords for all the networks that you want to connect to later.


How to get your WiFi Passwords

Before you delete the plist, you will want to make a copy of all your SSID passwords. They are stored in your Keychain.

When you open your Keychain (CommandSpace and type "Keychain" to use Spotlight to open it) you will see a list of saved credentials from websites, to network passwords and of course the one we are interested in, Airport Passwords.

enter image description here

If you right click on the WiFi network you are interested in, you will have the option to "Copy the Password to the Clipboard" (how convenient is that?!?!)

Copy Password

You will be then asked to authenticate 2 times. The first time because OS X will want to "make changes to your computer" and then a second time because it wants access to your "System Keychain"

enter image description here

This will require you to type your user name and password of an Administrator (if that's you, then your username and password).

You can now paste that password anywhere...

enter image description here

Or maybe in a spreadsheet for safekeeping...

enter image description here

14
  • Thank you for your suggestions. My suspicion that it's the router comes from the fact that (a) I haven't had that problem anywhere else (although it might also have been that the connection just was never lost) and (b) that another MacBook connected to the same router also exhibits the same problem (although it's the same model, so it could also be related to that). I'll try if deleting the plist does anything. Before I do that though, if I keep the old plist, will I later be able to swap them again, without having to reenter all passwords?
    – jan
    Commented Mar 22, 2016 at 0:15
  • Yes, If you save the plist, and it doesn't fix the problem, you can just copy it back the way you had it. Oh...what kind of router is it, do you know?
    – Allan
    Commented Mar 22, 2016 at 0:19
  • Your suggestion seems to have done the trick! I trashed the plist and then tried restarting the router twice, and each time it connected automatically. Cool, thank you! That was easier than I thought.
    – jan
    Commented Mar 22, 2016 at 13:05
  • (Oh and the router was a TP-Link TN-WR841N)
    – jan
    Commented Mar 22, 2016 at 13:06
  • Actually I have one more question, since there were actually some important Airport networks saved, where I'd need to hunt some person down to get the password again. Do you know if there is a way to manually hack the plist to add them? I looked at the plist and saw there are two xml strings: one <key>wifi.ssid and some stuff and then a <dict> array. Do you think I can just copy them into the new plist?
    – jan
    Commented Mar 22, 2016 at 13:10
0

The simple solution I use is an economical UPS to your router which has enough battery power to last through these outages. Better UPSs can also help protect devices from power surges.

2
  • 1
    This is the worst solution... it's more of a diy, instead of having apple fix it or doing it via some app Commented Jun 5, 2018 at 21:23
  • It's even worse than that because it is very likely that internet failure is not related to a power failure.
    – Rich
    Commented Dec 8, 2018 at 4:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .