To learn more about how to build and send BRBs down the Bluetooth driver stack, see Building and Sending a BRB.Įach BRB begins with a standard header defined by the BRB_HEADER structure that specifies the type of BRB, which determines the structure of the rest of the BRB. IOCTL_INTERNAL_BTH_SUBMIT_BRB contains a BRB that further describes the Bluetooth operation to perform.
Profile drivers use BRBs to open and close connections to remote devices and to perform most input and output tasks.
A profile driver uses IOCTL_INTERNAL_BTH_SUBMIT_BRB to deliver a variable-length data structure called a Bluetooth Request Block ( BRB) to the device it manages. Profile drivers primarily use IOCTL_INTERNAL_BTH_SUBMIT_BRB to communicate and interact with the functionality provided in the Bluetooth driver stack. The Bluetooth driver stack supports the following IOCTLs and BRBs kernel-mode callers (generally for driver-to-driver communication) through IRP_MJ_INTERNAL_DEVICE_CONTROL:įor more information about how to use the IOCTLs described in the previous lists, see Bluetooth IOCTLs. The Bluetooth driver stack supports the following IOCTLs for kernel-mode callers through IRP_MJ_DEVICE_CONTROL: The profile driver specifies one of the I/O control codes in the following list in the IRP. Profile drivers then communicate with their devices by using IOCTL requests that are delivered to the device by means of an IRP_MJ_INTERNAL_DEVICE_CONTROL or IRP_MJ_DEVICE_CONTROL IRP. A profile driver communicates with its device by allocating and sending IRPs down the Bluetooth driver stack to the Bluetooth port driver, Bthport.sys.Ī profile driver allocates and initializes IRPs to be processed by Bthport.sys. Profile drivers communicate with the Bluetooth driver stack through the standard I/O Request Packet (IRP)-based mechanism employed by all drivers based on the WDM architecture. The profile driver to be loaded is selected based on the INF file that installs the profile driver and the device identifier, as generated by the Bluetooth driver stack and described in Installing a Bluetooth Device. Next, the driver stack uses standard Plug and Play (PnP) mechanisms to load the appropriate profile driver for each device. The driver stack then generates device identifiers (device IDs) for all paired devices. After Windows loads and initializes the Bluetooth driver stack, the driver stack discovers active Bluetooth devices that have already been paired.