Linux: Change Name/Alias of a Bluetooth Device

So, after searching around, I didn't immediately find the answer.
I hope this post proves useful to someone else searching for the same thing.

I first came across this post on StackExchange.
Then, I found this post on SuperUser.

The gist of it:

If you modify /var/lib/bluetooth/[CONTROLLER]/[DEVICE]/info, then it will modify the alias for the time being after restarting (sudo service bluetooth restart) and repairing to the device, it will yield the new name, but I noticed that it renames the device to its original alias after a few seconds/minute.
Where: [CONTROLLER] is the mac address of your bluetooth controller (if you're only using the built-in controller and not an additional USB device, then you'll only have one directory here).
Where [DEVICE] is the mac address of the remote device to connect and get metadata around the device.

I discovered you could use `bt-device` to update the alias and it seems to be a bit more persistent than modifying the metadata under bluetoothd's configuration.

Let's assume I have a remote device with the mac address of 00:1D:FC:9A:3D:1A (I made this up, fwiw).


bt-device --set 00:1D:FC:9A:3D:1A Alias "My-Device-Alias"

Seems to work better than modifying /var/lib/bluetooth/[CONTROLLER]/[DEVICE]/info, as I can see the updates from the console when running devices from the bluetoothctl console command.
However, I did notice it did not update the metadata in the files in /var/lib/bluetooth.
Seems to be an aesthetic thing, but won't rename the device itself.



Popular posts from this blog

Setup and Install Monero(d) -- p2pool -- xmrig

Build xmrig on Linux

Git: Process