Device searching method and electronic device

By setting up two Bluetooth controllers in Bluetooth devices and using filter resources of multiple Bluetooth controllers, the problem of limited connections to Bluetooth devices is solved, interconnection with more Bluetooth devices is achieved, and communication efficiency is improved.

WO2024234808A1PCT designated stage expired Publication Date: 2024-11-21HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081387
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-18
Filing Date
2024-03-13
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

The number of other Bluetooth devices that Bluetooth devices can connect to at the same time is limited, limiting the interconnection between Bluetooth devices and more Bluetooth devices.

Method used

By setting at least two Bluetooth controllers in the Bluetooth device, the Bluetooth device can use Bluetooth resources, thereby enabling Bluetooth devices to connect to more Bluetooth devices. The specific method includes setting up two Bluetooth hosts and two Bluetooth controllers in the first Bluetooth device, and using the filter resources of the two Bluetooth controllers to search and connect the device.

Benefits of technology

The number of Bluetooth devices that Bluetooth devices can be connected at the same time has been increased, the communication resources of Bluetooth devices have been improved, and the communication speed and efficiency have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081387_21112024_PF_FP_ABST
    Figure CN2024081387_21112024_PF_FP_ABST
Patent Text Reader

Abstract

A device searching method and a Bluetooth device. The method comprises: a first Bluetooth host determines a first quantity of filters required for a Bluetooth application to search for a Bluetooth device; the first Bluetooth host allocates the first quantity of filters to the Bluetooth application from idle filters of a first Bluetooth controller and a second Bluetooth controller; if the first quantity of filters allocated to the Bluetooth application comprise an idle filter of the second Bluetooth controller, the idle filter of the second Bluetooth controller is controlled by the first Bluetooth host and allocated by the second Bluetooth host; the first Bluetooth host searches for the Bluetooth device by using the first quantity of filters. The embodiments of the present application can support a Bluetooth device to be connected to more Bluetooth devices by using the Bluetooth technology.
Need to check novelty before this filing date? Find Prior Art

Description

Device search method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 18, 2023, with application number 202310567265.9 and application name “Device Search Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to a device search method and an electronic device. Background Art

[0003] Bluetooth is an important method for communication between electronic devices. Electronic devices that support Bluetooth communication are also called Bluetooth devices. However, a Bluetooth device (e.g., a mobile phone) is limited in the number of other Bluetooth devices (e.g., Bluetooth peripherals) that can be connected to it at the same time using Bluetooth technology, which restricts the interconnection between Bluetooth devices and other Bluetooth devices.

[0004] Application Contents

[0005] The present application provides a device search method and electronic device, which can support a Bluetooth device to connect to more Bluetooth devices using Bluetooth technology.

[0006] In a first aspect, an embodiment of the present application provides a device search method, which is applied to a first Bluetooth device, wherein the first Bluetooth device includes: a first Bluetooth host, a second Bluetooth host, a first Bluetooth controller, and a second Bluetooth controller, wherein the first Bluetooth host is connected to the first Bluetooth controller, and the second Bluetooth host is connected to the second Bluetooth controller; the method includes: the first Bluetooth host determining a first number of filters required for a Bluetooth application to search for Bluetooth devices; the first Bluetooth host allocating a first number of filters to the Bluetooth application from the idle filters of the first Bluetooth controller and the second Bluetooth controller; when the first number of filters includes the idle filters of the second Bluetooth controller, the first Bluetooth host instructs the second Bluetooth host to allocate the idle filters of the second Bluetooth controller to the Bluetooth application; and the first Bluetooth host uses the first number of filters to search for Bluetooth devices. In this method, two Bluetooth hosts are provided in the first Bluetooth device, each of which is connected to one Bluetooth controller, and filter resources are allocated to the Bluetooth application from the two Bluetooth controllers to implement device search, thereby increasing the available filter resources in the first Bluetooth device, thereby enabling the first Bluetooth device to connect to more Bluetooth devices using Bluetooth technology.

[0007] In one possible implementation, the first Bluetooth host allocates a first number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller and the second Bluetooth controller, including: when the number of idle filters of the first Bluetooth controller is a second number, the number of idle filters of the second Bluetooth controller is a third number, the second number is less than the first number, and the third number is greater than or equal to the difference between the first number and the second number, the first Bluetooth host allocates the second number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller, and controls the second Bluetooth host to allocate the difference number of filters to the Bluetooth application in the idle filters of the second Bluetooth controller.

[0008] In one possible implementation, the first Bluetooth host uses a first number of filters to search for Bluetooth devices, including: the first Bluetooth host controls the first Bluetooth controller to use a second number of filters to search for Bluetooth devices, and instructs the second Bluetooth host to use a difference number of filters to search for Bluetooth devices, and the second Bluetooth host controls the second Bluetooth controller to use the difference number of filters to search for Bluetooth devices.

[0009] In one possible implementation, the first Bluetooth host allocates a first number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller and the second Bluetooth controller, including: when the number of idle filters of the first Bluetooth controller is 0, the number of idle filters of the second Bluetooth controller is a third number, and the third number is greater than or equal to the first number, the first Bluetooth host controls the second Bluetooth host to allocate the first number of filters to the Bluetooth application in the idle filters of the second Bluetooth controller.

[0010] In one possible implementation, the first Bluetooth host uses a first number of filters to search for Bluetooth devices, including: the first Bluetooth host instructs the second Bluetooth host to use the first number of filters to search for Bluetooth devices; the second Bluetooth host controls the second Bluetooth controller to use the first number of filters to search for Bluetooth devices.

[0011] In a possible implementation, the method further includes: when the total number of idle filters of the first Bluetooth controller and the second Bluetooth controller is less than a first number, the first Bluetooth host indicating to the Bluetooth application that the filter allocation has failed.

[0012] In a possible implementation, it also includes: the first Bluetooth host sends the search results of the Bluetooth device to the Bluetooth application; the Bluetooth application displays a second interface, which is used to display the search results; when the Bluetooth application detects the user's selection operation for the second Bluetooth device in the second interface, the first Bluetooth host establishes a Bluetooth connection with the second Bluetooth device through the first Bluetooth controller.

[0013] In a possible implementation, the method further includes: the first Bluetooth host sending the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device.

[0014] In one possible implementation, the first Bluetooth host sends the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device, including: the first Bluetooth host sends the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device via a Bluetooth connection; or, the first Bluetooth host sends the address information of the first Bluetooth controller to the second Bluetooth device via a Bluetooth connection, and uploads the address information of the second Bluetooth controller to a cloud server, for the second Bluetooth device to download the address information of the second Bluetooth controller from the cloud server.

[0015] In a possible implementation, it also includes: the first Bluetooth host receives the address information of the second Bluetooth device sent by the second Bluetooth device, and sends the address information of the second Bluetooth device to the second Bluetooth host; the second Bluetooth host adds the address information of the second Bluetooth device to the second Bluetooth controller, so that the second Bluetooth controller communicates with the second Bluetooth device according to the address information of the second Bluetooth device.

[0016] In a possible implementation, the address information includes an IRK.

[0017] In a second aspect, an embodiment of the present application provides a Bluetooth device comprising: a processor, a memory, a first Bluetooth controller and a second Bluetooth controller; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the Bluetooth device to execute any one of the methods of the first aspect.

[0018] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes any one of the methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] FIG1A is a schematic diagram of a structure of a Bluetooth device provided in an embodiment of the present application;

