Skip to content

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

Merged
liamcottle merged 3 commits into
meshcore-dev:devfrom
netrunnereve:bluetooth-name
Nov 15, 2026
Merged

liamcottle merged 3 commits 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.

Comment thread examples/companion_radio/MyMesh.cpp Resolved
@netrunnereve
netrunnereve force-pushed the bluetooth-name branch 2 times, most recently from 1cdd9c5 to 2d44e14 Compare November 11, 2026 18:58
Comment thread examples/companion_radio/MyMesh.cpp Resolved
Comment thread examples/companion_radio/MyMesh.cpp Resolved
Comment thread examples/companion_radio/NodePrefs.h Resolved
@liamcottle

Copy link
Copy Markdown
Member

Hey, thanks for the PR @netrunnereve, I've left some comments in the review above.

I mean I could add another command to change the prefix as well but let's see what the maintainers think about this first.

We could possibly check if a custom name was set. If so, don't add the prefix. If a custom name is not set, add the prefix by default. That way users that want to hide that it's a MeshCore device, don't see the MeshCore- prefix, unless they manually set it in the custom name.

This could probably be done by passing in an empty string as prefix in bluetooth_interface.begin(...) and fallback to passing in BLE_NAME_PREFIX if no custom name is configured.

@netrunnereve

Copy link
Copy Markdown
Author

Okay I think this covers everything!

@liamcottle
liamcottle merged commit b6a9b5d into meshcore-dev:dev Nov 15, 2026
20 checks passed
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.

4 participants