How to block bluetooth device that spams me with pairing requests?
A bluetooth device that is not mine nor under my control asks my computer to pair, about every minute or so.
Interestingly, it's fairly effective as a DOS attack actually.
Disabling my BT is not an option, since I need it for my BT devices.
I want to tell OSX to ignore this particular BT device, but I can't figure out how.
Solution 1:
The GUI way
Press and hold together the Option + Shift (⌥ + ⇧) and the click the Bluetooth icon in the topbar.
A Debug submenu will appear as shown below:
You get the options to Remove all devices and Factory reset all connected Apple devices — pick whichever you need.
The terminal way
Open terminal and type:
-
sudo rm /Library/Preferences/com.apple.Bluetooth.plist
Enter -
rm ~/Library/Preferences/com.apple.Bluetooth.plist
Enter - Reboot OSX.
The commands above will remove the MAC addresses of the 'remembered' bluetooth devices from the systems settings. If you want to have a look at the actual contents of those files copy the original file to a user-writable folder and then do:
plutil -convert xml1 com.apple.Bluetooth.plist
,
and then open it with a text editor (it is an XML file).
To convert it back to binary use
plutil -convert binary1 com.apple.Bluetooth.plist
.
Solution 2:
Inspired by @ccpizza's answer.
Open terminal and type:
sudo plutil -convert xml1 /Library/Preferences/com.apple.Bluetooth.plist
- Find the MAC address of the offending Bluetooth device. You can find it by searching
/Library/Preferences/com.apple.Bluetooth.plist
. -
Add this section to the plist:
<key>IgnoredDevices</key> <array> <string>ff-ff-ff-ff-ff-ff</string> </array>
Where FF:FF:FF:FF:FF:FF is the MAC address of the offending Bluetooth device.
sudo plutil -convert binary1 /Library/Preferences/com.apple.Bluetooth.plist
- Reboot OS X if necessary.
Solution 3:
- Find the MAC address of the culprit Bluetooth device
- Disable Bluetooth
- Type
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist IgnoredDevices -array-add '<ENTER MAC ADDRESS HERE>'
in the terminal - Enable Bluetooth again