Share via


HCI Commands (Windows CE 5.0)

Send Feedback

The HCI_INTERFACE structure declares an entry point for each HCI-level Bluetooth command as defined by the HCI Specification at this Official Bluetooth Wireless Info Web site.

Each function pointer that is declared in HCI_INTERFACE takes a void* cookie that uniquely identifies the call context of the layer that calls the command. The following code example shows the function pointer declaration of the HCI_CreateConnection command.

typedef int (*HCI_CreateConnection_In)  (HANDLE hDeviceContext,    void *pCallContext,    BD_ADDR *pba,    unsigned short packet_type,    unsigned char page_scan_repetition_mode,    unsigned char page_scan_mode,    unsigned short clock_offset,    unsigned char allow_role_switch);

Note   Function pointers for commands are named with an _In suffix.

Calls to HCI commands can be terminated by calling HCI_AbortCall. Calls can also be aborted by the underlying system for communication loss, timeout, card being popped out, or other reasons, in which case, the system calls HCI_AbortCall with this cookie.

Every _In command declared in HCI_INTERFACE has a corresponding _OutHCI Callback function. If the call to an HCI command is successfully completed, the HCI layer calls one of the callbacks provided by the upper layer. Some commands like HCI_CreateConnection raise events to inform the caller that the command execution is complete. For more information about HCI_EVENT_INDICATION, see HCI Events.

Note   Not all HCI commands are implemented. These are declared with NULL pointers in HCI_INTERFACE.

See Also

Host Controller Interface | Bluetooth OS Design Development | Bluetooth Protocol Stack

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.