mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
WifiProv: Extended support for configuring if link encryption is needed
when attempting to read / write characteristic to bluedroid stack
This commit is contained in:
parent
3cc134672b
commit
0dc0f8ad51
@ -405,8 +405,10 @@ static ssize_t populate_gatt_db(esp_gatts_attr_db_t **gatt_db_generated)
|
|||||||
(*gatt_db_generated)[i].att_desc.value = (uint8_t *) &character_prop_read_write;
|
(*gatt_db_generated)[i].att_desc.value = (uint8_t *) &character_prop_read_write;
|
||||||
} else if (i % 3 == 2) {
|
} else if (i % 3 == 2) {
|
||||||
/* Characteristic Value */
|
/* Characteristic Value */
|
||||||
(*gatt_db_generated)[i].att_desc.perm = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE | \
|
(*gatt_db_generated)[i].att_desc.perm = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE ;
|
||||||
ESP_GATT_PERM_READ_ENCRYPTED | ESP_GATT_PERM_WRITE_ENCRYPTED;
|
#if CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION
|
||||||
|
(*gatt_db_generated)[i].att_desc.perm |= ESP_GATT_PERM_READ_ENCRYPTED | ESP_GATT_PERM_WRITE_ENCRYPTED;
|
||||||
|
#endif
|
||||||
(*gatt_db_generated)[i].att_desc.uuid_length = ESP_UUID_LEN_128;
|
(*gatt_db_generated)[i].att_desc.uuid_length = ESP_UUID_LEN_128;
|
||||||
(*gatt_db_generated)[i].att_desc.uuid_p = protoble_internal->g_nu_lookup[i / 3].uuid128;
|
(*gatt_db_generated)[i].att_desc.uuid_p = protoble_internal->g_nu_lookup[i / 3].uuid128;
|
||||||
(*gatt_db_generated)[i].att_desc.max_length = CHAR_VAL_LEN_MAX;
|
(*gatt_db_generated)[i].att_desc.max_length = CHAR_VAL_LEN_MAX;
|
||||||
|
@ -34,7 +34,6 @@ menu "Wi-Fi Provisioning Manager"
|
|||||||
config WIFI_PROV_BLE_FORCE_ENCRYPTION
|
config WIFI_PROV_BLE_FORCE_ENCRYPTION
|
||||||
bool
|
bool
|
||||||
prompt "Force Link Encryption during characteristic Read / Write"
|
prompt "Force Link Encryption during characteristic Read / Write"
|
||||||
depends on BT_NIMBLE_ENABLED
|
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Used to enforce link encryption when attempting to read / write characteristic
|
Used to enforce link encryption when attempting to read / write characteristic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user