[0021] FIG1B is a schematic diagram of a software structure of a Bluetooth device provided in an embodiment of the present application;

[0022] FIG2A is a schematic diagram of a structure of a Bluetooth architecture in a Bluetooth device provided in an embodiment of the present application;

[0023] FIG2B is a schematic diagram of a scenario provided by an embodiment of the present application;

[0024] 3A to 3E are schematic structural diagrams of a first Bluetooth device provided in an embodiment of the present application;

[0025] FIG4A is a schematic diagram of a scenario in which the device search method provided in an embodiment of the present application is applicable;

[0026] FIG4B is a schematic diagram of an interface of a device search method provided in an embodiment of the present application;

[0027] FIG5A is a schematic diagram of a flow chart of a device search method provided in an embodiment of the present application;

[0028] FIG5B is another schematic diagram of the structure of the first Bluetooth device provided in an embodiment of the present application;

[0029] FIG6 is a schematic diagram of a second flow chart of a device search method provided in an embodiment of the present application;

[0030] FIG7 is a schematic diagram of a third flow chart of the device search method provided in an embodiment of the present application;

[0031] FIG8 is a schematic diagram of a fourth flow chart of the device search method provided in an embodiment of the present application;

[0032] FIG9 is a schematic diagram of a fifth flow chart of the device search method provided in an embodiment of the present application;

[0033] FIG10 is another structural diagram of the first Bluetooth device provided in an embodiment of the present application;

[0034] FIG11 is a sixth flow chart of the device search method provided in an embodiment of the present application;

[0035] FIG12 is a seventh flow chart of the device search method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0037] Bluetooth is an important way for electronic devices to communicate with each other. However, a Bluetooth device is limited in the number of other Bluetooth devices that can be connected at the same time using Bluetooth technology, which restricts the interconnection between Bluetooth devices and more Bluetooth devices.

[0038] Taking mobile phones as an example, with the development of Bluetooth peripherals, more and more Bluetooth peripherals can be connected to mobile phones. However, the number of Bluetooth peripherals that a mobile phone can connect to at the same time is limited.

[0039] To this end, embodiments of the present application provide a device search method and electronic device, which can support a Bluetooth device to connect to more Bluetooth devices via Bluetooth.

[0040] The Bluetooth device of the embodiment of the present application is an electronic device that can support communication with the outside world (e.g., Bluetooth peripherals) using Bluetooth technology. Bluetooth devices may include: mobile phones, tablet computers (PADs), watches, headphones, etc.

[0041] Figure 1A shows a structural diagram of a Bluetooth device. As shown in Figure 1A, the Bluetooth device 100 may include a processor 110, an external memory interface 120, an internal memory 130, a display screen 140, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, etc.

[0042] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the Bluetooth device 100. In other embodiments of the present application, the Bluetooth device 100 may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0043] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0044] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0045] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0046] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0047] The wireless communication function of the Bluetooth device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0048] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in Bluetooth device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0049] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the Bluetooth device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0050] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.

[0051] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the Bluetooth device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module (such as a Bluetooth processing module). The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. Taking the Bluetooth processing module as an example, which can also be called a Bluetooth controller, the Bluetooth processing module is the hardware component used to process Bluetooth. It mainly includes a radio frequency circuit, which is used to convert digital signals into electromagnetic waves and transmit them via antenna 2, or convert electromagnetic waves received by antenna 2 into digital signals and transmit them to the processor. The Bluetooth processing module can be set in the Bluetooth chip or integrated into a processor chip such as an MCU.

[0052] In some embodiments, the antenna 1 of the Bluetooth device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the Bluetooth device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0053] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the Bluetooth device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0054] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the Bluetooth device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0055] The internal memory 130 can be used to store computer executable program codes, which include instructions. The internal memory 130 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the Bluetooth device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 130 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the Bluetooth device 100 by running instructions stored in the internal memory 130 and / or instructions stored in a memory provided in the processor.

[0056] The display screen 140 is used to display images, videos, and the like. The display screen 140 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, the Bluetooth device 100 may include one or more display screens 140.

[0057] The software system of the Bluetooth device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the (Android) system as an example, the software structure of the Bluetooth device 100 is exemplified.

[0058] FIG1B is a software structure block diagram of the Bluetooth device 100 according to an embodiment of the present invention.

[0059] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: from top to bottom: the application layer, the application framework layer (also known as the system framework layer), the system library and Android runtime layer, the hardware abstraction layer (HAL), and the kernel layer.

[0060] The application layer may include several applications (hereinafter referred to as applications). In the embodiment of the present application, the application layer may include: Bluetooth applications. Bluetooth applications are applications that can implement functions based on Bluetooth data. They can be third-party applications, such as video playback applications, applications provided by a Bluetooth device provider, or system-provided applications, such as gallery applications and system settings applications.

[0061] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer, including various components and services to support developers' Android development. In the embodiment of the present application, the application framework layer may include: Bluetooth system services and a Bluetooth protocol stack. The Bluetooth protocol stack, also known as the Bluetooth host, can be used to enable Bluetooth devices to perform Bluetooth communication in accordance with the method specified by the Bluetooth protocol. The above-mentioned Bluetooth protocol stack can be, for example, Bluedroid.

[0062] The Android runtime layer includes the system library and the Android runtime. The system library includes multiple functional modules, such as the surface manager. The Android runtime is responsible for scheduling and managing the Android system and specifically includes the core library and the virtual machine. The core library consists of two parts: one for the functional functions required by the Java language and the other for the Android core library; the virtual machine is used to run Android applications developed in Java.

[0063] The HAL layer is the interface between the operating system kernel and the hardware circuitry. The HAL layer includes, but is not limited to, the Bluetooth HAL. The Bluetooth HAL consists of the Bluetooth Core Specification Abstraction Layer and the Bluetooth Application Specification Hardware Abstraction Layer. It provides the Bluetooth API and standard interfaces for Bluetooth process calls to ensure the proper functioning of Bluetooth devices.

[0064] The kernel layer is the layer between hardware and software. The kernel layer may include: Bluetooth driver, etc. The Bluetooth driver is used to drive the Bluetooth processing module mentioned above.

[0065] In one embodiment, when a Bluetooth application uses Bluetooth, it can call the Bluetooth system service of the application framework layer, and the Bluetooth system service calls the Bluetooth protocol stack, and then sends the digital signal to the Bluetooth processing module via the Bluetooth HAL and Bluetooth driver. The Bluetooth processing module converts the digital signal into electromagnetic waves and sends it to other Bluetooth devices via the antenna.

[0066] The device search method according to the embodiment of the present application is described below with reference to the structures of the Bluetooth devices shown in FIG. 1A and FIG. 1B .

[0067] 1A and 1B , the Bluetooth architecture in a Bluetooth device mainly includes a Bluetooth application, a Bluetooth host, and a Bluetooth controller as shown in FIG2A ; wherein,

[0068] Bluetooth applications and Bluetooth hosts can run on the processor of the Bluetooth device.

[0069] The Bluetooth application can be a third-party application or a system-provided Bluetooth-enabled application.

[0070] The Bluetooth host may correspond to the Bluetooth protocol stack in the software structure shown in FIG. 1B .

