Last active
March 14, 2024 11:26
-
-
Save 0bmxa/2dc489e29a2ba6f940f069039d2896d2 to your computer and use it in GitHub Desktop.
Enable/fix macOS WiFi roaming (802.11k, 802.11r, 802.11v)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Enable roaming | |
sudo defaults write /Library/Preferences/com.apple.airport.opproam enabled -bool true | |
# (Optional) Un-disable roaming | |
#sudo defaults write /Library/Preferences/com.apple.airport.opproam disabled -bool false | |
# 2. Prefer networks with stronger signals | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport en0 prefs JoinMode=Strongest | |
# (Optional) Set a fallback mode (Prompt, JoinOpen, KeepLooking, DoNothing) | |
#sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport en0 prefs JoinModeFallback=Prompt | |
# 3. Power cycle WiFi interface | |
networksetup -setnetworkserviceenabled 'Wi-Fi' off | |
networksetup -setnetworkserviceenabled 'Wi-Fi' on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check current settings | |
# Roaming settings | |
defaults read /Library/Preferences/com.apple.airport.opproam | |
# AirPort preferences | |
/usr/libexec/PlistBuddy -c 'Print :Sets:<ID>:Network:Interface:en0:AirPort' \ | |
/Library/Preferences/SystemConfiguration/preferences.plist | |
# Or manually check <ID> → Network → Interface → en0 → AirPort → <JoinMode, etc.> with: | |
#defaults read /Library/Preferences/SystemConfiguration/preferences Sets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To undo above changes | |
# (Careful with this!) | |
#sudo defaults delete /Library/Preferences/com.apple.airport.opproam enabled | |
#/usr/libexec/PlistBuddy -c 'Delete :Sets:<ID>:Network:Interface:en0:AirPort:JoinMode' \ | |
# /Library/Preferences/SystemConfiguration/preferences.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment