I am using Xubuntu, pure Xfce, 64-bit.
The problem:
I have tried 2 ways; both have failed for different reasons: (1) the commandline way (see below) fails because at no stage does it actually ask for a pin verification. (2) the GUI way using the "Bluetooth" utility (that sounds generic but it's what the tool is actually called and how it is catalogued under Synaptic) fails because the keyboard is unresponsive when the pin is requested by Bluetooth.
How do I pair my device properly with the use of a automatically generated PIN?
I really don't care if the solution will be GUI-based or not, as long as you can get it to pair the secure way, with a PIN. I don't want to be using my keyboard on discovery mode all the time for obvious reasons relating to security.
Details of my failed efforts:
I followed the directions on http://ubuntuforums.org/showthread.php?t=224673 in order to activate a generic bluetooth device (http://www.ebay.com/itm/Mini-Bluetooth-Keyboard-PC-Mac-iPhone-Nokia-PDA-HTC-/110653444332?pt=PCA_Mice_Trackballs&hash=item19c37590ec), which succeeded. Except come the part where I am supposed to be asked for a password, I wasn't. This is a bit disturbing, I think to myself. Anyone in the neighborhood could've in this manner connected to my keyboard and started key-logging my activities.
Anyhow this is how I did it:
peter@peter-xfce:~$ hcitool scan
Scanning ...
peter@peter-xfce:~$ hcitool scan
Scanning ...
00:12:A1:11:04:E9 Bluetooth Keyboard
peter@peter-xfce:~$ gksudo mousepad /etc/bluetooth/hcid.conf
peter@peter-xfce:~$ sudo gedit /etc/default/bluetooth
peter@peter-xfce:~$ sudo /etc/init.d/bluetooth restart
* Stopping bluetooth [ OK ]
* Starting bluetooth [ OK ]
peter@peter-xfce:~$ sudo hidd --connect 00:12:A1:11:04:E9
sudo: hidd: command not found
peter@peter-xfce:~$ hidd --connect 00:12:A1:11:04:E9
The program 'hidd' is currently not installed. You can install it by typing:
sudo apt-get install bluez-compat
[at this point bluez-compat is installed]
peter@peter-xfce:~$ sudo hidd --connect 00:12:A1:11:04:E9
peter@peter-xfce:~$
[can now type using the bluetooth keyboard]
Again this is unacceptable. I don't consider that the device was paired securely because no pin was requested.
Alternatively via GUI:
But the keyboard is unresponsive so I cannot enter to PIN when requested.
sudo apt-get install bluez-compat
. You runbluetoothctl
and thenscan
. Use the device id listed and runpair xx:xx:xx:xx:xx
filling in your device id then runconnect xx:xx:xx:xx:xx
then runtrust xx:xx:xx:xx:xx
. This should mean that your device is paired and correctly working. I got this working on Mate 14.04 running on a Raspberry pi 2 board. Thanks – james-see Dec 09 '15 at 22:02