Solved

How to set up to automatically disable Wireless whenever the Macbook connects to the wired?

Posted on 2014-10-14
2
179 Views
Last Modified: 2014-10-31
While my MacBook connects to my network cable through the Thunderbolt, I found the WiFi connection is still on. Is there a way to automatically disable the WiFi whenever the wired connection is connected?
Also, when both wired and wireless are connected, which connection is utilized? Is it the wired or the wireless, or both in the end?
0
Comment
Question by:Castlewood
2 Comments
 
LVL 16

Assisted Solution

by:Joshua Grantom
Joshua Grantom earned 250 total points
ID: 40380518
You can change the service order of networks under System Preferences > Network. Then hit the gear icon in the bottom left.

If you have Ethernet above Airport, if a wired connection is available, it will use that network before the wireless.

No need to disable wireless
0
 
LVL 27

Accepted Solution

by:
serialband earned 250 total points
ID: 40380988
Here's a site with a launchdaemon that calls a script to do that.

http://www.heatxsink.com/entry/turn-off-airport-when-ethernet-is-plugged-in-on-osx
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.heatxsink.jackedin</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Scripts/heatxsink/jackedin.sh</string>
        </array>
        <key>StandardOutPath</key>
        <string>/var/log/jackedin.log</string>
        <key>StandardErrorPath</key>
        <string>/var/log/jackedin.log</string>
        <key>Debug</key>
        <true/>
        <key>WatchPaths</key>
        <array>
        <string>/Library/Preferences/SystemConfiguration</string>
        </array>
    </dict>
</plist>

Open in new window


#!/bin/sh
ETHERNET_INTERFACE="en0"
AIRPORT_INTERFACE="en1"
DETECT_INET=`ifconfig $ETHERNET_INTERFACE | grep inet6 | tr -d '\t' | cut -d ' ' -f 1 | tr -d '\n'`

if [ "$DETECT_INET" = "inet6" ] ; then
        /usr/sbin/networksetup -setairportpower $AIRPORT_INTERFACE off
        echo "Wired ethernet detected, turning off Airport."
        exit 0
else
        /usr/sbin/networksetup -setairportpower $AIRPORT_INTERFACE on
        echo "No wired ethernet, turning on Airport."
        exit 1
fi

Open in new window

http://hints.macworld.com/article.php?story=20100927161027611

You can also use a 3rd party app to detect
http://www.symonds.id.au/marcopolo/
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In certain circumstances, a Microsoft Office mac application may fail to save a document to a network server, with the following error message: "There has been a network or file permission error. The network connection may be lost." An article at…
The /etc/authorization file in Mac OS X 10.x can be used to control access to the various panes of the System Preferences amongst other things. It’s used by some of us Mac Sys Admin’s to give Standard Users access to System Prefs panes that only adm…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now