-
-
Save jtbonhomme/f5ff149b4f0deee7bc6449544e35bbab to your computer and use it in GitHub Desktop.
Control Bluetooth Daemon through Command Line OSX
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
#read the current pref, returns '0' for off and '1' for on. | |
defaults read /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState | |
#set bluetooth pref to off | |
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0 | |
#set bluetooth pref to on | |
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1 | |
#kill the bluetooth server process | |
sudo killall blued | |
#unload the daemon | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist | |
#reload the daemon | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist | |
#start the daemon | |
sudo launchctl start com.apple.blued |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment