Solution: A1016 Apple Wireless Keyboard - pairing with bluetooth (macOS Sequoia)
I've bought a beautiful A1016 Keyboard yesterday and struggled a bit, even with the content posted here using `blueutil`. In fact, as it's Bluetooth 2.1 (from 20 years ago), we've to tell the system to use it.
So I ended up tuning with the system a bit.
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist EnableLegacyPairing 1
sudo defaults write/Library/Preferences/com.apple.Bluetooth.plist EnableClassicDiscovery 1
Then we have to restart the bluetooth deamon.
sudo pkill bluetoothd
sudo rm /Library/Preferences/com.apple.Bluetooth.*
After that, we can use `blueutil` to get the keyboard MAC address.
To do so, we can scan the BLE band with this:
# Continuous scanning for a minute or so
for i in {1..6}; do blueutil --inquiry --format json; sleep 10; done
Be sure to have the keyboard looking for a connection, so blinking green light at the back of the case.
Eventually, you'll get a log that looks like this
[{"address":"00-0a-95-3b-95-65","recentAccessDate":"2024-11-13T20:08:24+01:00","favourite":false,"name":"Wireless Keyboard","connected":false,"paired":false}]2024-11-13 20:08:24.255
So grab "address":"00-0a-95-3b-95-65"
And now I you can log precisely:
log stream --predicate 'subsystem == "com.apple.bluetooth" AND eventMessage CONTAINS "00:0A:95:3B:95:65"' --level debug
Now
# First make sure Bluetooth is on
blueutil -p 1
# Force classic pairing mode
sudo defaults write/Library/Preferences/com.apple.Bluetooth.plist ClassicPairingEnabled 1
# Try pairing with PIN code 0000 (common for BT 2.1 devices)
blueutil --pair 00-0a-95-3b-95-65 0000
After that, you can enjoy your "new" keyboard experience.
Cheers ⌨️
MacBook Pro 14″