Sponsored Content
Operating Systems OS X (Apple) Change Name of Bluetooth Device from Command Line in macOS Post 303042105 by Neo on Saturday 14th of December 2019 10:52:42 PM
Old 12-14-2019
Change Name of Bluetooth Device from Command Line in macOS

Mac Version 10.15.2 (macOS Catalina)

Does anyone know how to change the name of a connected bluetooth device from the command line on macOS?

I am having trouble with various bluetooth devices which I cannot get the "rename" option in the GUI to "save" properly and so I cannot rename a few devices (two keyboards, one headset)

I tried installing BluetoothConnector

Code:
brew install bluetoothconnector

but this utility only permits connecting and disconnecting (and notify).

Code:
Catalina:~ Tim$ BluetoothConnector
Usage: BluetoothConnector [--connect | -c] [--disconnect | -d] 00-00-00-00-00-00 [--notify | -n]

Get the MAC address from the list below (if your device is missing, pair it with your computer first):
00-cd-fe-b8-ae-ef - Tim's iPhone 6S
20-c9-d0-96-1f-00 - TIM-MAC-MINI
60-f8-1d-2c-55-4c - Tim iPhone Plus
00-00-00-00-08-1e - AWEI MUSIC
98-5a-eb-bf-82-ae - Tim Bass's Keyboard #1
1c-36-bb-0a-ca-08 - Magic Mouse
54-46-6b-91-e6-0d - Bluetooth 3.0 Keyboard

I was able to change the the name of the mouse using the GUI, but when I change the name of the keyboards or bluetooth headset, the name changes do not "stick".

So, searched the web for a way to do this with a single command line tool and did not find anything.

If anyone has one, that would be great; but is is not critical.

The issue I am facing is that I sometimes like to use a small backlit bluetooth keyboard in the dark, I bought this keyboard on Aliexpress:

AVATTO Ultra-thin 7 Color LED Backlit Wireless Bluetooth Tablet Keyboard For Android, Mac OS, Windows Tablet Phone

This keyboard works "OK" and the backlight feature is really good; but there is some communications problem with it when I try to manage it using bluetooth preferences (it hangs). The keyboard works fine; but it has as adverse effect on bluetooth setup, overall.

It's not a big deal, just an annoyance.


I don't think renaming it will make a difference, but I wanted to try anyway; but I cannot rename it via the GUI (in a way which actually "holds"), so I am looking for some robust command line tools for the mac.

BluetoothConnector does not rename devices.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change the GRUB command line to graphical interface?

Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (1 Reply)
Discussion started by: lee_chongeu
1 Replies

2. Linux

How change GRUB command line to graphical interface?

Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (4 Replies)
Discussion started by: lee_chongeu
4 Replies

3. UNIX for Advanced & Expert Users

How to change size of command line in unix

Hi, I'm trying to execute my program from $prompt by passing many parameters which is more than 300 charecters in line but unix not accepting those many charecters, could some one help me how to increase the size? thanks (7 Replies)
Discussion started by: krishna
7 Replies

4. UNIX for Advanced & Expert Users

%device line change

Hello and thank you in advance for any assistance. Working with SCO 5.0.5 our SCSI tape device is no longer working. Before we replace the unit I want to verify it's not related to a change someone may have made via mkdev tape. For years the boot message would list the tape device as this:... (1 Reply)
Discussion started by: sighbrrguy
1 Replies

5. Shell Programming and Scripting

Using sed command to change end of line

I am looking to change a data file into a javascript string and this is the code that I am using: sed -i '' -e 's/^/str += "/' -e 's/$/";/' file.xml The first part -e 's/^/str += "/' works as intended, but the second part -e 's/$/";/' adds an additional newline to my file, so that instead of... (3 Replies)
Discussion started by: figaro
3 Replies

6. Shell Programming and Scripting

Change filename extensions..from command line

