diff --git a/src/device.c b/src/device.c
index 49c55f0..716da53 100644
--- a/src/device.c
+++ b/src/device.c
gatt_server_cleanup(device);
device->server = bt_gatt_server_new(db, device->att, device->att_mtu,
- main_opts.min_enc_key_size);
+ main_opts.key_size);
if (!device->server) {
error("Failed to initialize bt_gatt_server");
return;
diff --git a/src/hcid.h b/src/hcid.h
index 8924e9b..704f0ba 100644
--- a/src/hcid.h
+++ b/src/hcid.h
bt_gatt_cache_t gatt_cache;
uint16_t gatt_mtu;
- uint8_t min_enc_key_size;
+ uint8_t key_size;
};
extern struct main_opts main_opts;
diff --git a/src/main.c b/src/main.c
index e825082..f49f29c 100644
--- a/src/main.c
+++ b/src/main.c
static const char *gatt_options[] = {
"Cache",
- "MinEncKeySize",
+ "KeySize",
"ExchangeMTU",
NULL
};
g_free(str);
}
- val = g_key_file_get_integer(config, "GATT",
- "MinEncKeySize", &err);
+ val = g_key_file_get_integer(config, "GATT", "KeySize", &err);
if (err) {
DBG("%s", err->message);
g_clear_error(&err);
} else {
- DBG("MinEncKeySize=%d", val);
+ DBG("KeySize=%d", val);
if (val >=7 && val <= 16)
- main_opts.min_enc_key_size = val;
+ main_opts.key_size = val;
}
val = g_key_file_get_integer(config, "GATT", "ExchangeMTU", &err);
diff --git a/src/main.conf b/src/main.conf
index a709976..224334c 100644
--- a/src/main.conf
+++ b/src/main.conf
# Minimum required Encryption Key Size for accessing secured characteristics.
# Possible values: 0 and 7-16. 0 means don't care.
# Defaults to 0
-# MinEncKeySize = 0
+#KeySize = 0
# Exchange MTU size.
# Possible values: 23-517