From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Corrections in hciattach code
Date: Wed, 07 Dec 2005 10:04:51 +0100 [thread overview]
Message-ID: <1133946291.11247.7.camel@blade> (raw)
In-Reply-To: <A35A8D03A748B34A9DA2AB0335A3F93D408958@rfsdmail.internal.rfmd.com>
Hi Jatin,
> Here it is...
>
> --- hciattach_old.c 2005-12-06 13:15:22.000000000 -0800
> +++ hciattach.c 2005-12-06 13:16:15.000000000 -0800
> @@ -688,7 +688,7 @@
> }
>
> /* Send initialization command */
> - if (write(fd, cmd, 9) != 9) {
> + if (write(fd, cmd, 10) != 10) {
> perror("Failed to write init command");
> return -1;
> }
this part is clear.
> @@ -720,15 +720,15 @@
> return -1;
> }
>
> - // we probably got the reply. Now we must send the "soft reset":
> + // we probably got the reply. Now we must send the "soft reset":
> which
> + // is standard HCI RESET.
> cmd[0] = HCI_COMMAND_PKT; // it's a command packet
> - cmd[1] = 0x0B; // OCF 0x0B = param access
> set
> - cmd[2] = 0xfc; // OGF bx111111 = vendor
> specific
> - cmd[3] = 0x01; // 1 byte of data following
> - cmd[4] = 0x03; // HCI Reset Subcommand
> + cmd[1] = 0x03;
> + cmd[2] = 0x0c;
> + cmd[3] = 0x00;
>
> - // Send initialization command
> - if (write(fd, cmd, 5) != 5) {
> + // Send HCI RESET command
> + if (write(fd, cmd, 4) != 4) {
> perror("Can't write Silicon Wave reset cmd.");
> return -1;
> }
But with this one I am not sure. Do this chip really uses HCI Reset to
reset the device and bring it up with the new baud rate. Actually my
understanding is that HCI Reset should not reset the transport layer and
this has been clarified in the Bluetooth 1.1 specification.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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:[~2005-12-07 9:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-07 2:21 [Bluez-devel] Corrections in hciattach code Jatin Nahar
2005-12-07 9:04 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-12-08 0:56 Jatin Nahar
2005-12-08 5:41 ` Marcel Holtmann
2005-12-06 21:30 Jatin Nahar
2005-12-06 21:34 ` Marcel Holtmann
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=1133946291.11247.7.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).