Move name to AD and restrict length
This commit is contained in:
parent
2852fe315c
commit
64e89b09ea
1 changed files with 3 additions and 2 deletions
|
@ -56,7 +56,8 @@ enum advertising_type {
|
|||
#define CURR_ADV(adv) (adv << 4)
|
||||
|
||||
#define ZMK_ADV_CONN_NAME \
|
||||
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_USE_NAME, \
|
||||
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_USE_NAME | \
|
||||
BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \
|
||||
BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL)
|
||||
|
||||
static struct zmk_ble_profile profiles[ZMK_BLE_PROFILE_COUNT];
|
||||
|
@ -65,7 +66,7 @@ static uint8_t active_profile;
|
|||
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
|
||||
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)
|
||||
|
||||
BUILD_ASSERT(DEVICE_NAME_LEN <= 27, "ERROR: BLE device name is too long. Max length: 27");
|
||||
BUILD_ASSERT(DEVICE_NAME_LEN <= 16, "ERROR: BLE device name is too long. Max length: 16");
|
||||
|
||||
static struct bt_data zmk_ble_ad[] = {
|
||||
BT_DATA_BYTES(BT_DATA_GAP_APPEARANCE, 0xC1, 0x03),
|
||||
|
|
Loading…
Add table
Reference in a new issue