Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Auto-disable AirPort when ethernet is active' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Auto-disable AirPort when ethernet is active
Authored by: RaceTripper on Oct 06, '10 07:56:28AM

Or you could make it easy. Go into the Network preference pane and change the service order to put Ethernet above Airport. Then it doesn't matter if Airport is on or not. Ethernet will take precedence. It's worked well for me for years.

[ Reply to This | # ]
Authored by: mdwittenberg on Oct 06, '10 08:57:31AM

My thoughts exactly RaceTripper. Is you solution as good as this complicated solution?

[ Reply to This | # ]
Authored by: DaijDjan on Oct 06, '10 09:13:13AM

I dont think so.. though I am not 100% sure... more like 80% :)

the script will turn airport on / off for real
=> sets the power

dont think the system preferences do that
=> they only mark which is the PRIMARY connection
==> all others are still active though

[ Reply to This | # ]
Authored by: jonas_jonas on Oct 08, '10 08:13:14AM

And if you have installed blueutil then you can start and stop bluetooth with it.

I use this, because I only use the bluetooth mouse and keybord when using ethernet and my external monitor. So I can automatically deactivate bluetooth on the road to save a bit of battery.

Here are the changes in the first function:

function set_airport {

    if [ $new_status = "On" ]; then
	/usr/sbin/networksetup -setairportpower en1 on
        /usr/local/bin/blueutil off
	touch /var/tmp/prev_air_on
	/usr/sbin/networksetup -setairportpower en1 off
        /usr/local/bin/blueutil on
	if [ -f "/var/tmp/prev_air_on" ]; then
	    rm /var/tmp/prev_air_on

[ Reply to This | # ]
Authored by: ars on Oct 06, '10 09:54:13AM

I have rank ordered it like you suggest, but the hint is clearly superior. If e.g. your wireless access has a limited pool of IP numbers (which is the case at my work), then not having wireless active when connected by ethernet will not use up an IP number. I also have occasionally had problems with waking up my laptop, when it would grab the wireless access instead of the ethernet.

[ Reply to This | # ]