9

EDIT: after an ultimate SMC/PRAM reset, @doublepluskat's solution below finally worked. Currently typing on my A1016 keyboard. Many thanks!

I have trouble pairing again my white Apple Wireless Keyboard (2003) (S/N M9270LL/A or A1016) to my 15-inch 2016 MacBook Pro after update to Monterey 12.0.1. Here is how the problem unfolds:

  1. Device turned on and in 'Discovery' mode, it appears in the 'Bluetooth' panel in 'System Preferences', in the list of unpaired devices.
  2. By clicking on 'Connect' button, nothing happens until 'Return' key is pressed.
  3. Then, the panel indicating the 6-digit 'Passkey' appears (the Passkey being different each time) and then immediately disappears.
  4. If no key is pressed though, the panel never appears and pairing simply fails; then the Connect button is clickable again within approximately 20 seconds.
  5. Device status in BT panel then indicates 'Passkey doesn't match' (as I was unable to enter the passkey anyway).

I have tried turning Bluetooth off and on, rebooting Mac and reseting SMC+PRAM countless times, as well as replacing the batteries. Since I own two of these I tried with both and the problem is exactly the same. The two worked seamlessly on that computer before the update. I haven't got another computer to test them on unfortunately. My headphones, mouse and DualShock 4 controller pair and connect fine to that same computer since I don't have to enter any passkey. I would like to avoid having to downgrade to get my external keyboard to work if possible.

Please note that I was unable to reset the Bluetooth module or delete all devices since these options don't seem to be present anymore by opening Bluetooth menu in Menu Bar while pressing alt+shift after update to Monterey. To overcome this I sought various methods of doing the same by other means without any of them being helpful in the problem I'm encountering:

How to restart Bluetooth service from command line

To me, it simply seems to be a software bug of the UI. Update, see below I reported it to Apple through their bug report interface, though I'm not sure they ever read these.

With that said I would like to know if I'm the only one to encounter these UI problems, and if there's any way to bypass that passkey pairing. Thanks in advance,

Kind regards,

EDIT: I tried pairing using blueutil in Terminal as per this post :

Pair with a Bluetooth device over Terminal

However the same thing happens in terminal. Nothing happens until I press return. As soon as I press return, pairing immediately fails without giving me the opportunity to enter the passcode. If I try to enter the 6-digit code then return, it does the same as it doesn't recognize the passcode I entered. Here is the error messages:

alexis@macbook-pro ~ % blueutil --pair 00-0a-95-45-9b-58 000000
Input pin 000000 on "Apple Wireless Keyboard" (00-0a-95-45-9b-58)
2021-10-31 08:44:43.900 blueutil[2637:220491] IOBluetoothDevicePair BluetoothHCIPINCodeRequestReply - 0
2021-10-31 08:44:44.466 blueutil[2637:220493] -[IOBluetoothDevicePair peerPairingCompleted:withError:]: Calling connectionComplete on IOBluetoothDevicePair. Status: 31
2021-10-31 08:44:44.470 blueutil[2637:220493] -[IOBluetoothDevicePair peerPairingCompleted:withError:]: Calling connectionComplete on IOBluetoothDevicePair. Status: 31
Failed to pair "00-0a-95-45-9b-58" with error 0x1f (Unspecified Error)

I also tried with different 6-digit codes with no result. So to me it doesn't seem to be a problem with the UI but rather with the IOBluetooth

2 Answers 2

8

After many hours of experimenting, I finally got my A1016 keyboard to connect to a brand-new Apple Silicon MBP running Monterey, and I found your post helpful, but the steps were not quite right.

I used blueutil, installed via brew, and the first command I ran was

blueutil --inquiry

while the keyboard was in discovery mode (the power light blinking)

I was able to get the MAC address and I also noticed a +0000 at the end of the info line from the 'inquiry' command. I am not sure what this represented, but I was wondering if this had something do to with a default passcode or that the passcode should be 4 digits? Maybe not, but I ended up using 0000 as my passcode successfully.

The steps that worked to connect for me (with keyboard in discovery mode):

blueutil --pair [mac address, lowercase on the letters, separated by dashes, no brackets] 0000

Then (after 5-10 seconds), I typed 0000 on the numbers above the alphabetical keyboard, and pressed 'Return' (also on the main keyboard). I tried 0000 and 'Enter' on the numeric keypad first and that did not work.

That got me paired, then I still had to go into the bluetooth settings in the GUI and select the keyboard and 'Connect'.

9
  • Thank you very much for your answer. However that still doesn't do it for me. First of all I did used the 'blueutil --inquiry' once to get my device's Mac address, however to my knowledge once you know it you don't have to use that command every time and it doesn't seem to make any difference. Use a 4 letter passkey did yield different results but it still doesn't work – see below: Nov 6, 2021 at 18:14
  • 1
    alexis@alexis ~ % blueutil --pair 00-0a-95-3d-8e-83 0000 Input pin 0000 on "Apple Wireless Keyboard" (00-0a-95-3d-8e-83) 2021-11-06 19:11:20.092 blueutil[18549:1796474] IOBluetoothDevicePair BluetoothHCIPINCodeRequestReply - 0 2021-11-06 19:11:20.390 blueutil[18549:1796481] -[IOBluetoothDevicePair peerPairingCompleted:withError:]: Calling connectionComplete on IOBluetoothDevicePair. Status: 31 Failed to pair "00-0a-95-3d-8e-83" with error 0x1f (Unspecified Error) Nov 6, 2021 at 18:15
  • Furthermore, the line 'Input pin...' still doesn't appear until I press Return Nov 6, 2021 at 18:19
  • 1
    Eventually got it to work for me! The issue for me was there were too many BT devices on nearby. The workaround was to shut off all BT devices and run the above commands. Thanks! Dec 26, 2021 at 19:32
  • 1
    For me it was a bit different. 0000 didn't work for initially. Then I tried 000000 (six zeros) and it said peerPairingCompleted:withError:. Then I did 0000 and after about 10 seconds typed that on external KB and it worked. Maybe the magic is just to wait longer. Keep trying if you have this problem
    – captain
    Feb 11, 2022 at 0:18
1

Long Story Short. :-)

1.) open Terminal

an then Copy & Paste the next Steps in the Terminal

2.) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3.) brew install blueutil

4.) blueutil --pair [Mac adress] 0000

5.) Then (after 5-10 seconds), I typed 0000 on the numbers above the alphabetical keyboard, and pressed 'Return' (also on the main keyboard). I tried 0000 and 'Enter' on the numeric keypad first and that did not work. That got me paired, then I still had to go into the bluetooth settings in the GUI and select the keyboard and 'Connect'.

Ready! :-) Thanks a lot for your Help!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .