11

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.

1
  • 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. Commented Oct 25, 2015 at 8:58

5 Answers 5

11

This information is still valid for Ubuntu 22.04

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][2])
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!

2
  • These instructions worked for me on Linux Mint. Thanks! Commented May 16, 2020 at 15:51
  • After connecting to the device, it always reverts back to the original name.
    – csha
    Commented Mar 27, 2023 at 12:33
4
+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

1
  • 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
    Commented Nov 23, 2019 at 7:33
3

I had the same problem as Xristos. I fixed creating a new line:

Alias=My_Device

When the device connects, the Name variable is reset but not the Alias variable. I hope this helps, I can't reply directly to Xristos because I don't have any points yet.

2
  • Thank you very much for this. I've wanted to do this for months. Commented Aug 29, 2022 at 14:22
  • After this PR, changing the Alias is the correct way to do this on elementary OS!
    – csha
    Commented Aug 21, 2023 at 8:32
1

The problem is once you connect the device, it reverts back to the original name so my headset is called "BH-M91". I changed it to "BT Headset" restarted the bluetooth service and it was fine. After I connected to "BT Headseet" it reverted back and stayed that way???

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 and acknowledge you have read our privacy policy.

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