Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] First HCI command sent to a device
Date: Thu, 04 Mar 2004 15:50:50 +0100	[thread overview]
Message-ID: <1078411850.5347.43.camel@pegasus> (raw)

Hi Folks,

while debugging the i-Tec dongle with Broadcom HID proxy support I saw
that this dongle expects that the first command is a HCI_Reset. I can't
remember any time where BlueZ has used this command. Our command
sequence on initialization can be found in hci_core.c:hci_init_req() and
it looks like this:

/* Mandatory initialization */

        /* Read Local Supported Features */
        hci_send_cmd(hdev, OGF_INFO_PARAM, OCF_READ_LOCAL_FEATURES, 0, NULL);

        /* Read Buffer Size (ACL mtu, max pkt, etc.) */
        hci_send_cmd(hdev, OGF_INFO_PARAM, OCF_READ_BUFFER_SIZE, 0, NULL);

        /* Read BD Address */
        hci_send_cmd(hdev, OGF_INFO_PARAM, OCF_READ_BD_ADDR, 0, NULL);

        /* Read Voice Setting */
        hci_send_cmd(hdev, OGF_HOST_CTL, OCF_READ_VOICE_SETTING, 0, NULL);

/* Optional initialization */

        /* Clear Event Filters */
        cp.flt_type  = HCI_FLT_CLEAR_ALL;
        hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, sizeof(cp), &cp);

        /* Page timeout ~20 secs */
        param = __cpu_to_le16(0x8000);
        hci_send_cmd(hdev, OGF_HOST_CTL, OCF_WRITE_PG_TIMEOUT, 2, &param);

        /* Connection accept timeout ~20 secs */
        param = __cpu_to_le16(0x7d00);
        hci_send_cmd(hdev, OGF_HOST_CTL, OCF_WRITE_CA_TIMEOUT, 2, &param);

Until the i-Tec dongle this worked perfect, but now my question is what
is the prefered init sequence? How do other stacks do it? Acutally how
do Microsoft or Widcomm init a device? Will adding a HCI_Reset break any
other Bluetooth adapter? Feedback from everyone is welcome before I am
going to make a decission on adding HCI_Reset or not.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2004-03-04 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04 14:50 Marcel Holtmann [this message]
2004-03-04 15:23 ` [Bluez-devel] First HCI command sent to a device Steven Singer
2004-03-04 15:55   ` Marcel Holtmann
2004-03-05 12:18     ` Charles Bueche
2004-03-05 12:28       ` 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=1078411850.5347.43.camel@pegasus \
    --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