diff --git a/tools/hcitool.c b/tools/hcitool.c
index 66e5c20..aefbd68 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
{ "help", 0, 0, 'h' },
{ "privacy", 0, 0, 'p' },
{ "passive", 0, 0, 'P' },
+ { "whitelist", 0, 0, 'w' },
{ "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 [--discovery=g|l] enable general or limited discovery"
"procedure\n"
"\tlescan [--duplicates] don't filter duplicates\n";
uint8_t own_type = 0x00;
uint8_t scan_type = 0x01;
uint8_t filter_type = 0;
+ uint8_t filter_policy = 0x00;
uint16_t interval = htobs(0x0010);
uint16_t window = htobs(0x0010);
uint8_t filter_dup = 1;
case 'P':
scan_type = 0x00; /* Passive */
break;
+ case 'w':
+ filter_policy = 0x01; /* Whitelist */
+ break;
case 'd':
filter_type = optarg[0];
if (filter_type != 'g' && filter_type != 'l') {
}
err = hci_le_set_scan_parameters(dd, scan_type, interval, window,
- own_type, 0x00, 1000);
+ own_type, filter_policy, 1000);
if (err < 0) {
perror("Set scan parameters failed");
exit(1);