diff -ru bluez-utils-2.0-pre7.clean/tools/hciconfig.c bluez-utils-2.0-pre7/tools/hciconfig.c
--- bluez-utils-2.0-pre7.clean/tools/hciconfig.c	Fri Mar  8 22:12:35 2002
+++ bluez-utils-2.0-pre7/tools/hciconfig.c	Tue Mar 19 12:12:09 2002
@@ -38,6 +38,7 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <asm/types.h>
+#include <asm/byteorder.h>
 
 #include <bluetooth.h>
 #include <hci.h>
@@ -377,6 +378,70 @@
 		ver.manufacturer);
 }
 
+void cmd_inq_parms(int ctl, int hdev, char *opt)
+{
+	struct hci_request rq;
+	int s;
+	if ((s = hci_open_dev(hdev)) < 0) {
+		printf("Can't open device hci%d. %s(%d)\n", hdev, strerror(errno), errno);
+		exit(1);
+	}
+
+	memset(&rq, 0, sizeof(rq));
+
+	if (opt) {
+	  uint16_t window, interval;
+	  if (sscanf(opt,"%4u/%4u", &window, &interval)==2) {
+	    write_inq_activity_cp cp;
+
+	    rq.ogf = OGF_HOST_CTL;
+	    rq.ocf = OCF_WRITE_INQ_ACTIVITY;
+	    rq.cparam = &cp;
+	    rq.clen = WRITE_INQ_ACTIVITY_CP_SIZE;
+
+	    cp.window = __cpu_to_le16(window);
+	    cp.interval = __cpu_to_le16(interval);
+
+	    if (window<0x12 || window>0x1000)
+	      printf("Warning: inquiry window out of range!\n");
+
+	    if (interval<0x12 || interval>0x1000)
+	      printf("Warning: inquiry interval out of range!\n");
+
+	    if (hci_send_req(s, &rq, 1000) < 0) {
+	      printf("Can't set inquiry parameters name on hci%d. %s(%d)\n", 
+		     hdev, strerror(errno), errno);
+	      exit(1);
+	      }
+	  } else {
+	    printf("Unkown argument for command, remeber: one integer/one integer NO SPACES and one \"/\"\n");
+	  }
+	} else {
+	  uint16_t window, interval;
+	  read_inq_activity_rp rp;
+
+	  rq.ogf = OGF_HOST_CTL;
+	  rq.ocf = OCF_READ_INQ_ACTIVITY;
+	  rq.rparam = &rp;
+	  rq.rlen = READ_INQ_ACTIVITY_RP_SIZE;
+		
+	  if (hci_send_req(s, &rq, 1000) < 0) {
+	    printf("Can't read inquiry parameters on hci%d. %s(%d)\n", 
+		   hdev, strerror(errno), errno);
+	    exit(1);
+	  }
+	  if (rp.status) {
+	    printf("Read inquiry parameters on hci%d returned status %d\n", hdev, rp.status);
+	    exit(1);
+	  }
+	  print_dev_hdr(&di);
+
+	  window = __le16_to_cpu(rp.window);
+	  interval = __le16_to_cpu(rp.interval);
+	  printf("\tInquiry interval: %u slots (%.2f ms), window: %u slots (%.2f ms)\n", interval, interval*0.625, window, window*0.625);
+        }
+}
+
 void print_dev_hdr(struct hci_dev_info *di)
 {
 	static int hdr = -1;
@@ -445,6 +510,7 @@
 	{ "lp",     cmd_lp,      "[policy]", "Get/Set default link policy" },
 	{ "name",   cmd_name,    "[name]",   "Get/Set local name" },
 	{ "class",  cmd_class,   "[class]",  "Get/Set class of device" },
+	{ "inqparms",cmd_inq_parms, "[int/win]","Get/Set device inquiry window and iterval" },
 	{ "version",	cmd_version, 0,  "Display version information" },
 	{ "features",	cmd_features, 0,"Display device features" },
 	{ NULL, NULL, 0}

