Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow MAC address to be dynamically included in Bluetooth device name #1668

Open
xudongzheng opened this issue Feb 16, 2023 · 0 comments · May be fixed by #2785
Open

Allow MAC address to be dynamically included in Bluetooth device name #1668

xudongzheng opened this issue Feb 16, 2023 · 0 comments · May be fixed by #2785

Comments

@xudongzheng
Copy link
Contributor

For users with multiple keyboards, having this feature as an option makes it easier to distinguish one keyboard from another.

This can be implemented with CONFIG_BT_DEVICE_NAME_DYNAMIC=y and bt_set_name().

The default Bluetooth name (prefix) can be truncated as needed such that the resulting name fits within CONFIG_BT_DEVICE_NAME_MAX. Part of the MAC address can be used to create a unique suffix.

ZMK currently includes the name explicitly in the advertising data

BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
so some minor refactoring is needed if one wants the dynamic name to be visible in the advertising data.

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 a pull request may close this issue.

1 participant