Skip to content

Instantly share code, notes, and snippets.

@andrey-str
Created December 5, 2015 08:58
Show Gist options
  • Save andrey-str/7991de6ed92cf8eddabe to your computer and use it in GitHub Desktop.
Save andrey-str/7991de6ed92cf8eddabe to your computer and use it in GitHub Desktop.
Fix bluetooth problem on Yosemite
#!/bin/sh
# Credits to author of this message(timgws): https://discussions.apple.com/thread/6693749?start=15&tstart=0
function msg() {
foo=$2
what="$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
echo ">> ${what}ing $1...";
}
function __blued() {
msg "blued" "$1";
sudo launchctl $1 /System/Library/LaunchDaemons/com.apple.blued.plist
}
function __driver() {
msg "bluetooth driver" "$1";
sudo kext$1 -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
}
__blued "unload"
__driver "unload"
sleep 5;
__driver "load";
__blued "load"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment