--- bluez-utils-2.17.orig/tools/hciconfig.c +++ bluez-utils-2.17/tools/hciconfig.c @@ -143,6 +143,27 @@ } } +static void cmd_nosiac(int ctl, int hdev, char *opt) +{ + int s = hci_open_dev(hdev); + + if (s < 0) { + fprintf(stderr, "Can't open device hci%d: %s (%d)\n", + hdev, strerror(errno), errno); + exit(1); + } + { + uint8_t n; + if (hci_read_number_of_supported_iac(s, &n, 1000) < 0) { + printf("Failed to read IAC from hci%d: %s\n", hdev, strerror(errno)); + exit(1); + } + print_dev_hdr(&di); + printf("\tNumber of supported IAC: %d\n", n); + } + close(s); +} + static void cmd_iac(int ctl, int hdev, char *opt) { int s = hci_open_dev(hdev); @@ -1323,6 +1344,7 @@ { "name", cmd_name, "[name]", "Get/Set local name" }, { "class", cmd_class, "[class]", "Get/Set class of device" }, { "voice", cmd_voice, "[voice]", "Get/Set voice setting" }, + { "nosiac", cmd_nosiac, 0, "Display number of supported inquiry access code" }, { "iac", cmd_iac, "[iac]", "Get/Set inquiry access code" }, { "inqmode", cmd_inq_mode, "[mode]", "Get/set inquiry mode" }, { "inqparms", cmd_inq_parms, "[win:int]", "Get/Set inquiry scan window and interval" },