WO2023165246A1 - 蓝牙协议的通信方法、电子设备、装置、存储介质及产品 - Google Patents

蓝牙协议的通信方法、电子设备、装置、存储介质及产品 Download PDF

Info

Publication number
WO2023165246A1
WO2023165246A1 PCT/CN2022/143502 CN2022143502W WO2023165246A1 WO 2023165246 A1 WO2023165246 A1 WO 2023165246A1 CN 2022143502 W CN2022143502 W CN 2022143502W WO 2023165246 A1 WO2023165246 A1 WO 2023165246A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
bluetooth
bluetooth controller
channel
data packet
Prior art date
Application number
PCT/CN2022/143502
Other languages
English (en)
French (fr)
Inventor
任凯
余庆华
王泷
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023165246A1 publication Critical patent/WO2023165246A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Definitions

  • the present application relates to the technical field of wireless networks, and in particular to a communication method of the Bluetooth protocol, electronic equipment, devices, storage media and products.
  • two electronic devices can transmit data through Bluetooth Low Energy technology.
  • the first electronic device and the second electronic device need to establish a Bluetooth communication connection.
  • the first electronic device scans the broadcast channel, thereby establishing a Bluetooth communication connection with the second electronic device based on the scanned device information of the second electronic device, thereby realizing data transmission.
  • the Bluetooth core specification protocol supports multi-channel data transmission, that is, it not only supports the broadcast channel (37, 38 and 39 channels) to broadcast the first data packet, the first data packet includes the device information of the second electronic device, but also supports the data channel (0- 36 channel or other channels) to broadcast (or send) a second data packet, where the second data packet includes device information of the second electronic device or data to be transmitted.
  • the first electronic device includes a Bluetooth controller, the Bluetooth controller needs to switch between two channels, so as to receive the first data packet and the second data packet.
  • the embodiments of the present application provide a Bluetooth protocol communication method, electronic equipment, device, storage medium and product, which can improve the scanning performance of the first broadcast channel through the first Bluetooth controller. Described technical scheme is as follows:
  • a communication method based on the Bluetooth protocol executed by a first electronic device, the method comprising:
  • the first Bluetooth controller keeps scanning the first broadcast channel, and performs scanning on the first data channel through the second Bluetooth controller to receive the first broadcast channel from the second electronic device. Two packets;
  • the second Bluetooth controller is different from the first Bluetooth controller.
  • an electronic device in another aspect, includes a bluetooth module, a first bluetooth controller and a second bluetooth controller;
  • the bluetooth module is configured to:
  • the first bluetooth controller is configured to:
  • the second bluetooth controller is configured to:
  • a Bluetooth protocol communication device comprising:
  • the first execution module is used to scan the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device;
  • the second execution module is configured to keep the scanning of the first broadcast channel by the first Bluetooth controller based on the determination that the preset condition is met, and perform scanning on the first data channel through the second Bluetooth controller to receive information from the first broadcast channel.
  • an electronic device in another aspect, includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to realize the above aspects The communication method of the Bluetooth protocol.
  • a computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the Bluetooth protocol as described in the above aspect communication method.
  • a computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the Bluetooth protocol as described in any of the above implementations. communication method.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • Fig. 2 shows the flow chart of the communication method of bluetooth protocol shown in an exemplary embodiment of the present application
  • Fig. 3 shows the flowchart of the communication method of bluetooth protocol shown in an exemplary embodiment of the present application
  • Fig. 4 shows a schematic diagram of channel scanning shown in an exemplary embodiment of the present application
  • Fig. 5 shows a schematic structural diagram of a first electronic device shown in an exemplary embodiment of the present application
  • FIG. 6 shows a schematic structural diagram of a first electronic device shown in an exemplary embodiment of the present application
  • FIG. 7 shows a flowchart of a communication method of the Bluetooth protocol shown in an exemplary embodiment of the present application
  • FIG. 8 shows a flow chart of a communication method of the Bluetooth protocol shown in an exemplary embodiment of the present application
  • FIG. 9 shows a flow chart of a communication method of the Bluetooth protocol shown in an exemplary embodiment of the present application.
  • Fig. 10 shows a flowchart of a communication method of the Bluetooth protocol shown in an exemplary embodiment of the present application
  • Fig. 11 shows a block diagram of a communication device of the Bluetooth protocol shown in an exemplary embodiment of the present application
  • Fig. 12 shows a structural block diagram of an electronic device shown in an exemplary embodiment of the present application
  • Fig. 13 shows a structural block diagram of an electronic device shown in an exemplary embodiment of the present application
  • Fig. 14 shows a structural block diagram of an electronic device shown in an exemplary embodiment of the present application.
  • the "plurality” mentioned herein means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
  • the character "/” generally indicates that the contextual objects are an "or” relationship.
  • the relevant data involved in this application may be data authorized by the user or fully authorized by all parties.
  • the first Bluetooth controller keeps scanning the first broadcast channel, and performs scanning on the first data channel through the second Bluetooth controller to receive the first broadcast channel from the second electronic device. Two packets;
  • the second Bluetooth controller is different from the first Bluetooth controller.
  • the preset conditions include:
  • the second electronic device performs Bluetooth broadcasting through the first data channel.
  • the preset conditions include:
  • the second electronic device establishes a Bluetooth communication connection with the first electronic device to use the first data channel.
  • the first Bluetooth controller is independent of the first electronic device.
  • the second Bluetooth controller is independent of the first electronic device.
  • determining that a predetermined condition is met includes:
  • the first data packet is broadcast by the second electronic device, and the first data packet includes auxiliary information, it is determined that the second electronic device performs a Bluetooth broadcast through the first data channel to send the The second data packet, the auxiliary information is used to instruct the second electronic device to perform Bluetooth broadcast through the first data channel to send the second data packet.
  • the auxiliary information includes a channel identifier and a target time of a target subchannel, the target subchannel is a subchannel for sending the second data packet, and the target time is the time for sending the second data packet time;
  • the scanning of the first data channel by the second Bluetooth controller to receive the second data packet from the second electronic device includes:
  • the first Bluetooth controller is electrically connected to the second Bluetooth controller
  • the sending the channel identifier and the target time to the second Bluetooth controller includes:
  • the first electronic device includes a scheduling module, and the scheduling module is electrically connected to the first Bluetooth controller and the second Bluetooth controller;
  • the sending the channel identifier and the target time to the second Bluetooth controller includes:
  • the method also includes:
  • the first Bluetooth controller Based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first Bluetooth controller scans the second data channel to receive the second data packet from the third electronic device. of the third packet.
  • the method also includes:
  • the first Bluetooth controller Based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first Bluetooth controller scans the Bluetooth audio link to receive data from the fourth electronic device. audio data.
  • the method also includes:
  • the first Bluetooth controller Based on determining that the preset condition is not met, the first Bluetooth controller keeps scanning the first broadcast channel, and broadcasts a fourth data packet through the second Bluetooth controller.
  • FIG. 1 shows a schematic diagram of an implementation environment of a Bluetooth protocol communication method provided by an exemplary embodiment of the present application.
  • the implementation environment includes a first electronic device 100 and at least one second electronic device 200; the first electronic device 100 communicates with each second electronic device 200 through a corresponding Bluetooth communication connection.
  • the first electronic device 100 and each second electronic device 200 can be devices applying the Bluetooth core specification 5.0 protocol or other Bluetooth core specification protocols, and other Bluetooth core specification protocols can be the Bluetooth core specification 6.0 protocol, the Bluetooth core specification 7.0 protocol, etc. But not limited thereto, the first electronic device 100 and each of the second electronic devices 200 can perform data transmission through Bluetooth low energy technology.
  • the first electronic device 100 and each second electronic device 200 can be terminal devices or wearable electronic devices, for example, the first electronic device 100 and each second electronic device 200 can be mobile phones, tablet computers, personal computers (Personal Computers) , PC), earphones, watches, glasses and other equipment.
  • the first electronic device 100 and each second electronic device 200 can be mobile phones, tablet computers, personal computers (Personal Computers) , PC), earphones, watches, glasses and other equipment.
  • the Bluetooth core specification protocol supports multi-channel data transmission, that is, it not only supports the broadcast channel (37, 38 and 39 channels) to broadcast the first data packet, the first data packet includes the device information of the second electronic device, but also supports the data channel (0- 36 channel or other channels) to broadcast (or send) a second data packet, where the second data packet includes device information of the second electronic device or data to be transmitted.
  • the first electronic device includes a bluetooth controller; therefore, in the related art, the bluetooth controller of the first electronic device needs to switch between two channels, so as to realize the reception of the first data packet and the second data packet .
  • the frequent switching of channels by the Bluetooth controller of the first electronic device will result in a short scanning time of the Bluetooth controller on the broadcast channel, thereby affecting the scanning performance of the Bluetooth controller on the broadcast channel.
  • FIG. 2 shows a flow chart of a Bluetooth protocol communication method shown in an exemplary embodiment of the present application.
  • the execution subject is the first electronic device, and the method includes:
  • Step 201 Scan the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • Step 202 Based on determining that the preset condition is met, keep the first Bluetooth controller scanning the first broadcast channel, and perform scanning on the first data channel through the second Bluetooth controller to receive the second data packet from the second electronic device ; Wherein, the second bluetooth controller is different from the first bluetooth controller.
  • the scanning of the first broadcast channel by the first Bluetooth controller since the scanning of the first broadcast channel by the first Bluetooth controller is performed, and the scanning of the first broadcast channel by the first Bluetooth controller can be maintained if the preset condition is met,
  • the first data channel is scanned by the second bluetooth controller; in this way, when the first electronic device can obtain the second data packet sent through the first data channel, it can also keep scanning the first broadcast channel, Obtaining the first data packet broadcast by the second electronic device through the first broadcast channel avoids the short scanning time of the first broadcast channel caused by the first Bluetooth controller switching from the first broadcast channel to the first data channel, thereby improving The scanning performance of the first broadcast channel through the first bluetooth controller is improved.
  • FIG. 3 shows a flow chart of a Bluetooth protocol communication method shown in an exemplary embodiment of the present application, and the execution subject of this embodiment is the first electronic device.
  • Methods include:
  • Step 301 The first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • the first electronic device includes two Bluetooth controllers, namely a first Bluetooth controller and a second Bluetooth controller, the second Bluetooth controller is different from the first Bluetooth controller, and the first electronic device passes
  • the first Bluetooth controller and the second Bluetooth controller may perform scanning on broadcast channels or data channels, respectively. For example, the first electronic device scans the broadcast channel through the first Bluetooth controller, and scans the data channel through the second Bluetooth controller.
  • both the first Bluetooth controller and the second Bluetooth controller are independent of the first electronic device, so that the first Bluetooth controller and the second Bluetooth controller can be multiplexed by multiple electronic devices respectively, Therefore, the utilization rate of the first bluetooth controller and the second bluetooth controller is improved.
  • the first electronic device includes a first bluetooth controller, and the second bluetooth controller is independent of the first electronic device, so that the second bluetooth controller can be reused by multiple electronic devices, thereby improving the Utilization of the second bluetooth controller.
  • the first electronic device includes a second Bluetooth controller, and the first Bluetooth controller is independent of the first electronic device, so that the first Bluetooth controller can be multiplexed by multiple electronic devices, thereby improving the Utilization of the first bluetooth controller.
  • the first broadcast channel is used for broadcasting the first data packet
  • the first data packet is used for establishing a Bluetooth communication connection between the second electronic device and the first electronic device
  • the second electronic device is a device broadcasting the first data packet.
  • the second electronic device broadcasts the first data packet through the first broadcast channel
  • the first electronic device scans the first broadcast channel to receive the first data packet from the second electronic device
  • the second electronic device and The first electronic device establishes a Bluetooth communication connection through the first data packet
  • the Bluetooth communication connection is used for data transmission between the first electronic device and the second electronic device.
  • the first broadcast channel is the main broadcast channel, including at least one of channel 37, channel 38 and channel 39, and channel 37, channel 38 and channel 39 respectively correspond to channel frequencies of 2402MHz, 2426MHz and 2480MHz.
  • the first broadcast channel also includes channels other than channel 37, channel 38, and channel 39; for example, other channels are channel 57, channel 58, or channel 59, etc., which are not specifically limited in this embodiment of the application .
  • the number of the first bluetooth controller and the second bluetooth controller can be at least two, and the number of the first bluetooth controller and the second bluetooth controller can be set and changed according to needs. In the embodiment of the application, this is not limited; optionally, there are two first bluetooth controllers and two second bluetooth controllers.
  • Step 302 The first electronic device keeps scanning the first broadcast channel by the first Bluetooth controller based on determining that the second electronic device performs Bluetooth broadcast through the first data channel.
  • the second electronic device performs Bluetooth broadcasting through the first data channel, so as to send the second data packet to the first electronic device.
  • the second data packet includes the data to be transmitted.
  • the first data channel includes at least one channel among channels 0-36, and is used for data transmission or broadcasting of data packets.
  • the first data channel further includes channels other than channels 0-36; for example, other channels are channels 40-56, etc., which are not specifically limited in this embodiment of the present application.
  • the second electronic device can assist in broadcasting the second data packet to the first electronic device through the first data channel, and the first data channel and the first broadcast channel are different channels, a Bluetooth controller cannot Simultaneously scan the first data channel and the first broadcast channel, and after determining that the second electronic device performs Bluetooth broadcast through the first data channel in this application, keep the first Bluetooth controller to scan the first broadcast channel, which can ensure The first electronic device can receive the first data packet broadcast from the second electronic device through the first broadcast channel, and because the first electronic device can also scan the first data channel through the second Bluetooth controller to receive the second electronic device through the first broadcast channel The second data packet broadcast by a data channel, thereby ensuring that the first electronic device can completely receive the data packet from the second electronic device.
  • the first electronic device determines that the second electronic device performs Bluetooth broadcasting through the first data channel: if the first data packet is broadcast by the second electronic device, and the first data packet includes auxiliary information, Then the first electronic device determines that the second electronic device performs a Bluetooth broadcast through the first data channel to send the second data packet.
  • the first electronic device determines whether the first data packet is broadcast by the second electronic device, and if the first data packet is broadcast by the second electronic device, the first electronic device determines whether the auxiliary information is included in the first data packet, and if If the first data packet includes auxiliary information, the first electronic device determines that the second electronic device performs Bluetooth broadcasting through the first data channel to send the second data packet.
  • the auxiliary information is used to instruct the second electronic device to send the second data packet through the first data channel
  • the auxiliary information includes the channel identifier and the target time of the target subchannel
  • the target subchannel is the subchannel for sending the second data packet
  • the target time is the time to send the second data packet.
  • the first data packet sent by the second electronic device through the first broadcast channel includes auxiliary information corresponding to at least one auxiliary extended indication (AUX_EXT_IND) pointing to the first data channel, where,
  • the auxiliary information includes auxiliary link indication (auxiliary chain indication, AUX_CHAIN_IND) and auxiliary synchronization indication (auxiliary synchronous indication, AUX_SYNC_IND), respectively pointing to the channel identifier and target time of the target subchannel.
  • the auxiliary information further includes a device name, a device identifier, and other coding information of the device, etc., of the second electronic device customized by the manufacturer, which are not specifically limited in this embodiment of the present application.
  • the first electronic device can accurately find the second electronic device based on the device name, device identifier, and other coded information of the second electronic device included in the auxiliary information, and then realize the communication with the second electronic device.
  • the first data packet broadcast by the first broadcast channel needs to carry the first data packet sent by the second electronic device through the first data channel.
  • the indication information of the second data packet and in the embodiment of the present application, by determining whether the first data packet is broadcast by the second electronic device, and determining whether the first data packet carries auxiliary information indicating the first data channel, it is possible to improve The accuracy of determining whether the second electronic device transmits the second data packet through Bluetooth broadcasting through the first data channel.
  • Step 303 the first electronic device sends the channel identifier and the target time to the second Bluetooth controller.
  • the number of the second bluetooth controller is at least two, and the second bluetooth controller in this step is one of the at least two bluetooth controllers included in the first electronic device or is independent of the first electronic device One of the at least two bluetooth controllers; the first electronic device determines a target bluetooth controller among the at least two second bluetooth controllers, and sends the channel identifier and target time to the target bluetooth controller.
  • the target bluetooth controller is the bluetooth controller used to scan the data channel among the multiple second bluetooth controllers, or the bluetooth controller that performs the least number of scans among the multiple second bluetooth controllers, or is multiple The Bluetooth controller whose scanning time is the longest from the current time among the second Bluetooth controllers, but not limited thereto.
  • the first Bluetooth controller is electrically connected to the second Bluetooth controller; the first electronic device sends the channel identifier and target time to the second Bluetooth controller through the first Bluetooth controller.
  • the first Bluetooth controller is electrically connected to the Bluetooth module and the second Bluetooth controller through the first interface and the second interface, respectively.
  • the bluetooth module is the bluetooth host part, is used for realizing the control to the first bluetooth controller and the second bluetooth controller;
  • the first interface is the host controller interface (Host Controller Interface, HCI), and the bluetooth module passes The HCI interface is connected with the first bluetooth controller.
  • the bluetooth module can send an instruction to the first bluetooth controller through the first interface, and then implement scanning of the first broadcast channel through the first bluetooth controller.
  • the Bluetooth module also instructs the second Bluetooth controller to perform scanning through the first Bluetooth controller.
  • the first Bluetooth controller scans the first broadcast channel to receive the first data packet from the second electronic device, and obtains the target subchannel based on the auxiliary information included in the first data packet and send the channel identifier and target time to the second Bluetooth controller.
  • the first bluetooth controller sends a scan command to the second bluetooth controller, the scan command carries the channel identifier and the target time, and the scan command is used to instruct the second bluetooth controller to scan the channel identifier corresponding to the target time
  • the target sub-channel is used to receive the second data packet from the second electronic device.
  • the first Bluetooth controller by connecting the first Bluetooth controller and the second Bluetooth controller, the first Bluetooth controller can directly send the channel identification and target time obtained by scanning the first broadcast channel to the second Bluetooth controller, Furthermore, the efficiency of transmitting the channel identifier and the target time is improved, so that the efficiency of subsequent scanning performed by the second Bluetooth controller can be improved.
  • the first Bluetooth controller sends the first data packet obtained by scanning the first broadcast channel to the Bluetooth module, and the Bluetooth module sends the auxiliary information to the first Bluetooth controller after determining the auxiliary information in the first data packet.
  • a scanning instruction the scanning instruction carries the channel identifier and the target time, and the scanning instruction is used to instruct the second Bluetooth controller to scan the target subchannel corresponding to the channel identifier to receive the second data packet from the second electronic device at the target time,
  • the first Bluetooth controller forwards the scanning instruction to the second Bluetooth controller.
  • the auxiliary information in the first data packet is determined through the Bluetooth module, and the scanning instruction is synthesized through the Bluetooth module, and the auxiliary information is forwarded through the first Bluetooth controller, thereby reducing the workload of the first Bluetooth controller. Furthermore, it can be ensured that the first Bluetooth controller can perform channel scanning stably and efficiently.
  • the first electronic device includes a scheduling module, and the scheduling module is electrically connected to the first Bluetooth controller and the second Bluetooth controller respectively.
  • the first electronic device sends the channel identifier and target time to the second Bluetooth controller through the scheduling module.
  • the scheduling module is connected to the Bluetooth module through the third interface, and connected to the first Bluetooth controller and the second Bluetooth controller through the fourth interface and the fifth interface respectively.
  • the bluetooth module sends scan instructions to the first bluetooth controller and the second bluetooth controller respectively through the dispatching module, that is, dispatches the first bluetooth controller or the second bluetooth controller through the dispatching module, and realizes through the first bluetooth controller Or the second Bluetooth controller for channel scanning.
  • the interface types of the third interface, the fourth interface, and the fifth interface may be set and changed as required, which is not specifically limited in this embodiment of the present application.
  • the first Bluetooth controller sends the first data packet obtained by scanning the first broadcast channel to the scheduling module, and after the scheduling module determines the auxiliary information in the first data packet, it sends the scan to the second Bluetooth controller.
  • An instruction the scan instruction carries a channel identifier and a target time, and the scan instruction is used to instruct the second Bluetooth controller to perform scanning on the first data channel.
  • the scheduling module sends the channel identifier and the target time to the second Bluetooth controller, and can instruct the second Bluetooth controller to perform scanning on the first data channel, thereby realizing the scheduling of the second Bluetooth controller, and The workload of the first Bluetooth controller is reduced, thereby ensuring that the first Bluetooth controller can perform channel scanning stably and efficiently.
  • the first bluetooth controller sends the first data packet obtained by scanning the first broadcast channel to the bluetooth module through the scheduling module, and after the bluetooth module determines the auxiliary information in the first data packet, it sends The second bluetooth controller sends a scanning instruction; furthermore, the scheduling module can effectively control the second bluetooth controller to perform channel scanning, so that the first bluetooth controller and the second bluetooth controller can cooperate to perform scanning.
  • Step 304 The first electronic device instructs the second Bluetooth controller to scan the target sub-channel corresponding to the channel identifier at the target time to receive the second data packet from the second electronic device.
  • the first electronic device sends a scan command carrying the channel identifier and target time to the second Bluetooth controller, and the scan command is also used to instruct the second Bluetooth controller to scan the first data channel; specifically, the scan The instruction is used to instruct the second Bluetooth controller to scan the target sub-channel corresponding to the channel identifier at the target time.
  • the target sub-channel is at least one channel in the first data channel 0-36 channels.
  • the target sub-channel can also be other channels for transmitting the second data packet other than the 0-36 channel; for example, other channels are at least one channel in the 40-56 channel, in the embodiment of the present application, for This is not specifically limited.
  • the channel identifier is a channel number or a channel frequency, etc.; in this embodiment of the application, the channel identifier is not specifically limited.
  • the first electronic device instructs the second Bluetooth controller to formulate a scanning action based on the channel identification and target time after receiving the channel identification and target time, and the second Bluetooth controller performs scanning based on the scanning action, that is, at Target time, scan the target sub-channel corresponding to the channel identifier.
  • the first electronic device scans the first data channel through the second Bluetooth controller to obtain the second data packet sent by the second electronic device through the first data channel.
  • the first electronic device and the second electronic device provided in the embodiment of the present application are all electronic devices applying Bluetooth low energy technology, and for electronic devices applying Bluetooth low energy technology, it is very easy to perform Bluetooth broadcasting and scanning. Important, it provides a basic guarantee for device discovery and fast connection between electronic devices. And with the rapid development of low-power Bluetooth audio technology applied to electronic devices, the application of data packet broadcasting through data channels will become more and more extensive, and the method provided by the embodiment of the present application can ensure the basic Bluetooth Under the performance of broadcasting and scanning, it supports data packet broadcasting through the data channel to the greatest extent, which can improve the overall performance of electronic devices for Bluetooth broadcasting and scanning.
  • FIG. 4 is a schematic diagram of the first electronic device scanning the first broadcast channel and the first data channel through the first Bluetooth controller and the second Bluetooth controller respectively; wherein, the first Bluetooth controller always maintains Scanning is performed on the first broadcast channel, and the second Bluetooth controller performs scanning on the first data channel.
  • the first electronic device periodically scans a broadcast channel, that is, scans the first broadcast channel every preset time interval to generate a scan window.
  • the first electronic device also needs to obtain the information pointing to the first data packet from the first data packet broadcast through the first broadcast channel. Auxiliary information of a data channel. Therefore, it is very important to ensure the scanning duration of the first broadcast channel to obtain a complete data packet.
  • the first electronic device since the first electronic device uses two Bluetooth controllers, it is not only possible to continue to maintain the first Bluetooth control when the second electronic device broadcasts Bluetooth through the first data channel to send the second data packet.
  • the controller scans the first broadcast channel, and scans the first data channel through the second Bluetooth controller, so that when the first electronic device can obtain the second data packet sent through the first data channel, it can also maintain the The scanning of the first broadcast channel obtains the first data packet broadcast by the first broadcast channel, which avoids the short scanning time of the first broadcast channel caused by the first bluetooth controller switching from the first broadcast channel to other channels, thereby improving The scanning performance of the first bluetooth controller to the first broadcast channel is improved.
  • FIG. 7 shows a flow chart of a Bluetooth protocol communication method shown in an exemplary embodiment of the present application, and the execution body of this embodiment is the first electronic device.
  • Methods include:
  • Step 701 The first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • This step is the same as step 301, and will not be repeated here.
  • Step 702 Based on determining that the second electronic device establishes a Bluetooth communication connection with the first electronic device to use the first data channel, the first electronic device keeps scanning the first broadcast channel by the first Bluetooth controller, and passes the second Bluetooth controller A scan is performed on the first data channel to receive a second data packet from the second electronic device.
  • the process of establishing a Bluetooth communication connection between the first electronic device and the second electronic device is: after the first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet of the second electronic device , the first electronic device establishes a Bluetooth communication connection with the second electronic device based on the first data packet, and after the first electronic device establishes the Bluetooth communication connection with the second electronic device, the first electronic device communicates with the second electronic device using the first data channel. Data transmission between two electronic devices.
  • the first electronic device since the first electronic device uses two Bluetooth controllers, not only can the second electronic device establish a Bluetooth communication connection with the first electronic device to use the first data channel, but the second Bluetooth controller can receive data from The second data packet of the second electronic device can also receive the first data packet broadcast by the second electronic device through the first broadcast channel through the first bluetooth controller to keep scanning the first broadcast channel, avoiding the first bluetooth control
  • the scan time of the first broadcast channel caused by switching the controller from the first broadcast channel to other channels is short, thereby improving the scanning performance of the first Bluetooth controller on the first broadcast channel.
  • FIG. 8 shows a flow chart of a Bluetooth protocol communication method shown in an exemplary embodiment of the present application, and the execution subject of this embodiment is the first electronic device.
  • Methods include:
  • Step 801 The first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • Step 801 is the same as step 301, and will not be repeated here.
  • Step 802 The first electronic device keeps scanning the first broadcast channel by the first Bluetooth controller based on the determination that the preset condition is met, and scans the first data channel through the second Bluetooth controller to receive a message from the second electronic device. Second data packet.
  • step 802 is implemented by the second Bluetooth controller scanning the first data channel to receive the second data packet from the second electronic device The process is the same as steps 302-304, and will not be repeated here. If the preset condition is that the second electronic device establishes a Bluetooth communication connection with the first electronic device to use the first data channel, then step 802 is the same as step 702 and will not be repeated here.
  • Step 803 Based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first electronic device scans the second data channel to receive the packet from the third electronic device through the first Bluetooth controller. third packet.
  • the second data channel is used for broadcasting a third data packet
  • the third data packet is used for establishing a Bluetooth communication connection between the third electronic device and the first electronic device.
  • the second data channel includes at least one channel among 0-36 channels, and is used for data transmission or broadcasting of data packets.
  • the second data channel further includes channels other than channels 0-36; for example, other channels are channels 40-56, etc., which are not specifically limited in this embodiment of the present application.
  • the channels of the first data channel and the second data channel are the same or different; for example, the first data channel is channel 36 and the second data channel is channel 36, or the first data channel is channel 36 and the second data channel is the channel 35, which is not specifically limited in this application.
  • the first electronic device determines whether the third electronic device performs Bluetooth broadcasting through the second data channel to send the third data packet. In one implementation, if the first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device, the scanned information includes the second data packet passed by the third electronic device. The channel broadcasts the data packet of the indication information of the third data packet, and the first electronic device determines that the third electronic device broadcasts the third data packet through the Bluetooth broadcast through the second data channel, and then the first electronic device executes step 803 .
  • the first electronic device controls the scanning channel of the first Bluetooth controller to switch to the data channel, and also scans the data channel, that is, the first electronic device The device scans the data channels corresponding to the two electronic devices through the first Bluetooth controller and the second Bluetooth controller respectively, so as to obtain the second data packets sent by the two electronic devices through the data channels respectively. In this way, the first electronic device scans the data channel through the two Bluetooth controllers respectively, thereby improving the efficiency of obtaining data packets broadcast by other electronic devices through the data channel.
  • FIG. 9 shows a flow chart of a Bluetooth protocol communication method according to an exemplary embodiment of the present application, and the execution subject of this embodiment is the first electronic device.
  • Methods include:
  • Step 901 The first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • This step is the same as step 301, and will not be repeated here.
  • Step 902 The first electronic device keeps scanning the first broadcast channel by the first Bluetooth controller based on the determination that the preset condition is met, and scans the first data channel through the second Bluetooth controller to receive a message from the second electronic device. Second data packet.
  • This step is the same as step 802, and will not be repeated here.
  • Step 903 Based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first electronic device scans the Bluetooth audio link through the first Bluetooth controller to receive the second data packet from the fourth electronic device. audio data.
  • the Bluetooth audio link is a link established between the fourth electronic device and the first electronic device for transmitting audio data.
  • the Bluetooth audio link is a data channel
  • the fourth electronic device sends the second data packet through the data channel
  • the data channel includes at least one channel among channels 0-36, and is used for data transmission or broadcasting of the data packet.
  • the data channel also includes other channels than 0-36 channels; for example, other channels are 40-56 channels, etc., which are not specifically limited in this embodiment of the present application.
  • the first electronic device determines whether the fourth electronic device transmits audio data through the Bluetooth audio link. In one implementation, if the first electronic device determines that the fourth electronic device has established a Bluetooth audio link with the first electronic device, then the first electronic device determines that the fourth electronic device transmits audio data through the Bluetooth audio link, then the second An electronic device executes step 903 to receive audio data from a fourth electronic device.
  • the first electronic device scans the fifth data packet of the fourth electronic device through the first Bluetooth controller, establishes a Bluetooth audio link with the fourth electronic device, and communicates with the fourth electronic device through the first Bluetooth controller.
  • the fourth electronic device performs data transmission through the established Bluetooth audio link, and keeps the first electronic device receiving the second data packet through the second Bluetooth controller, so that while the first electronic device keeps receiving the second data packet, it can also pass the Frequency division multiplexing is used to transmit audio data.
  • the first electronic device since the first electronic device can scan the first data channel through the second Bluetooth controller to receive the second data packet from the second electronic device, it can also scan the first data channel through the first Bluetooth controller.
  • the Bluetooth audio link is used to receive the audio data sent by the fourth electronic device through the Bluetooth audio link, so that the first electronic device can receive the second data packet from the second electronic device and the second data packet from the fourth electronic device through two Bluetooth controllers respectively. audio data, thereby improving the efficiency of receiving data by the first electronic device.
  • FIG. 10 shows a flow chart of a Bluetooth protocol communication method shown in an exemplary embodiment of the present application, and the execution subject of this embodiment is the first electronic device.
  • Methods include:
  • Step 1001 The first electronic device scans the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device.
  • This step is the same as step 301, and will not be repeated here.
  • Step 1002 Based on determining that the preset condition is not met, the first electronic device keeps scanning the first broadcast channel by the first bluetooth controller, and broadcasts the fourth data packet through the second bluetooth controller.
  • the preset conditions include at least one of the second electronic device performing Bluetooth broadcasting through the first data channel and the second electronic device establishing a Bluetooth communication connection with the first electronic device to use the first data channel, and responding to these two predetermined If none of the preset conditions is met, the first electronic device determines that the preset conditions are not met.
  • the fourth data packet is used for establishing a Bluetooth communication connection between the electronic device receiving the fourth data packet and the first electronic device.
  • the first electronic device broadcasts the fourth data packet through a broadcast channel or a data channel, which is not specifically limited in this application.
  • the first electronic device since the first electronic device uses two bluetooth controllers, it can broadcast data packets through the second bluetooth controller while keeping scanning the first broadcast channel through the first bluetooth controller, so that the first When the electronic device can keep scanning the first broadcast channel, it establishes a Bluetooth communication connection with other electronic devices through Bluetooth broadcasting, which avoids the first broadcasting caused by the first Bluetooth controller switching from scanning to performing broadcasting on the first broadcasting channel.
  • the fact that the channel scanning time is short further improves the scanning performance of the first bluetooth controller on the first broadcast channel.
  • the number of Bluetooth controllers corresponding to the first electronic device is three, and the three Bluetooth controllers can all be Bluetooth controllers included in the first electronic device or Bluetooth controllers independent of the first electronic device .
  • the first electronic device scans the first broadcast channel through the first Bluetooth controller.
  • the second electronic device performs Bluetooth broadcast through the first data channel to send the second data packet
  • the third electronic device performs Bluetooth broadcast through the second data channel to send the third data packet
  • the first electronic device keeps The first Bluetooth controller scans the first broadcast channel
  • the second Bluetooth controller scans the first data channel
  • the third Bluetooth controller scans the second data channel.
  • the first electronic device maintains the first Bluetooth controller pair
  • the scanning of the first broadcast channel is performed by the second bluetooth controller to scan the first data channel, and the third bluetooth controller scans the bluetooth audio link for audio data transmission with the fourth electronic device.
  • the first electronic device keeps the first Bluetooth controller scanning the first broadcast channel , scan the second broadcast channel through the second bluetooth controller, and perform scan on the third broadcast channel through the third bluetooth controller.
  • the number of Bluetooth controllers corresponding to the first electronic device is four, and each of the four Bluetooth controllers may be a Bluetooth controller included in the first electronic device or a Bluetooth controller independent of the first electronic device .
  • the first electronic device scans the first broadcast channel through the first Bluetooth controller.
  • the first electronic device keeps the scan of the first broadcast channel by the first bluetooth controller, scans the first data channel through the second bluetooth controller, and scans the second data channel through the third bluetooth controller Scanning is performed, and the Bluetooth audio link is scanned through the fourth Bluetooth controller.
  • the second electronic device broadcasts the second data packet through the first data channel
  • the third electronic device broadcasts the second data packet through the second broadcast channel
  • FIG. 11 shows a block diagram of a communication device of the Bluetooth protocol shown in an exemplary embodiment of the present application.
  • the device includes:
  • the first execution module 1101 is configured to scan the first broadcast channel through the first Bluetooth controller to receive the first data packet from the second electronic device;
  • the second execution module 1102 is configured to keep the scanning of the first broadcast channel by the first Bluetooth controller based on the determination that the preset condition is met, and scan the first data channel through the second Bluetooth controller to receive data from the second electronic device.
  • preset conditions include:
  • the second electronic device performs Bluetooth broadcasting through the first data channel.
  • preset conditions include:
  • the second electronic device establishes a Bluetooth communication connection with the first electronic device to use the first data channel.
  • the first Bluetooth controller is independent of the first electronic device.
  • the second Bluetooth controller is independent of the first electronic device.
  • the device also includes:
  • the determination module is configured to determine that if the first data packet is broadcast by the second electronic device and the first data packet includes auxiliary information, it is determined that the second electronic device performs Bluetooth broadcast through the first data channel to send the second data packet, and the auxiliary information is The information is used to instruct the second electronic device to perform Bluetooth broadcast through the first data channel to send the second data packet.
  • the auxiliary information includes a channel identifier of a target subchannel and a target time, where the target subchannel is a subchannel for sending the second data packet, and the target time is the time when the second data packet is sent;
  • the second execution module 1102 is configured to send the channel identifier and the target time to the second Bluetooth controller; instruct the second Bluetooth controller to scan the target sub-channel corresponding to the channel identifier at the target time to receive the second electronic device Two packets.
  • the first Bluetooth controller is electrically connected to the second Bluetooth controller
  • the second execution module 1102 is configured to send the channel identifier and the target time to the second Bluetooth controller through the first Bluetooth controller.
  • the first electronic device includes a scheduling module, and the scheduling module is electrically connected to the first Bluetooth controller and the second Bluetooth controller;
  • the second execution module 1102 is configured to send the channel identifier and the target time to the second Bluetooth controller through the scheduling module.
  • the device also includes:
  • the third execution module is configured to, based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first Bluetooth controller scans the second data channel to receive the data packet from the third electronic device third packet.
  • the device also includes:
  • the fourth execution module is configured to scan the Bluetooth audio link through the first Bluetooth controller to receive the second data packet from the fourth electronic device based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet. audio data.
  • the device also includes:
  • the fifth execution module is configured to keep scanning the first broadcast channel by the first Bluetooth controller based on determining that the preset condition is not satisfied, and broadcast the fourth data packet through the second Bluetooth controller to broadcast.
  • the electronic device includes a Bluetooth module, a first Bluetooth controller and a second Bluetooth controller;
  • the Bluetooth module is configured to: communicate with a or a plurality of other electronic devices for data communication based on the Bluetooth protocol;
  • the first Bluetooth controller is configured to: scan the first broadcast channel to receive the first data packet from the second electronic device; based on determining that the preset condition is met, keep Scanning the first broadcast channel;
  • the second Bluetooth controller is configured to: based on knowing that the preset condition is met, scan the first data channel to receive a second data packet from the second electronic device.
  • preset conditions include:
  • the second electronic device performs Bluetooth broadcasting through the first data channel.
  • preset conditions include:
  • the second electronic device establishes a Bluetooth communication connection with the first electronic device to use the first data channel.
  • the first Bluetooth controller is independent of the first electronic device.
  • the second Bluetooth controller is independent of the first electronic device.
  • the Bluetooth module is further configured to: if the first data packet is broadcast by the second electronic device, and the first data packet includes auxiliary information, then determine that the second electronic device performs Bluetooth broadcasting through the first data channel To send the second data packet, the auxiliary information is used to instruct the second electronic device to perform Bluetooth broadcasting through the first data channel to send the second data packet.
  • the auxiliary information includes the channel identification and the target time of the target subchannel, the target subchannel is the subchannel for sending the second data packet, and the target time is the time for sending the second data packet;
  • the bluetooth module is also configured to: Send the channel identifier and the target time to the second Bluetooth controller; instruct the second Bluetooth controller to scan the target sub-channel corresponding to the channel identifier at the target time to receive the second data packet from the second electronic device.
  • the first Bluetooth controller is electrically connected to the second Bluetooth controller; the first Bluetooth controller is further configured to: send the channel identifier and the target time to the second Bluetooth controller.
  • FIG. 13 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device includes a Bluetooth module, a first Bluetooth controller, and a second Bluetooth controller, and also includes a scheduling module.
  • the scheduling module is connected to the Bluetooth module respectively.
  • the first Bluetooth controller is electrically connected to the second Bluetooth controller; the scheduling module is configured to: send the channel identifier and the target time to the second Bluetooth controller.
  • the Bluetooth module is further configured to: based on determining that the second Bluetooth controller is scanning the first data channel to receive the second data packet, the first Bluetooth controller scans the second data channel to receive A third data packet from a third electronic device.
  • the bluetooth module is further configured to: based on determining that the second bluetooth controller is scanning the first data channel to receive the second data packet, the first bluetooth controller scans the bluetooth audio link to receive Audio data from the fourth electronic device.
  • the bluetooth module is further configured to: based on determining that the preset condition is not met, keep the first bluetooth controller scanning the first broadcast channel, and perform a broadcast by the second bluetooth controller to broadcast the fourth data packet .
  • both the first Bluetooth controller and the second Bluetooth controller are controllers applying Bluetooth low power consumption technology, and the first Bluetooth controller and the second Bluetooth controller cooperate to perform scanning work, thus through The first bluetooth controller and the second bluetooth controller improve the scanning performance of the electronic equipment applying the bluetooth low power technology to the data channel.
  • the electronic device includes a first Bluetooth controller and a second Bluetooth controller.
  • the electronic device scans the first broadcast channel through the first Bluetooth controller, if the preset condition is met, the electronic device can Keeping the scan of the first broadcast channel by the first bluetooth controller, and performing the scan on the first data channel by the second bluetooth controller; thus enabling the first electronic device to obtain the information of the second data packet sent through the first data channel
  • the fact that the scanning time for the first broadcast channel is short, further improves the scanning performance of the first broadcast channel by the first Bluetooth controller.
  • FIG. 14 shows a structural block diagram of an electronic device provided by an exemplary embodiment of the present application.
  • the structural block diagram may be a structural block diagram of the first electronic device, or may be a structural block diagram of the second electronic device.
  • the electronic device 1400 includes one or more of the following components: a processor 1410 , a memory 1420 , a first Bluetooth controller 1430 , a second Bluetooth controller 1440 , a scheduling module 1450 and a Bluetooth module 1460 .
  • processor 1410 may include one or more processing cores.
  • the processor 1410 uses various interfaces and lines to connect various parts of the entire electronic device 1400, and executes electronic operations by running or executing instructions, programs, code sets or instruction sets stored in the memory 1420, and calling data stored in the memory 1420.
  • the processor 1410 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1410 can integrate one or more of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem, etc.
  • a central processing unit Central Processing Unit, CPU
  • an image processor Graphics Processing Unit, GPU
  • a neural network processor Neural-network Processing Unit, NPU
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the content that needs to be displayed on the display screen
  • the NPU is used to realize artificial intelligence (Artificial Intelligence, AI) functions
  • the modem is used to process wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 1410, but may be realized by a single chip.
  • the memory 1420 includes random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • RAM Random Access Memory
  • ROM Read-Only Memory
  • the memory 1420 includes a non-transitory computer-readable storage medium. The memory 1420 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 1420 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for realizing the above-mentioned various method embodiments; the storage data area may store data created according to the use of the electronic device 1400 (such as audio data, phonebook) and the like.
  • the Bluetooth controller 1430 there is at least one first Bluetooth controller 1430, and at least one first Bluetooth controller 1430 is used to scan broadcast channels.
  • the second bluetooth controller 1440 is at least one, and at least one second bluetooth controller 1440 is used for the electronic device to scan the first data channel to The second data packet from the second electronic device is received, so as to keep the first Bluetooth controller 1430 scanning the broadcast channel.
  • the scheduling module 1450 is used to schedule the first Bluetooth controller 1430 and the second Bluetooth controller 1440 .
  • the Bluetooth module 1460 is used for data communication based on the Bluetooth protocol with one or more other electronic devices.
  • the electronic device 1400 also includes a display screen.
  • a display is a display component for displaying a user interface.
  • the display screen is a display screen with a touch function. Through the touch function, the user can use any object among fingers and stylus to perform touch operations on the display screen.
  • the display screen is usually arranged on the front panel of the electronic device 1400 .
  • the display screen can be designed as full screen, curved screen, special-shaped screen, double-sided screen or folding screen.
  • the display screen can also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which are not limited in this embodiment.
  • the structure of the electronic device 1400 shown in the above drawings does not constitute a limitation on the electronic device 1400, and the electronic device 1400 may include more or less components than those shown in the figure. Or combine certain components, or different component arrangements.
  • the electronic device 1400 also includes components such as a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, Wi-Fi) module, and a power supply, which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores at least one program code, and the at least one program code is executed by the processor of the electronic device to implement the Bluetooth protocol shown in the above embodiments communication method.
  • the embodiment of the present application also provides a computer program product, the computer program product stores at least one program code, and the at least one program code is executed by the processor of the electronic device to implement the communication method of the Bluetooth protocol as shown in the above embodiments.
  • the functions described in the embodiments of the present application may be implemented by hardware, software, firmware or any combination thereof.
  • the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
  • Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • a storage media may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种蓝牙协议的通信方法、电子设备、装置、存储介质及产品,属于无线网络技术领域。方法由第一电子设备执行,方法包括:通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;基于确定满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包;第二蓝牙控制器不同于第一蓝牙控制器;这样使得第一电子设备能够得到通过第一数据信道发送的第二数据包的情况下,还能够保持对第一广播信道的扫描,避免了第一蓝牙控制器进行信道切换导致的对第一广播信道扫描时间短的情况,提高了通过第一蓝牙控制器对第一广播信道的扫描性能。