I want to change the extensions of a folder full of files (some of the files are located in subfolders as well) to another extension, but instead of replacing the files I want the new files to be copied into a newly created folder. Here is the folder structure: /Downloads/3eb... (3 Replies)
Discussion started by: bound4h
3 Replies

7. Shell Programming and Scripting

one line command to change mode only if necessary

hi, sorry for posting this for a quick answer. Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode? Running chmod updates the last access/modified timestamp on the files, and i want to... (11 Replies)
Discussion started by: ysrini
11 Replies

8. Shell Programming and Scripting

Script to read command line input and change it to some form

Hi, I want to write a small code in which script changes command line input to some form. Example script.sh a1 a2 a3 a4 ..... output should be "a1|a2|a3|....." Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
2 Replies

9. Shell Programming and Scripting

Issue with shutdown command in script (MacOS High Sierra)

Hello, I have a backup script that runs an rsync backup to an external drive. I use the script frequently on Windows and Linux and have installed it on a Mac. The script has an option to run shutdown after the backup has completed. Since backup can take hours to run, this is an option that is... (10 Replies)
Discussion started by: LMHmedchem
10 Replies
NG_BLUETOOTH(4) 					   BSD Kernel Interfaces Manual 					   NG_BLUETOOTH(4)

NAME
ng_bluetooth -- placeholder for global Bluetooth variables SYNOPSIS
#include <sys/types.h> #include <netgraph/bluetooth/include/ng_bluetooth.h> DESCRIPTION
The ng_bluetooth module is a placeholder for global Bluetooth variables. All Bluetooth variables can be examined and changed via sysctl(8). Bluetooth Variables Below is the description of default variables. Each Bluetooth module might add its own variables to the tree. net.bluetooth.version A read-only integer variable that shows the current version of the Bluetooth stack. net.bluetooth.hci.command_timeout A read-write integer variable that controls the Host Controller Interface (HCI) command timeout (in seconds), i.e., how long the HCI layer will wait for the Command_Complete or Command_Status event from a Bluetooth device. net.bluetooth.hci.connection_timeout A read-write integer variable that controls the HCI connection timeout, i.e. how long the HCI layer will wait for the Connection_Complete event. Normally this should not be required as Bluetooth devices have connection timeout of their own and will send event back. This timeout is required to ensure that no connection will stall in case when the HCI transport layer is broken. Be careful when changing this variable. Make sure you understand what you are doing. net.bluetooth.hci.max_neighbor_age A read-write integer variable that controls time-to-live (in seconds) for entries in the HCI neighbor cache. Every time a Bluetooth device performs an Inquiry operation, the results will be put in cache. Later when a Bluetooth device establishes a baseband connec- tion, it will try to find the matching entry in the cache and use it. This might speed up establishment of the baseband connection. net.bluetooth.l2cap.rtx_timeout A read-write integer variable that controls the Link Layer Control and Adaptation Protocol (L2CAP) Retransmission Timeout (RTX) (in seconds). Every time the L2CAP layer submits a control command, the RTX timeout is set. The value of the RTX timeout should be greater or equal to the value of the HCI connection timeout. Be careful when changing this variable. Make sure you understand what you are doing. net.bluetooth.l2cap.ertx_timeout A read-write integer variable that controls the L2CAP Extended Retransmission Timeout (ERTX) (in seconds). In some cases remote peer may respond with PENDING status to the L2CAP control command. In this case the L2CAP command timeout is reset to the ERTX timeout value. The value of the ERTX timeout should be greater or equal to the value of the RTX timeout. Be careful when changing this variable. Make sure you understand what you are doing. SEE ALSO
ng_btsocket(4), ng_hci(4), ng_l2cap(4), sysctl(8) HISTORY
The ng_bluetooth module was implemented in FreeBSD 5.0. AUTHORS
Maksim Yevmenkin <m_evmenkin@yahoo.com> BSD
November 9, 2002 BSD
All times are GMT -4. The time now is 12:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy