Bluetooth Driver Stack
The Bluetooth driver stack comprises the core portion of the support provided by Microsoft for the Bluetooth protocol. With this stack, Bluetooth-enabled devices can locate each other and establish connections. Across such connections, the devices can exchange data and interact with one another through various applications.
The following image shows the modules within the Bluetooth driver stack, along with possible custom user-mode and kernel-mode drivers not included in Windows Vista and later. These custom drivers are known as profile drivers.
User-mode
User-mode application— A user-mode application that accesses the Bluetooth driver stack through published APIs. For more information, see About Bluetooth in the Windows SDK documentation.
NoteВ В User-mode applications should link against BthProps.lib, instead of IrProps.lib, in order to use APIs, such as BluetoothSetLocalServiceInfo.
Examples of profile drivers
WAP Kernel Mode Driver— The Wireless Application Protocol (WAP) component is an example of a profile driver that communicates between the Windows networking stack and BthPort, accessing the L2CAP interface and, optionally, the SDP interface contained in L2CAP. Other possible profiles include the Advanced Audio Distribution profile (A2DP), A/V Remote Control profile (AVRCP), Generic A/V Distribution profile (GAVDP), and Common ISDN Access (CIP) profile.
Audio Kernel Mode Driver— An example of a profile driver that communicates between the Windows audio stack and BthPort, accessing the SCO interfaces contained in the latter. Possible profiles include the Hands Free profile (HFP), Headset profile (HSP), Cordless Telephony profile (CTP), and Intercom profile (ICP). NoteВ В This profile driver is included with Windows beginning with WindowsВ 8.
Bluetooth LE Heart Rate Monitor Profile— An example of a Bluetooth LE profile driver that communicates with the Bluetooth Low Energy (LE) API.
Bluetooth driver stack components
IrProps— A component that is used for backward compatibility for profile drivers that are created for the first version of the Bluetooth driver stack.
NoteВ В IrProps is provided only for backward compatibility. Use the BthProps component for new development.
BthProps— A component that contains the implementation of the Bluetooth user interface along with implementation of the Bluetooth APIs that user-mode applications access. This component sends inquiries to BthServ through remote procedure calls (RPC). Additionally, BthProps performs pin exchanges with BthPort through private IOCTLs. Note that BthProps runs on any system with a Bluetooth-enabled radio.
BthServ— A service that is responsible for caching and forwarding inquiry data to Bthport.
BthCi— The Bluetooth class installer.
WshBth— The Bluetooth Windows socket helper component. WshBth is called by the Windows sockets layer to perform socket operations. WshBth primarily calls into RfComm through the TDI interface. WshBth also calls into BthServ to perform remote device inquiries and into BthPort to perform local radio inquiries.
FSquirt— A nonextensible Object Exchange (OBEX) component that allows users to send and receive files across an open Bluetooth connection. OBEX communicates with remote devices through RFCOMM that uses the WshBth component.
BthPrint— A component that implements the Hardcopy Cable Replacement Profile (HCRP). This component allows the print system to send data to and receive data from Bluetooth-enabled printers. BthPrint communicates with the SDP interface in BthPort to query remote printers and the L2CAP interface in BthPort to send and receive data.
HidBth— The component that implements the Human Interface Device (HID) profile. HidBth also communicates with the L2CAP and SDP interfaces in BthPort. HidBth connects to the HID stack much like USB HID module does.
BthPan— The component that implements the Personal Area Network (PAN) profile, providing TCP connections across an open Bluetooth connection. In Windows Vista and Windows XP, BthPan only supports outgoing connections. BthPan is also a client of the BthPort component and uses both the L2CAP and SDP interfaces.
RfComm— The component that implements the Bluetooth serial cable emulation protocol. RfComm also uses the L2CAP and SDP interfaces found in BthPort. The upper edge of RfComm exposes the TDI interface, allowing this component to appear to be a networking transport. This is how WshBth connects to Bluetooth to send and receive data from user-mode APIs.
User-mode applications can access RfComm using the Winsock interfaces described in the Windows SDK.
BthModem— The component that implements virtual COM ports and dial-up networking (DUN). BthModem directs all I/O and control operations to RfComm through a TDI interface. The upper edge of BthModem communicates with Serial.sys to give the appearance of being a wireless COM port. NoteВ В This component is not available in WindowsВ RT.
BthEnum— The Bluetooth bus driver. BthEnum communicates with the Plug and Play (PnP) manager to create and destroy device objects used to enable Bluetooth services. BthEnum creates a PDO for every service that a connected remote device supports. For example, when a user connects a Bluetooth-enabled mouse, Windows will discover that the mouse supports the Bluetooth HID service and creates a PDO for the HID service that causes the PnP manager to load HidBth.
NoteВ В BthEnum will not create PDOs for services that appear in the UnsupportedServices registry key as specified in Bth.inf.
BthLEEnum— The Bluetooth Low Energy (LE) bus driver. BthLEEnum implements the ATT protocol and the GATT profile. It is also responsible for creating PDOs to represent the remote devices and their primary services.
BthPort— A minidriver loaded by the BthUsb miniport. BthPort provides four components:
- The HCI component communicates to the local Bluetooth-enabled radio through the Host Controller Interface (HCI) defined in the Bluetooth specification. Because all Bluetooth-enabled radios implement the HCI specification, BthPort is able to communicate with any Bluetooth-enabled radio, regardless of the manufacturer or model.
- The SCO component implements the Synchronous Connection-Oriented (SCO) protocol. This protocol supports creating point-to-point connections to a remote device. SCO clients communicate with the SCO interface by building and sending Bluetooth request blocks (BRBs).
- L2CAP implements the Bluetooth logical link control and adaptation protocol. This protocol supports creating a lossless channel to a remote device. L2CAP clients communicate with the L2CAP interface by building and sending Bluetooth request blocks (BRBs).
- SDP implements the Bluetooth Service Discovery Protocol.
How to use the Bluetooth Driver Stack
After Windows loads and initializes the Bluetooth driver stack, the driver stack discovers active Bluetooth devices that have already been paired. The driver stack then generates device identifiers (device IDs) for all paired devices. Next, the driver stack uses standard Plug and Play (PnP) mechanisms to load the appropriate profile driver for each device. 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.
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. A profile driver communicates with its device by allocating and sending IRPs down the Bluetooth driver stack to the Bluetooth port driver, Bthport.sys.
A profile driver allocates and initializes IRPs to be processed by Bthport.sys. 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. The profile driver specifies one of the I/O control codes in the following list in the IRP.
The Bluetooth driver stack supports the following IOCTLs for kernel-mode callers through IRP_MJ_DEVICE_CONTROL:
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:
For more information about how to use the IOCTLs described in the previous lists, see Bluetooth IOCTLs.
Profile drivers primarily use IOCTL_INTERNAL_BTH_SUBMIT_BRB to communicate and interact with the functionality provided in the Bluetooth driver stack. 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 use BRBs to open and close connections to remote devices and to perform most input and output tasks. IOCTL_INTERNAL_BTH_SUBMIT_BRB contains a BRB that further describes the Bluetooth operation to perform. To learn more about how to build and send BRBs down the Bluetooth driver stack, see Building and Sending a BRB.
Each 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. The Type member, which must equal one of the values found in the BRB_TYPE enumeration, determines the type of Bluetooth operation that the profile driver requests. The BRB structure and size vary according to the type of BRB. The Length member of the BRB_HEADER structure specifies the size, in bytes, of the BRB. The BthAllocateBrb, BthInitializeBrb, and BthReuseBrb functions automatically set the Type and Length members.
For example, to open a connection to a remote device, specify either one of the function codes, BRB_L2CA_OPEN_CHANNEL or BRB_SCO_OPEN_CHANNEL, to indicate that the profile driver is attempting to open a L2CAP or a SCO connection channel to the remote device. The Bluetooth driver stack uses the Status member of the BRB structure to return a Bluetooth-specific status code.
For each BRB, the profile driver must allocate and initialize the appropriate corresponding structure with information about the Bluetooth operation to perform.
The following table describes the structures that correspond to specific BRBs that profile drivers can issue:
Подключение устройства Bluetooth® (Майкрософт)
Соединение между устройством Bluetooth (Майкрософт) и компьютером зависит от приемопередатчика Bluetooth.
Если ваше устройство не оснащено приемопередатчиком Bluetooth от корпорации Майкрософт, необходимо связать устройство с помощью встроенного в компьютер приемопередатчика (от стороннего производителя) и установленной на компьютере программы для настройки Bluetooth.
Если к устройству прилагается приемопередатчик Bluetooth от корпорации Майкрософт с кнопкой First Connect, с помощью этой кнопки можно запустить мастер подключения (Майкрософт). Это поможет выполнить связывание по Bluetooth.
Если к вашему устройству прилагается приемопередатчик Bluetooth от корпорации Майкрософт, не оснащенный кнопкой First Connect, необходимо подключить приемопередатчик, а затем связать устройство с помощью установленной на компьютере программы для настройки Bluetooth.
Если в компьютер встроен приемопередатчик не от корпорации Майкрософт, вы можете связать устройство непосредственно с компьютером при помощи установленной на нем программы для настройки Bluetooth, не используя приемопередатчик Bluetooth от корпорации Майкрософт.
Примечание. Кнопку питания на новых устройствах Bluetooth, например Wedge Touch Mouse и Sculpt Touch Mouse, необходимо удерживать около 5 секунд, чтобы начать связывание с компьютером.
Использование ключа доступа
При связывании мыши с компьютером не нужно настраивать ключ доступа. Однако, следует всегда настраивать ключ доступа при связывании обычной или цифровой клавиатуры с компьютером. Способ указания ключа доступа зависит от установленной на компьютере программы для настройки Bluetooth. Если программа для настройки Bluetooth предлагает выбрать вариант создания ключа доступа, рекомендуем остановиться на автоматическом создании. Это предпочтительнее, чем создавать ключ доступа самостоятельно или обходиться без него. При вводе ключа доступа он не отображается на экране. Указав ключ доступа, необходимо нажать клавишу ВВОД на обычной или цифровой клавиатуре, чтобы завершить связывание.
Подключение устройства с помощью приемопередатчика Bluetooth от корпорации Майкрософт с кнопкой First Connect
Некоторые устройства Bluetooth комплектуются приемопередатчиками с кнопками, помогающими связывать устройство с компьютером.
Подключите приемопередатчик Bluetooth от корпорации Майкрософт к USB-порту.
Нажмите и удерживайте кнопку подключения на USB-приемопередатчике в течение пяти секунд. Откроется мастер подключения (Майкрософт).
Следуйте инструкциям мастера для подключения устройства. -или-
Запустите IntelliType Pro.
Убедитесь, что выбрана клавиатура Bluetooth, использующая приемопередатчик First Connect.
Откройте вкладку «Беспроводная сеть» и нажмите кнопку «Подключиться».
Следуйте инструкциям мастера для подключения устройства.
Подключение устройства Bluetooth без кнопки First Connect
Приемопередатчики некоторых устройств корпорации Майкрософт не оснащены кнопками First Connect. Дополнительные сведения о связывании этих устройств с компьютером вы найдете в руководстве по подключению Bluetooth и документации к программе для настройки Bluetooth.
Подключение устройства без приемопередатчика Bluetooth от корпорации Майкрософт
Если ваш компьютер оснащен встроенным приемопередатчиком Bluetooth или у вас есть внешний USB-приемопередатчик Bluetooth, вы можете подключить нужное устройство с их помощью, не используя USB-приемопередатчик от Майкрософт.
При подключении через приемопередатчик Bluetooth не от корпорации Майкрософт некоторые дополнительные функции Центра управления мышью и клавиатурой могут не работать. Центр управления мышью и клавиатурой рассчитан на работу с программным обеспечением для настройки Bluetooth, поставляемым корпорацией Майкрософт. Известно, что программное обеспечение Bluetooth от Toshiba совместимо в большинстве случаев. Другое программное обеспечение для настройки Bluetooth может работать, но не поддерживается.
На компьютере откройте программу Bluetooth. Программа для настройки Bluetooth обычно находится на панели управления или в разделе Параметры.
Нажмите и удерживайте кнопку Подключение на обратной стороне устройства. Если на устройстве есть световой индикатор аккумулятора, он будет мигать зеленым и красным светом, указывая на обнаруживаемость устройства.
В программе Bluetooth выберите нужный вариант для добавления нового устройства. В разных программах Bluetooth различных версий формулировки могут отличаться.
Следуйте указаниям на экране.
Если при подключении клавиатуры появилось предложение настроить ключ доступа, доверьте его выбор программе.
Если предложение настроить ключ доступа появилось при подключении мыши, выберите вариант Ключ доступа отсутствует. Мыши Bluetooth от корпорации Майкрософт не работают со случайными ключами доступа.
Открытие программы Bluetooth
Существует несколько версий программ для настройки Bluetooth, которые помогут вам подключить устройство к беспроводному приемопередатчику Bluetooth. Инструкции по использованию соответствующей программы см. в документации, поставляемой с компьютером, или обратитесь к изготовителю компьютера.
Расположение программного обеспечения для настройки Bluetooth
Для некоторых компьютеров с Windows 10
Выберите Пуск > Параметры > Устройства > Bluetooth
Для некоторых компьютеров с Windows 8.1
Выберите Чудо-кнопки > Параметры > Изменить параметры компьютера > Компьютер и устройства > Bluetooth.
Для некоторых компьютеров с Windows 7
Выберите Пуск > Панель управления > Оборудование и звук > Устройства Bluetooth.
Для некоторых компьютеров с Windows Vista
Выберите Пуск > Панель управления > Оборудование и звук > Устройства Bluetooth.
Для некоторых компьютеров с Windows XP
Выберите Пуск > Панель управления > Принтеры и оборудование > Устройства Bluetooth.
Для некоторых компьютеров Toshiba
Выберите Пуск > Все программы > Toshiba > Bluetooth > Параметры Bluetooth.
Для других компьютеров
См. документацию к компьютеру или обратитесь к изготовителю компьютера.
Если компьютер не может обнаружить приемопередатчик Bluetooth, программное обеспечение для настройки Bluetooth будет недоступно в меню Windows.
Переключение между режимами беспроводной сети 2,4 ГГц и Bluetooth
Если в компьютере предусмотрен Bluetooth-приемник (встроенный или внешний), а ваше устройство поддерживает оба режима беспроводной сети (2,4 ГГц и Bluetooth), можно переключаться между ними.
Технология Bluetooth позволяет достичь оптимальной производительности на расстоянии до 10 метров. Устройства Bluetooth обеспечивают большую безопасность по сравнению с другими привычными беспроводными устройствами благодаря использованию таких функций безопасности, как шифрование сигналов и постоянное изменение частот.
Изменение режима беспроводной сети с 2,4 ГГц на Bluetooth
Снимите крышку аккумулятора в нижней части устройства и включите режим Bluetooth.
На компьютере откройте программу Bluetooth. Программа для настройки Bluetooth обычно находится на панели управления или в приложении «Параметры».
Для повторного подключения устройства к компьютеру нажмите и удерживайте кнопку «Подключение» на обратной стороне устройства в течение нескольких секунд. Когда индикатор в верхней части устройства начнет мигать красным и зеленым светом, это будет означать, что устройство сможет быть обнаружено другими устройствами Bluetooth в течение 2 минут.
Если в списке указана мышь, выберите ее и следуйте инструкциям, чтобы подключиться к устройству.
Изменение режима беспроводной сети с Bluetooth на 2,4 ГГц
Подключите USB-приемопередатчик к компьютеру.
Снимите крышку аккумулятора в нижней части устройства и включите режим 2,4 ГГц. Ваше устройство обнаружится автоматически.