Fake pass-code from Ubuntu Bluetooth GUI

Today, I bought a Bluetooth 4.0 dongle to connect my Logitech K760 keyboard. But I could not get it working with my Ubuntu system. Initially, I thought the Bluetooth adaptor does not support Ubuntu, as the product description says it only supports Windows… But lsusb shows the below output, which to me does not look like an OS issue.

xinquan@:~$ lsusb 
Bus 002 Device 003: ID 03f0:0324 Hewlett-Packard SK-2885 keyboard
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 0b95:772a ASIX Electronics Corp. AX88772A Fast Ethernet
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

After attempting to connect via the Bluetooth GUI, it gave me a passcode to type in on my wireless keyboard, which I proceed to do. It immediately gave me this error: ‘Logitech K760 failed to connect’.


After some googling, it turns out that the passcode from the Bluetooth GUI was bogus, the correct passcode can be obtained from the command tool hcidump! Goshi… After I typed the passcode from hcidump, it connected successfully!

sudo apt-get install bluez-hcidump
sudo hcidump -at | grep -A 1 "User Passkey"

2015-03-27 11:29:29.787512 > HCI Event: User Passkey Notification (0x3b) plen 10
    bdaddr 00:1F:20:3E:53:A2 passkey 359872

Leave a Reply

Your email address will not be published. Required fields are marked *