public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bruna Moreira <bruna.moreira@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Bruna Moreira <bruna.moreira@openbossa.org>
Subject: [PATCH] Change LE scan interval and window to recommended values
Date: Wed, 22 Dec 2010 15:11:48 -0400	[thread overview]
Message-ID: <1293045108-14011-1-git-send-email-bruna.moreira@openbossa.org> (raw)

Replace default scan interval and scan window values with recommended
ones for general discovery procedure, according to the Core
specification.
---
 plugins/hciops.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/hciops.c b/plugins/hciops.c
index 43e3d93..be143e9 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -2583,8 +2583,10 @@ static int hciops_start_scanning(int index)
 
 	memset(&cp, 0, sizeof(cp));
 	cp.type = 0x01;			/* Active scanning */
-	cp.interval = htobs(0x0010);
-	cp.window = htobs(0x0010);
+	/* The recommended value for scan interval and window is 11.25 msec.
+	 * It is calculated by: time = n * 0.625 msec */
+	cp.interval = htobs(0x0012);
+	cp.window = htobs(0x0012);
 	cp.own_bdaddr_type = 0;		/* Public address */
 	cp.filter = 0;			/* Accept all adv packets */
 
-- 
1.7.0.4


             reply	other threads:[~2010-12-22 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 19:11 Bruna Moreira [this message]
2010-12-22 22:42 ` [PATCH] Change LE scan interval and window to recommended values Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293045108-14011-1-git-send-email-bruna.moreira@openbossa.org \
    --to=bruna.moreira@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox