IOCTL_BTHX_WRITE_HCI IOCTL (bthxddi.h)

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.

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

Requirement Value
Minimum supported client Supported starting with Windows 8.
Header bthxddi.h
IRQL <= DISPATCH_LEVEL