[0071] The Bluetooth controller can correspond to the Bluetooth processing module shown in Figure 1A, and mainly includes the hardware part for implementing Bluetooth, such as the radio frequency circuit, for converting digital signals into electromagnetic waves. The Bluetooth controller can specifically include: a low-power Bluetooth main controller (BLE Controller), a classic Bluetooth main controller (BR / EDR Controller), a secondary controller (Alternate MAC / PHYs Controller, AMP Controller), etc. The Bluetooth controller can be set in the Bluetooth chip or integrated into a processor chip such as an MCU. Figure 2A takes the Bluetooth controller set in the Bluetooth chip as an example.

[0072] The Bluetooth host and Bluetooth controller each include several protocol layers.

[0073] For example, the Bluetooth host may include: L2CAP protocol layer, ATT / GATT protocol layer, host controller inter (HCI) protocol layer, GAP protocol layer, SMP protocol layer, etc.

[0074] The Bluetooth controller may include: a physical layer (PHY), a link layer (LL), a link management layer (LMP), an HCI protocol layer, etc. The functions of each protocol layer may refer to the specific provisions of the Bluetooth protocol, and will not be described in detail in the embodiments of this application.

[0075] The Bluetooth host and the Bluetooth controller are connected through the HCI, which provides a standardized interface for communication between the Bluetooth host and the Bluetooth controller. Referring to Figure 2A, the HCI includes a software part located in the Bluetooth host and a part located in the Bluetooth controller. The hardware corresponding to the HCI is a physical bus used to connect the CPU and the Bluetooth chip, for example, a physical bus used to implement the UART, USB, SDIO, PCI, I2C, I2S or I3C protocol.

[0076] However, when a Bluetooth device is configured with only one Bluetooth controller, the Bluetooth resources it can provide are limited. When a Bluetooth device wishes to connect to multiple other Bluetooth devices, problems such as insufficient filters in the Bluetooth controller may arise, limiting the number of other Bluetooth devices it can connect to. For example, as shown in Figure 2B, assume that the Bluetooth controller configured in mobile phone A provides eight filters. Mobile phone A is already connected to mobile phone B, a watch, and headphones via Bluetooth, occupying six filters. If mobile phone A wishes to connect to mobile phone C, and mobile phone C requires more than two filters, mobile phone A will be unable to connect to mobile phone C via Bluetooth because the Bluetooth controller only has two free filters, which cannot meet the filter requirements of mobile phone C.

[0077] To this end, an embodiment of the present application provides a technical solution for setting at least two Bluetooth controllers in a Bluetooth device to increase the Bluetooth resources available to the Bluetooth device, such as filters.

[0078] The embodiment of the present application includes a first Bluetooth device and a second Bluetooth device. The first Bluetooth device is a Bluetooth device that triggers Bluetooth communication with other Bluetooth devices, and the second Bluetooth device is a Bluetooth device that communicates with the first Bluetooth device.

[0079] In the embodiments of the present application, the implementation structure of the first Bluetooth device is used as an example to illustrate the possible implementation structure of the Bluetooth device in the embodiments of the present application. It should be noted that the implementation structure of the second Bluetooth device can be the same as or different from that of the first Bluetooth device, as long as it can achieve Bluetooth communication with the first Bluetooth device.

[0080] As shown in FIG3A , taking the example of setting two Bluetooth hosts and two Bluetooth controllers in a Bluetooth device, the first Bluetooth device provided in the embodiment of the present application may include:

[0081] Processor 1 is physically connected to processor 2; processor 1 is physically connected to Bluetooth chip 1; processor 2 is physically connected to Bluetooth chip 2;

[0082] The Bluetooth application and Bluetooth host 1 run on processor 1, and Bluetooth host 2 runs on processor 2;

[0083] The Bluetooth controller 1 is disposed in the Bluetooth chip 1 , and the Bluetooth controller 2 is disposed in the Bluetooth chip 2 .

[0084] Optionally, processor 1 and processor 2 may be connected using a physical bus, such as a physical bus for implementing a UART or I2S protocol.

[0085] For the first Bluetooth device shown in Figure 3A, when the first Bluetooth device wishes to connect and communicate with other Bluetooth devices via Bluetooth, it can use the Bluetooth resources of both Bluetooth controller 1 and the second Bluetooth controller, thereby increasing the Bluetooth resources in the first Bluetooth device and enabling the first Bluetooth device to connect to a relatively large number of other Bluetooth devices simultaneously. Still taking the scenario shown in Figure 2B as an example, assuming that mobile phone A includes two Bluetooth controllers, each with eight filters, then, if mobile phone B, a watch, and headphones have already occupied six filters, mobile phone A still has 10 free filters that can be used to connect to other Bluetooth devices such as mobile phone C.

[0086] In another embodiment provided by the present application, the number of processors and Bluetooth chips in the first Bluetooth device shown in FIG3A can be increased, for example, increased to a number M, where M is an integer greater than or equal to 3, and accordingly, the number of Bluetooth hosts and Bluetooth controllers can also be increased. For example, the first Bluetooth device shown in FIG3B adds, on the basis of the first Bluetooth device shown in FIG3A , the following: a processor 3 physically connected to the processor 1, a Bluetooth chip 3 connected to the processor 3, a Bluetooth host 3 running in the processor 3, and a Bluetooth controller 3 set in the Bluetooth chip 3, so that the first Bluetooth device includes 3 Bluetooth hosts and 3 Bluetooth controllers. At this time, the first Bluetooth device can have more Bluetooth resources than the first Bluetooth device shown in FIG3A , so that the first Bluetooth device can be connected to relatively more Bluetooth devices at the same time.

[0087] In the above embodiment, the Bluetooth application and the Bluetooth host 1 are located on the same processor 1 as an example. In another embodiment provided in the present application, the Bluetooth application and the Bluetooth host 1 can be located on different processors, such as processor 2, or other processors other than processor 1 and processor 2. For example, in Figure 3C, the Bluetooth application is located on processor 4 as an example.

[0088] In the above embodiment, the Bluetooth host is located in different processors as an example. In another embodiment provided in the present application, among the Bluetooth hosts included in the first Bluetooth device, there may also be two or more Bluetooth hosts located in the same processor. For example, as shown in Figure 3D, processor 1 is physically connected to Bluetooth chip 1 and Bluetooth chip 2 at the same time, Bluetooth host 1 and Bluetooth host 2 are located together in processor 1, Bluetooth host 1 is connected to Bluetooth controller 1 in Bluetooth chip 1, and Bluetooth host 2 is connected to Bluetooth controller 2 in Bluetooth chip 2.

[0089] In the above embodiment, one Bluetooth host is connected to one Bluetooth controller as an example. In another embodiment provided in the present application, one Bluetooth host can also be connected to multiple Bluetooth controllers.

[0090] In the above embodiment, the Bluetooth controller is set in the Bluetooth chip as an example. In another embodiment provided by this application, the Bluetooth controller and the processor can also be integrated into the same chip. For example, as shown in Figure 3E, the processor 2 and the Bluetooth controller 2 can be implemented by an MCU integrated with the Bluetooth controller.

[0091] In order to enable the first Bluetooth device to use multiple Bluetooth controllers to connect and communicate with other Bluetooth devices, the embodiment of the present application also provides a corresponding device search method.

[0092] FIG4A is a schematic diagram of a scenario of a device search method according to an embodiment of the present application. As shown in FIG4A , the method includes: a first Bluetooth device and a second Bluetooth device.

