Windows microsoft bluetooth stack windows

Introduction to Bluetooth Profile Drivers

This section describes the support that Microsoft provides for the wireless Bluetooth protocol. Bluetooth is an industry standard protocol that enables wireless connectivity for a variety of devices including computers, mobile phones, handheld devices, mouse devices, keyboards, and printers. This section also provides guidelines on how to develop Bluetooth profile drivers for your Bluetooth-enabled device. Details of the Bluetooth protocol are available on the Bluetooth website.

Microsoft provides support for the Bluetooth protocol in Microsoft Windows XP with Service Pack 2 (SP2) and later. Bluetooth drivers, known as profile drivers, are written by independent hardware vendors (IHVs) to support various protocols defined in the Bluetooth specifications. Profile drivers should follow the Windows Driver Model (WDM) architecture.

To support the Bluetooth protocol, Microsoft supplies several drivers and support files, including:

IHVs must use Windows Vista or later to develop their profile drivers because earlier versions of Windows, including Windows XP with SP2, do not support profile driver development.

The Bluetooth driver stack provides device driver interfaces (DDIs) that enable profile drivers to access Synchronous Connection-Oriented (SCO) links and Logical Link Controller and Adaptation Protocol (L2CAP) links between the local system and remote Bluetooth devices.

SCO

Synchronous connection-oriented (SCO) links are point-to-point connections between two Bluetooth devices. They are defined primarily to support time-bounded information like voice.

The Windows Vista Bluetooth driver stack has been enhanced to provide SCO kernel-mode DDIs. By using these interfaces, profile drivers can use the SCO DDIs to open, update, and close SCO connections, as well as perform read and write operations over an open SCO connection.

L2CAP and SDP

The L2CAP is designed to support asynchronous connectionless link (ACL) Bluetooth links. The Bluetooth driver stack provides support for connection-oriented services. Profile drivers use the Bluetooth L2CAP DDIs to open, update, and close L2CAP connections, as well as to perform read and write operations over an open L2CAP connection.

The Service Discovery Protocol (SDP) provides a way for a profile driver to advertise the services or discover services offered by the device it manages.

SDP records are advertised in a complex byte stream. Profile drivers can use the SDP DDIs to find an SDP record and convert it to a tree-based representation that is more easily interpreted for parsing. Profile drivers can also use the SDP DDIs to build a tree-based representation of an SDP record and then convert it to a stream to advertise it.

For more information about the Bluetooth driver stack, see Bluetooth Driver Stack.

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.

Читайте также:  Utorrent ccleaner для windows 10

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 в Windows.

Связать с компьютером можно все типы устройств Bluetooth, в том числе клавиатуру, мышь, телефон, динамики и т. д. Для этого компьютер должен поддерживать технологию Bluetooth. У некоторых компьютеров, например ноутбуков и планшетов, есть встроенное устройство Bluetooth. Если в вашем компьютере его нет, к USB-порту компьютера можно подключить USB-адаптер Bluetooth.

Прежде всего убедитесь, что ваш компьютер с Windows 10 поддерживает Bluetooth. Дополнительные сведения о том, как это проверить, см. в статье Устранение проблем с Bluetooth в Windows 10. Если вам нужна помощь в добавлении устройства, не поддерживающего технологию Bluetooth, см. раздел Добавление устройства на компьютер с Windows 10.

Включение Bluetooth

Когда вы убедились, что ваш компьютер с Windows 10 поддерживает Bluetooth, вам нужно включить Bluetooth. Для этого выполните следующие действия.

В разделе «Параметры»

Нажмите кнопку пуск > Параметры > устройства > Bluetooth & другие устройстваи включите Bluetooth.

В центре уведомлений

Центр уведомлений можно найти рядом с полем «Время и дата» на панели задач. На панели задач нажмите Центр уведомлений ( или ), а затем выберите Bluetooth , чтобы включить его. Если эта функция отключена, возможно, она отображается как Не подключено.

Если вы не видите Bluetooth в центре уведомлений, это можно изменить следующим образом.

Разверните «Быстрые действия» На панели задач выберите Центр уведомлений ( или ) > Развернуть. Здесь должен отобразиться элемент Bluetooth. Он будет отображаться как Bluetooth или Не подключено.

Добавьте Bluetooth в центр уведомлений. Нажмите кнопку пуск > Параметры > системные > уведомления & действия> быстрые действия. Перейдите к пункту Добавить или удалить быстрые действия и включите функцию Bluetooth.

Читайте также:  Патчи windows 10 microsoft

Примечание: Дополнительные сведения о том, как изменить список приложений и параметров, которые отображаются в центре уведомлений, см. в разделе Изменение параметров уведомлений и действий в Windows 10

Установление связи по Bluetooth с гарнитурой, динамиками или другим аудиоустройством.

Включите аудиоустройство Bluetooth и сделайте его обнаруживаемым. Порядок действий зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя.

На компьютере нажмите кнопку Пуск> Параметры > устройства > Bluetooth & другие устройства > Добавить Bluetooth или другое устройство> Bluetooth. Выберите устройство и следуйте дополнительным инструкциям, а затем нажмите Готово.

Устройство Bluetooth и компьютер обычно будут автоматически связываться в любое время, когда они находятся в диапазоне действия друг друга при включенном Bluetooth.

Установление связи по Bluetooth с клавиатурой, мышью или другим устройством

Включите клавиатуру, мышь или другое устройство Bluetooth и сделайте их обнаруживаемыми. Порядок действий зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя.

На компьютере нажмите кнопку Пуск > Параметры > устройства > bluetooth & другие устройства > Добавить Bluetooth или другое устройство > Bluetooth. Выберите устройство и следуйте дополнительным инструкциям, а затем нажмите Готово.

Установление связи по Bluetooth с принтером или сканером

Включите Bluetooth-принтер или сканер и сделайте его обнаруживаемым. Порядок действий зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя.

Нажмите кнопку Пуск > Параметры > устройства > принтеры & сканеры> Добавить принтер или сканер. Подождите, пока компьютер найдет находящиеся рядом принтеры. Затем выберите нужный принтер и нажмите кнопку Добавить устройство.

При возникновении проблем с установкой принтера или сканера см. разделы Устранение проблем с принтерами или Установка и использование сканера в Windows 10.

Установление связи с устройством Bluetooth с помощью быстрой связи

Быстрая связь в Windows 10 позволяет быстро связать поддерживаемое устройство Bluetooth с компьютером. Если устройство Bluetooth поддерживает быструю связь, вы получите уведомление, если оно находится рядом с вами, и сможете перевести его в режим связывания, чтобы сделать его обнаруживаемым.

Включите устройство Bluetooth, поддерживающее функцию быстрой связи, и сделайте его обнаруживаемым. Порядок действий зависит от устройства. Осмотрите устройство или зайдите на веб-сайт изготовителя, чтобы получить дополнительные сведения.

Если вы используете быструю связь в первый раз, выберите Да, когда вам будет предложено получать уведомления и использовать быструю связь.

Когда появится уведомление о том, что найдено новое устройство Bluetooth, нажмите кнопку Подключить.

После подключения нажмите кнопку Закрыть.

Прежде всего убедитесь, что ваш компьютер с Windows 8 поддерживает Bluetooth.

Включите устройство Bluetooth и сделайте его обнаруживаемым.

Так как вы сделаете его обнаруживаемым, зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя.

Выберите Пуск > напечатайте Bluetooth > и выберите из списка Параметры Bluetooth.

Включите Bluetooth, выберите устройство, затем выберите Связать.

Выполните все инструкции, которые появятся на экране. Если инструкций нет — все готово, вы подключены.

Устройство Bluetooth и компьютер обычно будут автоматически связываться в любое время, когда они находятся в диапазоне действия друг друга при включенном Bluetooth.

Прежде всего убедитесь, что ваш компьютер с Windows 7 поддерживает Bluetooth.

Включите устройство Bluetooth и сделайте его обнаруживаемым.

Так как вы сделаете его обнаруживаемым, зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя. Включите устройство Bluetooth и сделайте его обнаруживаемым. Порядок действий зависит от устройства. Осмотрите устройство или найдите инструкции на сайте производителя.

Выберите пуск > устройства и принтеры.

Выберите Добавить устройство, выберите устройство и нажмите кнопку Далее.

Выполните инструкции, которые появятся на экране. Если инструкций нет — все готово, вы подключены.

Устройство Bluetooth и компьютер обычно будут автоматически связываться в любое время, когда они находятся в диапазоне действия друг друга при включенном Bluetooth.

Installing a Bluetooth Device

This topic is for programmers. If you are a customer experiencing Bluetooth device installation issues see Pair a Bluetooth device in Windows

There are two installation types for Bluetooth profile drivers:

Client-side installation for remote devices where the remote device advertises its services and the computer connects to it. Examples include: mouse devices, keyboards, and printers.

Server-side installation where the computer advertises services and remote devices can connect to the computer to use those services. For example, a vendor could author a server-side installation to enable a PDA to print to a printer attached to the computer.

Читайте также:  Windows movie maker с чего начинать

These two installation types require different installation procedures.

Installing a Client-side Profile Driver

A user that wants to use a Bluetooth-enabled device will bring the device within range of the computer and initiate a connection from the computer to the remote device using the following installation sequence for a client-side profile driver.

Launch Bluetooth Devices in Control Panel to find all devices within range of the computer.

Select the device to pair with.

Pair (or bond) the device with the local radio. This may or may not involve a PIN exchange.

The local radio issues an SDP inquiry to identify the services supported on the remote device.

The Found New Hardware Wizard searches for appropriate drivers on the local hard disk drive, and/or on Windows Update.

If the Found New Hardware Wizard does not find an appropriate driver for the device, it prompts the user to insert the profile driver installation media that contains the profile driver’s device setup information file (INF file).

Installing a Server-side Profile Driver

The Bluetooth driver stack supports service GUIDs as defined by the Bluetooth SIG, as well as custom GUIDs (that is, GUIDs that are not defined by the Bluetooth SIG).

The Guidgen.exe tool provided with the Microsoft Windows SDK can be used to create custom GUIDs.

A user-mode installation application must be written to expose computer functionality that remote Bluetooth devices can use.

The installation application must communicate with the Bluetooth driver stack to create a service GUID for the functionality to expose. Vendors specify the service GUID in the application and in their device installation INF file.

The installation application must call the user-mode API BluetoothSetLocalServiceInfo. Before the application can call this API the application must have the SE_LOAD_DRIVER_NAME security privilege. The following code example demonstrates how to obtain this privilege. Note that the example does not demonstrate error handling.

Profile Driver INF file

A profile driver’s INF file contains information about a Bluetooth device for client-side installation. For a server-side installation, the INF file specifies a device ID that corresponds to the service GUID created by the installation application. All Bluetooth devices are members of the Bluetooth class. The Bluetooth class installer (Bthci.dll) assists in installing profile drivers.

For more information about creating and distributing INF files and installing drivers, see Creating an INF File and INF File Sections and Directives.

Plug and Play IDs

The Bluetooth driver stack generates hardware IDs according to the following templates:

BTHENUM\< ServiceGUID>_VID& nnnnnnnn_PID& nnnn

The Bluetooth driver stack generates compatible IDs according to the following template:

ServiceGUID is a 16-bit GUID expanded into a 128-bit GUID, as defined by the Bluetooth specification. For example, <00001124-0000-1000-8000-00805f9b34fb>corresponds to an HID device.

The 8 digits following VID& correspond to the vendor ID code.

The 4 digits following PID& correspond to the product ID code.

The 4 digits following LOCALMFG& correspond to the manufacturer of the local Bluetooth radio.

The VID/PID and LOCALMFG tags are independent of each other.

The most generic device ID is a ServiceGUID by itself. For example:

The Bluetooth driver stack can be restricted to load your profile driver and software to run only on a specific release of a remote device by using Plug and Play IDs in both the remote device and the INF file. Note that the Bluetooth driver stack generates a VID/PID pair only if the device publishes a Plug and Play ID that the stack can detect using SDP. For example:

The Bluetooth driver stack can be restricted to load profile driver and software to run only on a specific local Bluetooth radio by specifying the LOCALMFG tag in the device ID in your INF file. For example:

Оцените статью