Skip to content

feat: implement multi profile bluetooth support#26199

Open
damex wants to merge 1 commit intoqmk:developfrom
damex:feat/bluetooth-multi-profile
Open

feat: implement multi profile bluetooth support#26199
damex wants to merge 1 commit intoqmk:developfrom
damex:feat/bluetooth-multi-profile

Conversation

@damex
Copy link
Copy Markdown

@damex damex commented May 9, 2026

Description

implements the QK_BLUETOOTH_PROFILE_* and QK_BLUETOOTH_UNPAIR
keycodes that have been reserved but unwired. fulfills the TODO
in process_connection.c.

extends connection_config_t with a 4-bit bluetooth_profile
field sharing the existing 1-byte slot (4-bit desired_host +
4-bit profile). no eeprom layout shift; existing values decode
unchanged.

new bluetooth.h api: bluetooth_get_max_profile,
bluetooth_set_profile, bluetooth_get_profile,
bluetooth_unpair. weak defaults in bluetooth.c keep rn42
and bluefruit_le working as single-profile. drivers gain
multi-profile by overriding the four functions.

new connection-layer api:

  • connection_set_bluetooth_profile,
  • connection_get_bluetooth_profile,
  • connection_next/prev_bluetooth_profile
    plus connection_bluetooth_profile_changed_user/_kb weak hooks.
    connection_set_bluetooth_profile ensures host is bluetooth as
    a side effect, so pressing BT_PRF1 from usb switches and
    selects in one go.

docs/keycodes.md and docs/features/wireless.md updated:
"not yet implemented" markers removed from the bluetooth profile
rows, and a new section in wireless.md describes the
multi-profile contract.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

wires QK_BLUETOOTH_PROFILE_* and QK_BLUETOOTH_UNPAIR.

extends connection_config_t with 4-bit bluetooth_profile sharing
the existing byte. existing values decode unchanged.

new bluetooth.h api: get_max_profile, set_profile, get_profile, unpair.
new connection.h api: set/get/next/prev_bluetooth_profile and two weak hooks.

weak defaults keep rn42 and bluefruit_le single-profile.
docs are updated.

Signed-off-by: Roman Kuzmitskii <roman@damex.org>
@drashna drashna requested review from a team May 9, 2026 19:52
@zvecr zvecr changed the base branch from master to develop May 9, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant