I have a bluetooth headset which is detected as keyboard. How to change it's device class in Ubuntu?
-
Did you look for its oid (first three hex pairs of its mac addr) in the /usr/share/gnome-bluetooth/pin-code-database.xml ? That's one location to change the type'"keyboard" to type=""headset" or "headphones".– ubfan1Feb 22, 2016 at 0:26
-
Tried to add it to that file. But still got it as keyboard. I looks that type in this file is used only to match device with pin.– graphiteFeb 22, 2016 at 8:27
-
late to the party, but I'm having the same issue. Really wonder why it can't be done.– bluppfiskNov 26, 2017 at 4:06
1 Answer
So I experienced the same thing and I use a Kali Linux what I did was I copied the files from a working bluetooth device
sudo nano /var/lib/bluetooth/EB:D4:3D:F5:C3:32/1C:6B:37:D2:D3:4B/info
J-800L (Head set seen as Keyboard)
I changed the class and services
Name=J-800L
Class=0x302540 # is the class of a KeyBoard
Services=00001101-0000-1000-8000-00805f9b34fb;0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;00001124-0000-1000-8000-00805f9b34fb;00001200-0000-1000-8000-00805f9b34fb;
# Services of KeyBoard
Copy from
sudo nano /var/lib/bluetooth/EB:D4:3D:F5:C3:32/1B:6E:22:C3:F3:8B/info
Q5 (Working Headset)
Name=Q5
Class=0x240404 # is the class of an Headset
Services=0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;
# Services of an Headset
You can just use what I have for Q5 if you don't have a working headset
Then run the :
sudo systemctl restart bluetooth
or
sudo systemctl start bluetooth.service
I hope this was helpful