[0093] The first Bluetooth device includes: a first Bluetooth application, a first Bluetooth host (e.g., the aforementioned Bluetooth host 1), a second Bluetooth host (e.g., the aforementioned Bluetooth host 2), a first Bluetooth controller (e.g., the aforementioned Bluetooth controller 1), and a second Bluetooth controller (e.g., the aforementioned Bluetooth controller 2). The first Bluetooth application and the first Bluetooth host are located in an AP, the first Bluetooth controller is located in a first Bluetooth chip, the second Bluetooth host is located in a sensor hub, and the second Bluetooth controller is integrated into the sensor hub. The first Bluetooth application is connected to the first Bluetooth host, the first Bluetooth host is connected to the first Bluetooth controller and the second Bluetooth host respectively, and the second Bluetooth host is connected to the second Bluetooth controller.

[0094] The second Bluetooth device includes: a second Bluetooth application, a third Bluetooth host, and a third Bluetooth controller. The second Bluetooth application is connected to the third Bluetooth host, and the third Bluetooth host is connected to the third Bluetooth controller.

[0095] There is a logical link at the application layer between the first Bluetooth application and the second Bluetooth application, and there is a corresponding logical link between the first Bluetooth host and the third Bluetooth host based on each layer of the Bluetooth protocol stack. For example, there is a corresponding GATT link between the first Bluetooth host and the third Bluetooth host based on the GATT layer, and physical communication links can be established between the first Bluetooth controller and the third Bluetooth controller, and between the second Bluetooth controller and the third Bluetooth controller.

[0096] The following embodiments will exemplarily illustrate the device search method of the embodiment of the present application in conjunction with the scenario example shown in FIG4A .

[0097] Figure 4B is a schematic diagram of an interface implementation of the device search method according to an embodiment of the present application. As shown in Figure 4B, it is assumed that the first Bluetooth application is XX application and the Bluetooth of the first Bluetooth device has been activated.

[0098] The user selects the "Add XX Watch" control in the settings interface provided by the XX application, such as shown in step 401. Accordingly, the XX application detects the user's search request for the XX watch.

[0099] If the total number of free filters of all Bluetooth controllers in the first Bluetooth device is less than the number of filters required for the XX application to search for the XX watch, the XX application displays a prompt interface such as that shown in interface 402 to the user, to prompt the user that the Bluetooth resources are insufficient and the new device cannot be added; if the total number of free filters of all Bluetooth controllers in the first Bluetooth device is not less than the number of filters required for the XX application to search for the XX watch, the XX application can allocate a corresponding number of filters to XX, use the filters to search for the XX watch, and display a search prompt interface such as that shown in interface 403 to the user to prompt the user that the XX watch is being searched for, and after the search for the XX watch is completed, the device search result display interface such as that shown in interface 404 is displayed to the user. The device search result display interface can display a list of XX watches searched by the first Bluetooth device. For example, the list displayed in interface 404 includes: XX watch 1 and XX watch 2.

[0100] The user selects a watch in the XX watch list, such as XX watch 1. Accordingly, the XX application detects the user's selection operation for XX watch 1 and determines XX watch 1 as the second Bluetooth device to be paired. The XX application establishes a Bluetooth connection with XX watch 1 through the first Bluetooth device. Afterwards, the XX application and XX watch 1 can communicate via Bluetooth. Furthermore, in the device search method provided in the embodiment of the present application, the XX application can communicate with XX watch 1 through any Bluetooth controller included in the first Bluetooth device, such as the first Bluetooth controller and / or the second Bluetooth controller.

[0101] FIG5A is a flow chart of a device search method provided by an embodiment of the present application based on the interface shown in FIG4B . As shown in FIG5A , the method may include:

[0102] Step 501: A first Bluetooth application detects a user's search request for Bluetooth devices and sends a filter request message to a first Bluetooth host.

[0103] The filter request message is used to apply for a filter from the first Bluetooth host.

[0104] Optionally, the filter request message may include: the number n of required filters.

[0105] The filter in the embodiment of the present application is used to record the filtering conditions for searching for Bluetooth devices. By setting a filter for the Bluetooth application and recording the filtering conditions for searching for Bluetooth devices, Bluetooth devices that do not meet the requirements of the Bluetooth application can be filtered out from the surrounding Bluetooth devices.

[0106] The above-mentioned device search may also be referred to as device scanning.

[0107] The number of filters required by the Bluetooth application to search for Bluetooth devices can be determined by the Bluetooth application based on the Bluetooth devices to be searched, and the specific method is not limited in the embodiments of this application.

[0108] Step 502 : The first Bluetooth host determines whether the total number of idle filters of all Bluetooth controllers is less than the number n of filters required by the first Bluetooth application. If yes, step 503 is executed; if not, step 505 is executed.

[0109] An idle filter refers to a filter in the Bluetooth controller that is not currently occupied by other Bluetooth applications.

[0110] Step 503: The first Bluetooth host sends an application failure message to the first Bluetooth application.

[0111] Step 504: The first Bluetooth application displays a prompt interface, and this branch process ends.

[0112] The prompt interface is shown as interface 402, for example.

[0113] Step 505 : The first Bluetooth host allocates n filters to the first Bluetooth application from the idle filters of all Bluetooth controllers, sends an application success message to the first Bluetooth application, and executes step 506 .

[0114] The application success message may include: filter IDs of n filters, and the Bluetooth controller to which each filter belongs.

[0115] Optionally, if the filter IDs in the first Bluetooth controller and the second Bluetooth controller are not repeated, in other words, if the Bluetooth controller to which the filter belongs can be identified by the filter ID, the Bluetooth controller to which each filter belongs in the application success message can be omitted.

[0116] Alternatively, if the n filters allocated by the first Bluetooth host include filters of the second Bluetooth controller, the first Bluetooth host may allocate filters in the second Bluetooth controller through the second Bluetooth host. For example, if the n filters include filters of the second Bluetooth controller, the first Bluetooth host may instruct the second Bluetooth controller to allocate filters for the first Bluetooth application through the second Bluetooth host.

[0117] Through the processing of the above steps, the first Bluetooth host realizes the management and allocation of filters of the two Bluetooth controllers, so that the first Bluetooth device can use the filters of the two Bluetooth controllers to support the first Bluetooth application's search for devices, thereby increasing the number of Bluetooth devices that the first Bluetooth device can connect to simultaneously.

[0118] Step 506: The first Bluetooth application sends a search request to the first Bluetooth host, where the search request is used to request the first Bluetooth host to search for Bluetooth devices.

[0119] Step 507: The first Bluetooth host uses the n filters allocated to the first Bluetooth application to search for Bluetooth devices, and sends the search results to the first Bluetooth application.

[0120] Optionally, if the n filters allocated by the first Bluetooth host include the filter of the second Bluetooth controller, the first Bluetooth host may trigger the second Bluetooth controller to search for Bluetooth devices using the filter through the second Bluetooth host.

[0121] By processing the above steps, the first Bluetooth host can trigger two Bluetooth controllers to use filters to search for Bluetooth devices, so that the first Bluetooth device can use filters of multiple Bluetooth controllers to support the first Bluetooth application to search for Bluetooth devices.

[0122] Step 508: The first Bluetooth application displays a device search result display interface.

[0123] Step 509: The first Bluetooth application detects a user pairing request operation for the second Bluetooth device on the device search result display interface, and requests the first Bluetooth host to establish a Bluetooth connection.

[0124] Step 510: The first Bluetooth host establishes a Bluetooth connection with the second Bluetooth device.

[0125] Optionally, the Bluetooth connection may include: a GATT connection based on the GATT protocol.

[0126] Step 511: The first Bluetooth host sends the address information of the first Bluetooth controller and / or the address information of the second Bluetooth controller to the second Bluetooth device.

