I've just revisited this issue on 16.04 with the HWE v4.13 kernel and still having the same problem.
This time however I seem to have discovered a workaround that successfully pairs the Apple Wireless Keyboard A1016. This uses the 'bluetoothctl' CLI tool in the terminal. In short, instead of initiating the pairing from the PC you must INITIATE PAIRING FROM THE KEYBOARD. 1. Activate the KeyboardDisplay PIN agent 2. Start the bluetooth controller scanning. 3. Power-on the BT Keyboard and ensure it is in pairing mode (LED flashing rapidly) 4. Once the PC discovers the BT Keyboard REMOVE it (this deletes any existing stored configuration) 5. After a few seconds the BT Keyboard should be re-discovered. 6. CONNECT to the BT Keyboard 7. Wait a few seconds then type a PIN code ON THE BT KEYBOARD and press Enter 8. The PC will prompt for the PIN code. Type it on an already-connected keyboard (built-in, USB, etc.) 9. Once the "Paired: yes" message is reported TRUST the BT Keyboard tj ~ bluetoothctl [NEW] Controller 00:1F:3A:E0:0A:AF XPS1530 [default] [NEW] Device 00:0A:95:44:37:11 Apple Wireless Keyboard [NEW] Device 2C:8A:72:15:A8:55 HTC One M8 [NEW] Device 00:07:61:3B:86:98 Bluetooth Travel Mouse [NEW] Device 00:19:15:29:83:14 Think Outside Keyboard [bluetooth]# power on [CHG] Controller 00:1F:3A:E0:0A:AF Class: 0x3c010c Changing power on succeeded [CHG] Controller 00:1F:3A:E0:0A:AF Powered: yes [bluetooth]# agent KeyboardDisplay Agent registered [bluetooth]# default-agent Default agent request successful [bluetooth]# scan on Discovery started [CHG] Controller 00:1F:3A:E0:0A:AF Discovering: yes [CHG] Device 00:0A:95:44:37:11 LegacyPairing: yes [CHG] Device 00:0A:95:44:37:11 RSSI: -56 [CHG] Device 00:0A:95:44:37:11 RSSI: -45 [CHG] Device 00:0A:95:44:37:11 RSSI: -60 [CHG] Device 00:0A:95:44:37:11 RSSI: -51 [CHG] Device 00:0A:95:44:37:11 RSSI: -42 [bluetooth]# devices Device 00:0A:95:44:37:11 Apple Wireless Keyboard Device 2C:8A:72:15:A8:55 HTC One M8 Device 00:07:61:3B:86:98 Bluetooth Travel Mouse Device 00:19:15:29:83:14 Think Outside Keyboard [CHG] Device 00:0A:95:44:37:11 RSSI: -50 [bluetooth]# remove 00:0A:95:44:37:11 [DEL] Device 00:0A:95:44:37:11 Apple Wireless Keyboard Device has been removed [NEW] Device 00:0A:95:44:37:11 Apple Wireless Keyboard [bluetooth]# devices Device 2C:8A:72:15:A8:55 HTC One M8 Device 00:07:61:3B:86:98 Bluetooth Travel Mouse Device 00:19:15:29:83:14 Think Outside Keyboard Device 00:0A:95:44:37:11 Apple Wireless Keyboard [bluetooth]# connect 00:0A:95:44:37:11 Attempting to connect to 00:0A:95:44:37:11 Request PIN code [agent] Enter PIN code: 1234 [CHG] Device 00:0A:95:44:37:11 Connected: yes [CHG] Device 00:0A:95:44:37:11 Modalias: usb:v05ACp0209d0110 [CHG] Device 00:0A:95:44:37:11 UUIDs: 00001124-0000-1000-8000-00805f9b34fb [CHG] Device 00:0A:95:44:37:11 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 00:0A:95:44:37:11 Paired: yes Connection successful [Apple Wireless Keyboard]# trust 00:0A:95:44:37:11 [CHG] Device 00:0A:95:44:37:11 Trusted: yes Changing 00:0A:95:44:37:11 trust succeeded [CHG] Device 00:07:61:3B:86:98 Connected: yes [Apple Wireless Keyboard]# -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to bluez in Ubuntu. https://bugs.launchpad.net/bugs/1490347 Title: [Regression] 16:04 + 15:10 - Cannot pair with devices using (legacy LMP Link Management Protocol) PIN codes Status in Bluez Utilities: New Status in bluez package in Ubuntu: Triaged Status in bluez source package in Wily: Triaged Status in bluez source package in Xenial: Confirmed Bug description: Bluez 5.3 does not have support for pairing with devices (such as keyboards) that use a PIN code for pairing. A mouse pairs correctly. From my research it seems as if the ChromeOS project developed patches to fix this and they are supposed to have been included in Bluez 5.4 (that statement dated April 2013) but I've not yet identified them. "The agent's implementation in bt_console/bluetoothctl upstream is incomplete, missing some functions like DisplayPincode." https://code.google.com/p/chromium/issues/detail?id=222661 Along with the loss of Headset profiles meaning VoIP applications can no longer use HSP/HFP profiles (requiring functionality yet to land in Ofono) this cripples the use of Bluetooth for much else than A2DP or mouse input. Attempting to pair with, for example, an Apple Wireless Keyboard that pairs and works correctly with 14.04 LTS, fails totally on 15.10. The mouse shown below is already paired, connected, and working. $ bluetoothctl [NEW] Controller 00:1F:3A:E0:0A:AF hephaestion.lan.iam.tj [default] [NEW] Device 00:0A:95:4B:BD:C2 Apple Wireless Keyboard [NEW] Device 00:07:61:3B:86:98 Bluetooth Travel Mouse [bluetooth]# agent on Agent registered [bluetooth]# default-agent Default agent request successful [bluetooth]# scan on Discovery started [CHG] Controller 00:1F:3A:E0:0A:AF Discovering: yes [CHG] Device 00:0A:95:4B:BD:C2 LegacyPairing: yes [CHG] Device 00:0A:95:4B:BD:C2 RSSI: -48 [bluetooth]# pair 00:0A:95:4B:BD:C2 Attempting to pair with 00:0A:95:4B:BD:C2 >>> at this point nothing is happening >>> so I press Enter on the keyboard and... [agent] PIN code: 791166 >>> I type 791166 Enter and ... [agent] PIN code: 237744 >>> I type 237744 Enter and... [agent] PIN code: 358866 >>> I type 358866 Enter and... Request PIN code [agent] Enter PIN code: 1234 >>> I type 1234 Enter on the keyboard and 1234 at the prompt... Failed to pair: org.bluez.Error.AuthenticationFailed This cycle repeats in various permuations. Sometimes the final "Request PIN code" does not appear. To manage notifications about this bug go to: https://bugs.launchpad.net/bluez/+bug/1490347/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp