HCI_EVENT_INDICATION
HCI_EVENT_INDICATION contains the full set of Bluetooth HCI events as defined by the HCI specification of the Bluetooth Core Specification.
HCI events, unlike other layers of the stack, are sometimes caused by executing commands. For example, issuing HCI_CreateCommand to the Bluetooth controller will cause an HCI_CommandStatus event that notifies the stack that a command has been accepted for execution, and then an HCI_ConnectionComplete event will occur when the connection is established (or rejected). Some events (such as ConnectionComplete) occur only as a result of executed command. Some (HCI_LinkKeyChanged event) occur as a result of executed command or as an act from the other side, without the command issued. Other events occur only as a result of action of peer Bluetooth devices (HCI_ConnectionRequest event).
The HCI layer matches events to commands currently in execution and will return a call context for executing a command (and retire the command) only when the corresponding event has signaled.
In general, HCI commands are divided into two non-intersecting sets: those that are executed immediately by the card and are completed by the controller issuing HCI_CommandComplete event, and those that require remote action and depend on the wireless media. These commands are signaled for acceptance by the controller sending an HCI_CommandStatus event and are completed by one of the Bluetooth events.
All events in the HCI event table carry both user context and call context.
typedef int (*HCI_InquiryCompleteEvent) (
void* pUserContext,
void* pCallContext,
unsigned char status,
unsigned char num_responses
);
When the event is generated by a command, the command is retired at this point and pCallContext is non-NULL. If the event comes asynchronously, pCallContext is NULL.
See Also
Establishing Connections through HCI | Enhancing the Bluetooth Stack
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.