[0127] Optionally, in the embodiment of the present application, the first Bluetooth host may decide that the first Bluetooth application uses the first Bluetooth controller and / or the second Bluetooth controller to communicate with the second Bluetooth device. The specific decision method is not limited in the embodiment of the present application.

[0128] Step 512: The first Bluetooth host receives the address information of the second Bluetooth device sent by the second Bluetooth device.

[0129] Optionally, if the first Bluetooth host decides that the first Bluetooth application can use the first Bluetooth controller to communicate with the second Bluetooth device, the first Bluetooth host can add the address information of the second Bluetooth device to the first Bluetooth controller; thereafter, the first Bluetooth controller can perform address resolution on the received message according to the address information of the second Bluetooth device, so as to realize Bluetooth communication between the first Bluetooth controller and the second Bluetooth device.

[0130] Optionally, if the first Bluetooth host decides that the first Bluetooth application can use the second Bluetooth controller to communicate with the second Bluetooth device, the first Bluetooth host can add the address information of the second Bluetooth device to the second Bluetooth controller through the second Bluetooth host; thereafter, the second Bluetooth controller can perform address resolution on the received message according to the address information of the second Bluetooth device, so as to realize Bluetooth communication between the second Bluetooth controller and the second Bluetooth device.

[0131] By processing the above steps, the first Bluetooth application can communicate with the second Bluetooth device through the first Bluetooth controller and / or the second Bluetooth controller, thereby increasing the Bluetooth resources that can be used by the first Bluetooth device when communicating with other Bluetooth devices. Therefore, the first Bluetooth device can not only support connecting to more Bluetooth devices, but also increase the communication resources between the first Bluetooth application and other Bluetooth devices, thereby improving communication speed and efficiency.

[0132] 5B , the first Bluetooth host may include a first processing module and an agent module; wherein,

[0133] The first processing module can communicate with the first Bluetooth application and the first Bluetooth controller respectively to manage the filters in the first Bluetooth controller. Optionally, the first processing module can be implemented by a scan / filter manager provided in the first Bluetooth host. The scan / filter manager can be located at any protocol layer in the first Bluetooth host, such as the HCI protocol layer.

[0134] The proxy module is used to: realize communication between the first Bluetooth host and the second Bluetooth host. Optionally, the proxy module can be located in the HCI protocol layer of the first Bluetooth host. In a processor such as an AP, there is usually a hidle service (hidle service) for accessing the device node mapped by the MCU. A module called HCI proxy (HCI proxy) is usually pre-installed in the hidl service to connect to the HCI layer of the standard Bluetooth protocol stack. Optionally, the above-mentioned proxy module can be implemented by the HCI proxy (HCI proxy) module of the HCI protocol layer in the first Bluetooth host.

[0135] The second Bluetooth host may include a second processing module that can communicate with the proxy module in the first Bluetooth host and the second Bluetooth controller, respectively, to manage filters in the second Bluetooth controller. Optionally, the second processing module can be implemented by a dual-ble manager in the second Bluetooth host. The dual-ble manager can be located at any protocol layer in the first Bluetooth host, such as the HCI protocol layer.

[0136] The following describes the specific implementation of the method shown in FIG5A in different scenarios with reference to the structure shown in FIG5B .

[0137] In one embodiment, taking the example of a user wanting to add a Bluetooth watch to the first Bluetooth application, assuming that the number of filters required to search for Bluetooth watches is n, the number of idle filters in the first Bluetooth controller is m, and m is greater than or equal to n. In this embodiment, the filters in the second Bluetooth controller can all be in an idle state. For example, assuming that the number of filters in the first Bluetooth controller and the second Bluetooth controller in mobile phone A is 8, the mobile phone B and the headset connected to mobile phone A occupy 4 filters of the first Bluetooth controller, and the number of filters that the Bluetooth watch to be added needs to occupy is 3, which is less than the number of idle filters of the first Bluetooth controller, which is 4.

[0138] Referring to FIG6 , the device search method according to an embodiment of the present application may include:

[0139] Step 601: When initializing the protocol stack, the first processing module of the first Bluetooth host obtains the number of filters of the first Bluetooth controller from the first Bluetooth controller. When initializing the protocol stack, the second processing module of the second Bluetooth host obtains the number of filters of the second Bluetooth controller from the second Bluetooth controller, and sends the number of filters of the second Bluetooth controller to the proxy module of the first Bluetooth host.

[0140] Optionally, the first processing module may obtain the number of filters of the first Bluetooth controller from the first Bluetooth controller through an HCI_LE_Read_Filter_Accept_List_Size command.

[0141] Optionally, the second processing module may obtain the number of filters of the second Bluetooth controller from the second Bluetooth controller through an HCI_LE_Read_Filter_Accept_List_Size command.

[0142] Optionally, this step may be triggered when the first Bluetooth device is powered on or the user activates the Bluetooth function in the first Bluetooth device.

[0143] Step 602: The first Bluetooth application detects a user's search request for Bluetooth devices in a setting interface, and applies for n filters from a first processing module of a first Bluetooth host.

[0144] Optionally, the first Bluetooth application may also send the filtering conditions required for searching for a Bluetooth device (eg, a Bluetooth watch) to the first Bluetooth host.

[0145] Step 603 : The first processing module determines whether the number m of idle filters in the first Bluetooth controller is greater than or equal to n. If yes, execute step 604 .

[0146] The process of the first processing module determining that the number m of idle filters in the first Bluetooth controller is not greater than or equal to n will be described in subsequent embodiments and will not be repeated here.

[0147] Step 604: The first processing module requests the first Bluetooth controller to add n filters.

[0148] Step 605: The first Bluetooth controller allocates n filters to the first Bluetooth application, and sends the filter identifiers (IDs) of the n filters to the first processing module.

[0149] The n filters are used to record the filtering conditions required for searching for Bluetooth devices.

[0150] Step 606: The first processing module indicates to the first Bluetooth application that the filter application is successful.

[0151] Step 607: The first Bluetooth application requests the first processing module to search for Bluetooth devices.

[0152] Optionally, the first Bluetooth application may send filter IDs of n filters to the first processing module.

[0153] Step 608: The first processing module instructs the first Bluetooth controller to start searching for Bluetooth devices using the n filters allocated to the first Bluetooth application.

[0154] Optionally, the first processing module may send the filter IDs of the n filters to the first Bluetooth controller, so as to instruct the first Bluetooth controller to search for Bluetooth devices using the n filters allocated to the first Bluetooth application.

[0155] Step 609: The first Bluetooth controller sends the search result to the first processing module.

[0156] The search results may include: a list of searched Bluetooth devices, such as the list of XX watches in FIG. 4 .

[0157] Step 610: The first processing module sends the search result to the first Bluetooth application.

[0158] Step 611: The first Bluetooth application displays a device search result display interface according to the search result.

[0159] The device search result display interface is shown as interface 404, for example.

[0160] The steps after the device search result display interface is displayed may refer to the description in FIG. 5A and subsequent embodiments, which will not be repeated here.

[0161] In this method, communication between the first Bluetooth host and the second Bluetooth host is achieved through a proxy strategy. For example, the first Bluetooth host allocates an idle filter in the second Bluetooth controller to the first Bluetooth application through the proxy via the second Bluetooth host, and uses the idle filter in the second Bluetooth controller to search for devices. The search results are then connected to the first Bluetooth host through the proxy mechanism, thereby achieving unified management of the filter resources of the two Bluetooth controllers by the first Bluetooth host, and enabling the first Bluetooth application to use the filter resources of the two Bluetooth controllers without perception.

