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″

Posted on Nov 14, 2024 1:49 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 10, 2025 3:16 PM

Thank you! It paired!


Similar questions

8 replies

Jan 28, 2025 4:46 AM in response to NitramWill

Thank you so much, I'm typing this using a A1016 on a M1 Mini/Sonoma!


But there are some quirks in your description:


  • The 2nd "sudo defaults write/Library/Preferences..." needs a space between write and /Library
  • com.apple.Bluetooth.plist does not exist. It's com.apple.bluetooth.plist
  • Why the first two commands, when you delete the file in command #4 anyway?
  • sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ClassicPairingEnabled 1 misses another space after "write"
  • I had to get a recent version of blueutil using brew. I had to use the full pathname or it would use an outdated version (/opt/homebrew/bin/blueutil)
  • After entering blueutil --pair I had to type in "0000" on the actual keyboard and press enter. This final step cost me a lot of time to figure it out!


Anyway, the keyboard works just fine again! Thank you!

Feb 10, 2025 12:19 PM in response to nicksu

Yeah sure!


sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist EnableLegacyPairing 1
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist EnableClassicDiscovery 1
sudo pkill bluetoothd 


sudo rm /Library/Preferences/com.apple.Bluetooth.*

or

sudo rm /Library/Preferences/com.apple.bluetooth.*


get blueutil latest https://formulae.brew.sh/formula/blueutil

Enter pairing mode on the keyboard (toggle on/off a couple of times until the green light flashes)

Run blueutil with full path to make sure we're using the current one (blueutil --version should read 2.12.0 atm)

for i in {1..6}; do /usr/local/bin/blueutil --inquiry --format json; sleep 10; done


Get the MAC address from the output (00-0a-95-3b-95-65)

[{"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 

Get the log while pairing

log stream --predicate 'subsystem == "com.apple.bluetooth" AND eventMessage CONTAINS "00:0A:95:3B:95:65"' --level debug


Open a 2nd terminal and start pairing

sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ClassicPairingEnabled 1 

or

sudo defaults write /Library/Preferences/com.apple.bluetooth.plist ClassicPairingEnabled 1 

Start pairing

/usr/local/bin/blueutil --pair 00-0a-95-3b-95-65 0000


CRITICAL

Wait a couple of seconds. Enter 0000 on the A1016 keyboard and press enter on the A1016 keyboard. This will finish the pairing process.


I cannot guarantee everything is needed (especially the lines before "get blueutil latest") or will work in any configuration. But this is how I made it working, based on this thread.

The keyboard then shows up in the GUI menus, works, shows correct battery %, and wakes the machine from sleep.

For me the file name was com.apple.bluetooth* (no capitol B), as mentioned com.apple.Bluetooth* didn't exist (macOS Sequoia). But I can imagine deleting is not necessary at all.

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.

Solution: A1016 Apple Wireless Keyboard - pairing with bluetooth (macOS Sequoia)

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