Description

蓝牙协议的通信方法、电子设备、装置、存储介质及产品
本申请要求于2022年03月03日提交的申请号为202210201987.8、发明名称为“蓝牙协议的通信方法、电子设备、装置、存储介质及产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及无线网络技术领域,特别涉及一种蓝牙协议的通信方法、电子设备、装置、存储介质及产品。
背景技术
目前,两个电子设备可以通过低功耗蓝牙技术进行数据传输。在第一电子设备和第二电子设备通过低功耗蓝牙技术进行数据传输之前,第一电子设备和第二电子设备需要先建立蓝牙通信连接。而第一电子设备和第二电子设备建立蓝牙通信连接时,第一电子设备对广播信道执行扫描,从而基于扫描到的第二电子设备的设备信息与第二电子设备建立蓝牙通信连接,进而实现数据传输。
蓝牙核心规范协议支持多信道数据传输,也即不仅支持广播信道(37、38和39信道)广播第一数据包,第一数据包包括第二电子设备的设备信息,还支持数据信道(0-36信道或其他信道)广播(或发送)第二数据包,第二数据包包括第二电子设备的设备信息或者待传输的数据。而第一电子设备包括一个蓝牙控制器,则蓝牙控制器就需要在两个信道之间进行切换,从而实现对第一数据包和第二数据包的接收。
发明内容
本申请实施例提供了一种蓝牙协议的通信方法、电子设备、装置、存储介质及产品,能够提高通过第一蓝牙控制器对第一广播信道的扫描性能。所述技术方案如下:
一方面,提供了一种基于蓝牙协议的通信方法,由第一电子设备执行,所述方法包括:
通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
基于确定满足预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包;
其中,所述第二蓝牙控制器不同于所述第一蓝牙控制器。
另一方面,提供了一种电子设备,所述电子设备包括蓝牙模块、第一蓝牙控制器和第二蓝牙控制器;
所述蓝牙模块配置成:
与一个或多个其他电子设备进行基于蓝牙协议的数据通信;
所述第一蓝牙控制器配置成:
对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
基于确定满足预设条件,保持对所述第一广播信道的扫描;
所述第二蓝牙控制器配置成:
基于获知所述预设条件被满足,对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包。
另一方面,提供了一种蓝牙协议的通信装置,所述装置包括:
第一执行模块,用于通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子 设备的第一数据包;
第二执行模块,用于基于确定满足预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包;其中,所述第二蓝牙控制器不同于所述第一蓝牙控制器。
另一方面,提供了一种电子设备,所述电子设备包括处理器和存储器;所述存储器存储有至少一条程序代码,所述至少一条程序代码用于被所述处理器执行以实现如上述方面所述的蓝牙协议的通信方法。
另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如上述方面所述的蓝牙协议的通信方法。
另一方面,提供了一种计算机程序产品,所述计算机程序产品存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如上述任一实现方式所述的蓝牙协议的通信方法。
附图说明
图1示出了本申请一个示例性实施例所提供的实施环境的示意图;
图2示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图3示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图4示出了本申请一个示例性实施例示出的信道扫描的示意图;
图5示出了本申请一个示例性实施例示出的第一电子设备的结构示意图;
图6示出了本申请一个示例性实施例示出的第一电子设备的结构示意图;
图7示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图8示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图9示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图10示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图;
图11示出了本申请一个示例性实施例示出的蓝牙协议的通信装置的框图;
图12示出了本申请一个示例性实施例示出的电子设备的结构框图;
图13示出了本申请一个示例性实施例示出的电子设备的结构框图;
图14示出了本申请一个示例性实施例示出的电子设备的结构方框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本申请所涉及的相关数据可以为经用户授权或者经各方充分授权的数据。
本申请实施例中,提供有如下技术方案:
基于蓝牙协议的通信方法,由第一电子设备执行,所述方法包括:
通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
基于确定满足预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包;
其中,所述第二蓝牙控制器不同于所述第一蓝牙控制器。
在一些实施例中,所述预设条件包括:
所述第二电子设备通过所述第一数据信道进行蓝牙广播。
在一些实施例中,所述预设条件包括:
所述第二电子设备与所述第一电子设备建立蓝牙通信连接以使用所述第一数据信道。
在一些实施例中,所述第一蓝牙控制器独立于所述第一电子设备。
在一些实施例中,所述第二蓝牙控制器独立于所述第一电子设备。
在一些实施例中,确定满足预设条件包括:
若所述第一数据包是所述第二电子设备广播的,且所述第一数据包中包括辅助信息,则确定所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包,所述辅助信息用于指示所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包。
在一些实施例中,所述辅助信息包括目标子信道的信道标识和目标时间,所述目标子信道为发送所述第二数据包的子信道,所述目标时间为发送所述第二数据包的时间;
所述通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包,包括:
将所述信道标识和所述目标时间发送给所述第二蓝牙控制器;
指示所述第二蓝牙控制器,在所述目标时间,扫描所述信道标识对应的目标子信道以接收来自所述第二电子设备的所述第二数据包。
在一些实施例中,所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
所述将所述信道标识和所述目标时间发送给所述第二蓝牙控制器,包括:
通过所述第一蓝牙控制器,将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
在一些实施例中,所述第一电子设备包括调度模块,所述调度模块分别与所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
所述将所述信道标识和所述目标时间发送给所述第二蓝牙控制器,包括:
通过调度模块,将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
在一些实施例中,所述方法还包括:
基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
在一些实施例中,所述方法还包括:
基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
在一些实施例中,所述方法还包括:
基于确定不满足所述预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过所述第二蓝牙控制器执行广播以广播第四数据包。
请参考图1,其示出了本申请一个示例性实施例所提供蓝牙协议的通信方法的实施环境的示意图。该实施环境包括第一电子设备100和至少一个第二电子设备200;第一电子设备100与各第二电子设备200分别通过相应的蓝牙通信连接进行通信。第一电子设备100和各第二电子设备200均可以为应用蓝牙核心规范5.0协议或其他蓝牙核心规范协议的设备,其他蓝牙核心规范协议可以为蓝牙核心规范6.0协议、蓝牙核心规范7.0协议等,但不限于此,第一电子设备100与各第二电子设备200可以通过低功耗蓝牙技术进行数据传输。第一电子设备100和各第二电子设备200均可以为终端设备或可穿戴电子设备,例如,第一电子设备100和各第二电子设备200均可以为手机、平板电脑、个人电脑(Personal Computer,PC)、耳机、手表、眼镜等设备中的至少一种。
蓝牙核心规范协议支持多信道数据传输,也即不仅支持广播信道(37、38和39信道) 广播第一数据包,第一数据包包括第二电子设备的设备信息,还支持数据信道(0-36信道或其他信道)广播(或发送)第二数据包,第二数据包包括第二电子设备的设备信息或者待传输的数据。而第一电子设备包括一个蓝牙控制器;因此,相关技术中,第一电子设备的蓝牙控制器就需要在两个信道之间进行切换,从而实现对第一数据包和第二数据包的接收。而第一电子设备的蓝牙控制器频繁的切换信道会导致蓝牙控制器在广播信道的扫描时间短,进而影响蓝牙控制器在广播信道的扫描性能。
请参考图2,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图。本申请实施例中的执行主体为第一电子设备,方法包括:
步骤201:通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
步骤202:基于确定满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包;其中,第二蓝牙控制器不同于第一蓝牙控制器。
在本申请实施例中,由于在通过第一蓝牙控制器对第一广播信道执行扫描的情况下,在满足预设条件的情况下,能够保持第一蓝牙控制器对第一广播信道的扫描,而通过第二蓝牙控制器来对第一数据信道执行扫描;这样使得第一电子设备能够得到通过第一数据信道发送的第二数据包的情况下,还能够保持对第一广播信道的扫描,得到第二电子设备通过第一广播信道广播的第一数据包,避免了第一蓝牙控制器从第一广播信道切换到第一数据信道导致的对第一广播信道扫描时间短的情况,进而提高了通过第一蓝牙控制器对第一广播信道的扫描性能。
请参考图3,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图,该实施例的执行主体为第一电子设备。方法包括:
步骤301:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
在一种实现方式中,第一电子设备包括两个蓝牙控制器,分别为第一蓝牙控制器和第二蓝牙控制器,第二蓝牙控制器不同于第一蓝牙控制器,第一电子设备通过第一蓝牙控制器和第二蓝牙控制器可以分别对广播信道或数据信道执行扫描。例如,第一电子设备通过第一蓝牙控制器对广播信道执行扫描,通过第二蓝牙控制器对数据信道执行扫描。
在另一种实现方式中,第一蓝牙控制器和第二蓝牙控制器均独立于第一电子设备,进而便于第一蓝牙控制器和第二蓝牙控制器分别能够被多个电子设备复用,从而提高了第一蓝牙控制器和第二蓝牙控制器的利用率。在另一种实现方式中,第一电子设备包括第一蓝牙控制器,第二蓝牙控制器独立于第一电子设备,进而便于第二蓝牙控制器能够被多个电子设备复用,从而提高了第二蓝牙控制器的利用率。在另一种实现方式中,第一电子设备包括第二蓝牙控制器,第一蓝牙控制器独立于第一电子设备,进而便于第一蓝牙控制器能够被多个电子设备复用,从而提高了第一蓝牙控制器的利用率。
其中,第一广播信道用于广播第一数据包,第一数据包用于第二电子设备与第一电子设备建立蓝牙通信连接,第二电子设备为广播第一数据包的设备。可选地,第二电子设备通过第一广播信道广播第一数据包,第一电子设备通过对第一广播信道执行扫描,以接收来自第二电子设备的第一数据包,第二电子设备与第一电子设备通过第一数据包建立蓝牙通信连接,该蓝牙通信连接用于第一电子设备和第二电子设备进行数据传输。其中,第一广播信道为主要的广播信道,包括信道37、信道38和信道39中的至少一个信道,信道37、信道38和信道39分别对应信道频率为2402MHz、2426MHz和2480MHz。可选地,第一广播信道还包括信道37、信道38和信道39以外的其他信道;例如,其他信道为信道57、信道58或信道59 等,在本申请实施例中,对此不作具体限定。
需要说明的是,第一蓝牙控制器和第二蓝牙控制器的数量均可以为至少两个,且第一蓝牙控制器和第二蓝牙控制器的数量可以根据需要进行设定并更改,在本申请实施例中,对此不作限定;可选地,第一蓝牙控制器和第二蓝牙控制器的数量均为两个。
步骤302:第一电子设备基于确定第二电子设备通过第一数据信道进行蓝牙广播,保持第一蓝牙控制器对第一广播信道的扫描。
其中,第二电子设备通过第一数据信道进行蓝牙广播,以向第一电子设备发送第二数据包。第二数据包包括待传输的数据。第一数据信道包括信道0-36信道中的至少一个信道,用于进行数据传输或广播数据包。可选地,第一数据信道还包括0-36信道以外的其他信道;例如,其他信道为40-56信道等,在本申请实施例中,对此不作具体限定。
需要说明的是,由于第二电子设备能够通过第一数据信道辅助向第一电子设备广播第二数据包,而第一数据信道和第一广播信道分别为不同的信道,一个蓝牙控制器不能够同时对第一数据信道和第一广播信道进行扫描,而在本申请中确定第二电子设备通过第一数据信道进行蓝牙广播后,保持第一蓝牙控制器对第一广播信道的扫描,能够保证第一电子设备能够接收来自第二电子设备通过第一广播信道广播的第一数据包,且由于第一电子设备还能够通过第二蓝牙控制器扫描第一数据信道来接收第二电子设备通过第一数据信道广播的第二数据包,从而保证了第一电子设备能够完整的接收来自第二电子设备的数据包。
在一些实施例中,第一电子设备确定第二电子设备通过第一数据信道进行蓝牙广播的过程为:若第一数据包是第二电子设备广播的,且第一数据包中包括辅助信息,则第一电子设备确定第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包。
其中,第一电子设备确定第一数据包是否是第二电子设备广播的,若第一数据包是第二电子设备广播的,则第一电子设备确定第一数据包中是否包括辅助信息,若第一数据包中包括辅助信息,则第一电子设备确定第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包。其中,辅助信息用于指示第二电子设备通过第一数据信道发送第二数据包,辅助信息包括目标子信道的信道标识和目标时间,目标子信道为发送第二数据包的子信道,目标时间为发送第二数据包的时间。可选地,参见图4,第二电子设备通过第一广播信道发送的第一数据包中包括指向第一数据信道的至少一个辅助拓展指示(auxiliary extended indication,AUX_EXT_IND)对应的辅助信息,其中,辅助信息包括辅助链接指示(auxiliary chain indication,AUX_CHAIN_IND)和辅助同步指示(auxiliary synchronous indication,AUX_SYNC_IND),分别指向目标子信道的信道标识和目标时间。可选地,辅助信息还包括厂家自定义的第二电子设备的设备名称、设备标识、以及设备的其他编码信息等,在本申请实施例中,对此不作具体限定。在一种实现方式中,第一电子设备能够基于辅助信息中包括的第二电子设备的设备名称、设备标识、以及设备的其他编码信息等,准确查找到第二电子设备,进而实现与第二电子设备之间的蓝牙通信。
需要说明的是,由于第二电子设备通过第一数据信道向第一电子设备广播第二数据包时,需要第一广播信道广播的第一数据包携带第二电子设备通过第一数据信道发送第二数据包的指示信息;而在本申请实施例中,通过确定第一数据包是否是第二电子设备广播的,且确定第一数据包中是否携带指示第一数据信道的辅助信息,能够提高确定第二电子设备是否通过第一数据信道进行蓝牙广播以发送第二数据包的准确性。
步骤303:第一电子设备将信道标识和目标时间发送给第二蓝牙控制器。
在一些实施例中,第二蓝牙控制器的数量为至少两个,该步骤中的第二蓝牙控制器为第一电子设备包括的至少两个蓝牙控制器中的一个或独立于第一电子设备的至少两个蓝牙控制器中的一个;第一电子设备确定至少两个第二蓝牙控制器中的目标蓝牙控制器,将信道标识和目标时间发送给该目标蓝牙控制器。可选地,目标蓝牙控制器为多个第二蓝牙控制器中用于扫描数据信道的蓝牙控制器、或为多个第二蓝牙控制器中执行扫描次数最少的蓝牙控制器、 或为多个第二蓝牙控制器中执行扫描的时间距当前时间最长的蓝牙控制器,但不限于此。
在一些实施例中,第一蓝牙控制器和第二蓝牙控制器电性连接;第一电子设备通过第一蓝牙控制器,将信道标识和目标时间发送给第二蓝牙控制器。
可选地,参见图5,第一蓝牙控制器通过第一接口和第二接口分别与蓝牙模块和第二蓝牙控制器电性连接。其中,蓝牙模块为蓝牙主机部分,用于实现对第一蓝牙控制器和第二蓝牙控制器的控制;可选地,第一接口为主机控制器接口(Host Controller Interface,HCI),蓝牙模块通过HCI接口与第一蓝牙控制器连接。蓝牙模块通过第一接口能够向第一蓝牙控制器发送指令,进而实现通过第一蓝牙控制器对第一广播通道执行扫描。可选地,蓝牙模块还通过第一蓝牙控制器指示第二蓝牙控制器执行扫描。
在一种实现方式中,第一蓝牙控制器通过对第一广播信道执行扫描,以接收来自第二电子设备的第一数据包,基于该第一数据包中包括的辅助信息,得到目标子信道的信道标识和目标时间,且将信道标识和目标时间发送给第二蓝牙控制器。可选地,第一蓝牙控制器向第二蓝牙控制器发送扫描指令,该扫描指令携带信道标识和目标时间,且该扫描指令用于指示第二蓝牙控制器在目标时间,扫描信道标识对应的目标子信道以接收来自第二电子设备的第二数据包。在本申请实施例中,通过连接第一蓝牙控制器和第二蓝牙控制器,使得第一蓝牙控制器能够直接将扫描第一广播信道得到的信道标识和目标时间发送给第二蓝牙控制器,进而提高了传输信道标识和目标时间的效率,从而能够提高后续第二蓝牙控制器执行扫描的效率。
在另一种实现方式中,第一蓝牙控制器将扫描第一广播信道得到的第一数据包发送给蓝牙模块,蓝牙模块确定第一数据包中的辅助信息后,向第一蓝牙控制器发送扫描指令,该扫描指令携带信道标识和目标时间,且该扫描指令用于指示第二蓝牙控制器在目标时间,扫描信道标识对应的目标子信道以接收来自第二电子设备的第二数据包,第一蓝牙控制器将该扫描指令转发给第二蓝牙控制器。在该实现方式中,通过蓝牙模块来确定第一数据包中的辅助信息,且通过蓝牙模块来合成扫描指令,通过第一蓝牙控制器转发辅助信息,减轻了第一蓝牙控制器的任务量,进而能够保证第一蓝牙控制器能够稳定高效的执行信道扫描。
在一些实施例中,第一电子设备包括调度模块,调度模块分别与第一蓝牙控制器和第二蓝牙控制器电性连接。第一电子设备通过调度模块,将信道标识和目标时间发送给第二蓝牙控制器。可选地,参见图6,调度模块通过第三接口与蓝牙模块连接,且通过第四接口和第五接口分别与第一蓝牙控制器和第二蓝牙控制器连接。其中,蓝牙模块通过调度模块分别向第一蓝牙控制器和第二蓝牙控制器发送扫描指令,即通过调度模块对第一蓝牙控制器或第二蓝牙控制器进行调度,实现通过第一蓝牙控制器或第二蓝牙控制器进行信道扫描。其中,第三接口、第四接口和第五接口的接口类型可以根据需要进行设定并更改,在本申请实施例中,对此不作具体限定。
在一种实现方式中,第一蓝牙控制器将扫描第一广播信道得到的第一数据包发送给调度模块,调度模块确定第一数据包中的辅助信息后,向第二蓝牙控制器发送扫描指令,该扫描指令携带信道标识和目标时间,且该扫描指令用于指示第二蓝牙控制器在第一数据信道执行扫描。在该实现方式中,通过调度模块向第二蓝牙控制器发送信道标识和目标时间,且能够指示第二蓝牙控制器在第一数据信道执行扫描,实现了对第二蓝牙控制器的调度,且减轻了第一蓝牙控制器的任务量,进而能够保证第一蓝牙控制器能够稳定高效的执行信道扫描。
在另一种实现方式中,第一蓝牙控制器将扫描第一广播信道得到的第一数据包通过调度模块发送给蓝牙模块,蓝牙模块确定第一数据包中的辅助信息后,通过调度模块向第二蓝牙控制器发送扫描指令;进而通过调度模块能够有效实现控制第二蓝牙控制器进行信道扫描,使得第一蓝牙控制器和第二蓝牙控制器能够协同执行扫描。
步骤304:第一电子设备指示第二蓝牙控制器,在目标时间,扫描信道标识对应的目标子信道以接收来自第二电子设备的第二数据包。
在一些实施例中,第一电子设备向第二蓝牙控制器发送携带信道标识和目标时间的扫描指令,该扫描指令还用于指示第二蓝牙控制器扫描第一数据信道;具体地,该扫描指令用于指示第二蓝牙控制器在该目标时间,扫描该信道标识对应的目标子信道。其中,目标子信道为第一数据信道0-36信道中的至少一个信道。可选地,目标子信道还能够为0-36信道以外的用于传输第二数据包的其他信道;例如,其他信道为40-56信道中的至少一个信道,在本申请实施例中,对此不作具体限定。可选地,信道标识为信道序号或信道频率等;在本申请实施例中,对信道标识不作具体限定。
在一种实现方式中,第一电子设备指示第二蓝牙控制器接收到信道标识和目标时间后,基于信道标识和目标时间制定扫描动作,第二蓝牙控制器基于该扫描动作执行扫描,即在目标时间,扫描信道标识对应的目标子信道。其中,第一电子设备通过第二蓝牙控制器对第一数据信道执行扫描,得到第二电子设备通过第一数据信道发送的第二数据包。
可选地,本申请实施例提供的第一电子设备和第二电子设备等均为应用低功耗蓝牙技术的电子设备,而对于应用低功耗蓝牙技术的电子设备,进行蓝牙广播和扫描十分重要,其为电子设备之间进行设备发现和快速连接提供了基础的保障。且随着电子设备应用低功耗蓝牙音频技术的快速发展,对于通过数据信道进行数据包广播的应用也会越来越广泛,而本申请实施例提供的方法,可以在保证电子设备基本的蓝牙广播和扫描的性能下,最大限度的支持通过数据信道进行数据包广播,进而能够提升电子设备进行蓝牙广播和扫描的整体性能。
继续参见图4,图4为第一电子设备分别通过第一蓝牙控制器和第二蓝牙控制器分别对第一广播信道和第一数据信道进行扫描的示意图;其中,第一蓝牙控制器始终保持对第一广播信道执行扫描,第二蓝牙控制器则对第一数据信道执行扫描。其中,第一电子设备对一个广播信道进行周期性的扫描,即每间隔预设时长对第一广播信道扫描一次,产生一个扫描窗口。且由图4也可知,即使第二电子设备通过第一数据信道向第一电子设备广播第二数据包,第一电子设备也需从通过第一广播信道广播的第一数据包中获取指向第一数据信道的辅助信息,因此,保证对第一广播信道的扫描时长对获取完整的数据包十分重要。
在本申请实施例中,由于第一电子设备通过两个蓝牙控制器,不仅能够在第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包的情况下,继续保持第一蓝牙控制器对第一广播信道执行扫描,且通过第二蓝牙控制器对第一数据信道执行扫描,使得第一电子设备能够得到通过第一数据信道发送的第二数据包的情况下,还能够保持对第一广播信道的扫描,得到通过第一广播信道广播的第一数据包,避免了第一蓝牙控制器从第一广播信道切换到其他信道导致的第一广播信道扫描时间短的情况,进而提高了第一蓝牙控制器对第一广播信道的扫描性能。
请参考图7,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图,该实施例的执行主体为第一电子设备。方法包括:
步骤701:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
该步骤与步骤301同理,在此不再赘述。
步骤702:第一电子设备基于确定第二电子设备与第一电子设备建立蓝牙通信连接以使用第一数据信道,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包。
可选地,第一电子设备与第二电子设备建立蓝牙通信连接的过程为:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收第二电子设备的第一数据包后,第一电子设备基于第一数据包建立与第二电子设备之间的蓝牙通信连接,第一电子设备与第二电子设备建立蓝牙通信连接之后,使用第一数据信道进行第一电子设备和第二电子设备之间的数据传输。
在本申请实施例中,由于第一电子设备通过两个蓝牙控制器,不仅能够在第二电子设备与第一电子设备建立蓝牙通信连接使用第一数据信道时,通过第二蓝牙控制器接收来自第二电子设备的第二数据包,还能够通过第一蓝牙控制器保持对第一广播信道的扫描来接收第二电子设备通过第一广播信道广播的第一数据包,避免了第一蓝牙控制器从第一广播信道切换到其他信道导致的第一广播信道扫描时间短的情况,进而提高了第一蓝牙控制器对第一广播信道的扫描性能。
请参考图8,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图,该实施例的执行主体为第一电子设备。方法包括:
步骤801:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
步骤801与步骤301同理,在此不再赘述。
步骤802:第一电子设备基于确定满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包。
其中,若预设条件为第二电子设备通过第一数据信道进行蓝牙广播,则步骤802通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包的实现过程与步骤302-304同理,在此不再赘述。若预设条件为第二电子设备与第一电子设备建立蓝牙通信连接以使用第一数据信道,则步骤802与步骤702同理,在此不再赘述。
步骤803:第一电子设备基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
其中,第二数据信道用于广播第三数据包,第三数据包用于第三电子设备与第一电子设备建立蓝牙通信连接。第二数据信道包括0-36信道中的至少一个信道,用于进行数据传输或广播数据包。可选地,第二数据信道还包括0-36信道以外的其他信道;例如,其他信道为40-56信道等,在本申请实施例中,对此不作具体限定。可选地,第一数据信道和第二数据信道的信道相同或不同;例如,第一数据信道为信道36且第二数据信道为信道36,或第一数据信道为信道36且第二数据信道为信道35,在本申请中对此不作具体限定。
在一些实施例中,第一电子设备执行步骤803之前,确定第三电子设备是否通过第二数据信道进行蓝牙广播以发送第三数据包。在一种实现方式中,若第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包时,扫描到包括第三电子设备通过第二数据信道广播第三数据包的指示信息的数据包,则第一电子设备确定第三电子设备通过第二数据信道进行蓝牙广播以发送第三数据包,则第一电子设备执行步骤803。
在本申请实施例中,在两个电子设备均通过数据信道广播数据包时,第一电子设备控制第一蓝牙控制器的扫描信道切换到数据信道,也对数据信道执行扫描,即第一电子设备通过第一蓝牙控制器和第二蓝牙控制器分别对两个电子设备对应的数据信道执行扫描,来得到该两个电子设备分别通过数据信道发送的第二数据包。这样第一电子设备分别通过两个蓝牙控制器扫描数据信道,进而能够提高获取其他电子设备通过数据信道广播的数据包的效率。
请参考图9,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图,该实施例的执行主体为第一电子设备。方法包括:
步骤901:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
该步骤与步骤301同理,在此不再赘述。
步骤902:第一电子设备基于确定满足预设条件,保持第一蓝牙控制器对第一广播信道 的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包。
该步骤与步骤802同理,在此不再赘述。
步骤903:第一电子设备基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
其中,蓝牙音频链路为第四电子设备与第一电子设备建立的,用于传输音频数据的链路。可选地,蓝牙音频链路为数据信道,第四电子设备通过数据信道发送第二数据包,数据信道包括信道0-36信道中的至少一个信道,用于进行数据传输或广播数据包。可选地,数据信道还包括0-36信道以外的其他信道;例如,其他信道为40-56信道等,在本申请实施例中,对此不作具体限定。
在一些实施例中,第一电子设备执行步骤903之前,确定第四电子设备是否通过蓝牙音频链路传输音频数据。在一种实现方式中,若第一电子设备确定第四电子设备与第一电子设备建立了蓝牙音频链路,则第一电子设备确定第四电子设备通过蓝牙音频链路传输音频数据,则第一电子设备执行步骤903,以接收来自第四电子设备的音频数据。
在一种实现方式中,若第一电子设备通过第一蓝牙控制器扫描得到第四电子设备的第五数据包后,与第四电子设备建立蓝牙音频链路,通过第一蓝牙控制器,与第四电子设备通过建立的蓝牙音频链路进行数据传输,保持第一电子设备通过第二蓝牙控制器接收第二数据包,这样使得第一电子设备保持接收第二数据包的同时,又能够通过频分复用的方式进行音频数据的传输。
在本申请实施例中,由于第一电子设备能够在通过第二蓝牙控制器扫描第一数据信道以接收来自第二电子设备的第二数据包的情况下,还能够通过第一蓝牙控制器扫描蓝牙音频链路以接收第四电子设备通过蓝牙音频链路发送的音频数据,使得第一电子设备能够分别通过两个蓝牙控制器接收来自第二电子设备的第二数据包和来自第四电子设备的音频数据,进而提高了第一电子设备接收数据的效率。
请参考图10,其示出了本申请一个示例性实施例示出的蓝牙协议的通信方法的流程图,该实施例的执行主体为第一电子设备。方法包括:
步骤1001:第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包。
该步骤与步骤301同理,在此不再赘述。
步骤1002:第一电子设备基于确定不满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器执行广播以广播第四数据包。
其中,预设条件包括第二电子设备通过第一数据信道进行蓝牙广播和第二电子设备与第一电子设备建立蓝牙通信连接以使用第一数据信道中的至少一项,响应于这两项预设条件均不满足,第一电子设备确定不满足预设条件。
其中,第四数据包用于接收到第四数据包的电子设备与第一电子设备建立蓝牙通信连接。可选地,第一电子设备通过广播信道或数据信道广播第四数据包,在本申请中,对此不作具体限定。
在本申请实施例中,由于第一电子设备通过两个蓝牙控制器,能够在保持通过第一蓝牙控制器对第一广播信道执行扫描时,通过第二蓝牙控制器广播数据包,使得第一电子设备能够保持对第一广播信道的扫描时,通过进行蓝牙广播与其他电子设备建立蓝牙通信连接,避免了第一蓝牙控制器对第一广播信道执行扫描切换到执行广播导致的对第一广播信道扫描时间短的情况,进而提高了第一蓝牙控制器对第一广播信道的扫描性能。
在一些实施例中,第一电子设备对应的蓝牙控制器的数量为三个,该三个蓝牙控制器均 可以为第一电子设备包括的蓝牙控制器或独立于第一电子设备的蓝牙控制器。第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描。可选地,若第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,且第三电子设备通过第二数据信道进行蓝牙广播以发送第三数据包,则第一电子设备保持第一蓝牙控制器对第一广播信道的扫描,通过第二蓝牙控制器对第一数据信道执行扫描,且通过第三蓝牙控制器对第二数据信道执行扫描。可选地,若第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,且第四电子设备通过蓝牙音频链路发送音频数据,则第一电子设备保持第一蓝牙控制器对第一广播信道的扫描,通过第二蓝牙控制器对第一数据信道执行扫描,且通过第三蓝牙控制器扫描蓝牙音频链路以与第四电子设备进行音频数据传输。可选地,若第二电子设备通过第二广播信道进行蓝牙广播,且第三电子设备通过第三广播信道进行蓝牙广播,则第一电子设备保持第一蓝牙控制器对第一广播信道的扫描,通过第二蓝牙控制器对第二广播信道执行扫描,且通过第三蓝牙控制器对第三广播信道执行扫描。
在一些实施例中,第一电子设备对应的蓝牙控制器的数量为四个,该四个蓝牙控制器均可以为第一电子设备包括的蓝牙控制器或独立于第一电子设备的蓝牙控制器。第一电子设备通过第一蓝牙控制器对第一广播信道执行扫描。可选地,若第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,且第三电子设备通过第二数据信道进行以发送第三数据包,且第四电子设备通过蓝牙音频链路发送音频数据,则第一电子设备保持第一蓝牙控制器对第一广播信道的扫描,通过第二蓝牙控制器对第一数据信道执行扫描,通过第三蓝牙控制器对第二数据信道执行扫描,通过第四蓝牙控制器对蓝牙音频链路执行扫描。可选地,若第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,且第三电子设备通过第二广播信道广播第二数据包,则保持第一蓝牙控制器对第一广播信道的扫描,通过第二蓝牙控制器对第一数据信道执行扫描,通过第三蓝牙控制器对第二广播信道执行扫描,且通过第四蓝牙控制器进行蓝牙广播。
需要说明的是,以上仅为本申请的可选实施例,并不用于限制本申请,蓝牙控制器的数量以及每个蓝牙控制器所执行的任务可以根据需要进行设定并更改。
请参考图11,其示出了本申请一个示例性实施例示出的蓝牙协议的通信装置的框图,装置包括:
第一执行模块1101,用于通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
第二执行模块1102,用于基于确定满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自第二电子设备的第二数据包;其中,第二蓝牙控制器不同于第一蓝牙控制器。
在一些实施例中,预设条件包括:
第二电子设备通过第一数据信道进行蓝牙广播。
在一些实施例中,预设条件包括:
第二电子设备与第一电子设备建立蓝牙通信连接以使用第一数据信道。
在一些实施例中,第一蓝牙控制器独立于第一电子设备。
在一些实施例中,第二蓝牙控制器独立于第一电子设备。
在一些实施例中,装置还包括:
确定模块,配置成若第一数据包是第二电子设备广播的,且第一数据包中包括辅助信息,则确定第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,辅助信息用于指示第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包。
在一些实施例中,辅助信息包括目标子信道的信道标识和目标时间,目标子信道为发送第二数据包的子信道,目标时间为发送第二数据包的时间;
第二执行模块1102,配置成将信道标识和目标时间发送给第二蓝牙控制器;指示第二蓝牙控制器,在目标时间,扫描信道标识对应的目标子信道以接收来自第二电子设备的第二数据包。
在一些实施例中,第一蓝牙控制器和第二蓝牙控制器电性连接;
第二执行模块1102,配置成通过第一蓝牙控制器,将信道标识和目标时间发送给第二蓝牙控制器。
在一些实施例中,第一电子设备包括调度模块,调度模块分别与第一蓝牙控制器和第二蓝牙控制器电性连接;
第二执行模块1102,配置成通过调度模块,将信道标识和目标时间发送给第二蓝牙控制器。
在一些实施例中,装置还包括:
第三执行模块,配置成基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
在一些实施例中,装置还包括:
第四执行模块,配置成基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
在一些实施例中,装置还包括:
第五执行模块,配置成基于确定不满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器执行广播以广播第四数据包。
请参考图12,其示出了本申请一个示例性实施例示出的电子设备的结构框图,该电子设备包括蓝牙模块、第一蓝牙控制器和第二蓝牙控制器;蓝牙模块配置成:与一个或多个其他电子设备进行基于蓝牙协议的数据通信;第一蓝牙控制器配置成:对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;基于确定满足预设条件,保持对第一广播信道的扫描;第二蓝牙控制器配置成:基于获知预设条件被满足,对第一数据信道执行扫描以接收来自第二电子设备的第二数据包。
在一些实施例中,预设条件包括:
第二电子设备通过第一数据信道进行蓝牙广播。
在一些实施例中,预设条件包括:
第二电子设备与第一电子设备建立蓝牙通信连接以使用第一数据信道。
在一些实施例中,第一蓝牙控制器独立于第一电子设备。
在一些实施例中,第二蓝牙控制器独立于第一电子设备。
在一些实施例中,蓝牙模块,还配置成:若第一数据包是第二电子设备广播的,且第一数据包中包括辅助信息,则确定第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包,辅助信息用于指示第二电子设备通过第一数据信道进行蓝牙广播以发送第二数据包。
在一些实施例中,辅助信息包括目标子信道的信道标识和目标时间,目标子信道为发送第二数据包的子信道,目标时间为发送第二数据包的时间;蓝牙模块,还配置成:将信道标识和目标时间发送给第二蓝牙控制器;指示第二蓝牙控制器,在目标时间,扫描信道标识对应的目标子信道以接收来自第二电子设备的第二数据包。
在一些实施例中,第一蓝牙控制器和第二蓝牙控制器电性连接;第一蓝牙控制器,还配置成:将信道标识和目标时间发送给第二蓝牙控制器。
请参考图13,其示出了本申请实施例提供的电子设备的结构框图,电子设备包括蓝牙模块、第一蓝牙控制器和第二蓝牙控制器,还包括调度模块,调度模块分别与蓝牙模块、第一蓝牙控制器和第二蓝牙控制器电性连接;调度模块,配置成:将信道标识和目标时间发送给 第二蓝牙控制器。
在一些实施例中,蓝牙模块,还配置成:基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
在一些实施例中,蓝牙模块,还配置成:基于确定第二蓝牙控制器在对第一数据信道执行扫描以接收第二数据包,通过第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
在一些实施例中,蓝牙模块,还配置成:基于确定不满足预设条件,保持第一蓝牙控制器对第一广播信道的扫描,并且通过第二蓝牙控制器执行广播以广播第四数据包。
在本申请实施例中,第一蓝牙控制器和第二蓝牙控制器均为应用蓝牙低功耗技术的控制器,第一蓝牙控制器和第二蓝牙控制器之间协同进行扫描工作,这样通过第一蓝牙控制器和第二蓝牙控制,提升了应用低功耗蓝牙技术的电子设备对数据信道的扫描性能。
在本申请实施例中,电子设备包括第一蓝牙控制器和第二蓝牙控制器,电子设备在通过第一蓝牙控制器对第一广播信道执行扫描时,在满足预设条件的情况下,能够保持第一蓝牙控制器对第一广播信道的扫描,而通过第二蓝牙控制器来对第一数据信道执行扫描;这样使得第一电子设备能够得到通过第一数据信道发送的第二数据包的情况下,还能够保持对第一广播信道的扫描,得到第二电子设备通过第一广播信道广播的第一数据包,避免了第一蓝牙控制器从第一广播信道切换到第一数据信道导致的对第一广播信道扫描时间短的情况,进而提高了通过第一蓝牙控制器对第一广播信道的扫描性能。
请参考图14,其示出了本申请一个示例性实施例提供的电子设备的结构方框图。该结构方框图可以为第一电子设备的结构方框图,也可以为第二电子设备的结构方框图。其中,该电子设备1400包括一个或多个如下部件:处理器1410、存储器1420、第一蓝牙控制器1430、第二蓝牙控制器1440、调度模块1450和蓝牙模块1460。
在一些实施例中,处理器1410可以包括一个或者多个处理核心。处理器1410利用各个接口和线路连接整个电子设备1400内的各个部分,通过运行或执行存储在存储器1420内的指令、程序、代码集或指令集,以及调用存储在存储器1420内的数据,执行电子设备1400的各种功能和处理数据。可选地,处理器1410可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1410可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1410中,单独通过一块芯片进行实现。
在一些实施例中,存储器1420包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1420包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1420可用于存储指令、程序、代码、代码集或指令集。存储器1420可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储根据电子设备1400的使用所创建的数据(比如音频数据、电话本)等。
在一些实施例中,第一蓝牙控制器1430为至少一个,至少一个第一蓝牙控制器1430用于扫描广播信道。第二蓝牙控制器1440为至少一个,至少一个第二蓝牙控制器1440用于电 子设备在通过第一蓝牙控制器1430扫描广播信道的时,满足预设条件的情况下,扫描第一数据信道以接收来自第二电子设备的第二数据包,从而实现保持第一蓝牙控制器1430对广播信道的扫描。在一些实施例中,调度模块1450用于对第一蓝牙控制器1430和第二蓝牙控制器1440进行调度。在一些实施例中,蓝牙模块1460用于与一个或多个其他电子设备进行基于蓝牙协议的数据通信。
在一些实施例中,电子设备1400还包括显示屏。显示屏是用于显示用户界面的显示组件。可选的,该显示屏为具有触控功能的显示屏,通过触控功能,用户可以使用手指、触摸笔中的任一种物体在显示屏上进行触控操作。显示屏通常设置在电子设备1400的前面板。显示屏可被设计成为全面屏、曲面屏、异型屏、双面屏或折叠屏。显示屏还可被设计成为全面屏与曲面屏的结合,异型屏与曲面屏的结合等,本实施例对此不加以限定。
除此之外,本领域技术人员可以理解,上述附图所示出的电子设备1400的结构并不构成对电子设备1400的限定,电子设备1400可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,电子设备1400中还包括麦克风、扬声器、射频电路、输入单元、传感器、音频电路、无线保真(Wireless Fidelity,Wi-Fi)模块、电源等部件,在此不再赘述。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一条程序代码,该至少一条程序代码被电子设备的处理器执行以实现如上各个实施例示出的蓝牙协议的通信方法。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品存储有至少一条程序代码,该至少一条程序代码被电子设备的处理器执行以实现如上各个实施例示出的蓝牙协议的通信方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。