[0162] In one embodiment, still taking the example of a user wanting to add a Bluetooth watch to the first Bluetooth application, it is assumed that the number of filters required to search for Bluetooth watches is n, the number of free filters in the first Bluetooth controller is m, m is less than n, and the number of free filters in the second Bluetooth controller is p, p is greater than or equal to (nm), that is, the total number of free filters in the first Bluetooth controller and the second Bluetooth controller (m+p) is greater than n. For example, assuming that the number of filters in the first Bluetooth controller and the second Bluetooth controller in mobile phone A is 8, mobile phone B and headphones connected to mobile phone A occupy 6 filters of the first Bluetooth controller, and the number of filters required to be occupied by the Bluetooth watch to be added is 3, which is greater than the number of free filters in the first Bluetooth controller, 2, and the difference between the two, 1, is less than the number of free filters in the second Bluetooth controller, 8.

[0163] 7 , the device search method according to the embodiment of the present application is different from the method shown in FIG6 , in which steps 604 to 610 are replaced by the following steps 701 to 716 .

[0164] Step 701: The first processing module requests the first Bluetooth controller to add m filters.

[0165] Step 702: The first Bluetooth controller allocates m filters to the first Bluetooth application, and sends the filter IDs of the m filters to the first processing module.

[0166] Step 703: The first processing module requests the proxy module to add nm filters.

[0167] There is no restriction on the execution order of steps 701 to 702 and steps 704 to 707 .

[0168] In one embodiment, step 701 may be performed after step 707 to prevent the number of idle filters in the second Bluetooth controller from being less than nm, which would cause the first Bluetooth controller to release m filters after adding them for the first Bluetooth application.

[0169] Step 704 : The proxy module determines whether the number p of idle filters in the second Bluetooth controller is greater than or equal to nm. If yes, execute step 705 .

[0170] The processing when the proxy module determines that the number p of idle filters in the second Bluetooth controller is not greater than or equal to nm will be described in subsequent embodiments and will not be repeated here.

[0171] Step 705: The proxy module requests the second Bluetooth controller to add nm filters.

[0172] Step 706: The second Bluetooth controller allocates nm filters to the first Bluetooth application, and sends the filter IDs of the nm filters to the proxy module.

[0173] Optionally, in step 705 and step 706, the information may be forwarded between the proxy module and the second Bluetooth controller via the second Bluetooth host. For example, the information may be forwarded by the second processing module in the second Bluetooth host.

[0174] Step 707: The proxy module sends the filter IDs of the nm filters to the first processing module.

[0175] Step 708: The first processing module indicates to the first Bluetooth application that the filter application is successful.

[0176] Step 709: The first Bluetooth application requests the first processing module to search for Bluetooth devices.

[0177] Optionally, the first Bluetooth application may send the filter ID to the first processing module.

[0178] Step 710: The first processing module instructs the first Bluetooth controller to start searching for Bluetooth devices using the m filters allocated to the first Bluetooth application.

[0179] Optionally, the first processing module may send the filter IDs of the m filters in the first Bluetooth controller to the first Bluetooth controller, so as to instruct the first Bluetooth controller to search for Bluetooth devices using the m filters allocated to the first Bluetooth application.

[0180] Step 711: The first Bluetooth controller sends the search results of the m filters to the first processing module.

[0181] Step 712: The first processing module instructs the agent module to start searching for Bluetooth devices using the nm filters allocated to the first Bluetooth application.

[0182] Optionally, the first processing module may send the filter IDs of the nm filters allocated by the second Bluetooth controller to the first Bluetooth application to the proxy module, so as to indicate the information of the filters that the proxy module needs to use.

[0183] Step 713: The proxy module instructs the second Bluetooth controller to start searching for Bluetooth devices using the nm filters allocated to the first Bluetooth application.

[0184] Optionally, the proxy module may send the filter IDs of the nm filters allocated by the second Bluetooth controller to the first Bluetooth application to the second Bluetooth controller, so that the second Bluetooth controller uses the nm filters allocated to the first Bluetooth application to search for Bluetooth devices.

[0185] Step 714: The second Bluetooth controller sends the search results of the nm filters to the proxy module.

[0186] Optionally, in step 713 and step 714, the information may be forwarded between the proxy module and the second Bluetooth controller via the second Bluetooth host. For example, the information may be forwarded by the second processing module in the second Bluetooth host.

[0187] Step 715: The proxy module sends the search results of the nm filters to the first processing module.

[0188] There is no restriction on the execution order of steps 710 to 711 and steps 712 to 715 .

[0189] Step 716: The first processing module sends the n search results to the first Bluetooth application.

[0190] It should be noted that, in the method shown in FIG7 , the number m of idle filters in the first Bluetooth controller may be equal to 0. In this case, steps 701 to 702 and steps 710 to 711 can be omitted. Then, in the method shown in FIG7 , the second Bluetooth controller actually allocates n filters to the first Bluetooth application and uses these n filters to search for Bluetooth devices.

[0191] In one embodiment, still taking the example of a user wanting to add a Bluetooth watch to the first Bluetooth application, it is assumed that the number of filters required to search for Bluetooth watches is n, the number of free filters in the first Bluetooth controller is m, m is less than n, the number of free filters in the second Bluetooth controller is p, p is less than (nm), that is, the total number of free filters in the first Bluetooth controller and the second Bluetooth controller (m+p) is less than n. For example, assuming that the number of filters in the first Bluetooth controller and the second Bluetooth controller in mobile phone A is 8, mobile phone B and headphones connected to mobile phone A occupy 6 filters of the first Bluetooth controller, and the number of filters required to be occupied by the Bluetooth watch to be added is 12, which is greater than the number of free filters of the first Bluetooth controller, 2, and the difference between the two, 10, is greater than the number of free filters in the second Bluetooth controller, 8.

[0192] 8 , compared to the method shown in FIG. 7 , in step 704 , when the proxy module determines whether the number p of idle filters in the second Bluetooth controller is greater than or equal to nm, if the determination result is no, step 801 is executed.

[0193] Step 801: The proxy module indicates to the first processing module that the filter addition fails.

[0194] Step 802: The first processing module indicates to the first Bluetooth application that the filter application has failed, and instructs the first Bluetooth controller to release the m filters allocated to the first Bluetooth application.

[0195] Optionally, if steps 701 to 702 are performed after step 801 , steps 701 to 702 and the step of instructing the first Bluetooth controller to release the m filters allocated to the first Bluetooth application in this step may be omitted.

[0196] Step 803: The first Bluetooth application displays a prompt interface indicating that the device cannot be added.

[0197] The prompt interface is shown as interface 602, for example.

[0198] In the device search method shown in the above embodiment, the first Bluetooth application is preferentially assigned an idle filter in the first Bluetooth controller, and the remaining amount is supplemented by the idle filter in the second Bluetooth controller. This application may also provide other solutions for adding filters to the first Bluetooth application. For example,

[0199] In one embodiment, the idle filters in the second Bluetooth controller can be preferentially allocated to the first Bluetooth application, and the idle filters in the first Bluetooth controller can be used to make up for the insufficient number of filters in the second Bluetooth controller. The specific implementation can refer to the above embodiment and will not be repeated here.

