diff --git a/android/bluetooth.c b/android/bluetooth.c
index a2ab445..563a743 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
if (missing_settings & MGMT_SETTING_SECURE_CONN)
set_mode(MGMT_OP_SET_SECURE_CONN, 0x01);
- if (missing_settings & MGMT_SETTING_PAIRABLE)
- set_mode(MGMT_OP_SET_PAIRABLE, 0x01);
+ if (missing_settings & MGMT_SETTING_BONDABLE)
+ set_mode(MGMT_OP_SET_BONDABLE, 0x01);
load_devices_info(cb);
load_devices_cache();
diff --git a/lib/mgmt.h b/lib/mgmt.h
index c229feb..46766a9 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
#define MGMT_SETTING_CONNECTABLE 0x00000002
#define MGMT_SETTING_FAST_CONNECTABLE 0x00000004
#define MGMT_SETTING_DISCOVERABLE 0x00000008
-#define MGMT_SETTING_PAIRABLE 0x00000010
+#define MGMT_SETTING_BONDABLE 0x00000010
#define MGMT_SETTING_LINK_SECURITY 0x00000020
#define MGMT_SETTING_SSP 0x00000040
#define MGMT_SETTING_BREDR 0x00000080
#define MGMT_OP_SET_FAST_CONNECTABLE 0x0008
-#define MGMT_OP_SET_PAIRABLE 0x0009
+#define MGMT_OP_SET_BONDABLE 0x0009
#define MGMT_OP_SET_LINK_SECURITY 0x000A
"Set Discoverable",
"Set Connectable",
"Set Fast Connectable", /* 0x0008 */
- "Set Pairable",
+ "Set Bondable",
"Set Link Security",
"Set Secure Simple Pairing",
"Set High Speed",
diff --git a/src/adapter.c b/src/adapter.c
index b216a28..668274a 100644
--- a/src/adapter.c
+++ b/src/adapter.c
store_adapter_info(adapter);
}
- if (changed_mask & MGMT_SETTING_PAIRABLE) {
+ if (changed_mask & MGMT_SETTING_BONDABLE) {
g_dbus_emit_property_changed(dbus_conn, adapter->path,
ADAPTER_INTERFACE, "Pairable");
adapter->pairable_timeout_id = 0;
- set_mode(adapter, MGMT_OP_SET_PAIRABLE, 0x00);
+ set_mode(adapter, MGMT_OP_SET_BONDABLE, 0x00);
return FALSE;
}
adapter->pairable_timeout_id = 0;
}
- if (!(adapter->current_settings & MGMT_SETTING_PAIRABLE))
+ if (!(adapter->current_settings & MGMT_SETTING_BONDABLE))
return;
if (adapter->pairable_timeout > 0)
param = &cp;
len = sizeof(cp);
break;
- case MGMT_SETTING_PAIRABLE:
- opcode = MGMT_OP_SET_PAIRABLE;
+ case MGMT_SETTING_BONDABLE:
+ opcode = MGMT_OP_SET_BONDABLE;
param = &mode;
len = sizeof(mode);
break;
{
struct btd_adapter *adapter = user_data;
- return property_get_mode(adapter, MGMT_SETTING_PAIRABLE, iter);
+ return property_get_mode(adapter, MGMT_SETTING_BONDABLE, iter);
}
static void property_set_pairable(const GDBusPropertyTable *property,
{
struct btd_adapter *adapter = user_data;
- property_set_mode(adapter, MGMT_SETTING_PAIRABLE, iter, id);
+ property_set_mode(adapter, MGMT_SETTING_BONDABLE, iter, id);
}
static gboolean property_get_pairable_timeout(
bool btd_adapter_get_pairable(struct btd_adapter *adapter)
{
- if (adapter->current_settings & MGMT_SETTING_PAIRABLE)
+ if (adapter->current_settings & MGMT_SETTING_BONDABLE)
return true;
return false;
!(adapter->current_settings & MGMT_SETTING_LE))
set_mode(adapter, MGMT_OP_SET_LE, 0x01);
- if (!(adapter->current_settings & MGMT_SETTING_PAIRABLE))
- set_mode(adapter, MGMT_OP_SET_PAIRABLE, 0x01);
+ if (!(adapter->current_settings & MGMT_SETTING_BONDABLE))
+ set_mode(adapter, MGMT_OP_SET_BONDABLE, 0x01);
if (!kernel_conn_control)
set_mode(adapter, MGMT_OP_SET_CONNECTABLE, 0x01);
diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 859e7df..03d0a05 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
cmd_setting(mgmt, index, MGMT_OP_SET_FAST_CONNECTABLE, argc, argv);
}
-static void cmd_pairable(struct mgmt *mgmt, uint16_t index, int argc,
+static void cmd_bondable(struct mgmt *mgmt, uint16_t index, int argc,
char **argv)
{
- cmd_setting(mgmt, index, MGMT_OP_SET_PAIRABLE, argc, argv);
+ cmd_setting(mgmt, index, MGMT_OP_SET_BONDABLE, argc, argv);
}
static void cmd_linksec(struct mgmt *mgmt, uint16_t index, int argc,
{ "discov", cmd_discov, "Toggle discoverable state" },
{ "connectable",cmd_connectable,"Toggle connectable state" },
{ "fast-conn", cmd_fast_conn, "Toggle fast connectable state" },
- { "pairable", cmd_pairable, "Toggle pairable state" },
+ { "bondable", cmd_bondable, "Toggle bondable state" },
+ { "pairable", cmd_bondable, "Toggle bondable state" },
{ "linksec", cmd_linksec, "Toggle link level security" },
{ "ssp", cmd_ssp, "Toggle SSP mode" },
{ "sc", cmd_sc, "Toogle SC support" },
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 6841341..07522c3 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
mgmt_send(data->mgmt, MGMT_OP_SET_SSP, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
- mgmt_send(data->mgmt, MGMT_OP_SET_PAIRABLE, data->mgmt_index,
+ mgmt_send(data->mgmt, MGMT_OP_SET_BONDABLE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
}
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index e69c9e3..99c36ac 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
.expect_status = MGMT_STATUS_NOT_SUPPORTED,
};
-static const char set_pairable_on_param[] = { 0x01 };
-static const char set_pairable_invalid_param[] = { 0x02 };
-static const char set_pairable_garbage_param[] = { 0x01, 0x00 };
-static const char set_pairable_settings_param[] = { 0x90, 0x00, 0x00, 0x00 };
-
-static const struct generic_data set_pairable_on_success_test = {
- .send_opcode = MGMT_OP_SET_PAIRABLE,
- .send_param = set_pairable_on_param,
- .send_len = sizeof(set_pairable_on_param),
+static const char set_bondable_on_param[] = { 0x01 };
+static const char set_bondable_invalid_param[] = { 0x02 };
+static const char set_bondable_garbage_param[] = { 0x01, 0x00 };
+static const char set_bondable_settings_param[] = { 0x90, 0x00, 0x00, 0x00 };
+
+static const struct generic_data set_bondable_on_success_test = {
+ .send_opcode = MGMT_OP_SET_BONDABLE,
+ .send_param = set_bondable_on_param,
+ .send_len = sizeof(set_bondable_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_pairable_settings_param,
- .expect_len = sizeof(set_pairable_settings_param),
- .expect_settings_set = MGMT_SETTING_PAIRABLE,
+ .expect_param = set_bondable_settings_param,
+ .expect_len = sizeof(set_bondable_settings_param),
+ .expect_settings_set = MGMT_SETTING_BONDABLE,
};
-static const struct generic_data set_pairable_on_invalid_param_test_1 = {
- .send_opcode = MGMT_OP_SET_PAIRABLE,
+static const struct generic_data set_bondable_on_invalid_param_test_1 = {
+ .send_opcode = MGMT_OP_SET_BONDABLE,
.expect_status = MGMT_STATUS_INVALID_PARAMS,
};
-static const struct generic_data set_pairable_on_invalid_param_test_2 = {
- .send_opcode = MGMT_OP_SET_PAIRABLE,
- .send_param = set_pairable_invalid_param,
- .send_len = sizeof(set_pairable_invalid_param),
+static const struct generic_data set_bondable_on_invalid_param_test_2 = {
+ .send_opcode = MGMT_OP_SET_BONDABLE,
+ .send_param = set_bondable_invalid_param,
+ .send_len = sizeof(set_bondable_invalid_param),
.expect_status = MGMT_STATUS_INVALID_PARAMS,
};
-static const struct generic_data set_pairable_on_invalid_param_test_3 = {
- .send_opcode = MGMT_OP_SET_PAIRABLE,
- .send_param = set_pairable_garbage_param,
- .send_len = sizeof(set_pairable_garbage_param),
+static const struct generic_data set_bondable_on_invalid_param_test_3 = {
+ .send_opcode = MGMT_OP_SET_BONDABLE,
+ .send_param = set_bondable_garbage_param,
+ .send_len = sizeof(set_bondable_garbage_param),
.expect_status = MGMT_STATUS_INVALID_PARAMS,
};
-static const struct generic_data set_pairable_on_invalid_index_test = {
+static const struct generic_data set_bondable_on_invalid_index_test = {
.send_index_none = true,
- .send_opcode = MGMT_OP_SET_PAIRABLE,
- .send_param = set_pairable_on_param,
- .send_len = sizeof(set_pairable_on_param),
+ .send_opcode = MGMT_OP_SET_BONDABLE,
+ .send_param = set_bondable_on_param,
+ .send_len = sizeof(set_bondable_on_param),
.expect_status = MGMT_STATUS_INVALID_INDEX,
};
return param;
}
-static uint16_t settings_powered_pairable[] = { MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_bondable[] = { MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_POWERED, 0 };
static uint8_t auth_req_param[] = { 0x2a, 0x00 };
static uint8_t pair_device_pin[] = { 0x30, 0x30, 0x30, 0x30 }; /* "0000" */
static const struct generic_data pair_device_success_test_1 = {
- .setup_settings = settings_powered_pairable,
+ .setup_settings = settings_powered_bondable,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_SUCCESS,
.client_pin_len = sizeof(pair_device_pin),
};
-static uint16_t settings_powered_pairable_linksec[] = { MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_bondable_linksec[] = { MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_POWERED,
MGMT_OP_SET_LINK_SECURITY,
0 };
static const struct generic_data pair_device_success_test_2 = {
- .setup_settings = settings_powered_pairable_linksec,
+ .setup_settings = settings_powered_bondable_linksec,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_SUCCESS,
.client_pin_len = sizeof(pair_device_pin),
};
-static const struct generic_data pair_device_legacy_nonpairable_1 = {
+static const struct generic_data pair_device_legacy_nonbondable_1 = {
.setup_settings = settings_powered,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
}
static const struct generic_data pair_device_reject_test_1 = {
- .setup_settings = settings_powered_pairable,
+ .setup_settings = settings_powered_bondable,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_AUTH_FAILED,
};
static const struct generic_data pair_device_reject_test_2 = {
- .setup_settings = settings_powered_pairable,
+ .setup_settings = settings_powered_bondable,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_AUTH_FAILED,
};
static const struct generic_data pair_device_reject_test_3 = {
- .setup_settings = settings_powered_pairable_linksec,
+ .setup_settings = settings_powered_bondable_linksec,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_AUTH_FAILED,
};
static const struct generic_data pair_device_reject_test_4 = {
- .setup_settings = settings_powered_pairable_linksec,
+ .setup_settings = settings_powered_bondable_linksec,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.expect_status = MGMT_STATUS_AUTH_FAILED,
.pin_len = sizeof(pair_device_pin),
};
-static uint16_t settings_powered_pairable_ssp[] = { MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_bondable_ssp[] = { MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_SSP,
MGMT_OP_SET_POWERED,
0 };
static const struct generic_data pair_device_ssp_test_1 = {
- .setup_settings = settings_powered_pairable_ssp,
+ .setup_settings = settings_powered_bondable_ssp,
.client_enable_ssp = true,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
};
static const struct generic_data pair_device_ssp_test_2 = {
- .setup_settings = settings_powered_pairable_ssp,
+ .setup_settings = settings_powered_bondable_ssp,
.client_enable_ssp = true,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
};
static const struct generic_data pair_device_ssp_reject_1 = {
- .setup_settings = settings_powered_pairable_ssp,
+ .setup_settings = settings_powered_bondable_ssp,
.client_enable_ssp = true,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
};
static const struct generic_data pair_device_ssp_reject_2 = {
- .setup_settings = settings_powered_pairable_ssp,
+ .setup_settings = settings_powered_bondable_ssp,
.client_enable_ssp = true,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.client_reject_ssp = true,
};
-static const struct generic_data pair_device_ssp_nonpairable_1 = {
+static const struct generic_data pair_device_ssp_nonbondable_1 = {
.setup_settings = settings_powered_ssp,
.client_enable_ssp = true,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.client_io_cap = 0x01, /* DisplayYesNo */
};
-static uint16_t settings_powered_connectable_pairable[] = {
- MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_connectable_bondable[] = {
+ MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_CONNECTABLE,
MGMT_OP_SET_POWERED, 0 };
static const struct generic_data pairing_acceptor_legacy_1 = {
- .setup_settings = settings_powered_connectable_pairable,
+ .setup_settings = settings_powered_connectable_bondable,
.pin = pair_device_pin,
.pin_len = sizeof(pair_device_pin),
.client_pin = pair_device_pin,
};
static const struct generic_data pairing_acceptor_legacy_2 = {
- .setup_settings = settings_powered_connectable_pairable,
+ .setup_settings = settings_powered_connectable_bondable,
.expect_pin = true,
.client_pin = pair_device_pin,
.client_pin_len = sizeof(pair_device_pin),
.expect_hci_func = client_bdaddr_param_func,
};
-static uint16_t settings_powered_connectable_pairable_linksec[] = {
- MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_connectable_bondable_linksec[] = {
+ MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_CONNECTABLE,
MGMT_OP_SET_LINK_SECURITY,
MGMT_OP_SET_POWERED, 0 };
static const struct generic_data pairing_acceptor_linksec_1 = {
- .setup_settings = settings_powered_connectable_pairable_linksec,
+ .setup_settings = settings_powered_connectable_bondable_linksec,
.pin = pair_device_pin,
.pin_len = sizeof(pair_device_pin),
.client_pin = pair_device_pin,
};
static const struct generic_data pairing_acceptor_linksec_2 = {
- .setup_settings = settings_powered_connectable_pairable_linksec,
+ .setup_settings = settings_powered_connectable_bondable_linksec,
.expect_pin = true,
.client_pin = pair_device_pin,
.client_pin_len = sizeof(pair_device_pin),
.expect_alt_ev_len = 8,
};
-static uint16_t settings_powered_connectable_pairable_ssp[] = {
- MGMT_OP_SET_PAIRABLE,
+static uint16_t settings_powered_connectable_bondable_ssp[] = {
+ MGMT_OP_SET_BONDABLE,
MGMT_OP_SET_CONNECTABLE,
MGMT_OP_SET_SSP,
MGMT_OP_SET_POWERED, 0 };
static const struct generic_data pairing_acceptor_ssp_1 = {
- .setup_settings = settings_powered_connectable_pairable_ssp,
+ .setup_settings = settings_powered_connectable_bondable_ssp,
.client_enable_ssp = true,
.expect_alt_ev = MGMT_EV_NEW_LINK_KEY,
.expect_alt_ev_len = 26,
};
static const struct generic_data pairing_acceptor_ssp_2 = {
- .setup_settings = settings_powered_connectable_pairable_ssp,
+ .setup_settings = settings_powered_connectable_bondable_ssp,
.client_enable_ssp = true,
.expect_alt_ev = MGMT_EV_NEW_LINK_KEY,
.expect_alt_ev_len = 26,
};
static const struct generic_data pairing_acceptor_ssp_3 = {
- .setup_settings = settings_powered_connectable_pairable_ssp,
+ .setup_settings = settings_powered_connectable_bondable_ssp,
.client_enable_ssp = true,
.expect_alt_ev = MGMT_EV_NEW_LINK_KEY,
.expect_alt_ev_len = 26,
}
static const struct generic_data get_conn_info_succes1_test = {
- .setup_settings = settings_powered_connectable_pairable_ssp,
+ .setup_settings = settings_powered_connectable_bondable_ssp,
.send_opcode = MGMT_OP_GET_CONN_INFO,
.send_func = get_conn_info_send_param_func,
.expect_status = MGMT_STATUS_SUCCESS,
};
static const struct generic_data get_conn_info_ncon_test = {
- .setup_settings = settings_powered_connectable_pairable_ssp,
+ .setup_settings = settings_powered_connectable_bondable_ssp,
.send_opcode = MGMT_OP_GET_CONN_INFO,
.send_func = get_conn_info_send_param_func,
.expect_status = MGMT_STATUS_NOT_CONNECTED,
&set_fast_conn_on_not_supported_test_1,
NULL, test_command_generic);
- test_bredrle("Set pairable on - Success",
- &set_pairable_on_success_test,
+ test_bredrle("Set bondable on - Success",
+ &set_bondable_on_success_test,
NULL, test_command_generic);
- test_bredrle("Set pairable on - Invalid parameters 1",
- &set_pairable_on_invalid_param_test_1,
+ test_bredrle("Set bondable on - Invalid parameters 1",
+ &set_bondable_on_invalid_param_test_1,
NULL, test_command_generic);
- test_bredrle("Set pairable on - Invalid parameters 2",
- &set_pairable_on_invalid_param_test_2,
+ test_bredrle("Set bondable on - Invalid parameters 2",
+ &set_bondable_on_invalid_param_test_2,
NULL, test_command_generic);
- test_bredrle("Set pairable on - Invalid parameters 3",
- &set_pairable_on_invalid_param_test_3,
+ test_bredrle("Set bondable on - Invalid parameters 3",
+ &set_bondable_on_invalid_param_test_3,
NULL, test_command_generic);
- test_bredrle("Set pairable on - Invalid index",
- &set_pairable_on_invalid_index_test,
+ test_bredrle("Set bondable on - Invalid index",
+ &set_bondable_on_invalid_index_test,
NULL, test_command_generic);
test_bredrle("Set discoverable on - Invalid parameters 1",
test_bredrle("Pair Device - Legacy Success 1",
&pair_device_success_test_1,
NULL, test_command_generic);
- test_bredrle("Pair Device - Legacy Non-pairable 1",
- &pair_device_legacy_nonpairable_1,
+ test_bredrle("Pair Device - Legacy Non-bondable 1",
+ &pair_device_legacy_nonbondable_1,
NULL, test_command_generic);
test_bredrle("Pair Device - Sec Mode 3 Success 1",
&pair_device_success_test_2,
test_bredrle("Pair Device - SSP Confirm Reject 2",
&pair_device_ssp_reject_2,
NULL, test_command_generic);
- test_bredrle("Pair Device - SSP Non-pairable 1",
- &pair_device_ssp_nonpairable_1,
+ test_bredrle("Pair Device - SSP Non-bondable 1",
+ &pair_device_ssp_nonbondable_1,
NULL, test_command_generic);
test_bredrle("Pairing Acceptor - Legacy 1",
diff --git a/tools/smp-tester.c b/tools/smp-tester.c
index c9639e6..ee1c744 100644
--- a/tools/smp-tester.c
+++ b/tools/smp-tester.c
mgmt_send(data->mgmt, MGMT_OP_SET_LE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
- mgmt_send(data->mgmt, MGMT_OP_SET_PAIRABLE, data->mgmt_index,
+ mgmt_send(data->mgmt, MGMT_OP_SET_BONDABLE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
mgmt_send(data->mgmt, MGMT_OP_SET_POWERED, data->mgmt_index,
sizeof(param), param, setup_powered_client_callback,
mgmt_send(data->mgmt, MGMT_OP_SET_LE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
- mgmt_send(data->mgmt, MGMT_OP_SET_PAIRABLE, data->mgmt_index,
+ mgmt_send(data->mgmt, MGMT_OP_SET_BONDABLE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);
mgmt_send(data->mgmt, MGMT_OP_SET_CONNECTABLE, data->mgmt_index,
sizeof(param), param, NULL, NULL, NULL);