Using MBP 13" Version 10.7.5
Connecting to Nokia Lumia 920 Internet Sharing (Wi-Fi). Getting MBP Wireless disconnections & drops issues like everybody else (almost). Tried investigating the root causes (via logs, network monitor, Inssider, applepushd, Channels etc) to no avail. Tried tons of solutions on the Net......remove airport keychains, plists, turn wi-fi on/off...None of it worked.
My Solution
Downloaded ControlPlane (Context Switcher)
As per Feature list - Has an Option - monitor Active Network Adapter i.e. Link
Adding to my woes - if I selected that Option it would crash!!!!!!!
So went back to the basic - Used ControlPlane with scripts
Step 1
Install ControlPlane
Step 2
ControlPlane Preferences/Context - Create 2 Contexts
- Connected (You can use your own)
- Disconnected (You can use your own)
Step 3
ControlPlane Preferences/Evidence
You can select - Active Network Adapter (If you select this & ControlPlane does not crash then kindly follow the controlplane documentation to move forward). Unfortunately the above crashed for me!!!!!
I selected - Shell Script
Step 4
ControlPlane Preferences/Rules
If you selected - Shell Script as Evidence then you will get - "Add Script Rule" when you click the "+"
Click Add Script Rule
Browse for the shell script - Select WLACT.sh (2 Scripts - Provided below)
Parameters
- Run Script - 5 Secs
- Confidence - Full
- Context Connected
- Click OK
Step 5ControlPlane Preferences/RulesClick Add Script RuleBrowse for the shell script - Select WLINACT.sh (2 Scripts - Provided below)
- Run Script - 5 Secs
- Confidence - Full
- Context Disconnected
Click OK
Step 6
ControlPlane Preferences/Action
This is only for testing purpose you can disable this later on if you are successful. You can ofcourse use the rest for any other purpose I just used it for this solution
Click "+"
Misc Action - Speak Phrase
Speak Text - Hellish
At context - Disconnected
On Arrival
Click OK
Step 7
ControlPlane Preferences/Action
Click "+"
Misc Action - Speak Phrase
Speak Text - Heaven
At context - Connected
On Arrival
Click OK
See how it goes!!!!!!! Works for me!!!
Scripts
Save the scripts anywhere on your MBP
Shell Script 1 - Checking for Wireless connection i.e. Active
WLACT.sh
#!/bin/bash
IPADDC=$(networksetup -getinfo wi-fi | grep -c 'IP address:')
if [ "$IPADDC" -eq "2" ]
then
exit 0
else
exit 1
fi
Shell Script 2 - Checking for Wireless connection i.e. if disconnected - Connect again
(Fairly Simple for my usage only. You can modify as required by you)
WLINACT.sh
#!/bin/bash
AIRPORT="en1"
WIFI_NETWORK_NAME="YOURSSIDNAME"
WIFI_PASSWORD="YOURSSIDPASSWORD"
IPADDC=$(networksetup -getinfo wi-fi | grep -c 'IP address:')
if [ "$IPADDC" -eq "1" ]
then
if networksetup -setairportnetwork $AIRPORT $WIFI_NETWORK_NAME $WIFI_PASSWORD | grep -i -a "Failed" ;
then
exit 0
else
exit 1
fi
else
exit 1
fi