Claims (27)

  1. 一种基于蓝牙协议的通信方法,由第一电子设备执行,所述方法包括:
    通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
    基于确定满足预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包;
    其中,所述第二蓝牙控制器不同于所述第一蓝牙控制器。
  2. 根据权利要求1所述的方法,所述预设条件包括:
    所述第二电子设备通过所述第一数据信道进行蓝牙广播。
  3. 根据权利要求1所述的方法,所述预设条件包括:
    所述第二电子设备与所述第一电子设备建立蓝牙通信连接以使用所述第一数据信道。
  4. 根据权利要求1-3中的任一项所述的方法,所述第一蓝牙控制器独立于所述第一电子设备。
  5. 根据权利要求1-3中的任一项所述的方法,所述第二蓝牙控制器独立于所述第一电子设备。
  6. 根据权利要求2所述的方法,确定满足预设条件包括:
    若所述第一数据包是所述第二电子设备广播的,且所述第一数据包中包括辅助信息,则确定所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包,所述辅助信息用于指示所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包。
  7. 根据权利要求6所述的方法,所述辅助信息包括目标子信道的信道标识和目标时间,所述目标子信道为发送所述第二数据包的子信道,所述目标时间为发送所述第二数据包的时间;
    所述通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包,包括:
    将所述信道标识和所述目标时间发送给所述第二蓝牙控制器;
    指示所述第二蓝牙控制器,在所述目标时间,扫描所述信道标识对应的目标子信道以接收来自所述第二电子设备的所述第二数据包。
  8. 根据权利要求7所述的方法,所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
    所述将所述信道标识和所述目标时间发送给所述第二蓝牙控制器,包括:
    通过所述第一蓝牙控制器,将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
  9. 根据权利要求7所述的方法,所述第一电子设备包括调度模块,所述调度模块分别与所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
    所述将所述信道标识和所述目标时间发送给所述第二蓝牙控制器,包括:
    通过调度模块,将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
  10. 根据权利要求1所述的方法,所述方法还包括:
    基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
  11. 根据权利要求1所述的方法,所述方法还包括:
    基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
  12. 根据权利要求1所述的方法,所述方法还包括:
    基于确定不满足所述预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过所述第二蓝牙控制器执行广播以广播第四数据包。
  13. 一种电子设备,所述电子设备包括蓝牙模块、第一蓝牙控制器和第二蓝牙控制器;
    所述蓝牙模块配置成:
    与一个或多个其他电子设备进行基于蓝牙协议的数据通信;
    所述第一蓝牙控制器配置成:
    对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
    基于确定满足预设条件,保持对所述第一广播信道的扫描;
    所述第二蓝牙控制器配置成:
    基于获知所述预设条件被满足,对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包。
  14. 根据权利要求13所述的电子设备,所述预设条件包括:
    所述第二电子设备通过所述第一数据信道进行蓝牙广播。
  15. 根据权利要求13所述的电子设备,所述预设条件包括:
    所述第二电子设备与所述第一电子设备建立蓝牙通信连接以使用所述第一数据信道。
  16. 根据权利要求13-15中的任一项所述的电子设备,所述第一蓝牙控制器独立于所述第一电子设备。
  17. 根据权利要求13-15中的任一项所述的电子设备,所述第二蓝牙控制器独立于所述第一电子设备。
  18. 根据权利要求13所述的电子设备,
    所述蓝牙模块,还配置成:
    若所述第一数据包是所述第二电子设备广播的,且所述第一数据包中包括辅助信息,则确定所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包,所述辅助信息用于指示所述第二电子设备通过所述第一数据信道进行蓝牙广播以发送所述第二数据包。
  19. 根据权利要求18所述的电子设备,所述辅助信息包括目标子信道的信道标识和目标时间,所述目标子信道为发送所述第二数据包的子信道,所述目标时间为发送所述第二数据包的时间;
    所述蓝牙模块,还配置成:
    将所述信道标识和所述目标时间发送给所述第二蓝牙控制器;
    指示所述第二蓝牙控制器,在所述目标时间,扫描所述信道标识对应的目标子信道以接 收来自所述第二电子设备的所述第二数据包。
  20. 根据权利要求19所述的电子设备,所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
    所述第一蓝牙控制器,还配置成:
    将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
  21. 根据权利要求19所述的电子设备,所述电子设备还包括调度模块,所述调度模块分别与所述蓝牙模块、所述第一蓝牙控制器和所述第二蓝牙控制器电性连接;
    所述调度模块,配置成:
    将所述信道标识和所述目标时间发送给所述第二蓝牙控制器。
  22. 根据权利要求13所述的电子设备,
    所述蓝牙模块,还配置成:
    基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对第二数据信道执行扫描以接收来自第三电子设备的第三数据包。
  23. 根据权利要求13所述的电子设备,
    所述蓝牙模块,还配置成:
    基于确定所述第二蓝牙控制器在对所述第一数据信道执行扫描以接收所述第二数据包,通过所述第一蓝牙控制器对蓝牙音频链路执行扫描以接收来自第四电子设备的音频数据。
  24. 根据权利要求13所述的电子设备,
    所述蓝牙模块,还配置成:
    基于确定不满足所述预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过所述第二蓝牙控制器执行广播以广播第四数据包。
  25. 一种蓝牙协议的通信装置,所述装置包括:
    第一执行模块,用于通过第一蓝牙控制器对第一广播信道执行扫描以接收来自第二电子设备的第一数据包;
    第二执行模块,用于基于确定满足预设条件,保持所述第一蓝牙控制器对所述第一广播信道的扫描,并且通过第二蓝牙控制器对第一数据信道执行扫描以接收来自所述第二电子设备的第二数据包;其中,所述第二蓝牙控制器不同于所述第一蓝牙控制器。
  26. 一种计算机可读存储介质,所述计算机可读存储介质存储有至少一条程序代码,所述至少一条程序代码用于被电子设备的处理器执行以实现如权利要求1至权利要求12任一项所述的蓝牙协议的通信方法。
  27. 一种计算机程序产品,所述计算机程序产品存储有至少一条程序代码,所述至少一条程序代码用于被电子设备的处理器执行以实现如权利要求1至权利要求12任一项所述的蓝牙协议的通信方法。
