I am attempting to connect a new bluetooth keyboard (Microsoft surface erganomic keyboard) to my Ubuntu running Dell XPS 15 (2016). I am running Xubuntu 16.10 and kernel version:
root@Flere:~$ uname -a
Linux Flere 4.8.0-28-generic #30-Ubuntu SMP Fri Nov 11 14:03:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
When I try to connect the keyboard with bluetoothctl (as shown in this post: How can a Bluetooth keyboard that requires a code entry be paired in the terminal? I get an authentication failure. If I pair the same keyboard with Windows on the same machine it will ask me to type a number into the keyboard and press enter then it works. I have also tried the built in GUI tool in XFCE with no success.
root@Flere:~$ bluetoothctl
[NEW] Controller [[mac address 1]] Flere [default]
[NEW] Device [[mac address 2]] Ergonomic Keyboard
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller [[mac address 1]] Discovering: yes
[NEW] Device [[mac address 2]] Ergonomic Keyboard
[NEW] Device [[mac address 3]] [[mac address 3 with dashes instead of colon]]
[bluetooth]# pair [[mac address 2]]
Attempting to pair with [[mac address 2]]
[CHG] Device [[mac address 2]] Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device [[mac address 2]] Connected: no