7

How can I change the name of my paired, remote Bluetooth devices (e.g., "Jabra a1.55.30" to "My headset")?

I'm comfortable using the CLI, if that is more efficient.

  • ls -l /var/lib/bluetooth/, then sudo nano /var/lib/bluetooth/[MAC of onboard Bluetooth card]/names though it does not seem to save the name once a connection is established to the external device (eg: "My newly renamed device name - 00" changes to headset's (EPROM?) string "H7"). Further advice appreciated. – A. M. Shepherd Oct 25 '15 at 8:58
5

First of all, following steps are directly derived from answer by @wolf

Note: This answer has only been tested on Ubuntu 16.04(Dropped here from google search. Thought to add my experience)
And I am assuming that:
a) you have already paired (say) 'QY7' bluetooth earphones with your Ubuntu.
b) it is listed as 'QY7' in the System Settings -> (Hardware) Bluetooth -> Devices

Steps:

1) Get the Mac address of QY7 (We will refer to it as MAC_ADDR_QY7)
System Settings ->
(Hardware) Bluetooth ->
In the 'Devices' list on left side, click on 'QY7' ->
Note down the 'Address' from the right side

In my case, it is:

Address   1C:52:db:7a:48:17


2) Get the Mac address of your computer's 'Bluetooth adapter' (MAC_ADDR_BT_ADAP)
You can open up a terminal and use following command: (source: How to check bluetooth status via terminal)

user@user:~$ hcitool dev

Devices:
hci0    00:1A:5C:C4:B3:41

Thus, in my case, 00:1A:5C:C4:B3:41 is the Mac address of 'Bluetooth adapter'


3) Navigate to /var/lib/bluetooth

user@user:~$ cd /var/lib/bluetooth


4) We need to edit contents of a file called info corresponding to the paired 'QY7'.
But it is located in a folder structure owned by 'root'
For me, the easiest way to proceed was to use GEdit with root privileges and I am sharing the same:

user@user:~$ sudo gedit
(Enter your password)


5) In this opened 'Text Editor' ->
Click 'Open' ->
Other Documents... ->
Folder called MAC_ADDR_BT_ADAP (from step 2) ->
Folder called MAC_ADDR_QY7 (from step 1) ->
Open file called info

Sample contents of info:

[General]
Name=QY7
Class=0x240404
SupportedTechnologies=BR/EDR;
Trusted=true
Blocked=false
...


6) We only need to modify the value corresponding to 'Name'. That is:

Name=modified_name_for_qy7

After modifying, save the file and close the text editor!


7) Now, we need to restart the bluetooth service.

user@user:~$ sudo service bluetooth restart
(Enter your password)


8) Verify that the name has been updated in System Settings -> (Hardware) Bluetooth -> Devices


Job complete!

3
+200

I don't use bluetooth so I can't test, but I found something that should work:

  1. When your device is connected, it should be listed in /var/lib/bluetooth by its MAC address. In that MAC address folder should be a config file. Edit the line that starts with name to the name you'd like.

  2. Restart bluetooth: sudo service bluetooth restart

I believe this would be the same method to change your local bluetooth broadcast name, but you might need to change another conf file too

  • After all wneh you open bluetooth settings dialog, you'll see device still has its default name and Name field at info file has been changed so to defive default name. I'd tried to rename couple of devices and result always the same. So there should be some service which changes info file on service restart or some other event. – sempasha Nov 23 '19 at 7:33
0

/var/lib/bluetooth/[MAC ADDRESS of adapter]/[MAC ADDRESS of remote device]/info file has Name for the device.

So you can change device name in this file as you wish.

Please, do not forget to restart of bluetooth demon after name change

sudo service bluetooth restart

However, it's not stable for me since some paring event make name return to original name. It's annoying and no idea under Bluez version 5.48 under Ubuntu 18.04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.