PCT/CN2022/143502 2022-03-03 2022-12-29 蓝牙协议的通信方法、电子设备、装置、存储介质及产品 WO2023165246A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210201987.8A CN116744264A (zh) 2022-03-03 2022-03-03 蓝牙协议的通信方法、电子设备、装置、存储介质及产品
CN202210201987.8 2022-03-03

Publications (1)

Publication Number Publication Date
WO2023165246A1 true WO2023165246A1 (zh) 2023-09-07

Family

ID=87883036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143502 WO2023165246A1 (zh) 2022-03-03 2022-12-29 蓝牙协议的通信方法、电子设备、装置、存储介质及产品

Country Status (2)

Country Link
CN (1) CN116744264A (zh)
WO (1) WO2023165246A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395615A (zh) * 2023-12-12 2024-01-12 辽宁科大物联科技有限公司 车辆系统中蓝牙稳定广播的装置和方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717603A (zh) * 2014-12-25 2015-06-17 惠州Tcl移动通信有限公司 一种蓝牙低功耗组网并支持便捷互联的方法及系统
CN104980987A (zh) * 2014-04-08 2015-10-14 诺基亚技术有限公司 用于通信连接的无缝切换的方法、装置和计算机程序产品
CN106412804A (zh) * 2016-10-08 2017-02-15 安宝睡科技(深圳)有限公司 用于物流追踪的双向通信系统
CN107197445A (zh) * 2017-05-16 2017-09-22 北京千丁互联科技有限公司 存储器、蓝牙智能终端、距离计算方法及开门控制方法
WO2020248924A1 (zh) * 2019-06-10 2020-12-17 海信视像科技股份有限公司 显示设备及扫描外部蓝牙设备的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980987A (zh) * 2014-04-08 2015-10-14 诺基亚技术有限公司 用于通信连接的无缝切换的方法、装置和计算机程序产品
CN104717603A (zh) * 2014-12-25 2015-06-17 惠州Tcl移动通信有限公司 一种蓝牙低功耗组网并支持便捷互联的方法及系统
CN106412804A (zh) * 2016-10-08 2017-02-15 安宝睡科技(深圳)有限公司 用于物流追踪的双向通信系统
CN107197445A (zh) * 2017-05-16 2017-09-22 北京千丁互联科技有限公司 存储器、蓝牙智能终端、距离计算方法及开门控制方法
WO2020248924A1 (zh) * 2019-06-10 2020-12-17 海信视像科技股份有限公司 显示设备及扫描外部蓝牙设备的方法

