IOCTL_BTHX_WRITE_HCI IOCTL

IOCTL_BTHX_WRITE_HCI is used to write Bluetooth ACL Data and Commands to the transport layer.

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

Profile drivers should use KMDF and its WdfRequestRetrieveInputMemory method to retrieve input parameters. For example, to get the input buffer:

Status = WdfRequestRetrieveInputMemory(_Request, &ReqInMemory);

The buffer describes a BTHX_HCI_READ_WRITE_CONTEXT structure that specifies the type of write and the data associated with the write.

Refer to the WDK Bluetooth samples for more information.

Input Buffer Length

The length of the buffer is the size of the BTHX_HCI_READ_WRITE_CONTEXT structure.

Output Buffer

Profile drivers should use KMDF and its WdfRequestRetrieveOutputMemory method to retrieve input parameters. For example, to get the output buffer:

Status = WdfRequestRetrieveOutputMemory(_Request, &ReqOutMemory);

The buffer describes a ULONG of the number of bytes written for the input data specified in the BTHX_HCI_READ_WRITE_CONTEXT structure.

Refer to the WDK Bluetooth samples for more information.

Output Buffer Length

The length of the buffer is the size of a ULONG.

Input / Output Buffer

Input / Output Buffer Length

Status Block

If the request is successful the Information member of the STATUS_BLOCK structure is set to the number of bytes in the Output Parameter.

The Status member is set to one of the values in the following table.

Status value Description
STATUS_SUCCESS The IOCTL completed successfully.

Remarks

The Bluetooth stack sends IOCTL_BTHX_WRITE_HCI to write HCI ACL data and HCI command to the controller.

The input buffer points to a BTHX_HCI_READ_WRITE_CONTEXT structure whose DataLen member specifies the number of bytes in the Data member. The Type member is set based on whether the packet is a command packet or an ACL data packet.

Requirements

   
Windows version Supported starting with Windows 8. Supported starting with Windows 8.
Header bthxddi.h
IRQL "<= DISPATCH_LEVEL"