File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,11 @@ config BT_PERIPHERAL_PREF_LATENCY
238
238
config BT_PERIPHERAL_PREF_TIMEOUT
239
239
default 400
240
240
241
+ # The device name should be 16 characters or less so it fits within the
242
+ # advertising data.
243
+ config BT_DEVICE_NAME_MAX
244
+ default 16
245
+
241
246
endif # ZMK_BLE
242
247
243
248
endmenu # Output Types
Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ static uint8_t active_profile;
66
66
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
67
67
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
68
68
69
- BUILD_ASSERT (DEVICE_NAME_LEN <= 16 , "ERROR: BLE device name is too long. Max length: 16" );
69
+ BUILD_ASSERT (
70
+ DEVICE_NAME_LEN <= CONFIG_BT_DEVICE_NAME_MAX ,
71
+ "ERROR: BLE device name is too long. Max length: " STRINGIFY (CONFIG_BT_DEVICE_NAME_MAX ));
70
72
71
73
static struct bt_data zmk_ble_ad [] = {
72
74
BT_DATA_BYTES (BT_DATA_GAP_APPEARANCE , 0xC1 , 0x03 ),
You can’t perform that action at this time.
0 commit comments