Also Published As

Publication number Publication date
CN116744264A (zh) 2023-09-12

Similar Documents

Publication Publication Date Title
CN109842917B (zh) 系统信息块的传输方法和用户终端
US20200245386A1 (en) Wireless connection method and device
CN111757410A (zh) 下行信道的接收方法、发送方法、终端和基站
CN111817831B (zh) 一种传输方法和通信设备
RU2765682C1 (ru) Способ определения, абонентское оборудование и сетевое устройство
WO2023165246A1 (zh) 蓝牙协议的通信方法、电子设备、装置、存储介质及产品
JP2023546940A (ja) 情報伝送方法、情報伝送装置、電子機器と可読記憶媒体
WO2019001188A1 (zh) 一种数据处理方法、终端以及基站
CN112583544A (zh) 确定源参考信号信息的方法和通信设备
CN112804755B (zh) 一种上行资源确定方法、指示方法、终端和网络设备
CN116419436A (zh) 一种蓝牙设备的组网方法、终端设备及蓝牙设备
WO2021147794A1 (zh) 频域资源处理方法、频域资源配置方法及相关设备
CN108307485B (zh) 无线网络扫描方法、装置、终端设备及存储介质
CN110890942A (zh) 一种旁链路信息反馈方法及终端
CN115175149A (zh) 设备添加方法、装置、蓝牙芯片及设备
CN111615219B (zh) 一种pc5链路建立方法、设备及系统
CN110475367B (zh) 一种传输方法、移动通信终端及网络侧设备
CN110769518B (zh) 随机接入方法、终端设备及网络设备
WO2022237616A1 (zh) 资源池配置方法、装置、终端及网络侧设备
CN115696637A (zh) 信息获取方法、装置、蓝牙设备、终端设备及存储介质
CN109155803B (zh) 音频数据处理方法、终端设备和存储介质
CN113498088B (zh) 资源确定方法及终端
KR20110070507A (ko) 무선 ip 망에서 그룹 통신과 일대일 통신을 병행하는 방법 및 시스템
WO2021027679A1 (zh) 数据传输方法、装置、设备及介质
CN113965787A (zh) 画面共享方法、装置、显示终端以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22929670

Country of ref document: EP

Kind code of ref document: A1