3

I'm on OS X 10.6. When I'm downloading a torrent, the connection is sometimes lost.

And because of this, the download stops too, and the only solution I found to reconnect is to manually turn off the WiFi and turn it back on.

Is there a program or trick to restore the network connection automatically?

2

While this doesn't solve your problem immediately, I can say that I had the exact same issue with my iMac and OS X 10.6. My solution? Get a new router. From that point on, the wireless connection was far more stable, and while the issue itself exists (say I make a lot of changes in the router that requires the connection to drop -- my iMac won't always reconnect), the router itself seems to make a big deal in the connectivity. (I went after one of the newer N routers; my previous router was a G router.)

Other things to try (before shelling out $$$):

  • Make sure your router's firmware is up-to-date (Mine was, unfortunately)
  • See if you can install a custom firmware (like DD-WRT) that might solve the problem (this is really dependent upon router type, so not all routers are supported)
2
  • 1
    Before buying a new router - you should check that your current router has the latest software applied. I had a Netgear router previously that lost wifi connections regularly - once I applied latest software - it ran for months without issues.
    – barryj
    May 6 '11 at 7:24
  • Good idea; I'd forgot to mention that. For my router, it was already on the latest firmware, and since it was a b/g device and I wanted to have N speeds for the Mac, I figured it was time to upgrade anyway. May 6 '11 at 15:59
0

This will do it

just replace with your network name

#!/bin/bash

# turn on wifi if it's turned 'Off'
if [ $(networksetup -getairportpower en1 | grep -c 'Off') = '1' ]
then $(networksetup -setairportpower en1 on)
fi

# cycle wifi power if missing 'IP address'
if [ $(networksetup -getinfo Wi-Fi | grep -c 'IP address:') = '1' ]
then $(networksetup -setairportpower en1 off; network setup -setairportpower en1 on)
fi

# initiate connection if not connected to the correct network
if [ $(networksetup -getairportnetwork en1 | grep -c '<networkName>') = 0]
then $(networksetup -setairportnetwork en1 '<networkName>')
fi

You must log in to answer this question.

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