From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <20060621091250.43316.qmail@web15809.mail.cnb.yahoo.com> Date: Wed, 21 Jun 2006 17:12:50 +0800 (CST) From: Mingfan lu To: BlueZ development Cc: BlueZ development In-Reply-To: <1150880390.3950.25.camel@localhost> MIME-Version: 1.0 Subject: [Bluez-devel] =?gb2312?q?=BB=D8=B8=B4=A3=BA=20Re:=20=20=BB=D8=B8=B4=A3=BA?= =?gb2312?q?=20Re:=20=BB=D8=B8=B4=A3=BA=20Re:=20=20RE=A3=BA=20RE:=20FWD=A3?= =?gb2312?q?=BA=20Re:=20Re:Request=20with=09RSSI?= Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0386789502==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============0386789502== Content-Type: multipart/alternative; boundary="0-1327117145-1150881170=:43001" Content-Transfer-Encoding: 8bit --0-1327117145-1150881170=:43001 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit Hi, I reviewed the hciconfig.c. If you set mode 5, it just output like you test. I can see any limitation of the mode num, 5 it can be dealt with. So, I don't think it can give such a conclusion you claimed. static void cmd_inq_mode(int ctl, int hdev, char *opt) { int dd; dd = hci_open_dev(hdev); if (dd < 0) { fprintf(stderr, "Can't open device hci%d: %s (%d)\n", hdev, strerror(errno), errno); exit(1); } if (opt) { uint8_t mode = atoi(opt); if (hci_write_inquiry_mode(dd, mode, 2000) < 0) { fprintf(stderr, "Can't set inquiry mode on hci%d: %s (%d)\n", hdev, strerror(errno), errno); exit(1); } } else { uint8_t mode; if (hci_read_inquiry_mode(dd, &mode, 1000) < 0) { fprintf(stderr, "Can't read inquiry mode on hci%d: %s (%d)\n", hdev, strerror(errno), errno); exit(1); } print_dev_hdr(&di); printf("\tInquiry mode: "); switch (mode) { case 0: printf("Standard Inquiry\n"); break; case 1: printf("Inquiry with RSSI\n"); break; case 2: printf("Inquiry with RSSI or Extended Inquiry\n"); break; default: printf("Unknown (0x%02x)\n", mode); break; } } hci_close_dev(dd); } Marcel Holtmann 写道: Hi, > I can't understand your test , why you set the mode 5? > what is the relation between your result and the problem? it means that they support the inquiry mode command, but don't do actually anything with it. Setting it to 5 is not allowed. So this command should fail and later on it should retrieve only 0 or 1 as valid values, but it doesn't. This leads to the conclusion that they only store the inquiry mode value somewhere, but never evaluate it. And this means they will never switch to Inquiry with RSSI as you have seen before. Regards Marcel > _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel With respects, Mingfan.Lu --------------------------------- 雅虎免费邮箱-3.5G容量,20M附件 --0-1327117145-1150881170=:43001 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit
Hi,
 I reviewed the hciconfig.c.
 If you set mode 5, it just output like you test. I can see any limitation of the mode num, 5 it can be dealt with. So, I don't think it can give such a conclusion you claimed.
 
static void cmd_inq_mode(int ctl, int hdev, char *opt)
{
 int dd;
 dd = hci_open_dev(hdev);
 if (dd < 0) {
  fprintf(stderr, "Can't open device hci%d: %s (%d)\n",
      hdev, strerror(errno), errno);
  exit(1);
 }
 if (opt) {
  uint8_t mode = atoi(opt);
  if (hci_write_inquiry_mode(dd, mode, 2000) < 0) {
   fprintf(stderr, "Can't set inquiry mode on hci%d: %s (%d)\n",
      hdev, strerror(errno), errno);
   exit(1);
  }
 } else {
  uint8_t mode;
  if (hci_read_inquiry_mode(dd, &mode, 1000) < 0) {
   fprintf(stderr, "Can't read inquiry mode on hci%d: %s (%d)\n",
      hdev, strerror(errno), errno);
   exit(1);
  }
  print_dev_hdr(&di);
  printf("\tInquiry mode: ");
  switch (mode) {
  case 0:
   printf("Standard Inquiry\n");
   break;
  case 1:
   printf("Inquiry with RSSI\n");
   break;
  case 2:
   printf("Inquiry with RSSI or Extended Inquiry\n");
   break;
  default:
   printf("Unknown (0x%02x)\n", mode);
   break;

  }
 }
 hci_close_dev(dd);
}


Marcel Holtmann <marcel@holtmann.org> 写道:
Hi,

> I can't understand your test , why you set the mode 5?
> what is the relation between your result and the problem?

it means that they support the inquiry mode command, but don't do
actually anything with it. Setting it to 5 is not allowed. So this
command should fail and later on it should retrieve only 0 or 1 as valid
values, but it doesn't. This leads to the conclusion that they only
store the inquiry mode value somewhere, but never evaluate it. And this
means they will never switch to Inquiry with RSSI as you have seen
before.

Regards

Marcel

>



_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel



With respects,
      Mingfan.Lu


雅虎免费邮箱-3.5G容量,20M附件 --0-1327117145-1150881170=:43001-- --===============0386789502== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0386789502== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============0386789502==--