Terminal command to un-block a bluetooth device?

How do you undo the 2nd Terminal command to ignore a bluetooth device?


sudo defaults read /Library/Preferences/com.apple.Bluetooth.plist DeviceCache


sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist IgnoredDevices -array-add '<MAC address>'

MacBook Pro 13″, macOS 11.6

Posted on Aug 11, 2022 7:15 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 12, 2022 8:21 AM

See this ⌘AskDifferent article on what to do if your plist array property has one element, or more, and the different approaches to removal of just one, or the nth element of the array. The defaults command does not provide you with the granularity to remove the nth element of an array, so first check how many elements are in that plist array:


defaults read /Library/Preferences/com.apple.Bluetooth.plist IgnoredDevices


If there is more than 1 array element in IgnoredDevices array, then you will need to use Apple's PlistBuddy to remove the array item. These are zero-based arrays, so in the following, let n be that array element:


sudo /usr/libexec/PlistBuddy -c "delete :IgnoredDevices:n" /Library/Preferences/com.apple.Bluetooth.plist


You may need to reboot after you fix this IgnoredDevices entry.

1 reply
Question marked as Top-ranking reply

Aug 12, 2022 8:21 AM in response to DCarlson93

See this ⌘AskDifferent article on what to do if your plist array property has one element, or more, and the different approaches to removal of just one, or the nth element of the array. The defaults command does not provide you with the granularity to remove the nth element of an array, so first check how many elements are in that plist array:


defaults read /Library/Preferences/com.apple.Bluetooth.plist IgnoredDevices


If there is more than 1 array element in IgnoredDevices array, then you will need to use Apple's PlistBuddy to remove the array item. These are zero-based arrays, so in the following, let n be that array element:


sudo /usr/libexec/PlistBuddy -c "delete :IgnoredDevices:n" /Library/Preferences/com.apple.Bluetooth.plist


You may need to reboot after you fix this IgnoredDevices entry.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal command to un-block a bluetooth device?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.