Compare commits

...

3 Commits

Author SHA1 Message Date
dependabot[bot] 6772c53d92
Merge 25625606cb into ad7fbfef92 2025-12-05 16:40:32 +01:00
Artem ad7fbfef92
feat(ble): Use appearance set in the BT_DEVICE_APPEARANCE config (#3115)
Properly use the BT_DEVICE_APPEARANCE Zephyr symbol to advertise
the correct appearance, allowing overrides, for e.g. mice.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2025-12-04 13:53:47 -05:00
dependabot[bot] 25625606cb
chore(deps): bump js-yaml from 4.1.0 to 4.1.1 in /docs
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 16:33:07 +00:00
5 changed files with 12 additions and 6 deletions

View File

@ -25,6 +25,9 @@ config USB_DEVICE_PID
config USB_DEVICE_MANUFACTURER config USB_DEVICE_MANUFACTURER
default "ZMK Project" default "ZMK Project"
config BT_DEVICE_APPEARANCE
default 961
config BT_DIS_PNP_VID config BT_DIS_PNP_VID
default 0x1D50 default 0x1D50

View File

@ -65,13 +65,15 @@ static uint8_t active_profile;
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME #define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1) #define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
#define DEVICE_APPEARANCE \
(uint8_t) CONFIG_BT_DEVICE_APPEARANCE, (uint8_t)(CONFIG_BT_DEVICE_APPEARANCE >> 8)
BUILD_ASSERT( BUILD_ASSERT(
DEVICE_NAME_LEN <= CONFIG_BT_DEVICE_NAME_MAX, DEVICE_NAME_LEN <= CONFIG_BT_DEVICE_NAME_MAX,
"ERROR: BLE device name is too long. Max length: " STRINGIFY(CONFIG_BT_DEVICE_NAME_MAX)); "ERROR: BLE device name is too long. Max length: " STRINGIFY(CONFIG_BT_DEVICE_NAME_MAX));
static struct bt_data zmk_ble_ad[] = { static struct bt_data zmk_ble_ad[] = {
BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, 0xC1, 0x03), BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, DEVICE_APPEARANCE),
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA_BYTES(BT_DATA_UUID16_SOME, 0x12, 0x18, /* HID Service */ BT_DATA_BYTES(BT_DATA_UUID16_SOME, 0x12, 0x18, /* HID Service */
0x0f, 0x18 /* Battery Service */ 0x0f, 0x18 /* Battery Service */

View File

@ -16,3 +16,4 @@ See [Configuration Overview](index.md) for instructions on how to change these s
| `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Aggregate config that enables both `CONFIG_ZMK_BLE_EXPERIMENTAL_CONN` and `CONFIG_ZMK_BLE_EXPERIMENTAL_SEC`. | n | | `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Aggregate config that enables both `CONFIG_ZMK_BLE_EXPERIMENTAL_CONN` and `CONFIG_ZMK_BLE_EXPERIMENTAL_SEC`. | n |
| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts.) | n | | `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts.) | n |
| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | | `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y |
| `CONFIG_BT_DEVICE_APPEARANCE` | int | Bluetooth device [appearance value](https://bluetooth.com/specifications/assigned-numbers) (should be converted from hexadecimal to decimal). | 961 |

View File

@ -16,7 +16,7 @@
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@mdx-js/react": "^3.1.0", "@mdx-js/react": "^3.1.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.1",
"react": "^18.0.0", "react": "^18.0.0",
"react-async": "^10.0.1", "react-async": "^10.0.1",
"react-copy-to-clipboard": "^5.0.3", "react-copy-to-clipboard": "^5.0.3",
@ -13151,9 +13151,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "4.1.0", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"argparse": "^2.0.1" "argparse": "^2.0.1"

View File

@ -23,7 +23,7 @@
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@mdx-js/react": "^3.1.0", "@mdx-js/react": "^3.1.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.1",
"react": "^18.0.0", "react": "^18.0.0",
"react-async": "^10.0.1", "react-async": "^10.0.1",
"react-copy-to-clipboard": "^5.0.3", "react-copy-to-clipboard": "^5.0.3",