[0200] In another embodiment, when the number m of idle filters in the first Bluetooth controller is greater than or equal to n, the filters in the first Bluetooth controller can be allocated to the first Bluetooth application on a priority basis; when m is less than n, the filters in the second Bluetooth controller can be allocated to the first Bluetooth application on a priority basis; if the number is insufficient, the filters in the first Bluetooth controller can be used to make up for it.

[0201] An exemplary implementation of step 511 and step 512 in FIG. 5A is described as follows.

[0202] In one embodiment, after a first Bluetooth host establishes a Bluetooth connection with a second Bluetooth device, when pairing with the second Bluetooth device, the address information of the Bluetooth controller usable by the first Bluetooth application, such as an Identity Resolving Key (IRK), can be sent to the second Bluetooth device via the established Bluetooth connection between the first Bluetooth host and the second Bluetooth device, thereby completing the pairing. The IRK of the Bluetooth controller is generated based on the MAC address of the Bluetooth controller.

[0203] For example, if the first Bluetooth host decides that the first Bluetooth application can use the first Bluetooth controller and the second Bluetooth controller to communicate with the second Bluetooth device, as shown in FIG9 :

[0204] After the first Bluetooth host establishes a Bluetooth connection with the second Bluetooth device, the second Bluetooth device sends the IRK3 of the local Bluetooth controller to the first Bluetooth host through the Bluetooth connection. The first Bluetooth host sends the IRK1 of the first Bluetooth controller and the IRK2 of the second Bluetooth controller to the second Bluetooth device. The first Bluetooth host adds the received IRK3 to the first Bluetooth controller and adds IRK3 to the second Bluetooth controller through the second Bluetooth host.

[0205] Through the above pairing process, the second Bluetooth device records two IRK pairs (IRK3, IRK1) and (IRK3, IRK2), so that it can communicate with the first Bluetooth controller and the second Bluetooth controller respectively;

[0206] The first Bluetooth controller has (IRK1, IRK3) recorded therein and can communicate with the second Bluetooth device;

[0207] The second Bluetooth controller has (IRK2, IRK3) recorded therein and can also communicate with the second Bluetooth device.

[0208] As shown in FIG10 , in one embodiment, the first Bluetooth host may include: an address management module, a first connection management module and a proxy module; wherein,

[0209] The address management module is used to manage the address information of the first Bluetooth controller, such as IRK1, and the address information of the second Bluetooth controller, such as IRK2.

[0210] The first connection management module is configured to establish a Bluetooth connection with another Bluetooth device, such as a second Bluetooth device, and to trigger scanning for paired Bluetooth devices, such as the second Bluetooth device. Optionally, the first connection management module may be implemented by a dual-BLE manager provided by a GATT service of the GATT protocol layer in the first Bluetooth host.

[0211] The proxy module is used to implement communication between the first Bluetooth host and the second Bluetooth host. Optionally, the proxy module can be located in the HCI protocol layer of the first Bluetooth host. Optionally, the proxy module can be implemented by an HCI proxy (HCI proxy) of the HCI protocol layer in the first Bluetooth host.

[0212] The second Bluetooth host may include a second connection management module that can communicate with the proxy module and the second Bluetooth device, respectively, to trigger a scan for paired Bluetooth devices, such as the second Bluetooth device. Optionally, the second connection management module may be implemented by a Dual-BLE manager in the second Bluetooth host. The Dual-BLE manager may be located in the GATT protocol layer of the first Bluetooth host.

[0213] As shown in FIG11 , the implementation of the method shown in FIG9 is exemplarily described based on the structure shown in FIG10 .

[0214] Referring to FIG. 11 , the method may include:

[0215] Step 1101: After establishing a Bluetooth connection with the second Bluetooth device through the GATT protocol, the first connection management module obtains IRK1 of the first Bluetooth controller and IRK2 of the second Bluetooth controller from the address management module, and sends IRK1 and IRK2 to the second Bluetooth device through the Bluetooth connection.

[0216] Optionally, the first connection management module can decide whether the first Bluetooth application uses the first Bluetooth controller and / or the second Bluetooth controller to communicate with the second Bluetooth device. The specific decision method is not limited in the embodiment of this application. Figure 11 takes the decision whether the first Bluetooth application uses the first Bluetooth controller and the second Bluetooth controller to communicate with the second Bluetooth device as an example.

[0217] After receiving IRK1 and IRK2, the second Bluetooth device forms two IRK pairs (IRK1, IRK3) (IRK2, IRK3) with IRK3 of the local Bluetooth controller, thereby being able to communicate with the first Bluetooth controller and the second Bluetooth controller respectively through the local Bluetooth controller.

[0218] Step 1102: The first connection management module receives IRK3 of the Bluetooth controller sent by the second Bluetooth device.

[0219] Step 1103: The first connection management module adds IRK3 to the first Bluetooth controller.

[0220] Step 1104: the first Bluetooth controller adds IRK3 to the Resolving List, and after completing the addition, indicates to the first connection management module that the IRK addition is complete.

[0221] After the first Bluetooth controller adds IRK3, the IRK pair (IRK1, IRK3) is recorded in the Resolving List, so that it can communicate with the Bluetooth controller of the second Bluetooth device. For example, as shown in the following steps 1105 to 1107, the first Bluetooth controller searches for the second Bluetooth device.

[0222] Optionally, the first connection management module may add IRK3 to the Resolving List of the first Bluetooth controller through the HCI_LE_Add_Device_To_Resolving_List command.

[0223] The specific implementation of the HCI_LE_Add_Device_To_Resolving_List command can be referred to as shown in Table 1 below.

[0224] Table 1

[0225] Step 1105: The first connection management module instructs the first Bluetooth controller to start device search.

[0226] Step 1106: The first Bluetooth controller uses (IRK1, IRK3) to perform address resolution in device search.

[0227] Step 1107: The first Bluetooth controller sends the device search result to the first connection management module.

[0228] Step 1108: The first connection management module sends IRK3 to the second connection management module.

[0229] Step 1109: The second connection management module adds IRK3 to the second Bluetooth controller.

[0230] Step 1110: The second Bluetooth controller adds IRK3 to the Resolving List. After the addition is completed, it indicates to the second connection management module that the IRK addition is completed.

[0231] After the second Bluetooth controller adds IRK3, the IRK pair (IRK2, IRK3) is recorded in the Resolving List, so that it can communicate with the Bluetooth controller of the second Bluetooth device. For example, as shown in the following steps 1111 to 1116, the second Bluetooth controller searches for the second Bluetooth device.

[0232] Step 1111: the second connection management module feeds back an adding completion message to the first connection management module.

[0233] Step 1112: The first connection management module instructs the second connection management module to start device search.

[0234] Step 1113: The second connection management module instructs the second Bluetooth controller to start device search.

[0235] Step 1114: The first Bluetooth controller uses (IRK2, IRK3) to perform address resolution in device search.

[0236] Step 1115: The second Bluetooth controller sends the device search result to the second connection management module.

[0237] Step 1116: The second connection management module sends the search result to the first connection management module.

[0238] Optionally, information can be forwarded between the second connection management module and the first connection management module through a proxy module.

[0239] In another embodiment, as shown in FIG12 , after a first Bluetooth host establishes a Bluetooth connection with a second Bluetooth device, when pairing with the second Bluetooth device, the address information of the first Bluetooth controller, such as IRK1, can be sent to the second Bluetooth device via the established Bluetooth connection between the first Bluetooth host and the second Bluetooth device, thereby completing the pairing. For other Bluetooth controllers that can be used by the first Bluetooth application, such as the second Bluetooth controller, their address information, such as IRK2, can be uploaded by the first Bluetooth host to a cloud server via the first Bluetooth device, and the second Bluetooth device can obtain the address information of other Bluetooth controllers in the first Bluetooth device other than the first Bluetooth controller from the cloud server.

