Here is the solution from wmbauer
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.plist
or
sudo rm /Library/Preferences/com.apple.bluetooth.plist
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)
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
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.
User level:
Level 1