By Darryl Mocek on Sep 09, 2014
I have BlueZ v4.101 installed by default on my Ubuntu 14.04 LTS system. I've been using it for a while without too many problems. All of a sudden I started getting an AuthenticationRejection problem when trying to pair with all devices, even devices I've been able to pair with previously. Further analysis using hcidump revealed that I was in fact getting a 'Error: PIN or Key Missing Error: PIN or Key Missing' error. The solution to this problem turned out to be corrupted BlueZ files. When BlueZ detects a local adapter, it creates a directory in /var/lib/bluetooth using the Bluetooth address of the adapter. It then stores a bunch of files in the directory including information on devices which have been discovered and paired with. I tried removing references to a device I was trying to pair with from all files, but I still received the same error. I ended up wiping the entire directory for the adapter under /var/lib/bluetooth and re-booting (not sure if re-booting is necessary) and my problem was solved. Note that this will wipe the list of devices you've paired with.