From: Marcel Holtmann <marcel@holtmann.org>
To: murdok <murdok@tiscali.it>
Cc: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Fwd: reduce hci connect time
Date: Mon, 06 Sep 2004 10:29:36 +0200 [thread overview]
Message-ID: <1094459376.5145.17.camel@notepaq> (raw)
In-Reply-To: <200409031858.24241.murdok@tiscali.it>
Hi Murdok,
> I'm trying to reduce the time of HCI connect using the clock offset in the
> hcitool create connection command.
> So I modified hcitool.c (present in attach) adding the clkoffset parameter
> on hci_create_connection:
>
> if (hci_create_connection(dd, &bdaddr, htobs(ptype), clkoffset , role,
> &handle, 25000) < 0)
> perror("Can't create connection");
>
> and change the code for insert that in the command with this syntax:
>
> hcitool cc --clkos <clkoffset-in-decimal> <BDADDR>;
>
> then I add a printf into hcitool inq for print the clkoffset in decimal
> and try to insert this in the connection command, b
> ut the time of connect do not change!
>
> Later, during other test I take a mistake using a wrong clockoffset in the
> connect command and the time of the connection w
> as redused under 100 ms (with the slave in continuos page scan mode).
>
> So I write a little bash script for test and I find a stange class of value
> to reduce this time of connection, but I can't
> understanding the logic.
>
> Where I mistake?
> Why if I insert the same value returned from hci inqiry the connection do
> not reduce its time?
> There is a bug in the code or I wrong using some function?
>
> In attach you can find:
> the hcitool.c code (modified)
> a dump with a hci inquiry, and an hci connect with the same value of
> clokoffset bash script for trying a lot value of clkoffset
check the specification on how to modify the clock offset for making it
a valid value for the create connection command.
Your patch is not really needed, because there is no need to use the
"hcitool cc ..." command. I wrote it many times that this is only a
command for debugging and not for normal use. The kernel has its own
inquiry cache and it uses the clock offset for every connection created
through by the kernel.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-09-06 8:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-03 16:58 [Bluez-devel] Fwd: reduce hci connect time murdok
2004-09-06 8:29 ` Marcel Holtmann [this message]
2004-09-06 8:58 ` Arnaud Mouiche
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=1094459376.5145.17.camel@notepaq \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=murdok@tiscali.it \
/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