All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] First HCI command sent to a device
@ 2004-03-04 14:50 Marcel Holtmann
  2004-03-04 15:23 ` Steven Singer
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2004-03-04 14:50 UTC (permalink / raw)
  To: BlueZ Mailing List

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-05 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-04 14:50 [Bluez-devel] First HCI command sent to a device Marcel Holtmann
2004-03-04 15:23 ` Steven Singer
2004-03-04 15:55   ` Marcel Holtmann
2004-03-05 12:18     ` Charles Bueche
2004-03-05 12:28       ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.