Home › Forums › RetroPie Project › Controller Configuration in RetroPie › Register and Connect to Bluetooth Device not working › Reply To: Register and Connect to Bluetooth Device not working
I don’t like to configure BT viathe command line but if I really have to I follow this HowTo that I wrote. Good luck! 🙂
| – Bluetooth – |
At the time of writing (dec. 2013) Bluetooth in Linux is a mess. Bluez 5.5 seems to have solved the probs, but Debian Stable (7.0, Wheezy) still uses version 4.
List bluetooth dongles:
Example of output:
Get MAC address of bluetooth keyboard or other device. Set device in pairing mode!:
Example of output:
AA:BB:CC:00:11:22 Wireless Keyboard
Pair said device:
bluez-simple-agent hci0 AA:BB:CC:00:11:22
It will ask for a confirmation code to be made up by you (I’d choose 0000). Then you must type it in on the on the BT-keyboard and press Enter. Sometimes the standard code used is 0000.
If the following error code is returned then you’ve already successfully paired said device:
Connecting device failed: org.bluez.Error.AlreadyExists: Already Exists
bluez-test-device trusted AA:BB:CC:00:11:22 yes
Connect device (this is where it always goes wrong!!!):
bluez-test-input connect AA:BB:CC:00:11:22 yes
Example of connect errors:
org.bluez.Error.Failed Connection refused (111)
org.bluez.Error.ConnectionAttemptFailed: Host is down (112)
And then what???
| – Trouble shooting – |
Restart bluetooth (choose the one that fits you system):
su -c “service bluetooth restart” (Debian 7 Wheezy)
sudo /etc/init.d/bluetooth restart (Ubuntu 10.04)
Remove a paired device?
bluez-simple-agent hci0 AA:BB:CC:00:11:22 remove
In Ubuntu 10.04 the bluez Python scripts called ‘simple-agent’, ‘test-device’ etc. reside in (!!):
Error: “Creating device failed: org.bluez.Error.AlreadyExists: Bonding already exists”. Solve by: ??