Category Archives: Wifi
how to retrieve forgotten Wifi password
At our house, giving visitors the wifi password is always an exercise in frustration. Can’t remember? Oh, then I’ve got to either go trawling through Keychain Access or log in to the router, neither of which are particularly appealing.
Here’s an easier way. It’ll require an admin password (and you’ll need to supply it for as many passwords as you’re looking for – no ‘with administrator privileges’ will help here I’m afraid), but otherwise requires nothing more than a quick double-click of this saved script, once you’ve added your own SSID names in place of the dummy ones.
Just to be clear, you do NOT need to add the passwords to the script. So long as the mac that you run this script on already knows the Wifi password, the script will retrieve it.
Get the script from my pastebin
Enjoy!
how to see active internet connections
I was playing around with some ways of detecting active network connections to add as a function in one of my apps — didn’t really work out, so far — but as I was prototyping the code in AppleScript I came up with this little ditty which some of you might be able to make use of:
1. Open the Script Editor
2. Paste the code below into it and hit ‘Run’
#start of script
on getConnections()
set theCmd to "lsof +c 0 -i -n | grep -i established | cut -d \" \" -f 1 | awk '!_[$0]++'"
set theMsg to (do shell script theCmd)
display dialog "The following apps & processes are actively using your internet connection: " & return & return & theMsg with title "Net Tattler" buttons {"Refresh", "OK"} default button "OK"
set theRes to button returned of the result as string
if theRes = "Refresh" then
getConnections()
end if
end getConnections
getConnections()
#eof
If you need more information than just the names of the process, you can play around in Terminal with lsof -i.
Here’s a great little tutorial.
For something a bit more heavy-duty, check out either Little Snitch or Charles Web Debugging Proxy, both of which are paid-apps but offer free trials. If even those aren’t enough to satisfy your network monitoring desires, head on over to MurusFirewall.com and check out their packet filter GUI offerings for the Mac.
Enjoy 🙂
Acknowledgements
Thanks to the folks over at Etresoft for additional suggestions.
disable captive network assistant
If you use coffee shop wifi services or others that require internet login, you’ve probably noticed in both Lion and Mountain Lion that OS X will produce a pop-up Safari window asking you to login. This can be annoying for several reasons:
1. The window floats on top and gets in the way if you’re trying to do something else
2. The window doesn’t keep cookies or allow plug-ins like 1Password, so you have to enter the login details manually every time
3. Sometimes the pop-up window will simply produce an error message that it can’t connect to the network. You either have to dismiss it manually or wait for it to go (it’ll normally auto-close after about 30 seconds)
If you find this behaviour annoying and want to stop it, there’s a very simple solution (and one that’s also easy to undo if you want to reverse it). Here’s what you do.
1. First go to
[Hard Disk] > System > Library > CoreServices > Captive Network Assistant.app
Click on the app once, and hit ‘return’ on your keyboard. This will make the name editable.
2. Hit the ‘left arrow’ key once to move the cursor to the beginning of the name and to unselect the text.
3. Type an ‘X’ (actually any letter will do, but I like ‘X’ so I can easily find the app later at the bottom of the list even if I forgot its exact name).
4. Hit ‘return’ on the keyboard. At this point, OS X will ask you to provide an Admin password as only Admin users are allowed to mess with files in the System directory. Type in your password and hit ‘OK’.
The name should now read ‘XCaptive Network Assistant.app’.
And that’s it! Captive Network Assistant will never run again unless you decide to change its name back to what it was (to do so, just repeat the procedure above and remove the ‘X’). Of course, you can still login to your internet or coffee shop wifi services by opening a normal browser window. The bonus is now your browser can fill the login details from cookies (if enabled) or your password manager.
🙂
featured picture: illuminated jellyfish by weaverglenn
problems with wifi, Safari and Mountain Lion
If you’ve upgraded to Mountain Lion and traded swift wifi and fast Safari for a flakey internet connection and sluggish browser, you are not alone. Widespread reports of problems with wifi, Safari and Mountain Lion have been mounting ever since July 25th. However, unlike the lengthy debacle with similar wifi problems experienced after the Lion upgrade last year, a lot of users are finding their problems can be solved by using one or more of the tips below.
1. Create a new location and renew the DHCP lease
OS X Daily have a step-by-step procedure here
http://osxdaily.com/2012/08/02/fix-os-x-mountain-lion-wireless-connection-problems/
that is proving hugely successful. Don’t forget to follow their second step about changing the MTU value while you’re at it.
2. Reset default system preferences
If that didn’t do it for you, it’s time to roll up your sleeves and enter Terminal! Open the Terminal.app from
/Applications/Utilities/Terminal.app
and paste this command
rm ~/Library/Preferences/com.apple.systempreferences.plist
then press ‘return’.
You will need to restart your mac to see if this has had any beneficial effect, so do that now.
3. Do PRAM & SMC resets
If you’re still suffering problems, it’s time for a couple of system resets. To do the SMC reset you will need to see what kind of mac you have, as the procedure is different for some models. Take a look here and follow the instructions for your model.
Before powering up after the SMC reset, also take the trouble to do a PRAM reset. To do that:
i. Ensure the machine is powered off.
ii. Locate the following keys on your keyboard in preparation for Step 4:
‘command’ – ‘option’ – ‘P’ – ‘R’
iii. Press the ‘power on’ button.
iv. Immediately – and before the grey screen appears – hold down ‘command-option-P-R’ all together.
v. Keep them held down until you’ve heard the start-up chime twice. After you release them you should hear it again, and hopefully your Mac will boot up without wifi/Safari issues.
4. Check Wifi connection
And if that doesn’t work? Time to check your wifi connection. See how strong your signal-to-noise ratio is. You need something in the order of 25 or higher. To find out whether you signal is strong enough, hold down the ‘option’ key and click on the wifi icon in the menu bar. Choose Open Wifi Diagnostics from the menu.
When you see the welcome screen, ignore the ‘Continue’ button and instead press ‘command-N’ on your keyboard.
Click wifi scan in the task bar and scroll to the right where you will see two numbers, ‘signal’ and ‘noise’. Ignore the minus ‘-‘ signs, and subtract the signal number from the ‘noise’ number. Anything over 25 is a good enough signal, below that and the signal is too weak for a reliable connection. Over 40 is excellent (in the example below, you can see the SNR is 34, a pretty good signal for a home router located on the next floor).
If your SNR is lower than 25 you need to either move the computer closer to the router or find a better connection. If the ‘Noise’ shows a very low figure (equals more noise), you can try changing the channel on your router. Look at the other routers in the list and if they are using the same channel as yours, switch your router to something else between 1 and 11.
5. Reinstall OS X
If all else fails…some users are reporting that simply reinstalling OS X is solving the problem for them. Reinstalling doesn’t touch your Apps or user data, but its always wise to make sure you have a backup before undertaking such an operation.
To reinstall, restart the computer while also holding down ‘command-R’ on the keyboard. From the Utilities window that opens up, choose ‘Reinstall OS X’.
Still having problems? Let us know in the comments below.
🙂
featured picture: Internet by ~vagraine