static const char *cc_help =
"Usage:\n"
- "\tcc [--role=m|s] [--ptype=pkt_types] <bdaddr>\n"
+ "\tcc [--role=c|p] [--ptype=pkt_types] <bdaddr>\n"
"Example:\n"
"\tcc --ptype=dm1,dh3,dh5 01:02:03:04:05:06\n"
- "\tcc --role=m 01:02:03:04:05:06\n";
+ "\tcc --role=c 01:02:03:04:05:06\n";
static void cmd_cc(int dev_id, int argc, char **argv)
{
break;
case 'r':
- role = optarg[0] == 'm' ? 0 : 1;
+ role = optarg[0] == 'm' || optarg[0] == 'c' ? 0 : 1;
break;
default:
str2ba(argv[0], &bdaddr);
switch (argv[1][0]) {
- case 'm':
+ case 'm': /* Deprecated. Kept for compatibility. */
+ case 'c':
role = 0;
break;
- case 's':
+ case 's': /* Deprecated. Kept for compatibility. */
+ case 'p':
role = 1;
break;
default:
{ "static", 0, 0, 's' },
{ "privacy", 0, 0, 'p' },
{ "passive", 0, 0, 'P' },
- { "whitelist", 0, 0, 'w' },
+ { "whitelist", 0, 0, 'w' }, /* Deprecated. Kept for compatibility. */
+ { "acceptlist", 0, 0, 'a' },
{ "discovery", 1, 0, 'd' },
{ "duplicates", 0, 0, 'D' },
{ 0, 0, 0, 0 }
"Usage:\n"
"\tlescan [--privacy] enable privacy\n"
"\tlescan [--passive] set scan type passive (default active)\n"
- "\tlescan [--whitelist] scan for address in the whitelist only\n"
+ "\tlescan [--acceptlist] scan for address in the accept list only\n"
"\tlescan [--discovery=g|l] enable general or limited discovery"
"procedure\n"
"\tlescan [--duplicates] don't filter duplicates\n";
case 'P':
scan_type = 0x00; /* Passive */
break;
- case 'w':
+ case 'w': /* Deprecated. Kept for compatibility. */
+ case 'a':
filter_policy = 0x01; /* Accept list */
break;
case 'd':
{ "help", 0, 0, 'h' },
{ "static", 0, 0, 's' },
{ "random", 0, 0, 'r' },
- { "whitelist", 0, 0, 'w' },
+ { "whitelist", 0, 0, 'w' }, /* Deprecated. Kept for compatibility. */
+ { "acceptlist", 0, 0, 'a' },
{ 0, 0, 0, 0 }
};
static const char *lecc_help =
"Usage:\n"
"\tlecc [--static] [--random] <bdaddr>\n"
- "\tlecc --whitelist\n";
+ "\tlecc --acceptlist\n";
static void cmd_lecc(int dev_id, int argc, char **argv)
{
case 'r':
peer_bdaddr_type = LE_RANDOM_ADDRESS;
break;
- case 'w':
+ case 'w': /* Deprecated. Kept for compatibility. */
+ case 'a':
initiator_filter = 0x01; /* Use accept list */
break;
default:
hci_close_dev(dd);
}
-static struct option lewladd_options[] = {
+static struct option lealadd_options[] = {
{ "help", 0, 0, 'h' },
{ "random", 0, 0, 'r' },
{ 0, 0, 0, 0 }
};
-static const char *lewladd_help =
+static const char *lealadd_help =
"Usage:\n"
- "\tlewladd [--random] <bdaddr>\n";
+ "\tlealadd [--random] <bdaddr>\n";
-static void cmd_lewladd(int dev_id, int argc, char **argv)
+static void cmd_lealadd(int dev_id, int argc, char **argv)
{
int err, opt, dd;
bdaddr_t bdaddr;
uint8_t bdaddr_type = LE_PUBLIC_ADDRESS;
- for_each_opt(opt, lewladd_options, NULL) {
+ for_each_opt(opt, lealadd_options, NULL) {
switch (opt) {
case 'r':
bdaddr_type = LE_RANDOM_ADDRESS;
break;
default:
- printf("%s", lewladd_help);
+ printf("%s", lealadd_help);
return;
}
}
- helper_arg(1, 1, &argc, &argv, lewladd_help);
+ helper_arg(1, 1, &argc, &argv, lealadd_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
}
}
-static struct option lewlrm_options[] = {
+static struct option lealrm_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlrm_help =
+static const char *lealrm_help =
"Usage:\n"
- "\tlewlrm <bdaddr>\n";
+ "\tlealrm <bdaddr>\n";
-static void cmd_lewlrm(int dev_id, int argc, char **argv)
+static void cmd_lealrm(int dev_id, int argc, char **argv)
{
int err, opt, dd;
bdaddr_t bdaddr;
- for_each_opt(opt, lewlrm_options, NULL) {
+ for_each_opt(opt, lealrm_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlrm_help);
+ printf("%s", lealrm_help);
return;
}
}
- helper_arg(1, 1, &argc, &argv, lewlrm_help);
+ helper_arg(1, 1, &argc, &argv, lealrm_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
}
}
-static struct option lewlsz_options[] = {
+static struct option lealsz_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlsz_help =
+static const char *lealsz_help =
"Usage:\n"
- "\tlewlsz\n";
+ "\tlealsz\n";
-static void cmd_lewlsz(int dev_id, int argc, char **argv)
+static void cmd_lealsz(int dev_id, int argc, char **argv)
{
int err, dd, opt;
uint8_t size;
- for_each_opt(opt, lewlsz_options, NULL) {
+ for_each_opt(opt, lealsz_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlsz_help);
+ printf("%s", lealsz_help);
return;
}
}
- helper_arg(0, 0, &argc, &argv, lewlsz_help);
+ helper_arg(0, 0, &argc, &argv, lealsz_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
printf("Accept list size: %d\n", size);
}
-static struct option lewlclr_options[] = {
+static struct option lealclr_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlclr_help =
+static const char *lealclr_help =
"Usage:\n"
- "\tlewlclr\n";
+ "\tlealclr\n";
-static void cmd_lewlclr(int dev_id, int argc, char **argv)
+static void cmd_lealclr(int dev_id, int argc, char **argv)
{
int err, dd, opt;
- for_each_opt(opt, lewlclr_options, NULL) {
+ for_each_opt(opt, lealclr_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlclr_help);
+ printf("%s", lealclr_help);
return;
}
}
- helper_arg(0, 0, &argc, &argv, lewlclr_help);
+ helper_arg(0, 0, &argc, &argv, lealclr_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
{ "con", cmd_con, "Display active connections" },
{ "cc", cmd_cc, "Create connection to remote device" },
{ "dc", cmd_dc, "Disconnect from remote device" },
- { "sr", cmd_sr, "Switch master/slave role" },
+ { "sr", cmd_sr, "Switch central/peripheral role" },
{ "cpt", cmd_cpt, "Change connection packet type" },
{ "rssi", cmd_rssi, "Display connection RSSI" },
{ "lq", cmd_lq, "Display link quality" },
{ "clock", cmd_clock, "Read local or remote clock" },
{ "lescan", cmd_lescan, "Start LE scan" },
{ "leinfo", cmd_leinfo, "Get LE remote information" },
- { "lewladd", cmd_lewladd, "Add device to LE White List" },
- { "lewlrm", cmd_lewlrm, "Remove device from LE White List" },
- { "lewlsz", cmd_lewlsz, "Read size of LE White List" },
- { "lewlclr", cmd_lewlclr, "Clear LE White List" },
+ { "lealadd", cmd_lealadd, "Add device to LE White List" },
+ { "lealrm", cmd_lealrm, "Remove device from LE White List" },
+ { "lealsz", cmd_lealsz, "Read size of LE White List" },
+ { "lealclr", cmd_lealclr, "Clear LE White List" },
+ { "lewladd", cmd_lealadd, "Deprecated. Use lealadd instead." },
+ { "lewlrm", cmd_lealrm, "Deprecated. Use lealrm instead." },
+ { "lewlsz", cmd_lealsz, "Deprecated. Use lealsz instead." },
+ { "lewlclr", cmd_lealclr, "Deprecated. Use lealclr instead." },
{ "lerladd", cmd_lerladd, "Add device to LE Resolving List" },
{ "lerlrm", cmd_lerlrm, "Remove device from LE Resolving List" },
{ "lerlclr", cmd_lerlclr, "Clear LE Resolving List" },
con
Display active baseband connections
-cc [--*role*\=m|s] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
+cc [--*role*\=c|p] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
Create baseband connection to remote device with Bluetooth address *bdaddr*.
Option **--pkt-type** specifies a list of allowed packet types.
packet types are **DM1**, **DM3**, **DM5**, **DH1**, **DH3**, **DH5**,
**HV1**, **HV2**, **HV3**. Default is to allow all packet types.
- Option **--role** can have value **m** (do not allow role switch, stay
- master) or **s** (allow role switch, become slave if the peer asks to become
- master). Default is **m**.
+ Option **--role** can have value **c** (do not allow role switch, stay
+ central) or **p** (allow role switch, become peripheral if the peer asks to
+ become central). Default is **c**.
dc <*bdaddr*> [*reason*]
Delete baseband connection from remote device with Bluetooth address
sr <*bdaddr*> <*role*>
Switch role for the baseband connection from the remote device to
- **master** or **slave**.
+ **central** or **peripheral**.
cpt <*bdaddr*> <*ptypes*>
Change packet types for baseband connection to device with Bluetooth
The *clock* can be **0** for the local clock or **1** for the piconet
clock (which is default).
-lescan [--*privacy*] [--*passive*] [--*whitelist*] [--*discovery*\=g|l] [--*duplicates*]
+lescan [--*privacy*] [--*passive*] [--*acceptlist*] [--*discovery*\=g|l] [--*duplicates*]
Start LE scan
leinfo [--*static*] [--*random*] <*bdaddr*>
Get LE remote information
-lewladd [--*random*] <*bdaddr*>
- Add device to LE White List
+lealadd [--*random*] <*bdaddr*>
+ Add device to LE Accept List
-lewlrm <*bdaddr*>
- Remove device from LE White List
+lealrm <*bdaddr*>
+ Remove device from LE Accept List
-lewlsz
- Read size of LE White List
+lealsz
+ Read size of LE Accept List
-lewlclr
- Clear LE White List
+lealclr
+ Clear LE Accept List
lerladd [--*local_irk*] [--*peer_irk*] [--*random*] <*bdaddr*>
Add device to LE Resolving List
lerloff
Disable LE Address Resolution
-lecc [--*static*] [--*random*] <*bdaddr*> | [--*whitelist*]
+lecc [--*static*] [--*random*] <*bdaddr*> | [--*acceptlist*]
Create a LE Connection
ledc <*handle*> [*reason*]