Skip to content

Allow the user to set a custom bluetooth name using the cli - #3754

Open
netrunnereve wants to merge 1 commit into
meshcore-dev:devfrom
netrunnereve:bluetooth-name
Open

netrunnereve wants to merge 1 commit into
meshcore-dev:devfrom
netrunnereve:bluetooth-name

Conversation

@netrunnereve

@netrunnereve netrunnereve commented Nov 3, 2026 •

Copy link
Copy Markdown

This fixes #1243 by letting the user set their own bluetooth name using the cli. If there's no custom name set it'll automatically use the node name instead.

Note that this doesn't let them change the "Meshcore-" prefix as that apparently breaks some apps. If someone really wants to change that they'll have to build the firmware manually with a different BLE_NAME_PREFIX.

This acts as a workaround for #1769 as well since you now can just set a shorter name manually. I tested this on my Heltec v4 companion and it's working fine with a custom name set.

@daneatthrive

Copy link
Copy Markdown

They should implement this and move the default Meshcore - into this method. I think that would solve everything.

@netrunnereve

Copy link
Copy Markdown
Author

They should implement this and move the default Meshcore - into this method. I think that would solve everything.

From the way the backend code is written it looks like the Bluetooth name is intended to have a separate prefix (which can be changed at compile time) followed by the node name. I mean I could add another command to change the prefix as well but let's see what the maintainers think about this first.

sprintf(reply, "> %s", _prefs.ble_name[0] ? _prefs.ble_name : "(not set)");
return true;
}
if (strcmp(command, "set ble_name_clear") == 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using set ble_name_default. The current wording is confusing because it does not 'clear' the BLE name; it resets it to the default value.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants