If you are one of the unlucky users having issues with your WiFi after upgrading to Lion, then we have a solution for you. The folks over at OSX Daily have posted this neat little Bash Script to maintain your wireless connection. This walkthrough will show you how to create the script and it will ping your router every 5 seconds, allowing the connection to stay up and not drop.
Step 1: Get your Wireless Router IP Address.
The first thing you will need is the IP address of your router. This IP is normally 192.168.0.1 or 192.168.1.1. In order to get the IP, go to:
System Preferences -> Network -> Advanced -> TCP/IP
Now look for the IP Address next to Router and make a note of the number.
Step 2: Create the Keepalive Bash Script
- Launch the Terminal (/Applications/Utilities)
- Type the following command:
- Paste in the following, be sure to put in your router’s IP Address here:
ping –I 5 –n 192.168.0.1
- Hit Control+O to save the contents of keepalive.sh
- Hit Control+X to exit from nano
Step 3: Run the WiFi Keepalive Bash Script
- Back in the terminal window, we need to make the script executable. Type the following:
Chmod +x keepalive.sh
- Now we just need to run it. Type the following in your terminal window:
That last command will start and run the script in the background. Your WiFi dropping issues should now be resolved. This is more of a workaround, then a fix but it will keep your WiFi connection up and running. Now the last thing to figure out is if this is a bug in OSX Lion, or if some routers don’t play well with the new version of OSX. Hopefully, the next update will help take care of this issue with some computers.