[0240] For example, if the first Bluetooth host decides that the first Bluetooth application can use the first Bluetooth controller and the second Bluetooth controller to communicate with the second Bluetooth device, as shown in FIG12 :

[0241] After the first Bluetooth host establishes a Bluetooth connection with the second Bluetooth device, the second Bluetooth device sends the IRK3 of the local Bluetooth controller to the first Bluetooth host through the Bluetooth connection, and the first Bluetooth host sends the IRK1 of the first Bluetooth controller to the second Bluetooth device; the first Bluetooth host uploads the IRK pair (IRK2, IRK3) consisting of the second Bluetooth controller IRK2 and the received IRK3 to the cloud server; the second Bluetooth device downloads the IRK pair (IRK2, IRK3) from the cloud server.

[0242] FIG12 omits the process of the first Bluetooth host adding IRK3 to the first Bluetooth controller and the second Bluetooth controller. For details, please refer to FIG9 , which is not described here.

[0243] Through the above process, the IRK2 of the second Bluetooth controller is also transmitted to the second Bluetooth device, so that communication can be achieved between the second Bluetooth controller and the second Bluetooth device.

[0244] Optionally, the first Bluetooth device and the second Bluetooth device may use the same user account when logging into the cloud server, thereby enabling uploading and downloading of the above-mentioned IRK pair (IRK2, IRK3).

[0245] In another embodiment, the MAC address of the second Bluetooth controller can be derived from the MAC address of the first Bluetooth controller using a preset algorithm, and the specific implementation of the algorithm is not limited in the embodiment of this application. In this case, the first Bluetooth device may not synchronize the IRK2 of the second Bluetooth controller to the second Bluetooth device in the manner described in the above embodiment. Instead, the second Bluetooth device may derive the IRK2 of the second Bluetooth controller from the IRK1 of the first Bluetooth controller using a specific algorithm, thereby obtaining the IRK pair (IRK2, IRK3). The specific implementation of the algorithm is not limited in the embodiment of this application.

[0246] An embodiment of the present application further provides a first Bluetooth device, comprising a processor, a memory, and a Bluetooth controller, wherein the processor is configured to implement the method provided in the above embodiment.

[0247] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method provided by the embodiment of the present application.

[0248] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method provided by the embodiment of the present application.

[0249] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.

[0250] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0251] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0252] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk, and other media that can store program code.

[0253] The above description is merely a specific embodiment of the present application. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. The scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A device search method, characterized in that: Applied to a first Bluetooth device, the first Bluetooth device comprises: a first Bluetooth host, a second Bluetooth host, a first Bluetooth controller and a second Bluetooth controller, the first Bluetooth host is connected to the first Bluetooth controller, and the second Bluetooth host is connected to the second Bluetooth controller; the method comprises: The first Bluetooth host determines a first number of filters required for the Bluetooth application to search for Bluetooth devices; The first Bluetooth host allocates the first number of filters to the Bluetooth application from the idle filters of the first Bluetooth controller and the second Bluetooth controller; when the first number of filters includes the idle filter of the second Bluetooth controller, the first Bluetooth host instructs the second Bluetooth host to allocate the idle filter of the second Bluetooth controller to the Bluetooth application; The first Bluetooth host searches for Bluetooth devices using the first number of filters.

2. The method according to claim 1, characterized in that: The first Bluetooth host allocates a first number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller and the second Bluetooth controller, including: When the number of idle filters of the first Bluetooth controller is a second number, the number of idle filters of the second Bluetooth controller is a third number, the second number is less than the first number, and the third number is greater than or equal to the difference between the first number and the second number, the first Bluetooth host allocates the second number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller, and controls the second Bluetooth host to allocate the difference number of filters to the Bluetooth application in the idle filters of the second Bluetooth controller.

3. The method according to claim 2, characterized in that The first Bluetooth host searches for Bluetooth devices using the first number of filters, including: The first Bluetooth host controls the first Bluetooth controller to use the second number of filters to search for Bluetooth devices, and instructs the second Bluetooth host to use the difference filters to search for Bluetooth devices, and the second Bluetooth host controls the second Bluetooth controller to use the difference filters to search for Bluetooth devices.

4. The method according to claim 1, characterized in that: The first Bluetooth host allocates a first number of filters to the Bluetooth application in the idle filters of the first Bluetooth controller and the second Bluetooth controller, including: When the number of idle filters of the first Bluetooth controller is 0 and the number of idle filters of the second Bluetooth controller is a third number, and the third number is greater than or equal to the first number, the first Bluetooth host controls the second Bluetooth host to allocate the first number of filters to the Bluetooth application in the idle filters of the second Bluetooth controller.

5. The method according to claim 4, characterized in that The first Bluetooth host searches for Bluetooth devices using the first number of filters, including: The first Bluetooth host instructs the second Bluetooth host to use the first number of filters to search for Bluetooth devices; The second Bluetooth host controls the second Bluetooth controller to search for Bluetooth devices using the first number of filters.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: When the total number of free filters of the first Bluetooth controller and the second Bluetooth controller is less than the first number, the first Bluetooth host indicates filter allocation failure to the Bluetooth application.

7. The method according to claim 1, characterized in that Also includes: The first Bluetooth host sends the search result of the Bluetooth device to the Bluetooth application; The Bluetooth application displays a second interface, where the second interface is used to display the search results; When the Bluetooth application detects a selection operation of the user on the second Bluetooth device in the second interface, the first Bluetooth host establishes a Bluetooth connection with the second Bluetooth device through the first Bluetooth controller.

8. The method according to claim 7, characterized in that Also includes: The first Bluetooth host sends the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device.

9. The method according to claim 8, characterized in that The first Bluetooth host sends the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device, including: The first Bluetooth host sends the address information of the first Bluetooth controller and the address information of the second Bluetooth controller to the second Bluetooth device through the Bluetooth connection; or, The first Bluetooth host sends the address information of the first Bluetooth controller to the second Bluetooth device through the Bluetooth connection, and uploads the address information of the second Bluetooth controller to a cloud server for the second Bluetooth device to download the address information of the second Bluetooth controller from the cloud server.

10. The method according to claim 7, characterized in that Also includes: The first Bluetooth host receives the address information of the second Bluetooth device sent by the second Bluetooth device, and sends the address information of the second Bluetooth device to the second Bluetooth host; The second Bluetooth host adds the address information of the second Bluetooth device to the second Bluetooth controller, so that the second Bluetooth controller communicates with the second Bluetooth device according to the address information of the second Bluetooth device.

11. The method according to any one of claims 8 to 10, characterized in that: The address information includes the IRK.

12. A Bluetooth device, characterized in that: include: A processor, a memory, a first Bluetooth controller and a second Bluetooth controller; One or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the processor, the Bluetooth device executes the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Equipment searching method and electronic equipment

    CN119012179A

  • Personalized recommendation and guide system based on context awareness information and control method

    CN104424304A

  • Broadcasting method and device of air defense and disaster prevention alarm, electronic device and storage medium

    CN110061793A

  • Bluetooth search result display method and device, terminal equipment and storage medium

    CN110602671A

  • Bluetooth communication method and system

    CN115150753A