WO2022188813A1 - Bluetooth communication method and system, and electronic device - Google Patents

Bluetooth communication method and system, and electronic device Download PDF

Info

Publication number
WO2022188813A1
WO2022188813A1 PCT/CN2022/079978 CN2022079978W WO2022188813A1 WO 2022188813 A1 WO2022188813 A1 WO 2022188813A1 CN 2022079978 W CN2022079978 W CN 2022079978W WO 2022188813 A1 WO2022188813 A1 WO 2022188813A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
bluetooth data
indication information
electronic device
bluetooth
Prior art date
Application number
PCT/CN2022/079978
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
倪观军
朱宇洪
彭炳光
孙尚帮
姚晶晶
王蓉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022188813A1 publication Critical patent/WO2022188813A1/en

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
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/20Negotiating bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection

Definitions

  • the embodiments of the present application relate to the field of communication, and in particular, to a Bluetooth communication method, system, and electronic device.
  • Bluetooth connections between devices are maintained based on existing Bluetooth protocols.
  • the maximum supported transmission bandwidth in the existing Bluetooth protocol is 2M.
  • existing Bluetooth protocols cannot support application scenarios with large traffic.
  • the present application provides a Bluetooth communication method, system and electronic device.
  • the first electronic device can indicate the transmission bandwidth of the frame body to the second electronic device through the frame header, so as to provide a real-time bandwidth adjustment method, reduce the number of interactions for bandwidth adjustment of the electronic device, and improve resource utilization and bandwidth. Adjust efficiency.
  • an embodiment of the present application provides a Bluetooth communication system.
  • the system includes a first electronic device and a second electronic device, and data interaction is performed between the first electronic device and the second electronic device through a Bluetooth connection.
  • the first electronic device is used to send the first Bluetooth data packet to the second electronic device;
  • the first Bluetooth data packet includes a frame header and a frame body, and the frame header of the first Bluetooth data packet includes first bandwidth indication information, and the first bandwidth indication
  • the information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet.
  • the second electronic device is configured to receive the first Bluetooth data packet; and the second electronic device obtains the first bandwidth indication information in the frame header of the first Bluetooth data packet.
  • the second electronic device receives the frame body of the first Bluetooth data packet on the first transmission bandwidth according to the first bandwidth indication information.
  • the first electronic device can indicate the transmission bandwidth of the frame body to the second electronic device through the frame header of the Bluetooth data packet, so that the second electronic device can read the frame After the header, the transmission bandwidth of the frame body can be obtained.
  • the first electronic device and the second electronic device may be any electronic device with a Bluetooth function.
  • the length of the first bandwidth indication information is 1 bit.
  • the modulation modes of the frame header and the frame body of the first Bluetooth data packet may be the same or different.
  • the transmission bandwidth of the frame header of the first Bluetooth data packet is 1 MHz or 2 MHz.
  • the transmission bandwidth of the frame header and the transmission bandwidth of the frame body may be the same or different.
  • the first electronic device is further configured to send a second Bluetooth data packet to the second electronic device, where the second Bluetooth data packet includes a frame header and a frame body, and the frame header of the second Bluetooth data packet includes a second bandwidth indication information, and the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein, the first transmission bandwidth is different from the second transmission bandwidth.
  • the second electronic device is further configured to receive a second Bluetooth data packet.
  • the second electronic device acquires the second bandwidth indication information in the frame header of the second Bluetooth data packet.
  • the second electronic device receives the frame body of the second Bluetooth data packet on the second transmission bandwidth according to the second bandwidth indication information. In this way, the first electronic device can indicate the transmission bandwidth of the frame body of the currently sent Bluetooth data packet to the second electronic device through the frame header of each Bluetooth data packet, thereby realizing dynamic and real-time adjustment of the transmission bandwidth.
  • the transmission bandwidth of the frame header of each Bluetooth data packet is the same.
  • the transmission bandwidth of the frame body of the Bluetooth data packet sent each time may be the same or different.
  • the first electronic device may receive a user instruction, and in response to the received user instruction, perform an operation of switching the transmission bandwidth, that is, send a Bluetooth data packet carrying the second transmission bandwidth to the second electronic device.
  • the first electronic device may adaptively adjust the transmission bandwidth based on current transmission conditions and/or the amount of data to be transmitted.
  • the frame header of the first Bluetooth data packet further includes first modulation indication information, where the first modulation indication information is used to indicate the modulation mode of the frame body.
  • the second electronic device is further configured to acquire the first modulation indication information.
  • the second electronic device demodulates the frame body of the first Bluetooth data packet according to the modulation mode indicated by the first modulation indication information.
  • the first electronic device can indicate the modulation mode of the frame body to the second electronic device through the frame header of each Bluetooth data packet, so that the second electronic device can obtain the modulation of the frame body when reading the frame header. mode, so as to realize real-time and dynamic adjustment of modulation mode.
  • channel resources are saved, resource utilization is improved, and the adjustment mode adjustment efficiency is improved.
  • the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet.
  • the preset device can obtain the corresponding bandwidth indication and modulation indication when reading the specified field.
  • the frame body of the first Bluetooth data packet includes a header field and a data field
  • the Header field includes first power indication information
  • the first power indication information is used for Indicates the transmit power of the second electronic device
  • the data field includes Bluetooth data.
  • the second electronic device may adjust the transmit power based on the received power indication information.
  • the second electronic device may send a Bluetooth data packet to the first electronic device based on the power indicated by the power indication information.
  • the first electronic device may determine, based on the received Bluetooth data packet sent by the second electronic device, the transmission power of the second electronic device to send the Bluetooth data packet next time.
  • the frame body of the first Bluetooth data packet may also not include a data field.
  • the Header field not only includes the first power indication information, but also is used to indicate that the length of the data field is 0, that is, the Bluetooth data packet does not include the data field.
  • the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data.
  • the peer end can check the corresponding data fields based on each check field when checking, thereby improving check efficiency.
  • the second electronic device is further configured to perform verification on the corresponding data field based on each verification field in the plurality of verification fields.
  • the second electronic device is further configured to send the third Bluetooth data to the first electronic device when at least one data field of the plurality of data fields fails to be verified packet;
  • the third Bluetooth data packet includes a frame header and a frame body, the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the frame of the third Bluetooth data packet
  • the first reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet.
  • the first electronic device is further configured to receive a third Bluetooth data packet.
  • the first electronic device acquires the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet.
  • the first electronic device receives the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and the first electronic device sends the fourth Bluetooth data packet to the second electronic device according to the first reception indication information , the frame body of the fourth Bluetooth data packet includes multiple data fields and multiple check fields, and the multiple data fields include at least one data field that fails the check.
  • the electronic device can simultaneously reply NACK information and Bluetooth data to the opposite end in the Bluetooth data packet, thereby reducing the number of signaling interactions.
  • the second electronic device is further configured to receive a fourth Bluetooth data packet.
  • the second electronic device performs merge verification based on at least one data field in the fourth Bluetooth data packet and other data fields that have been successfully verified among the multiple data fields; when the merge verification is successful , to get Bluetooth data in multiple data fields.
  • the electronic device fails to check any of the data fields, it can perform a combined check based on the data fields that failed the last check in the retransmitted data packet, so as to improve the The efficiency of the merge check.
  • the second electronic device is further configured to send fifth Bluetooth data to the first electronic device when at least one data field of the plurality of data fields fails to be verified packet;
  • the fifth Bluetooth data packet includes a frame header, the frame header of the fifth Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet is included.
  • the Bluetooth data packet does not include a frame body; the first electronic device is further configured to receive the fifth Bluetooth data packet; the first electronic device obtains the second reception indication information in the frame header of the fifth Bluetooth data packet.
  • the first electronic device sends a sixth Bluetooth data packet to the second electronic device according to the second receiving indication information
  • the frame body of the sixth Bluetooth data packet includes a plurality of data fields and a plurality of check fields, and the plurality of data fields include a check Failed at least one data field.
  • the frame body can be not carried in the Bluetooth data packet.
  • the second electronic device can obtain the NACK information by reading the frame header part, and does not need to receive the frame body again. This further improves resource utilization.
  • the second electronic device is further configured to receive a sixth Bluetooth data packet; in response to the received sixth Bluetooth data packet, based on the sixth Bluetooth data packet At least one of the data fields is merged and verified with other data fields that have been successfully verified among the multiple data fields. When the merge verification is successful, obtain the Bluetooth data in multiple data fields.
  • the second electronic device is further configured to send a seventh Bluetooth data packet to the first electronic device when the multiple data fields are successfully verified;
  • the seventh Bluetooth data The packet includes a frame header and a frame body, and the frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, and the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet ;
  • the third receiving indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet.
  • the first electronic device is further configured to receive the seventh Bluetooth data packet.
  • the first electronic device acquires the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet.
  • the first electronic device receives the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; Bluetooth packets. In this way, the electronic device can reply ACK information and Bluetooth data to the opposite end simultaneously in the Bluetooth data packet, thereby reducing the number of signaling interactions.
  • the second electronic device is further configured to send an eighth Bluetooth data packet to the first electronic device when the multiple data fields are successfully verified; the eighth Bluetooth data
  • the packet includes a frame header, the frame header of the eighth Bluetooth data packet includes fourth reception indication information, and the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body .
  • the first electronic device is further configured to receive an eighth Bluetooth data packet.
  • the first electronic device acquires the fourth reception indication information in the frame header of the eighth Bluetooth data packet.
  • the first electronic device determines, according to the fourth reception indication information, that the second electronic device has correctly received the first Bluetooth data packet. In this way, by setting a special indication mode, the frame body can be not carried in the Bluetooth data packet.
  • the second electronic device can obtain the ACK information by reading the frame header part, and does not need to receive the frame body again. This further improves resource utilization.
  • the first electronic device and the second electronic device are preset electronic devices.
  • the first electronic device and the second electronic device may confirm whether the opposite end is a preset electronic device during the process of establishing a Bluetooth connection.
  • the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz.
  • the embodiment of the present application can expand the bandwidth, so as to realize data interaction in a large data volume transmission scenario.
  • an embodiment of the present application provides a Bluetooth communication method.
  • the method is applied to a first electronic device, and the method includes sending a first Bluetooth data packet to a second electronic device; the first Bluetooth data packet includes a frame header and a frame body, and the frame header of the first Bluetooth data packet includes first bandwidth indication information, The first bandwidth indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet.
  • the method further includes the first electronic device receiving the first user instruction, the first electronic device sending a second Bluetooth data packet to the second electronic device in response to the received first user instruction, the second Bluetooth data packet including Frame header and frame body, the frame header of the second Bluetooth data packet includes second bandwidth indication information, and the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein, the first transmission bandwidth and The second transmission bandwidth is different.
  • the frame header of the first Bluetooth data packet further includes first modulation indication information, where the first modulation indication information is used to indicate the modulation mode of the frame body.
  • the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet.
  • the frame body of the first Bluetooth data packet includes a header field and a data field
  • the Header field includes first power indication information
  • the first power indication information is used for Indicates the transmit power of the second electronic device
  • the data field includes Bluetooth data
  • the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data.
  • the method further includes: the first electronic device receives a third Bluetooth data packet sent by the second electronic device; the third Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and at least one data field among the multiple data fields fails to check; the third Bluetooth data packet includes a frame header and a frame body , the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; the first reception indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; for indicating that the second electronic device does not correctly receive the first Bluetooth data packet.
  • the first electronic device acquires the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet.
  • the first electronic device receives the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and the first electronic device sends the fourth Bluetooth data to the second electronic device according to the first reception indication information
  • the frame body of the fourth Bluetooth data packet includes multiple data fields and multiple check fields, and the multiple data fields include at least one data field that fails the check.
  • the method further includes: the first electronic device receives a fifth Bluetooth data packet sent by the second electronic device; the fifth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and at least one data field among the plurality of data fields fails to check; the fifth Bluetooth data packet includes a frame header, and the fifth The frame header of the Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not include a frame body.
  • the first electronic device acquires the second reception indication information in the frame header of the fifth Bluetooth data packet.
  • the first electronic device sends a sixth Bluetooth data packet to the second electronic device according to the second receiving indication information
  • the frame body of the sixth Bluetooth data packet includes a plurality of data fields and a plurality of check fields
  • the plurality of data fields include a check Failed at least one data field.
  • the method further includes: the first electronic device receives a seventh Bluetooth data packet sent by the second electronic device; the fifth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and multiple data fields are successfully checked; the seventh Bluetooth data packet includes a frame header and a frame body, and the seventh Bluetooth data packet
  • the frame header includes fourth bandwidth indication information and third reception indication information, where the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used to indicate the second electronic device
  • the first bluetooth packet is received correctly.
  • the first electronic device acquires the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet.
  • the first electronic device receives the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; Bluetooth packets.
  • the method further includes: the first electronic device receives an eighth Bluetooth data packet sent by the second electronic device; the eighth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and the check of multiple data fields is successful; the eighth Bluetooth data packet includes a frame header, and the frame header of the eighth Bluetooth data packet Including fourth reception indication information, the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body; the first electronic device obtains the frame of the eighth Bluetooth data packet The fourth reception indication information in the header; the first electronic device determines that the second electronic device has correctly received the first Bluetooth data packet according to the fourth reception indication information.
  • the first electronic device and the second electronic device are preset electronic devices.
  • the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz.
  • the second aspect and any implementation manner of the second aspect correspond to the first aspect and any implementation manner of the first aspect, respectively.
  • the technical effects corresponding to the second aspect and any implementation manner of the second aspect reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.
  • an embodiment of the present application provides a Bluetooth communication method.
  • the method is applied to a second electronic device, and the method includes: the second electronic device receives a first Bluetooth data packet sent by the first electronic device; wherein the first Bluetooth data packet includes a frame header and a frame body, and the frame of the first Bluetooth data packet
  • the header includes first bandwidth indication information, where the first bandwidth indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet; the second electronic device obtains the first bandwidth indication information in the frame header of the first Bluetooth data packet ;
  • the second electronic device receives the frame body of the first Bluetooth data packet on the first transmission bandwidth according to the first bandwidth indication information.
  • the method further includes: the second electronic device receives a second Bluetooth data packet sent by the first electronic device; the second Bluetooth data packet includes a frame header and a frame body, and the frame header of the second Bluetooth data packet includes a second bandwidth
  • the indication information, the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein the first transmission bandwidth is different from the second transmission bandwidth.
  • the second electronic device obtains the second bandwidth indication information in the frame header of the second Bluetooth data packet; the second electronic device receives the frame body of the second Bluetooth data packet on the second transmission bandwidth according to the second bandwidth indication information.
  • the frame header of the first Bluetooth data packet further includes first modulation indication information, and the first modulation indication information is used to indicate the modulation manner of the frame body; the method further includes : The second electronic device acquires the first modulation indication information; the second electronic device demodulates the frame body of the first Bluetooth data packet according to the modulation mode indicated by the first modulation indication information.
  • the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet.
  • the frame body of the first Bluetooth data packet includes a header field and a data field
  • the Header field includes first power indication information
  • the first power indication information is used for Indicates the transmit power of the second electronic device
  • the data field includes Bluetooth data
  • the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data.
  • the method further includes: the second electronic device performs verification on the corresponding data field based on each verification field in the plurality of verification fields.
  • the method further includes: when at least one data field in the plurality of data fields fails to be verified, sending a third Bluetooth data packet to the first electronic device; third The Bluetooth data packet includes a frame header and a frame body, the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the third Bluetooth data packet. transmission bandwidth; the first reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet.
  • the method further includes: the second electronic device receives a fourth Bluetooth data packet sent by the first electronic device; the frame body of the fourth Bluetooth data packet includes a plurality of data packets field and a plurality of verification fields, the plurality of data fields include at least one data field whose verification fails; the second electronic device is based on at least one data field in the fourth Bluetooth data packet and other data in the plurality of data fields that have been successfully verified The fields are merged and verified; when the merged verification is successful, the Bluetooth data in multiple data fields is obtained.
  • the method further includes: when at least one data field in the plurality of data fields fails to be verified, sending a fifth Bluetooth data packet to the first electronic device; the fifth The Bluetooth data packet includes a frame header, and the frame header of the fifth Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not. Including the frame body.
  • the second electronic device receives the sixth Bluetooth data packet sent by the first electronic device;
  • the frame body of the sixth Bluetooth data packet includes multiple data fields and multiple The check field, the plurality of data fields include at least one data field that fails to check;
  • the second electronic device performs merging and checking based on at least one data field in the sixth Bluetooth data packet and other data fields that are successfully checked among the plurality of data fields. Check; when the merge check is successful, obtain the Bluetooth data in multiple data fields.
  • a seventh Bluetooth data packet is sent to the first electronic device;
  • the seventh Bluetooth data packet includes a frame header and a frame body,
  • the frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, and the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet;
  • the third reception indication information is used for Instruct the second electronic device to correctly receive the first Bluetooth data packet.
  • an eighth Bluetooth data packet is sent to the first electronic device; the eighth Bluetooth data packet includes a frame header, and the eighth Bluetooth data packet is The frame header of the data packet includes fourth reception indication information, and the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body.
  • the first electronic device and the second electronic device are preset electronic devices.
  • the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz.
  • the third aspect and any implementation manner of the third aspect correspond to the first aspect and any implementation manner of the first aspect, respectively.
  • the technical effects corresponding to the third aspect and any implementation manner of the third aspect reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes a memory and a processor, and the memory is coupled to the processor; the memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the second aspect or any possible implementation of the second aspect.
  • a Bluetooth communication method performed by an electronic device.
  • an embodiment of the present application provides an electronic device.
  • the electronic device includes a memory and a processor, and the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device enables the electronic device to perform the third aspect or any possible implementation of the third aspect.
  • a Bluetooth communication method performed by two electronic devices.
  • embodiments of the present application provide a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
  • embodiments of the present application provide a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the third aspect or the method in any possible implementation manner of the third aspect.
  • an embodiment of the present application provides a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
  • embodiments of the present application provide a computer program, where the computer program includes instructions for executing the third aspect or the method in any possible implementation manner of the third aspect.
  • an embodiment of the present application provides a chip, where the chip includes a processing circuit and transceiver pins.
  • the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the second aspect or any possible implementation manner of the second aspect to control the receiving pin to receive a signal to Control the send pin to send the signal.
  • an embodiment of the present application provides a chip, where the chip includes a processing circuit and a transceiver pin.
  • the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the third aspect or any possible implementation manner of the third aspect to control the receiving pin to receive signals, so as to Control the send pin to send the signal.
  • FIG. 1 is a schematic diagram of the hardware structure of an exemplary electronic device
  • FIG. 2 is a schematic diagram of the software structure of an exemplary electronic device
  • FIG. 3 is a schematic diagram of an exemplary application scenario
  • 4a-4c are schematic diagrams of user interfaces shown in an exemplary manner
  • FIG. 5 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset
  • Figure 6a is a schematic diagram of the format of an exemplary Bluetooth data packet
  • 6b is a schematic diagram of the format of an exemplary Bluetooth data packet
  • FIG. 7 is a schematic diagram of an exemplary user interface
  • 9a-9b are schematic diagrams of formats of Bluetooth data packets exemplarily shown.
  • FIG. 10 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • 11a-11b are schematic diagrams of formats of Bluetooth data packets exemplarily shown
  • FIG. 12 is a schematic diagram of the indication of the NESN field and the SN field shown by way of example;
  • FIG. 13 is a schematic diagram of an exemplary application scenario
  • 14a-14b are schematic diagrams of formats of Bluetooth data packets exemplarily shown
  • 15 is a schematic diagram of an exemplary data transmission mode
  • 16 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset
  • FIG. 17 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • FIG. 18 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • FIG. 19 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • FIG. 20a is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset
  • FIG. 20b is a schematic diagram of a data retransmission process between a mobile phone and a wireless headset exemplarily shown;
  • 21 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • 22 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • 23 is a schematic diagram of the format of an exemplary Bluetooth data packet
  • FIG. 24 is a schematic structural diagram of an exemplarily shown device.
  • first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects.
  • first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.
  • words such as “exemplary” or “for example” are used to represent examples, illustrations or illustrations. Any embodiments or designs described in the embodiments of the present application as “exemplary” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplary” or “such as” is intended to present the related concepts in a specific manner.
  • multiple processing units refers to two or more processing units; multiple systems refers to two or more systems.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 shown in FIG. 1 is only an example of an electronic device, and the electronic device 100 may have more or less components than those shown in the figure, and two or more components may be combined , or can have a different component configuration.
  • the various components shown in FIG. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture of the electronic device 100 divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, sensor driver, Wi-Fi driver, etc.
  • the components included in the system framework layer, system library and runtime layer shown in FIG. 2 do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • FIG. 3 is a schematic diagram of an exemplary application scenario.
  • the application scenarios include mobile phones and wireless headsets.
  • the mobile phone and the wireless headset perform data interaction through a Bluetooth connection.
  • the Bluetooth communication method in the embodiments of the present application can also be applied to communication scenarios between other electronic devices.
  • the Bluetooth communication method in the embodiments of the present application may also be applied to communication between electronic devices with Bluetooth functions, such as mobile phones, tablets, wearable devices, notebooks, Bluetooth speakers, and TVs.
  • the types and numbers of devices shown in FIG. 3 are only illustrative examples, and are not limited in this application.
  • FIGS. 4 a to 4 c are schematic diagrams of user interfaces when a mobile phone and a wireless headset establish a Bluetooth connection.
  • the display interface of the mobile phone displays a home page 402.
  • Home page 402 includes one or more controls.
  • Controls include, but are not limited to, application controls, network controls, Bluetooth controls 404, battery level display controls, and the like.
  • the Bluetooth control 404 is used to indicate that the Bluetooth function of the mobile phone has been turned on.
  • the user can activate the Bluetooth function of the mobile phone through the pull-down menu bar, or activate the Bluetooth function through the setting application, which is not limited in this application.
  • the first pairing of a wireless headset and a mobile phone is used as an example for description.
  • the initial pairing can optionally be that the wireless headset and the mobile phone have never been paired (that is, the Bluetooth connection has not been established), or, the wireless headset and/or the mobile phone needs to be re-paired after being reset (that is, the Bluetooth connection has been established once. connect).
  • the fingerprint information required for establishing a Bluetooth connection is not stored at either end of the mobile phone and the wireless headset.
  • the fingerprint information may include, but is not limited to, Bluetooth address information, device identification information, and the like.
  • prompt box 410 includes prompt information, cancel option 408 and connect option 410 .
  • the prompt information includes, but is not limited to, identification information of the electronic device currently to be connected.
  • the identification information may include, but is not limited to, the device name, device model, device icon, etc. of the electronic device (ie, the wireless headset).
  • the cancel option 408 is used to instruct to cancel the Bluetooth connection with the electronic device.
  • the connection option 410 is used to indicate that a Bluetooth connection with the electronic device is allowed.
  • the user clicks on the connect option 410 .
  • the mobile phone in response to the received user operation, the mobile phone establishes a Bluetooth connection with the wireless headset. After the Bluetooth connection is successfully established, the mobile phone displays a prompt box 412 .
  • the prompt box 412 includes prompt information for indicating that the wireless headset has been connected.
  • the mobile phone and the wireless headset can perform data interaction through the Bluetooth connection.
  • a music scene is used as an example.
  • the mobile phone displays a music application interface 414 in response to the user's operation.
  • the music application interface 414 includes song titles, song posters, and the like.
  • the mobile phone may display a sound quality adjustment option box 416 in response to the user's operation.
  • the sound quality condition option box 416 includes one or more controls, and the controls include, but are not limited to, standard quality controls, high quality controls, and lossless quality controls.
  • the different qualities (which may also be referred to as sound quality) described in the embodiments of the present application may be understood as different data amounts of the encoded audio files.
  • the higher the quality the larger the amount of data, and the larger the transmission bandwidth required for its transmission.
  • they are: standard quality, high quality, and lossless quality.
  • the mobile phone in response to the user's operation, the mobile phone generates corresponding Bluetooth data packets (also called data frames, audio frames, Bluetooth information, etc.), and sends the generated Bluetooth data packets to the wireless headset through the Bluetooth connection.
  • Bluetooth data packets also called data frames, audio frames, Bluetooth information, etc.
  • FIG. 5 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 5, it includes:
  • the wireless headset sends a Discovery Request message to the mobile phone.
  • the wireless headset After the wireless headset starts pairing, it sends a Discovery Request message in a broadcast manner through the Bluetooth interface.
  • the Discovery Request message includes, but is not limited to, the identification information of the wireless headset, the Bluetooth address of the wireless headset, and other information.
  • the identification information of the wireless headset may be the device name of the wireless headset, etc., which is not limited in this application.
  • the mobile phone sends a Discovery Response (detection response) message to the wireless headset.
  • a Discovery Response detection response
  • the interface of the mobile phone is shown in Figure 4a.
  • the mobile phone receives the operation of the user clicking the connection option 410, and the mobile phone sends a Discovery Response message to the wireless headset, which is used to instruct to establish a Bluetooth connection with the wireless headset.
  • the Discovery Response includes, but is not limited to, the identification information of the mobile phone, the Bluetooth address of the mobile phone, and other information.
  • the wireless headset establishes a Bluetooth connection with the mobile phone.
  • the wireless headset and the mobile phone transmit information required for establishing a Bluetooth connection through multiple Bluetooth signaling interactions.
  • a Bluetooth encryption key may be negotiated in multiple interactions of S103, and the encryption key may be used to encrypt Bluetooth data during data transmission.
  • the specific interaction process and content refer to the description in the Bluetooth protocol, which will not be repeated in this application.
  • the wireless headset and the mobile phone can perform data interaction based on the established Bluetooth connection.
  • the mobile phone may send a Bluetooth data packet to the wireless headset, wherein the Bluetooth data packet includes audio data.
  • S101 is used as the start time of the Bluetooth connection process
  • S103 is used as the completion time of the Bluetooth connection establishment.
  • the establishment of the Bluetooth connection between the mobile phone and the wireless headset may also take S102 or S103 as the starting time, which is not limited in this application.
  • the Bluetooth connection between the mobile phone and the wireless headset may be maintained through a BLE (Bluetooth Low Energy, Bluetooth Low Energy) protocol.
  • BLE Bluetooth Low Energy, Bluetooth Low Energy
  • the Bluetooth connection between the mobile phone and the wireless headset may be maintained through classic Bluetooth protocols, including BR (basic rate, basic rate) and EDR (enhanced date rate, extended data rate).
  • BR basic rate, basic rate
  • EDR enhanced date rate, extended data rate
  • the Bluetooth connection maintained by the BLE protocol supports transmission rates of 1Mbps, 2Mbps, 500Kbps and 125Kbps, and the supported bandwidth is 1MHz or 2MHz.
  • the Bluetooth connection maintained by the BR/EDR protocol supports a maximum transmission rate of 3Mbps and a supported bandwidth of 1MHz.
  • FIG. 6a is a schematic diagram of the format of a Bluetooth data packet in an exemplary BLE protocol.
  • the Bluetooth data packet includes but is not limited to: Preamble (preamble) field, Access Code (Access Code) field, PDU (Protocol Data Unit, Protocol Data Unit) field, CRC (Cyclic Redundancy Check, Cyclic Redundancy Check) Check) field and CTE (Constant Tone Extension, monophonic extension) field.
  • the PDU fields include, but are not limited to: a Header (header) field, a Payload (load) field, and the like.
  • the PDU field is used to carry the data sent by the mobile phone to the wireless headset.
  • the Header field can be used to carry control information.
  • FIG. 6b is an exemplary schematic diagram of the format of a Bluetooth data packet in the BR protocol.
  • the Bluetooth data packet includes but is not limited to: Access Code field, Header field, Payload HDR field, User Payload (user payload) field, MIC field and CRC field.
  • the Header field is used to carry the control information
  • the User Payload field is used to carry the data sent by the mobile phone to the wireless headset.
  • the mobile phone and the wireless headset may transmit a specified format based on the Bluetooth connection between the two, such as a BLE Bluetooth data packet, a BR Bluetooth data packet or an EDR Bluetooth data packet.
  • the Bluetooth connection between the mobile phone and the wireless headset is a BLE Bluetooth connection, that is, a Bluetooth connection maintained based on the BLE protocol, and the current transmission bandwidth is 1 MHz.
  • the initial transmission bandwidth may be 1 MHz or 2 MHz, which is not limited in this application.
  • the mobile phone in response to the received user operation, the mobile phone will generate an audio frame corresponding to the lossless quality, and a Bluetooth data packet containing the audio frame.
  • the amount of encoded data corresponding to different qualities is different.
  • the audio file size corresponding to standard quality that is, the data volume
  • the audio file size corresponding to high quality is 9.8MB
  • the audio file size corresponding to lossless quality. is 30.2MB.
  • the music playback time is 1 minute
  • the lossless quality requires that within 1 minute, the mobile phone transmits a 30.2MB audio file to the wireless headset.
  • FIG. 8 is a schematic flowchart of an exemplary bandwidth update. As shown in Figure 8, it specifically includes:
  • the mobile phone sends a bandwidth update request message to the wireless headset.
  • the mobile phone in response to the received user operation, sends a bandwidth update request message to the wireless headset to instruct to update the current bandwidth (for example, 1 MHz) to 2 MHz.
  • a bandwidth update request message to the wireless headset to instruct to update the current bandwidth (for example, 1 MHz) to 2 MHz.
  • FIG. 9a is a schematic diagram of the format of an exemplary Bluetooth data packet.
  • the Header field in the PDU field in the bandwidth update request message sent by the mobile phone includes signaling indication information, which is used to indicate that the message is a control message.
  • the Payload field includes bandwidth switching indication information.
  • the bandwidth switching indication information is used to indicate switching bandwidth. For example, if the current transmission bandwidth between the mobile phone and the wireless headset is 1 MHz, the wireless headset can determine to switch the current 1 MHz bandwidth to 2 MHz based on the bandwidth switching indication information. If the current transmission bandwidth between the mobile phone and the wireless headset is 2MHz, the wireless headset can determine to switch the current 2MHz bandwidth to a 1MHz bandwidth based on the bandwidth switching indication information. In this embodiment, the current transmission bandwidth of the mobile phone and the wireless headset is 1 MHz, and the bandwidth after switching is 2 MHz as an example for description.
  • the wireless headset sends a bandwidth update response message to the mobile phone.
  • the wireless headset after receiving the bandwidth update request message sent by the mobile phone, the wireless headset sends a bandwidth update response message to the mobile phone to indicate that the wireless headset can be updated based on the bandwidth indicated by the wireless headset.
  • the mobile phone sends a bandwidth update confirmation message to the wireless headset.
  • the mobile phone may send a bandwidth update confirmation message to the wireless headset, which is used to indicate the specific moment for switching the bandwidth. So that the wireless headset can receive the Bluetooth data packets sent by the mobile phone on the specified bandwidth at the specified time.
  • the wireless headset updates the bandwidth configuration.
  • the wireless headset updates the bandwidth configuration to receive the Bluetooth data packets sent by the mobile phone on a specified bandwidth (for example, a 2MHz bandwidth) at a specified moment.
  • a specified bandwidth for example, a 2MHz bandwidth
  • the current Bluetooth protocol supports a maximum bandwidth of 2MHz.
  • the file size corresponding to the lossless quality is 30MB
  • the music playing time is 1 minute for illustration, that is to say, the current 2MHz bandwidth is sufficient to support the above-mentioned transmission of the lossless quality audio.
  • the lossless quality audio file is larger, for example, 100MB (that is, the required bandwidth is greater than 2MHz), or, in other large-scale transmission scenarios, the existing BLE protocol Neither the bandwidth with the BR protocol can support the data transmission requirements. For example, in an audio scenario, due to the bandwidth limitation between the mobile phone and the wireless headset, it may be impossible to play lossless-quality music that requires a large bandwidth through the wireless headset.
  • the flow chart of the upper-layer signaling interaction between the mobile phone and the wireless headset shown in FIG. 8 is shown.
  • each time the wireless headset receives a message (or signaling) sent by the mobile phone it processes the message accordingly, such as decapsulation, verification, etc.
  • the specified bandwidth that is, the updated bandwidth, for example, 2MHz
  • reply ACK Acknowledgement, confirmation
  • NACK Negative Acknowledgement, negative
  • FIG. 9b is a schematic diagram of the format of an exemplary Bluetooth data packet.
  • the Header field in the PDU field of the Bluetooth data packet carries ACK information.
  • the mobile phone receives the data packet, decodes, decrypts, and decapsulates the data packet, and then obtains the ACK information carried in the Header field in the PDU field to determine that the wireless headset successfully received the last bluetooth sent. data pack.
  • the phone can continue to send the next Bluetooth data packet. Similar to the sending of NACK information, the mobile phone can resend the last sent Bluetooth data packet in response to the received NACK information.
  • the embodiments of the present application only take bandwidth switching as an example for description.
  • the power switching method is similar to the bandwidth switching method, and both use separate instructions, that is, separate signaling indicating switching power is sent. , and complete the switching of bandwidth or power in multiple interactive ways.
  • the embodiments of the present application provide a Bluetooth communication method.
  • both communicating parties use Bluetooth data packets with a set format, which can realize data transmission in a large bandwidth scenario, effectively improve bandwidth and/or power switching efficiency, and improve resource utilization.
  • a Bluetooth connection is established between the mobile phone and the wireless headset.
  • the mobile phone and the wireless headset exchange respective capability information to indicate whether it is a preset device.
  • the preset device is optionally a device that supports the Bluetooth protocol in this embodiment of the present application. It can also be understood that both parties in the communication determine whether the opposite end can generate and send a Bluetooth data packet with a set format, and/or correctly receive and parse a Bluetooth data packet with a set format.
  • any message for Bluetooth communication between the mobile phone and the wireless headset may include capability information.
  • a mobile phone and a wireless headset can send their respective capability information during the detection phase.
  • the capability information is carried in the Discovery Request message or the Discovery Response message.
  • the capability information may also be carried in any message during multiple message exchanges in S103, which is not limited in this application.
  • the Bluetooth connection between the mobile phone and the wireless headset is disconnected, the Bluetooth connection between the mobile phone and the wireless headset is performed again.
  • the mobile phone and the wireless headset store the fingerprint information of the last Bluetooth connection (the concept can be seen above), and the fingerprint information stored in the mobile phone includes information indicating that the wireless headset is a preset device, and the The fingerprint information includes information indicating that the mobile phone is a preset device.
  • each signaling may be exchanged based on the Bluetooth data packets in the preset format described in the embodiments of the present application.
  • the interaction is performed based on the Bluetooth data packets with the set format described in the embodiments of the present application.
  • the interaction may also be based on the Bluetooth data packet format in the existing Bluetooth protocol.
  • the bluetooth connection is completed, the interaction is performed based on the bluetooth data packets with the set format described in the embodiments of the present application.
  • FIG. 10 is a schematic structural diagram of an exemplary Bluetooth data packet.
  • the wireless headset broadcasts a Discovery Request message exemplarily.
  • the PDU field of the message carries information about whether it is a preset device.
  • the wireless earphone and the mobile phone are both preset devices as an example for description.
  • the mobile phone and the wireless headset are still Bluetooth communication is performed according to the existing Bluetooth protocol.
  • the mobile phone may determine that the wireless headset is a preset device.
  • the Discovery Response message sent by the mobile phone to the wireless headset carries information used to indicate that the mobile phone is a preset device.
  • the wireless headset can determine that the mobile phone is the default device according to the received Discovery Response.
  • the wireless headset and the mobile phone can perform data interaction based on the Bluetooth protocol proposed in the embodiments of the present application.
  • Figures 11a and 11b are schematic diagrams of formats of Bluetooth data packets exemplarily shown.
  • the format of the Bluetooth data packet includes but is not limited to: Preamble field, AccessCode field, PHY_IND (physical identify, physical layer indication) field, HEC (Header Error Check, frame header error check) field, Guard (protection) field interval), sync (synchronization) field, Header field, at least one payload field, at least one CRC field.
  • the Bluetooth data packet may also include a Tailer field.
  • the Preamble field, the AccessCode field, the PHY_IND field, the HEC field, and the Guard field are optionally referred to as control fields (or frame headers).
  • the at least one payload field, the at least one CRC field, and the Tailer field are optionally referred to as a data field (or frame body).
  • the length of the Access Code field is 32 bits. Its modulation method adopts 1Mbps GFSK (Gauss frequency Shift Keying, Gauss frequency shift keying) modulation.
  • GFSK Gauss frequency Shift Keying, Gauss frequency shift keying
  • the Preamble field and the Access Code field are not encoded.
  • the length of the PHY_IND field is 10 bits, and its modulation mode adopts 1Mbps GFSK modulation, including: BW (bandwidth) field, MCS (Modulation and Coding Scheme, modulation and coding strategy) field, NESN (Next Expected Sequence Number, next expected Sequence Number) field and SN (Sequence Number, current sequence number) field.
  • BW bandwidth
  • MCS Modulation and Coding Scheme, modulation and coding strategy
  • NESN Next Expected Sequence Number, next expected Sequence Number
  • SN Sequence Number, current sequence number
  • the length of the HEC field is 16 bits, and 1Mbps GFSK modulation is also used.
  • the length of the BW field is 3 bits, which is used to indicate the bandwidth of the frame body (ie, the data field).
  • the mapping method of the BW field is shown in Table 1:
  • the bandwidth corresponding to the other indication information may be reserved for use as an extension in a future protocol.
  • the Bluetooth protocol of the embodiments of the present application can support bandwidths of 1 MHz, 2 MHz, 4 MHz, and 5 MHz.
  • the BW field is included in the control field.
  • the receiver after receiving the Bluetooth data packet containing the BW field, the receiver (which can be a mobile phone or a wireless headset) can obtain the bandwidth information in the control field without decapsulating and verifying the data field. After processing, the bandwidth corresponding to the subsequent Bluetooth data transmission can be determined.
  • the Bluetooth data packet includes a BW field and a data field.
  • the sending end (which can be a mobile phone or a wireless headset) can control the bandwidth conversion in real time through this format without sending a separate message for indicating bandwidth switching (or updating), so as to effectively save resources.
  • the Bluetooth communication method in the embodiment of the present application can effectively shorten the switching time. The specific usage will be described in detail in the following examples.
  • the length of the MCS field is 5 bits, which is used to indicate the modulation mode and coding rate adopted by the frame body (ie, the data field).
  • the mapping method of the MCS field is shown in Table 2:
  • the BW field and the MCS field can be combined to indicate the bandwidth, modulation mode and coding rate.
  • the specific mapping method is shown in Table 3:
  • mapping manners of Table 1, Table 2, and Table 3 are only schematic examples, and are not limited in this application.
  • the lengths of the NESN field and the SN field are each 1 bit, and the total length of the two fields is 2 bits, which are used to indicate that the data packet is a new packet or a retransmitted data packet, and can also be used to indicate ACK information or NACK information.
  • the embodiment of the present application also provides a simple ACK or NACK reply method, which can Optionally, set the 8 bits of the BW field and MCS field to all 1s (ie 11111111) or all 0s (ie 00000000) to indicate that the Bluetooth data packet transmitted this time has only the frame header part (ie the control field), and What is transmitted is ACK information or NACK information.
  • the receiving end needs to start parsing from the frame header and continue to parse to the PDU field to obtain the ACK information or NACK information.
  • the embodiment of the present application provides a more efficient reply method, and the receiving end (eg, a mobile phone) can obtain the ACK information or the NACK information by reading the control field.
  • the sender it only needs to transmit the frame header part carrying the ACK information or NACK information, and does not need to transmit the frame body part, which can effectively save transmission overhead.
  • the NESN field and the SN field indicate that the data packet is a new packet or a retransmitted data packet, and the manner of indicating the ACK information or the NACK information is the same as that in the existing Bluetooth protocol.
  • the mobile phone locally stores the value of the NESN field (hereinafter referred to as the local NESN) and the value of the SN field (hereinafter referred to as the local SN).
  • the mobile phone receives the Bluetooth data packet sent by the wireless headset.
  • the mobile phone compares the NESN field in the Bluetooth data packet with the local SN.
  • the mobile phone can determine that the wireless headset sends NACK information. That is to say, the wireless headset request fails to receive the data sent by the mobile phone last time, and requests the mobile phone to resend the data sent last time through the NACK message.
  • the mobile phone may re-send the previously sent data to the wireless headset in response to the NACK information.
  • the mobile phone can determine that the wireless headset sends ACK information. That is to say, the wireless headset has successfully received the data previously sent by the mobile phone.
  • the mobile phone increments the value of the local SN by 1. For example, if the current locally stored local SN value is 0, after the mobile phone obtains the ACK information, the local SN value becomes 1. And, the mobile phone can send new data to the wireless headset in response to the received ACK information.
  • the NESN field and the SN field in the bluetooth data packet sent by the mobile phone are respectively the same as the local NESN and the local SN.
  • the mobile phone receives the Bluetooth data packet sent by the wireless headset.
  • the mobile phone compares the SN field in the Bluetooth data packet with the local NESN. In one example, if the SN field in the Bluetooth data packet is the same as the local NESN, the mobile phone can determine that the data packet transmits new data. Accordingly, the mobile phone receives the new data, and the mobile phone increments the local NESN value by 1.
  • the mobile phone can determine that the data packet transmits old data, that is, the wireless headset transmits the data that was previously transmitted.
  • the mobile phone detects that the last reply from the wireless headset is ACK information that is, the mobile phone has successfully received the data sent by the wireless headset last time
  • the mobile phone may not do anything to the old data received this time.
  • the mobile phone detects that the last reply was a NACK message that is, the mobile phone failed to successfully receive the data sent by the wireless headset last time. That is to say, the wireless headset is the data that is resent in response to the NACK information sent by the mobile phone.
  • the mobile phone can receive the old data and process the old data accordingly, and the specific processing process will be described in detail in the following embodiments.
  • the frame header adopts the GFSK modulation mode
  • the frame body adopts the GPSK modulation mode. Therefore, the Guard field is included between the frame header and the frame body.
  • the description of the Gurd field and the sync field may refer to the existing Bluetooth protocol, and the description will not be repeated in this application.
  • the content carried in the Header field is different.
  • the types of data packets include: ACL (Asynchronous Connection link, asynchronous connection link), CIS (Connected Isochronous Stream, connection isochronous stream), BIS (broadcast isochronous stream, broadcast isochronous stream) and TWS (True Wireless Stereo, true wireless stereo) (TWS refers to the data transfer stream between two earphones of TWS earphones).
  • ACL Asynchronous Connection link, asynchronous connection link
  • CIS Connected Isochronous Stream, connection isochronous stream
  • BIS broadcast isochronous stream
  • TWS True Wireless Stereo, true wireless stereo
  • TWS refers to the data transfer stream between two earphones of TWS earphones
  • the Header field of the ACL data type includes an LLID (logical link identify, logical link indication) field, a Length (length) field, an MD (more data, more data) field, and a CP (CTEInfo Present, CTE presence indication) field, APC (auto power control) field and RFU (Reserved for future use, reserved for future use) field.
  • LLID logical link identify, logical link indication
  • Length length
  • MD more data, more data
  • CP CTEInfo Present, CTE presence indication
  • APC auto power control
  • RFU Reserved for future use, reserved for future use
  • the length of the APC field is 2 bits, and is used to indicate the power value that the opposite end increases or decreases based on the current power. Its mapping method is shown in Table 4:
  • the character carried in the APC field when the character carried in the APC field is 0, that is, 00, it is used to indicate that the current power is still used.
  • the character carried in the APC field when the character carried in the APC field is 1, that is, 01, it is used to indicate that the current power is reduced by 1 dB.
  • the character carried in the APC field when the character carried in the APC field is 2, that is, 10, it is used to indicate that the current power is increased by 1 dB.
  • the character carried in the APC field when the character carried in the APC field is 3, that is, 11, it is used to indicate that the current power is increased by 3 dB.
  • this embodiment of the present application may indicate power switching of the electronic device through the APC field in the Bluetooth data packet, so that the peer device may send the Bluetooth data packet based on the power indicated by the received APC field.
  • the embodiments of the present application provide a real-time power switching method, which can indicate power switching when transmitting data, that is, In other words, the signaling overhead can be reduced and the power switching efficiency can be improved by multiplexing signaling.
  • the Bluetooth data packet when power switching is indicated, may also not include a data field.
  • the Length field in the Header field may indicate that the length of the data field is 0, indicating that the Bluetooth data packet does not include the data field.
  • the data field in this embodiment of the present application may adopt Polar coding or no coding.
  • the sender divides the data into multiple data blocks (that is, the data blocks carried by the payload1 field to the payload n field) according to the coding rate.
  • each data block is generated by separate channel coding.
  • each data block can be set according to actual requirements, which is not limited in this application.
  • each data block corresponds to one CRC field. The specific usage of multiple data blocks and multiple CRC checks will be described in detail in the following embodiments.
  • FIG. 11b is an exemplary Bluetooth data packet format.
  • the Bluetooth data packet shown in FIG. 11b is generated using convolutional coding as the coding method.
  • the Bluetooth data packet includes: Preamble field, AccessCode field, PHY_IND field, FEC 1/2 field, Guard field, sync field, Header field, HEC field, FEC 1/2 field, at least one payload field, at least one CRC field, at least one term field, and Tailer field.
  • the FEC1/2 field is channel coding with a code rate of 1/2. After encoding, the data length will increase. In this embodiment of the present application, the bits encoded by the 1/2 code rate are doubled.
  • the term field is a field unique to convolutional coding. It is attached at the end of the coding block, and the number of bits occupied is related to coding parameters.
  • the Header field includes: a Blocklen (block number) field, a payload field, an MD field, an LLID field, an APC field, and an RFU field.
  • the Blocklen field is used to indicate the number of blocks in the CRC block.
  • the payload field is used to indicate the packet length. For other undescribed fields, reference may be made to the related content of the existing Bluetooth protocol, which is not limited in this application.
  • FIG. 13 is a schematic diagram of an exemplary application scenario. As shown in (1) of FIG. 13 , a Bluetooth connection is established between the mobile phone and the wireless headset. Exemplarily, for the process of establishing a Bluetooth connection between the mobile phone and the wireless headset, reference may be made to FIG. 4a to FIG. 4c and the related description of FIG. 5 , which will not be repeated here.
  • the embodiments of the present application are described by taking the initial bandwidth of the mobile phone and the wireless headset as 1 MHz as an example.
  • the initial bandwidth may be determined after negotiation during the connection process.
  • the initial bandwidth may also be set in the Bluetooth protocol.
  • each electronic device may be preconfigured with an initial bandwidth, and the initial bandwidth configured by each electronic device is the same (for example, 1 MHz).
  • the mobile phone and the wireless headset can perform data interaction based on the Bluetooth data packets with the set format proposed in the embodiments of the present application.
  • the mobile phone and the wireless headset can also perform data interaction based on the existing Bluetooth protocol, and when the set conditions are triggered, Then, data interaction is performed based on the Bluetooth protocol proposed in the embodiments of the present application, that is, based on the Bluetooth data packets having a set format.
  • the set condition may be that the application started by the mobile phone is a music application.
  • the set condition may also be that the bandwidth required by the file to be transmitted is greater than the set threshold (for example, it may be 1 MHz).
  • the set threshold for example, it may be 1 MHz.
  • other conditions may also be used, which are not limited in this application.
  • FIG. 14a is a schematic diagram of the format of an exemplary Bluetooth data packet.
  • the Bluetooth data packet sent by the mobile phone includes, but is not limited to, the Preamble field, the Access Code field, the PHY_IND field, and other fields.
  • the character carried in the BW field in the PHY_IND field is 000.
  • the bandwidth corresponding to 000 is 1MHz.
  • the character carried in the MCS field is 00001.
  • the modulation mode indicated by 00001 is GFSK, and the coding rate is 1.
  • FIG. 15 is a schematic diagram of an exemplary data transmission manner.
  • the wireless earphone receives the control field on the designated frequency band.
  • the bandwidth of the control field is 1 MHz
  • the center frequency thereof is fc. It should be noted that the center frequency is negotiated during the process of establishing the Bluetooth connection between the mobile phone and the wireless headset, or after the Bluetooth connection is established.
  • the wireless headset receives the control field in the Bluetooth data packet as shown in FIG. 14a on a frequency band with a center frequency of fc and a bandwidth of 1 MHz.
  • the wireless headset performs corresponding processing on the control field.
  • the wireless headset can read the information carried in the Preamble field and the Access Code field, and perform corresponding processing.
  • the wireless headset reads the PHY_IND field to obtain the information (ie, 000) carried in the BW field.
  • the wireless headset may determine that the transmission bandwidth of the data field is 1 MHz based on the BW field.
  • the wireless headset may obtain the modulation mode of the data field based on the MCS field.
  • the wireless headset may determine that the bandwidth of the data field is 1 MHz based on the BW field carried in the control field.
  • the wireless earphone can receive the data field in the Bluetooth data packet sent by the mobile phone in a frequency band with a center frequency of fc and a bandwidth of 1 MHz.
  • the wireless headset may perform corresponding processing on the data field based on the encoding method indicated by the MCS field to obtain information or data carried in the data field.
  • the wireless headset may obtain audio data carried in the data field.
  • the wireless earphone can play the acquired audio data. It should be noted that the processing of the data field will be described in the following embodiments, and this embodiment only describes the bandwidth switching scenario.
  • the mobile phone can respond to the received user operation, based on a larger bandwidth, such as 4 MHz, and Wireless headset for data interaction.
  • the mobile phone determines that the bandwidth needs to be switched to 4 MHz.
  • the mobile phone generates a Bluetooth data packet, and the format of the Bluetooth data packet is shown in Figure 14b.
  • the information carried in the BW field in the PHY_IND field is 010.
  • the bandwidth indicated by 010 is 4MHz.
  • the information carried in the MCS field is 00001, which is used to indicate that the modulation mode is GFSK and the coding rate is 1. It should be noted that, in this embodiment of the present application, only the manner in which the user instructs to switch the bandwidth is used as an example for description.
  • the mobile phone can adaptively switch the transmission bandwidth based on the amount of data to be transmitted and/or current transmission conditions (also referred to as Bluetooth communication conditions). For example, if the distance between the mobile phone and the headset is close (for example, less than 2 meters), the interference received between the mobile phone and the headset is small, and the Bluetooth communication conditions are better, and the mobile phone can choose to pass a larger bandwidth (for example, 5MHz). ) for Bluetooth communication with the headset.
  • the bandwidth selection and judgment conditions can be set according to actual needs, which are not limited in this application.
  • the wireless headset receives a control field on a specified frequency band.
  • the bandwidth of the control field is 1 MHz, and the center frequency thereof is fc.
  • the center frequencies in (1) of FIG. 15 and (2) of FIG. 15 are the same as an example for description.
  • the center frequency is variable, which is not limited in this application.
  • the wireless headset receives the control field in the Bluetooth data packet as shown in Fig. 14b on a frequency band with a center frequency of fc and a bandwidth of 1 MHz.
  • the wireless headset can read the information carried in the Preamble field and the Access Code field, and process it accordingly.
  • the wireless headset reads the PHY_IND field to obtain the information (ie, 010) carried in the BW field.
  • the wireless headset may determine, based on the BW field, that the transmission bandwidth of the data field in the Bluetooth data packet is 4MHz.
  • the wireless headset may obtain the modulation mode of the data field based on the MCS field.
  • the wireless headset may determine that the current Bluetooth data packet transmits new data based on the NESN field and the SN field.
  • the wireless headset may determine that the bandwidth of the data field is 4 MHz based on the BW field carried in the control field.
  • the wireless headset can receive data fields in a frequency band with a center frequency of fc and a bandwidth of 4 MHz.
  • the wireless headset may decode the data field based on the encoding method indicated by the MCS field to obtain information or data carried in the data field, for example, the wireless headset may obtain audio data carried in the data field. Then, the wireless earphone can play the acquired audio data.
  • the Bluetooth protocol can support a transmission mode with a bandwidth of 4 MHz and above, which can effectively improve the transmission efficiency of Bluetooth data packets.
  • the initial bandwidth of the electronic device is 1 MHz as an example for illustration, that is, the control field is transmitted on the agreed 1 MHz bandwidth, so that the electronic devices can be correctly read. Control field.
  • the transmission bandwidth of the control field may also be 2 MHz, which is not limited in this application.
  • the wireless headset can also send a Bluetooth data packet to the mobile phone in the above manner, and indicate the bandwidth corresponding to the data field in the control field of the Bluetooth data packet.
  • the bandwidth indicated by the wireless headset to the handset may be the same as the bandwidth indicated by the handset to the wireless headset.
  • the bandwidth indicated by the wireless headset to the cell phone may not be the same as the bandwidth indicated by the cell phone to the wireless headset.
  • the bandwidth indicated by the mobile phone to the wireless headset is 4 MHz, that is, the bandwidth occupied by the data field sent by the mobile phone is 4 MHz.
  • the bandwidth indicated by the wireless headset to the mobile phone is 1 MHz, that is, the bandwidth occupied by the data field sent by the wireless headset is 1 MHz. Therefore, when the amount of data sent by the wireless headset is relatively small, the Bluetooth data packets can be transmitted with a relatively small bandwidth, so as to further save transmission resources.
  • the mobile phone and the wireless headset can dynamically determine their respective transmission bandwidths based on parameters such as network conditions, data volume, and application requirements. For example, when the current play of the lossless music ends, switch to the next piece of music. Moreover, the data amount of the next piece of music is small, for example, only 2MHz bandwidth is required.
  • the BW field in the data packet sent by the mobile phone to the wireless headset may indicate that the transmission bandwidth of the data field is 2MHz. Therefore, through a flexible bandwidth switching method, the bandwidth can be dynamically and real-time switched according to user instructions or actual needs, so as to effectively save resources and improve resource utilization.
  • FIG. 16 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 16, exemplary, specifically includes:
  • the wireless earphone receives the Bluetooth data packet sent by the mobile phone.
  • This embodiment takes the first data interaction between the wireless headset and the mobile phone, that is, the first Bluetooth data packet sent to the wireless headset after the mobile phone and the wireless headset establish a Bluetooth connection as an example for description.
  • the methods in the embodiments of the present application may be adopted, and the description will not be repeated in this application.
  • the mobile phone and the wireless headset store the value of the NESN field and the value of the SN field, that is, the local NESN and the local SN, respectively.
  • the value of the local initial NESN configured by the mobile phone and the wireless headset is 1, and the value of the local initial SN is 1 as an example for description.
  • the initial values of the local NESN and the local SN may be negotiated during the connection establishment process, or may be pre-configured, which are not limited in this application.
  • the values of the NESN field and SN field in the data packet can be modified to indicate that the data packet transmits new data or old data. And/or, ACK information or NACK information is indicated.
  • FIG. 17 is an exemplary schematic diagram of the format of a Bluetooth data packet.
  • the NESN field and the SN field in the Bluetooth data packet are the same as the local NESN and local SN currently stored in the mobile phone.
  • the local NESN value currently stored in the mobile phone is 1, and the local SN value is 1.
  • the value of the NESN field in the Bluetooth data packet sent by the mobile phone is 1, and the value of the SN field is 1.
  • the wireless headset receives the Bluetooth data packet and obtains the control field.
  • the wireless headset reads the NESN field and the SN field.
  • the local NESN value currently stored in the wireless headset is 1, and the SN value is 1.
  • the wireless headset determines that the value (ie, 1) in the SN field in the Bluetooth data packet is the same as the value (ie, 1) of the local NESN.
  • the wireless headset can determine that the currently received Bluetooth data packet transmits new data.
  • the wireless headset adds 1 to the value of the local NESN (ie, 1), and the updated value of the local NESN is 0.
  • an asymmetric service that is, the wireless headset only receives data sent by the mobile phone, and does not need to send data to the mobile phone, is used as an example for description. That is to say, the wireless headset has not sent data to the mobile phone, and the mobile phone does not need to send ACK information or NACK information to the wireless headset. Therefore, the wireless headset does not need to perform a process of judging ACK information or NACK information.
  • the wireless earphone may receive the data field of the Bluetooth data packet on the specified frequency band based on the indications of the BW field and the MCS field.
  • the data field in the Bluetooth data packet received by the wireless headset includes three data blocks and three corresponding CRC fields.
  • three data blocks are carried in the payload1 field, the payload2 field and the payload3 field respectively.
  • the three CRC fields are the CRC1 field, the CRC2 field, and the CRC3 field, respectively.
  • the CRC1 field corresponds to the data block in the payload1 field.
  • the CRC2 field corresponds to the data block in the payload2 field.
  • the CRC3 field corresponds to the data block in the payload3 field.
  • the wireless headset verifies the payload1 field based on the CRC1 field.
  • the wireless headset verifies the payload2 field based on the CRC2 field.
  • the wireless headset verifies the payload3 field based on the CRC3 field.
  • the wireless earphone receives the data field on a frequency band with a center frequency of fc and a bandwidth of 4 MHz.
  • the wireless headset can demodulate the data field based on the modulation mode indicated by the MCS field to obtain each field in the data field.
  • the following only describes the processing process of the payload field and the CRC field by the wireless headset.
  • the wireless headset may check the data block carried in the payload1 field based on the CRC1 field to determine whether the data block in the payload1 field is correctly received.
  • the correct reception is optionally that the length, sequence, and specific numbers of multiple characters corresponding to the received data are all correct.
  • the wireless headset checks the payload2 field and the payload3 field, respectively, based on the received CRC2 field and the CRC3 field.
  • the wireless headset determines that the verification of the CRC1 field to the CRC3 field is successful, and obtains the data of the payload1 field to the payload3 field.
  • the wireless headset verifies the payload1 to payload3 fields successfully, that is, the wireless headset determines that the payload1 to payload3 fields are correctly received.
  • the wireless headset obtains the data included in the payload1 field to the payload3 field (ie, the data block described above).
  • the wireless headset can exemplarily combine the acquired multiple data blocks (including the data block included in the payload1 field, the data block included in the payload2 field, and the data block included in the payload3 field) in the order of the data blocks, to Get the corresponding audio frame.
  • the wireless headset may further process the audio frame to play audio data corresponding to the audio frame.
  • the transmission process of other types of data is the same as that of audio data.
  • the difference may be the processing process at the wireless earphone end.
  • the wireless earphone end needs to perform audio decoding on the audio frame to obtain corresponding audio data.
  • the wireless headset needs to perform image decoding on the image frames to obtain corresponding image data, which will not be described one by one in this application.
  • the wireless headset sends ACK information to the mobile phone.
  • the wireless headset may send ACK information to the mobile phone based on the Bluetooth address information of the mobile phone (the information is obtained during the establishment of the Bluetooth connection).
  • FIG. 18 is a schematic diagram of the format of an exemplary Bluetooth data packet.
  • the Bluetooth data packet includes: Preamble field, Access Code field and PHY_IND field.
  • Preamble field For the description of the Preamble field and the Access Code field, refer to the above, and will not be repeated here.
  • the PHY_IND field includes the BW field, the MCS field, the NESN field, and the SN field.
  • all 8 bits in the BW field and the MCS field are 1, which are used to indicate that the Bluetooth data packet only includes a frame header (ie, does not carry a data field).
  • the NESN field and the SN field in the Bluetooth data packet sent by the wireless headset are the same as the NESN field and SN field currently stored by the wireless headset.
  • the value of the local NESN currently stored in the wireless headset is 0, and the value of the local SN is 1.
  • the NESN field in the Bluetooth data packet is 0, and the SN field is 1.
  • the mobile phone receives the Bluetooth data packet shown in FIG. 18 .
  • the mobile phone reads the BW field and the MCS field, detects that the 8 bits of the BW field and the MCS field are all 1, and determines that the Bluetooth data packet only includes the frame header, not the frame body, and is used to indicate ACK information or NACK information.
  • the mobile phone can further determine that the Bluetooth data packet indicates ACK information by reading the NESN field and the SN field (for the specific judgment method, please refer to the above, and the description will not be repeated below).
  • the mobile phone can determine that the wireless headset has correctly received the data previously sent by the mobile phone.
  • the mobile phone has determined that the Bluetooth data packet does not include a data field, and the mobile phone does not need to receive further data fields, so as to achieve the purpose of saving power consumption.
  • the electronic device eg, mobile phone
  • the electronic device in the embodiment of the present application can more quickly determine whether the wireless headset has correctly received data. After the mobile phone quickly determines whether the wireless headset has correctly received the data, the mobile phone can determine whether to resend the data or send new data according to the reception result of the wireless headset. Thus, the data processing and transmission efficiency of the mobile phone is improved.
  • the wireless headset only needs to reply with ACK information or NACK information.
  • ACK information or NACK information
  • interactive data and ACK information are required between the wireless headset and the mobile phone.
  • the mobile phone sends a Bluetooth data packet including voice data to the wireless headset.
  • the wireless headset After the wireless headset successfully receives the Bluetooth data packet sent by the mobile phone, the wireless headset optionally sends ACK information to the mobile phone.
  • the wireless headset obtains voice data through a microphone.
  • the wireless headset optionally sends the acquired voice data to the mobile phone.
  • the wireless headset can send ACK information to the mobile phone based on the Bluetooth data packet shown in FIG. 18 .
  • the wireless headset sends voice data to the mobile phone based on the Bluetooth data packet shown in FIG. 11a or 11b.
  • the wireless headset may send a Bluetooth data packet containing ACK information and voice data to the cell phone.
  • FIG. 19 is a schematic diagram of an exemplary format of a Bluetooth data packet.
  • the Bluetooth data packet includes a Preamble field, an Access Code field, a PHY_IND field, and a data field.
  • the 8 bits of the BW field and the MCS field in the PHY_IND field are not all 1s.
  • the handset may be based on determining that the Bluetooth data packet contains a data field.
  • the mobile phone can further determine the bandwidth and modulation mode of the data field by reading the BW field and the MCS field. For details, please refer to the relevant content above, which will not be repeated here.
  • the mobile phone may determine, based on the NESN field and the SN field, that the wireless headset responds with ACK information, and the Bluetooth data packet carries new data.
  • the specific determination method reference may be made to the above, which will not be repeated here, and the description will not be repeated hereinafter.
  • the data field includes a payload1 field, a CRC1 field, and the like.
  • the mobile phone can process the data field to obtain the voice data sent by the wireless headset.
  • the specific processing process can refer to the above, and details are not repeated here.
  • FIG. 20a is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 20a, it is exemplary and specifically includes:
  • the wireless earphone receives the Bluetooth data packet sent by the mobile phone.
  • the Bluetooth data packet shown in FIG. 16 is still taken as an example, and the specific description may refer to S301, which will not be repeated here.
  • the wireless headset verifies the payload1 field based on the CRC1 field.
  • the wireless headset verifies the payload2 field based on the CRC2 field.
  • the wireless headset verifies the payload3 field based on the CRC3 field.
  • the wireless headset determines that the verification of the CRC1 field and the CRC2 field is successful, and obtains the data of the payload1 field and the payload2 field.
  • the wireless headset determines that the CRC3 field check fails and waits for retransmission.
  • the wireless headset checks the payload1 field to the payload3 field based on the CRC1 to CRC3 fields, respectively.
  • the verification result is: the verification of the CRC1 field and the CRC2 field succeeds, and the verification of the CRC3 field fails.
  • the wireless headset can obtain the data fields that are successfully verified, that is, the data of the payload1 field and the payload2 field.
  • the wireless headset caches the payload1 field to the payload3 field in the memory.
  • the wireless headset sends NACK information to the mobile phone.
  • the wireless headset determines that the payload3 field is not correctly received.
  • the wireless headset can send NACK information to the mobile phone based on the Bluetooth address information of the mobile phone. That is to say, if any payload field in the data field in the Bluetooth data packet sent by the mobile phone fails to be received, it is determined that the data field fails to be received.
  • FIG. 21 is a schematic diagram of the format of an exemplary Bluetooth data packet.
  • the Bluetooth data packet includes: Preamble field, Access Code field and PHY IND field.
  • Preamble field For the description of the Preamble field and the Access Code field, refer to the above, and will not be repeated here.
  • the PHY IND field includes the BW field, the MCS field, the NESN field, and the SN field.
  • the 8 bits in the BW field and the MCS field are all 1, which are used to indicate that the Bluetooth data packet only includes the frame header (ie, the control field), and does not include the frame body (ie, the data field).
  • the wireless headset does not receive data correctly, and the wireless headset does not update the values of the local NESN and the local SN. That is to say, the value of the local NESN currently stored in the wireless headset is 1, and the value of the local SN is 1.
  • the wireless headset needs to feed back NACK information to the mobile phone.
  • the NESN field and the SN field in the Bluetooth data packet sent by the wireless headset are the same as the NESN field and SN field currently stored by the wireless headset. As shown in FIG. 21 , exemplarily, the NESN field in the Bluetooth data packet is 1, and the SN field is 1.
  • the mobile phone receives the Bluetooth data packet shown in FIG. 21 .
  • the mobile phone reads the BW field and the MCS field, detects that the 8 bits of the BW field and the MCS field are all 1, determines that the Bluetooth data packet only includes the frame header, and is used to indicate ACK information or NACK information.
  • the mobile phone can further read the NESN field and the SN field, and based on the value of the local NESN (that is, 1) and the value of the local SN (that is, 1), determine that the Bluetooth data packet indicates NACK information (that is, the value of the local SN is the same as the value of the local SN). the same value in the NESN field in the packet).
  • the mobile phone can determine that the wireless headset has not correctly received the data sent by the mobile phone.
  • the mobile phone when the mobile phone determines that the wireless headset has correctly received the data sent by the mobile phone, the mobile phone can detect a preset retransmission mechanism.
  • the preset retransmission mechanism of the mobile phone can set the number of retransmissions, for example, it can be set as one retransmission or three retransmissions, which is not limited in this application.
  • the headset optionally does not need to reply ACK information or NACK information.
  • FIG. 20b is an exemplary schematic diagram of a data retransmission process between a mobile phone and a wireless headset. As shown in Figure 20b, exemplary, specifically including:
  • the wireless headset receives the Bluetooth data packet retransmitted by the mobile phone.
  • FIG. 22 is a schematic structural diagram of an exemplary retransmission of a Bluetooth data packet.
  • the values of the NESN field and the SN field in the Bluetooth data packet are the same as the local NESN value (ie, 1) and the value of the local SN field (ie, 1) currently stored in the mobile phone.
  • the local NESN value ie, 1
  • the value of the local SN field ie, 1 currently stored in the mobile phone.
  • the wireless headset receives the Bluetooth data packet sent by the mobile phone.
  • the value of the local NESN currently stored in the wireless headset is 0, and the value of the local SN is 1.
  • the wireless headset may determine, based on the value of the local NESN (ie, 0) and the value of the SN field in the Bluetooth data packet (ie, 1), that the last transmitted old data is transmitted in the Bluetooth data packet.
  • the wireless headset detects that the last reply from the wireless headset is NACK information, the wireless headset receives the data field and performs subsequent processing steps.
  • the wireless headset performs combined verification on the payload3 field received for the first time and the payload3 field received for the second time based on the CRC3 field.
  • the wireless headset may obtain the data of the payload3 field received for the first time from the memory. Based on the CRC field, the wireless headset may perform a combined check on the data in the payload3 field received for the first time and the data in the payload3 field received for the second time (ie, currently received).
  • the data field in the Bluetooth data packet in the embodiment of the present application includes multiple data blocks, and the receiving end (for example, a wireless headset) can receive the retransmitted data packet after receiving the retransmitted data packet in the case that any data block is received incorrectly. A packet received in error is merged and checked. There is no need to merge and check the entire data field as in the existing Bluetooth protocol. Thereby, the data receiving efficiency is effectively improved and the processing pressure on the receiving end is reduced.
  • the wireless headset determines that the verification of the CRC3 field is successful, and obtains data from the payload1 field to the payload3 field.
  • the wireless headset can obtain the data of the payload1 field and the payload2 field obtained last time, and the data of the payload3 field obtained this time.
  • the data in the payload3 field refers to the data obtained after two successful merge verifications.
  • the wireless headset performs corresponding processing on the data in the payload1 field to the payload3 field, and the specific description can refer to S303, which will not be repeated here.
  • the wireless headset sends ACK information to the mobile phone.
  • the wireless headset may send ACK information to the mobile phone based on the Bluetooth address information of the mobile phone (the information is obtained during the establishment of the Bluetooth connection). For specific details, refer to S304, which will not be repeated here.
  • the Bluetooth data packet includes multiple payload fields and CRC fields.
  • the data in the Bluetooth data packet may also be divided into only one data block and carried in the payload field, and the payload field may correspond to a CRC field.
  • the frame header part in this embodiment of the present application can be combined with the frame body part in the existing Bluetooth protocol, that is, the frame body including only one payload field and one CRC field.
  • the bandwidth indication manner, the ACK/NACK indication manner, the power indication manner, and the manners of multiple payload fields and CRC fields in the embodiments of the present application may be used independently, or may be arbitrarily combined, which is not limited in this application.
  • the wireless headset optionally exchanges data and ACK information (or NACK information) with the mobile phone.
  • the mobile phone sends a Bluetooth data packet including voice data to the wireless headset. If the wireless headset fails to correctly receive at least one data field sent by the mobile phone, the wireless headset optionally sends a NACK message to the mobile phone.
  • the wireless headset obtains voice data through a microphone. The wireless headset optionally sends the acquired voice data to the mobile phone.
  • the wireless headset can send NACK information to the mobile phone based on the Bluetooth data packet shown in FIG. 21 .
  • the wireless headset sends voice data to the mobile phone based on the Bluetooth data packet shown in FIG. 11a or 11b.
  • the wireless headset may send a Bluetooth data packet containing NACK information and voice data to the cell phone.
  • FIG. 23 is a schematic diagram of an exemplary format of a Bluetooth data packet.
  • the Bluetooth data packet includes a Preamble field, an Access Code field, a PHY IND field, and a data field.
  • the 8 bits of the BW field and the MCS field in the PHY IND field are not all 1s.
  • the handset may be based on determining that the Bluetooth data packet contains a data field.
  • the mobile phone can further determine the bandwidth and modulation mode of the data field by reading the BW field and the MCS field. For details, please refer to the relevant content above, which will not be repeated here.
  • the mobile phone may determine, based on the NESN field and the SN field, that the wireless headset has not correctly received the voice data, and the data carried in the data packet is new data.
  • the data field includes a payload1 field, a CRC1 field, and the like.
  • the mobile phone can process the data field to obtain the voice data sent by the wireless headset.
  • the specific processing process can refer to the above, and details are not repeated here.
  • the mobile phone if the mobile phone correctly receives all the data fields sent by the wireless headset.
  • the mobile phone needs to send an ACK message to the wireless headset.
  • the mobile phone has determined that the wireless headset has not correctly received the last sent Bluetooth data.
  • the mobile phone simultaneously sends the ACK message and retransmits the Bluetooth data to the wireless headset.
  • the mobile phone may send a Bluetooth data packet including ACK information and retransmitted Bluetooth data to the wireless headset. This application is not limited.
  • the electronic device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • FIG. 24 shows a schematic block diagram of an apparatus 2400 according to an embodiment of the present application.
  • the apparatus 2400 may include: a processor 2401 , a transceiver/transceiver pin 2402 , and optionally, a memory 2403 .
  • bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
  • bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
  • bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
  • bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
  • bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
  • the memory 2403 may be used for the instructions in the foregoing method embodiments.
  • the processor 2401 can be used to execute the instructions in the memory 2403, and control the receive pins to receive signals, and control the transmit pins to transmit signals.
  • the apparatus 2400 may be the electronic device or the chip of the electronic device in the above method embodiments.
  • This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above related method steps to implement the Bluetooth communication method in the above embodiment.
  • This embodiment also provides a computer program product, which, when the computer program product runs on the computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the Bluetooth communication method in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the Bluetooth communication method in the above method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
  • the steps of the method or algorithm described in conjunction with the disclosure of the embodiments of this application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
  • Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, read only memory (Read Only Memory, ROM), erasable programmable read only memory ( Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage medium may reside in an ASIC.
  • 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 medium can be any available medium 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)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Embodiments of the present application provide a Bluetooth communication method and system, and an electronic device. The method comprises: a first electronic device sends to a second electronic device a frame header part of a Bluetooth data packet, comprising bandwidth indication information for indicating a transmission bandwidth of a frame body, so that the second electronic device can switch a receiving bandwidth on the basis of the bandwidth indication information obtained from a frame header to receive a frame body part of the Bluetooth data packet on a corresponding bandwidth. The present application provides a real-time dynamic transmission bandwidth adjustment approach by indicating the transmission bandwidth in the frame header of the Bluetooth data packet, such that the number of signaling interactions between the electronic devices are reduced, thereby saving channel overhead and improving the resource utilization rate and the bandwidth adjustment efficiency.

Description

蓝牙通信方法、系统及电子设备Bluetooth communication method, system and electronic device
本申请要求于2021年03月12日提交中国国家知识产权局、申请号为202110272348.6、申请名称为“蓝牙通信方法、系统及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110272348.6 and the application name "Bluetooth communication method, system and electronic device" filed with the State Intellectual Property Office of China on March 12, 2021, the entire contents of which are incorporated by reference in in this application.
技术领域technical field
本申请实施例涉及通信领域,尤其涉及一种蓝牙通信方法、系统及电子设备。The embodiments of the present application relate to the field of communication, and in particular, to a Bluetooth communication method, system, and electronic device.
背景技术Background technique
随着通信技术的飞速发展,蓝牙网络的应用场景也越来越广泛。目前,设备间的蓝牙连接是基于已有的蓝牙协议维护的。已有蓝牙协议中最大支持的传输带宽为2M。而由于带宽限制,已有蓝牙协议无法支持较大流量的应用场景。With the rapid development of communication technology, the application scenarios of Bluetooth network are becoming more and more extensive. Currently, Bluetooth connections between devices are maintained based on existing Bluetooth protocols. The maximum supported transmission bandwidth in the existing Bluetooth protocol is 2M. However, due to bandwidth limitations, existing Bluetooth protocols cannot support application scenarios with large traffic.
发明内容SUMMARY OF THE INVENTION
为了解决上述技术问题,本申请提供一种蓝牙通信方法、系统及电子设备。在该方法中,第一电子设备可通过帧头向第二电子设备指示帧体的传输带宽,以提供一种实时的带宽调整方式,降低电子设备带宽调整的交互次数,提升资源利用率以及带宽调整效率。In order to solve the above technical problems, the present application provides a Bluetooth communication method, system and electronic device. In this method, the first electronic device can indicate the transmission bandwidth of the frame body to the second electronic device through the frame header, so as to provide a real-time bandwidth adjustment method, reduce the number of interactions for bandwidth adjustment of the electronic device, and improve resource utilization and bandwidth. Adjust efficiency.
第一方面,本申请实施例提供一种蓝牙通信系统。该系统包括第一电子设备和第二电子设备,第一电子设备与第二电子设备之间通过蓝牙连接进行数据交互。第一电子设备,用于向第二电子设备发送第一蓝牙数据包;第一蓝牙数据包包括帧头和帧体,第一蓝牙数据包的帧头包括第一带宽指示信息,第一带宽指示信息用于指示第一蓝牙数据包的帧体的第一传输带宽。第二电子设备,用于接收第一蓝牙数据包;并且,第二电子设备获取第一蓝牙数据包的帧头中的第一带宽指示信息。以及,第二电子设备根据第一带宽指示信息,在第一传输带宽上接收第一蓝牙数据包的帧体。这样,本申请实施例提供一种实时的带宽调整方式,第一电子设备可通过蓝牙数据包的帧头向第二电子设备指示帧体的传输带宽,以使得第二电子设备可在读取帧头后,即可获取到帧体的传输带宽。从而实现传输带宽的动态调整,减少电子设备带宽调整的交互次数,提升资源利用率以及带宽调整效率。In a first aspect, an embodiment of the present application provides a Bluetooth communication system. The system includes a first electronic device and a second electronic device, and data interaction is performed between the first electronic device and the second electronic device through a Bluetooth connection. The first electronic device is used to send the first Bluetooth data packet to the second electronic device; the first Bluetooth data packet includes a frame header and a frame body, and the frame header of the first Bluetooth data packet includes first bandwidth indication information, and the first bandwidth indication The information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet. The second electronic device is configured to receive the first Bluetooth data packet; and the second electronic device obtains the first bandwidth indication information in the frame header of the first Bluetooth data packet. And, the second electronic device receives the frame body of the first Bluetooth data packet on the first transmission bandwidth according to the first bandwidth indication information. In this way, the embodiments of the present application provide a real-time bandwidth adjustment method. The first electronic device can indicate the transmission bandwidth of the frame body to the second electronic device through the frame header of the Bluetooth data packet, so that the second electronic device can read the frame After the header, the transmission bandwidth of the frame body can be obtained. Thereby, dynamic adjustment of transmission bandwidth is realized, the number of interactions for bandwidth adjustment of electronic devices is reduced, and resource utilization and bandwidth adjustment efficiency are improved.
示例性的,第一电子设备和第二电子设备可以为任一具有蓝牙功能的电子设备。Exemplarily, the first electronic device and the second electronic device may be any electronic device with a Bluetooth function.
示例性的,第一带宽指示信息的长度为1bit。Exemplarily, the length of the first bandwidth indication information is 1 bit.
示例性的,第一蓝牙数据包的帧头和帧体的调制方式可以相同,也可以不同。Exemplarily, the modulation modes of the frame header and the frame body of the first Bluetooth data packet may be the same or different.
示例性的,第一蓝牙数据包的帧头的传输带宽为1MHz或2MHz。帧头的传输带宽与帧体的传输带宽可以相同,也可以不同。Exemplarily, the transmission bandwidth of the frame header of the first Bluetooth data packet is 1 MHz or 2 MHz. The transmission bandwidth of the frame header and the transmission bandwidth of the frame body may be the same or different.
根据第一方面,第一电子设备,还用于向第二电子设备发送第二蓝牙数据包,第二 蓝牙数据包包括帧头和帧体,第二蓝牙数据包的帧头包括第二带宽指示信息,第二带宽指示信息用于指示第二蓝牙数据包的帧体的第二传输带宽;其中,第一传输带宽与第二传输带宽不同。第二电子设备,还用于接收第二蓝牙数据包。第二电子设备获取第二蓝牙数据包的帧头中的第二带宽指示信息。第二电子设备根据第二带宽指示信息,在第二传输带宽上接收第二蓝牙数据包的帧体。这样,第一电子设备可通过每个蓝牙数据包的帧头,向第二电子设备指示当前发送的蓝牙数据包的帧体的传输带宽,从而实现动态、实时地调整传输带宽。According to the first aspect, the first electronic device is further configured to send a second Bluetooth data packet to the second electronic device, where the second Bluetooth data packet includes a frame header and a frame body, and the frame header of the second Bluetooth data packet includes a second bandwidth indication information, and the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein, the first transmission bandwidth is different from the second transmission bandwidth. The second electronic device is further configured to receive a second Bluetooth data packet. The second electronic device acquires the second bandwidth indication information in the frame header of the second Bluetooth data packet. The second electronic device receives the frame body of the second Bluetooth data packet on the second transmission bandwidth according to the second bandwidth indication information. In this way, the first electronic device can indicate the transmission bandwidth of the frame body of the currently sent Bluetooth data packet to the second electronic device through the frame header of each Bluetooth data packet, thereby realizing dynamic and real-time adjustment of the transmission bandwidth.
示例性的,每个蓝牙数据包的帧头的传输带宽是相同的。Exemplarily, the transmission bandwidth of the frame header of each Bluetooth data packet is the same.
示例性的,每次发送的蓝牙数据包的帧体的传输带宽可以相同,也可以不同。Exemplarily, the transmission bandwidth of the frame body of the Bluetooth data packet sent each time may be the same or different.
示例性的,第一电子设备可接收到用户指令,并响应于接收到的用户指令,执行切换传输带宽的操作,即向第二电子设备发送携带第二传输带宽的蓝牙数据包。Exemplarily, the first electronic device may receive a user instruction, and in response to the received user instruction, perform an operation of switching the transmission bandwidth, that is, send a Bluetooth data packet carrying the second transmission bandwidth to the second electronic device.
示例性的,第一电子设备可基于当前的传输条件和/或传输的数据的数据量大小,自适应调节传输带宽。Exemplarily, the first electronic device may adaptively adjust the transmission bandwidth based on current transmission conditions and/or the amount of data to be transmitted.
根据第一方面,或者以上第一方面的任意一种实现方式,第一蓝牙数据包的帧头还包括第一调制指示信息,第一调制指示信息用于指示帧体的调制方式。第二电子设备,还用于获取第一调制指示信息。第二电子设备根据第一调制指示信息指示的调制方式,对第一蓝牙数据包的帧体进行解调。这样,第一电子设备可通过每个蓝牙数据包的帧头,向第二电子设备指示帧体的调制方式,以使得第二电子设备在读取帧头时,即可获取到帧体的调制方式,从而实现实时、动态地调制方式的调整。以减少调制方式调整时的信令交互次数,进而节约信道资源,提升资源利用率,并提高调整方式调整效率。According to the first aspect, or any implementation manner of the above first aspect, the frame header of the first Bluetooth data packet further includes first modulation indication information, where the first modulation indication information is used to indicate the modulation mode of the frame body. The second electronic device is further configured to acquire the first modulation indication information. The second electronic device demodulates the frame body of the first Bluetooth data packet according to the modulation mode indicated by the first modulation indication information. In this way, the first electronic device can indicate the modulation mode of the frame body to the second electronic device through the frame header of each Bluetooth data packet, so that the second electronic device can obtain the modulation of the frame body when reading the frame header. mode, so as to realize real-time and dynamic adjustment of modulation mode. In order to reduce the number of signaling interactions during modulation mode adjustment, channel resources are saved, resource utilization is improved, and the adjustment mode adjustment efficiency is improved.
根据第一方面,或者以上第一方面的任意一种实现方式,第一调制指示信息和第一带宽指示信息承载于第一蓝牙数据包的帧头的物理层指示字段。这样,通过指定的字段携带带宽指示信息和调制指示信息,可以使得预设的设备,在读取到该指定的字段时,获取到对应的带宽指示和调制指示。According to the first aspect, or any implementation manner of the above first aspect, the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet. In this way, by carrying the bandwidth indication information and the modulation indication information in the specified field, the preset device can obtain the corresponding bandwidth indication and modulation indication when reading the specified field.
根据第一方面,或者以上第一方面的任意一种实现方式,第一蓝牙数据包的帧体包括头部Header字段和数据字段,Header字段包括第一功率指示信息,第一功率指示信息用于指示第二电子设备的发送功率;数据字段包括蓝牙数据。这样,通过Header字段承载功率指示信息,可使得对端设备在读取到Header字段即可获取到对应的功率指示,从而减少调整功率时的信令交互次数,提供一种实时、动态地功率调整方式,在提升资源利用率的同时,提高功率调整效率。According to the first aspect, or any implementation manner of the above first aspect, the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information is used for Indicates the transmit power of the second electronic device; the data field includes Bluetooth data. In this way, by carrying the power indication information in the Header field, the peer device can obtain the corresponding power indication after reading the Header field, thereby reducing the number of signaling interactions when adjusting the power, and providing a real-time and dynamic power adjustment In this way, the power adjustment efficiency is improved while the resource utilization is improved.
示例性的,第二电子设备可基于接收到的功率指示信息,调整发送功率。示例性的,第二电子设备可基于功率指示信息指示的功率,向第一电子设备发送蓝牙数据包。Exemplarily, the second electronic device may adjust the transmit power based on the received power indication information. Exemplarily, the second electronic device may send a Bluetooth data packet to the first electronic device based on the power indicated by the power indication information.
示例性的,第一电子设备可基于接收到的第二电子设备发送的蓝牙数据包,确定第二电子设备的下一次发送蓝牙数据包的发送功率。Exemplarily, the first electronic device may determine, based on the received Bluetooth data packet sent by the second electronic device, the transmission power of the second electronic device to send the Bluetooth data packet next time.
示例性的,第一蓝牙数据包的帧体也可以不包括数据字段。其中,Header字段除包 括第一功率指示信息外,还用于指示数据字段的长度为0,即蓝牙数据包不包括数据字段。Exemplarily, the frame body of the first Bluetooth data packet may also not include a data field. Wherein, the Header field not only includes the first power indication information, but also is used to indicate that the length of the data field is 0, that is, the Bluetooth data packet does not include the data field.
根据第一方面,或者以上第一方面的任意一种实现方式,第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,多个数据字段与多个校验字段一一对应,且每个数据字段包括蓝牙数据。这样,通过多个校验字段,以使得对端在校验时,可基于每个校验字段,对对应的数据字段分别进行校验,从而提高校验效率。According to the first aspect, or any implementation manner of the above first aspect, the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data. In this way, by using multiple check fields, the peer end can check the corresponding data fields based on each check field when checking, thereby improving check efficiency.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于基于多个校验字段中的每个校验字段,对对应的数据字段进行校验。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to perform verification on the corresponding data field based on each verification field in the plurality of verification fields.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于当多个数据字段中的至少一个数据字段校验失败,向第一电子设备发送第三蓝牙数据包;第三蓝牙数据包包括帧头和帧体,第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,第三带宽指示信息用于指示第三蓝牙数据包的帧体的第三传输带宽;第一接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包。第一电子设备,还用于接收第三蓝牙数据包。第一电子设备获取第三蓝牙数据包的帧头中的第三带宽指示信息和第一接收指示信息。第一电子设备根据第三带宽指示信息,在第三传输带宽上接收第三蓝牙数据包的帧体;以及第一电子设备根据第一接收指示信息,向第二电子设备发送第四蓝牙数据包,第四蓝牙数据包的帧体包括多个数据字段和多个校验字段,多个数据字段包括校验失败的至少一个数据字段。这样,电子设备可在蓝牙数据包中向对端同时回复NACK信息以及蓝牙数据,从而减少信令交互次数。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to send the third Bluetooth data to the first electronic device when at least one data field of the plurality of data fields fails to be verified packet; the third Bluetooth data packet includes a frame header and a frame body, the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the frame of the third Bluetooth data packet The third transmission bandwidth of the body; the first reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet. The first electronic device is further configured to receive a third Bluetooth data packet. The first electronic device acquires the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet. The first electronic device receives the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and the first electronic device sends the fourth Bluetooth data packet to the second electronic device according to the first reception indication information , the frame body of the fourth Bluetooth data packet includes multiple data fields and multiple check fields, and the multiple data fields include at least one data field that fails the check. In this way, the electronic device can simultaneously reply NACK information and Bluetooth data to the opposite end in the Bluetooth data packet, thereby reducing the number of signaling interactions.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于接收第四蓝牙数据包。第二电子设备响应于接收到的第四蓝牙数据包,基于第四蓝牙数据包中的至少一个数据字段与多个数据字段中校验成功的其它数据字段进行合并校验;当合并校验成功,获取多个数据字段中的蓝牙数据。这样,通过设置多个校验字段,当电子设备对其中任一数据字段校验失败的情况下,可以基于重发的数据包中,上一次校验失败的数据字段执行合并校验,以提高合并校验的效率。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to receive a fourth Bluetooth data packet. In response to the received fourth Bluetooth data packet, the second electronic device performs merge verification based on at least one data field in the fourth Bluetooth data packet and other data fields that have been successfully verified among the multiple data fields; when the merge verification is successful , to get Bluetooth data in multiple data fields. In this way, by setting multiple check fields, when the electronic device fails to check any of the data fields, it can perform a combined check based on the data fields that failed the last check in the retransmitted data packet, so as to improve the The efficiency of the merge check.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于当多个数据字段中的至少一个数据字段校验失败,向第一电子设备发送第五蓝牙数据包;第五蓝牙数据包包括帧头,第五蓝牙数据包的帧头包括第二接收指示信息,第二接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包,且第五蓝牙数据包不包括帧体;第一电子设备,还用于接收第五蓝牙数据包;第一电子设备获取第五蓝牙数据包的帧头中的第二接收指示信息。第一电子设备根据第二接收指示信息,向第二电子设备发送第六蓝牙数据包,第六蓝牙数据包的帧体包括多个数据字段和多个校验字段,多个数据字段包括校验失败的至少一个数据字段。这样,通过设置特殊的指示方式,可以使得蓝牙数据包中不携带帧体。第二电子设备可通过读取帧头部分,即可获取到NACK信息, 而不需要再接收帧体。从而进一步提升资源利用率。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to send fifth Bluetooth data to the first electronic device when at least one data field of the plurality of data fields fails to be verified packet; the fifth Bluetooth data packet includes a frame header, the frame header of the fifth Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet is included. The Bluetooth data packet does not include a frame body; the first electronic device is further configured to receive the fifth Bluetooth data packet; the first electronic device obtains the second reception indication information in the frame header of the fifth Bluetooth data packet. The first electronic device sends a sixth Bluetooth data packet to the second electronic device according to the second receiving indication information, the frame body of the sixth Bluetooth data packet includes a plurality of data fields and a plurality of check fields, and the plurality of data fields include a check Failed at least one data field. In this way, by setting a special indication mode, the frame body can be not carried in the Bluetooth data packet. The second electronic device can obtain the NACK information by reading the frame header part, and does not need to receive the frame body again. This further improves resource utilization.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于接收第六蓝牙数据包;响应于接收到的第六蓝牙数据包,基于第六蓝牙数据包中的至少一个数据字段与多个数据字段中校验成功的其它数据字段进行合并校验。当合并校验成功,获取多个数据字段中的蓝牙数据。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to receive a sixth Bluetooth data packet; in response to the received sixth Bluetooth data packet, based on the sixth Bluetooth data packet At least one of the data fields is merged and verified with other data fields that have been successfully verified among the multiple data fields. When the merge verification is successful, obtain the Bluetooth data in multiple data fields.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于当多个数据字段校验成功,向第一电子设备发送第七蓝牙数据包;第七蓝牙数据包包括帧头和帧体,第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,第四带宽指示信息用于指示第七蓝牙数据包的帧体的第四传输带宽;第三接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包。第一电子设备,还用于接收第七蓝牙数据包。第一电子设备获取第七蓝牙数据包的帧头中的第四带宽指示信息和第三接收指示信息。第一电子设备根据第四带宽指示信息,在第四传输带宽上接收第七蓝牙数据包的帧体;以及,第一电子设备根据第三接收指示信息,确定第二电子设备正确接收到第一蓝牙数据包。这样,电子设备可在蓝牙数据包中向对端同时回复ACK信息以及蓝牙数据,从而减少信令交互次数。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to send a seventh Bluetooth data packet to the first electronic device when the multiple data fields are successfully verified; the seventh Bluetooth data The packet includes a frame header and a frame body, and the frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, and the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet ; The third receiving indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet. The first electronic device is further configured to receive the seventh Bluetooth data packet. The first electronic device acquires the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet. The first electronic device receives the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; Bluetooth packets. In this way, the electronic device can reply ACK information and Bluetooth data to the opposite end simultaneously in the Bluetooth data packet, thereby reducing the number of signaling interactions.
根据第一方面,或者以上第一方面的任意一种实现方式,第二电子设备,还用于当多个数据字段校验成功,向第一电子设备发送第八蓝牙数据包;第八蓝牙数据包包括帧头,第八蓝牙数据包的帧头包括第四接收指示信息,第四接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包,且第八蓝牙数据包不包括帧体。第一电子设备,还用于接收第八蓝牙数据包。第一电子设备获取第八蓝牙数据包的帧头中的第四接收指示信息。第一电子设备根据第四接收指示信息,确定第二电子设备正确接收到第一蓝牙数据包。这样,通过设置特殊的指示方式,可以使得蓝牙数据包中不携带帧体。第二电子设备可通过读取帧头部分,即可获取到ACK信息,而不需要再接收帧体。从而进一步提升资源利用率。According to the first aspect, or any implementation manner of the above first aspect, the second electronic device is further configured to send an eighth Bluetooth data packet to the first electronic device when the multiple data fields are successfully verified; the eighth Bluetooth data The packet includes a frame header, the frame header of the eighth Bluetooth data packet includes fourth reception indication information, and the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body . The first electronic device is further configured to receive an eighth Bluetooth data packet. The first electronic device acquires the fourth reception indication information in the frame header of the eighth Bluetooth data packet. The first electronic device determines, according to the fourth reception indication information, that the second electronic device has correctly received the first Bluetooth data packet. In this way, by setting a special indication mode, the frame body can be not carried in the Bluetooth data packet. The second electronic device can obtain the ACK information by reading the frame header part, and does not need to receive the frame body again. This further improves resource utilization.
根据第一方面,或者以上第一方面的任意一种实现方式,第一电子设备与第二电子设备为预设的电子设备。According to the first aspect, or any implementation manner of the above first aspect, the first electronic device and the second electronic device are preset electronic devices.
示例性的,第一电子设备与第二电子设备可以在建立蓝牙连接的过程中,确认对端是否为预设的电子设备。Exemplarily, the first electronic device and the second electronic device may confirm whether the opposite end is a preset electronic device during the process of establishing a Bluetooth connection.
示例性的,若任一端非预设的电子设备,则按照已有蓝牙协议进行数据交互。Exemplarily, if either end is not a preset electronic device, data interaction is performed according to the existing Bluetooth protocol.
根据第一方面,或者以上第一方面的任意一种实现方式,第一传输带宽为1MHz、2MHz、4MHz或5MHz。这样,本申请实施例可以扩展带宽,以实现大数据量传输场景下的数据交互。According to the first aspect, or any implementation manner of the above first aspect, the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz. In this way, the embodiment of the present application can expand the bandwidth, so as to realize data interaction in a large data volume transmission scenario.
第二方面,本申请实施例提供一种蓝牙通信方法。该方法应用于第一电子设备,方法包括向第二电子设备发送第一蓝牙数据包;第一蓝牙数据包包括帧头和帧体,第一蓝牙数据包的帧头包括第一带宽指示信息,第一带宽指示信息用于指示第一蓝牙数据包的帧体的第一传输带宽。In a second aspect, an embodiment of the present application provides a Bluetooth communication method. The method is applied to a first electronic device, and the method includes sending a first Bluetooth data packet to a second electronic device; the first Bluetooth data packet includes a frame header and a frame body, and the frame header of the first Bluetooth data packet includes first bandwidth indication information, The first bandwidth indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet.
根据第二方面,方法还包括第一电子设备接收第一用户指令,第一电子设备响应于接收到的第一用户指令,向第二电子设备发送第二蓝牙数据包,第二蓝牙数据包包括帧头和帧体,第二蓝牙数据包的帧头包括第二带宽指示信息,第二带宽指示信息用于指示第二蓝牙数据包的帧体的第二传输带宽;其中,第一传输带宽与第二传输带宽不同。According to the second aspect, the method further includes the first electronic device receiving the first user instruction, the first electronic device sending a second Bluetooth data packet to the second electronic device in response to the received first user instruction, the second Bluetooth data packet including Frame header and frame body, the frame header of the second Bluetooth data packet includes second bandwidth indication information, and the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein, the first transmission bandwidth and The second transmission bandwidth is different.
根据第二方面,或者以上第二方面的任意一种实现方式,第一蓝牙数据包的帧头还包括第一调制指示信息,第一调制指示信息用于指示帧体的调制方式。According to the second aspect, or any implementation manner of the above second aspect, the frame header of the first Bluetooth data packet further includes first modulation indication information, where the first modulation indication information is used to indicate the modulation mode of the frame body.
根据第二方面,或者以上第二方面的任意一种实现方式,第一调制指示信息和第一带宽指示信息承载于第一蓝牙数据包的帧头的物理层指示字段。According to the second aspect, or any implementation manner of the above second aspect, the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet.
根据第二方面,或者以上第二方面的任意一种实现方式,第一蓝牙数据包的帧体包括头部Header字段和数据字段,Header字段包括第一功率指示信息,第一功率指示信息用于指示第二电子设备的发送功率;数据字段包括蓝牙数据。According to the second aspect, or any implementation manner of the above second aspect, the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information is used for Indicates the transmit power of the second electronic device; the data field includes Bluetooth data.
根据第二方面,或者以上第二方面的任意一种实现方式,第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,多个数据字段与多个校验字段一一对应,且每个数据字段包括蓝牙数据。According to the second aspect, or any implementation manner of the above second aspect, the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data.
根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:第一电子设备接收第二电子设备发送的第三蓝牙数据包;第三蓝牙数据包为第二电子设备基于多个校验字段中的每个校验字段,对对应的数据字段进行校验,且多个数据字段中的至少一个数据字段校验失败时发送的;第三蓝牙数据包包括帧头和帧体,第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,第三带宽指示信息用于指示第三蓝牙数据包的帧体的第三传输带宽;第一接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包。第一电子设备获取第三蓝牙数据包的帧头中的第三带宽指示信息和第一接收指示信息。第一电子设备根据第三带宽指示信息,在第三传输带宽上接收第三蓝牙数据包的帧体;以及,第一电子设备根据第一接收指示信息,向第二电子设备发送第四蓝牙数据包,第四蓝牙数据包的帧体包括多个数据字段和多个校验字段,多个数据字段包括校验失败的至少一个数据字段。According to the second aspect, or any implementation manner of the above second aspect, the method further includes: the first electronic device receives a third Bluetooth data packet sent by the second electronic device; the third Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and at least one data field among the multiple data fields fails to check; the third Bluetooth data packet includes a frame header and a frame body , the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; the first reception indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; for indicating that the second electronic device does not correctly receive the first Bluetooth data packet. The first electronic device acquires the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet. The first electronic device receives the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and the first electronic device sends the fourth Bluetooth data to the second electronic device according to the first reception indication information The frame body of the fourth Bluetooth data packet includes multiple data fields and multiple check fields, and the multiple data fields include at least one data field that fails the check.
根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:第一电子设备接收第二电子设备发送的第五蓝牙数据包;第五蓝牙数据包为第二电子设备基于多个 校验字段中的每个校验字段,对对应的数据字段进行校验,且多个数据字段中的至少一个数据字段校验失败时发送的;第五蓝牙数据包包括帧头,第五蓝牙数据包的帧头包括第二接收指示信息,第二接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包,且第五蓝牙数据包不包括帧体。第一电子设备获取第五蓝牙数据包的帧头中的第二接收指示信息。第一电子设备根据第二接收指示信息,向第二电子设备发送第六蓝牙数据包,第六蓝牙数据包的帧体包括多个数据字段和多个校验字段,多个数据字段包括校验失败的至少一个数据字段。According to the second aspect, or any implementation manner of the above second aspect, the method further includes: the first electronic device receives a fifth Bluetooth data packet sent by the second electronic device; the fifth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and at least one data field among the plurality of data fields fails to check; the fifth Bluetooth data packet includes a frame header, and the fifth The frame header of the Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not include a frame body. The first electronic device acquires the second reception indication information in the frame header of the fifth Bluetooth data packet. The first electronic device sends a sixth Bluetooth data packet to the second electronic device according to the second receiving indication information, the frame body of the sixth Bluetooth data packet includes a plurality of data fields and a plurality of check fields, and the plurality of data fields include a check Failed at least one data field.
根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:第一电子设备接收第二电子设备发送的第七蓝牙数据包;第五蓝牙数据包为第二电子设备基于多个校验字段中的每个校验字段,对对应的数据字段进行校验,且多个数据字段校验成功时发送的;第七蓝牙数据包包括帧头和帧体,第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,第四带宽指示信息用于指示第七蓝牙数据包的帧体的第四传输带宽;第三接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包。第一电子设备获取第七蓝牙数据包的帧头中的第四带宽指示信息和第三接收指示信息。第一电子设备根据第四带宽指示信息,在第四传输带宽上接收第七蓝牙数据包的帧体;以及,第一电子设备根据第三接收指示信息,确定第二电子设备正确接收到第一蓝牙数据包。According to the second aspect, or any implementation manner of the above second aspect, the method further includes: the first electronic device receives a seventh Bluetooth data packet sent by the second electronic device; the fifth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and multiple data fields are successfully checked; the seventh Bluetooth data packet includes a frame header and a frame body, and the seventh Bluetooth data packet The frame header includes fourth bandwidth indication information and third reception indication information, where the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used to indicate the second electronic device The first bluetooth packet is received correctly. The first electronic device acquires the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet. The first electronic device receives the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; Bluetooth packets.
根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:第一电子设备接收第二电子设备发送的第八蓝牙数据包;第八蓝牙数据包为第二电子设备基于多个校验字段中的每个校验字段,对对应的数据字段进行校验,且多个数据字段校验成功时发送的;第八蓝牙数据包包括帧头,第八蓝牙数据包的帧头包括第四接收指示信息,第四接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包,且第八蓝牙数据包不包括帧体;第一电子设备获取第八蓝牙数据包的帧头中的第四接收指示信息;第一电子设备根据第四接收指示信息,确定第二电子设备正确接收到第一蓝牙数据包。According to the second aspect, or any implementation manner of the above second aspect, the method further includes: the first electronic device receives an eighth Bluetooth data packet sent by the second electronic device; the eighth Bluetooth data packet is the second electronic device based on multiple Each check field in the check fields is sent when the corresponding data field is checked, and the check of multiple data fields is successful; the eighth Bluetooth data packet includes a frame header, and the frame header of the eighth Bluetooth data packet Including fourth reception indication information, the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body; the first electronic device obtains the frame of the eighth Bluetooth data packet The fourth reception indication information in the header; the first electronic device determines that the second electronic device has correctly received the first Bluetooth data packet according to the fourth reception indication information.
根据第二方面,或者以上第二方面的任意一种实现方式,第一电子设备与第二电子设备为预设的电子设备。According to the second aspect, or any implementation manner of the above second aspect, the first electronic device and the second electronic device are preset electronic devices.
根据第二方面,或者以上第二方面的任意一种实现方式,第一传输带宽为1MHz、2MHz、4MHz或5MHz。According to the second aspect, or any implementation manner of the above second aspect, the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz.
第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The second aspect and any implementation manner of the second aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the second aspect and any implementation manner of the second aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.
第三方面,本申请实施例提供一种蓝牙通信方法。该方法应用于第二电子设备,方法包括:第二电子设备接收第一电子设备发送的第一蓝牙数据包;其中,第一蓝牙数据包包括帧头和帧体,第一蓝牙数据包的帧头包括第一带宽指示信息,第一带宽指示信息 用于指示第一蓝牙数据包的帧体的第一传输带宽;第二电子设备获取第一蓝牙数据包的帧头中的第一带宽指示信息;第二电子设备根据第一带宽指示信息,在第一传输带宽上接收第一蓝牙数据包的帧体。In a third aspect, an embodiment of the present application provides a Bluetooth communication method. The method is applied to a second electronic device, and the method includes: the second electronic device receives a first Bluetooth data packet sent by the first electronic device; wherein the first Bluetooth data packet includes a frame header and a frame body, and the frame of the first Bluetooth data packet The header includes first bandwidth indication information, where the first bandwidth indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet; the second electronic device obtains the first bandwidth indication information in the frame header of the first Bluetooth data packet ; The second electronic device receives the frame body of the first Bluetooth data packet on the first transmission bandwidth according to the first bandwidth indication information.
根据第三方面,方法还包括:第二电子设备接收第一电子设备发送的第二蓝牙数据包;第二蓝牙数据包包括帧头和帧体,第二蓝牙数据包的帧头包括第二带宽指示信息,第二带宽指示信息用于指示第二蓝牙数据包的帧体的第二传输带宽;其中,第一传输带宽与第二传输带宽不同。第二电子设备获取第二蓝牙数据包的帧头中的第二带宽指示信息;第二电子设备根据第二带宽指示信息,在第二传输带宽上接收第二蓝牙数据包的帧体。According to a third aspect, the method further includes: the second electronic device receives a second Bluetooth data packet sent by the first electronic device; the second Bluetooth data packet includes a frame header and a frame body, and the frame header of the second Bluetooth data packet includes a second bandwidth The indication information, the second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein the first transmission bandwidth is different from the second transmission bandwidth. The second electronic device obtains the second bandwidth indication information in the frame header of the second Bluetooth data packet; the second electronic device receives the frame body of the second Bluetooth data packet on the second transmission bandwidth according to the second bandwidth indication information.
根据第三方面,或者以上第三方面的任意一种实现方式,第一蓝牙数据包的帧头还包括第一调制指示信息,第一调制指示信息用于指示帧体的调制方式;方法还包括:第二电子设备获取第一调制指示信息;第二电子设备根据第一调制指示信息指示的调制方式,对第一蓝牙数据包的帧体进行解调。According to the third aspect, or any implementation manner of the above third aspect, the frame header of the first Bluetooth data packet further includes first modulation indication information, and the first modulation indication information is used to indicate the modulation manner of the frame body; the method further includes : The second electronic device acquires the first modulation indication information; the second electronic device demodulates the frame body of the first Bluetooth data packet according to the modulation mode indicated by the first modulation indication information.
根据第三方面,或者以上第三方面的任意一种实现方式,第一调制指示信息和第一带宽指示信息承载于第一蓝牙数据包的帧头的物理层指示字段。According to the third aspect, or any implementation manner of the above third aspect, the first modulation indication information and the first bandwidth indication information are carried in the physical layer indication field of the frame header of the first Bluetooth data packet.
根据第三方面,或者以上第三方面的任意一种实现方式,第一蓝牙数据包的帧体包括头部Header字段和数据字段,Header字段包括第一功率指示信息,第一功率指示信息用于指示第二电子设备的发送功率;数据字段包括蓝牙数据。According to the third aspect, or any implementation manner of the above third aspect, the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information is used for Indicates the transmit power of the second electronic device; the data field includes Bluetooth data.
根据第三方面,或者以上第三方面的任意一种实现方式,第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,多个数据字段与多个校验字段一一对应,且每个数据字段包括蓝牙数据。According to the third aspect, or any implementation manner of the above third aspect, the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields are one One correspondence, and each data field includes Bluetooth data.
根据第三方面,或者以上第三方面的任意一种实现方式,方法还包括:第二电子设备基于多个校验字段中的每个校验字段,对对应的数据字段进行校验。According to the third aspect, or any implementation manner of the above third aspect, the method further includes: the second electronic device performs verification on the corresponding data field based on each verification field in the plurality of verification fields.
根据第三方面,或者以上第三方面的任意一种实现方式,方法还包括:当多个数据字段中的至少一个数据字段校验失败,向第一电子设备发送第三蓝牙数据包;第三蓝牙数据包包括帧头和帧体,第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,第三带宽指示信息用于指示第三蓝牙数据包的帧体的第三传输带宽;第一接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包。According to the third aspect, or any implementation manner of the above third aspect, the method further includes: when at least one data field in the plurality of data fields fails to be verified, sending a third Bluetooth data packet to the first electronic device; third The Bluetooth data packet includes a frame header and a frame body, the frame header of the third Bluetooth data packet includes third bandwidth indication information and first reception indication information, and the third bandwidth indication information is used to indicate the third Bluetooth data packet. transmission bandwidth; the first reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet.
根据第三方面,或者以上第三方面的任意一种实现方式,方法还包括:第二电子设备接收第一电子设备发送的第四蓝牙数据包;第四蓝牙数据包的帧体包括多个数据字段 和多个校验字段,多个数据字段包括校验失败的至少一个数据字段;第二电子设备基于第四蓝牙数据包中的至少一个数据字段与多个数据字段中校验成功的其它数据字段进行合并校验;当合并校验成功,获取多个数据字段中的蓝牙数据。According to the third aspect, or any implementation manner of the above third aspect, the method further includes: the second electronic device receives a fourth Bluetooth data packet sent by the first electronic device; the frame body of the fourth Bluetooth data packet includes a plurality of data packets field and a plurality of verification fields, the plurality of data fields include at least one data field whose verification fails; the second electronic device is based on at least one data field in the fourth Bluetooth data packet and other data in the plurality of data fields that have been successfully verified The fields are merged and verified; when the merged verification is successful, the Bluetooth data in multiple data fields is obtained.
根据第三方面,或者以上第三方面的任意一种实现方式,方法还包括:当多个数据字段中的至少一个数据字段校验失败,向第一电子设备发送第五蓝牙数据包;第五蓝牙数据包包括帧头,第五蓝牙数据包的帧头包括第二接收指示信息,第二接收指示信息用于指示第二电子设备未正确接收第一蓝牙数据包,且第五蓝牙数据包不包括帧体。According to the third aspect, or any implementation manner of the above third aspect, the method further includes: when at least one data field in the plurality of data fields fails to be verified, sending a fifth Bluetooth data packet to the first electronic device; the fifth The Bluetooth data packet includes a frame header, and the frame header of the fifth Bluetooth data packet includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not. Including the frame body.
根据第三方面,或者以上第三方面的任意一种实现方式,第二电子设备接收第一电子设备发送的第六蓝牙数据包;第六蓝牙数据包的帧体包括多个数据字段和多个校验字段,多个数据字段包括校验失败的至少一个数据字段;第二电子设备基于第六蓝牙数据包中的至少一个数据字段与多个数据字段中校验成功的其它数据字段进行合并校验;当合并校验成功,获取多个数据字段中的蓝牙数据。According to the third aspect, or any implementation manner of the above third aspect, the second electronic device receives the sixth Bluetooth data packet sent by the first electronic device; the frame body of the sixth Bluetooth data packet includes multiple data fields and multiple The check field, the plurality of data fields include at least one data field that fails to check; the second electronic device performs merging and checking based on at least one data field in the sixth Bluetooth data packet and other data fields that are successfully checked among the plurality of data fields. Check; when the merge check is successful, obtain the Bluetooth data in multiple data fields.
根据第三方面,或者以上第三方面的任意一种实现方式,当多个数据字段校验成功,向第一电子设备发送第七蓝牙数据包;第七蓝牙数据包包括帧头和帧体,第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,第四带宽指示信息用于指示第七蓝牙数据包的帧体的第四传输带宽;第三接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包。According to the third aspect, or any implementation manner of the above third aspect, when the multiple data fields are successfully verified, a seventh Bluetooth data packet is sent to the first electronic device; the seventh Bluetooth data packet includes a frame header and a frame body, The frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, and the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used for Instruct the second electronic device to correctly receive the first Bluetooth data packet.
根据第三方面,或者以上第三方面的任意一种实现方式,当多个数据字段校验成功,向第一电子设备发送第八蓝牙数据包;第八蓝牙数据包包括帧头,第八蓝牙数据包的帧头包括第四接收指示信息,第四接收指示信息用于指示第二电子设备正确接收第一蓝牙数据包,且第八蓝牙数据包不包括帧体。According to the third aspect, or any implementation manner of the above third aspect, when the verification of multiple data fields is successful, an eighth Bluetooth data packet is sent to the first electronic device; the eighth Bluetooth data packet includes a frame header, and the eighth Bluetooth data packet is The frame header of the data packet includes fourth reception indication information, and the fourth reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body.
根据第三方面,或者以上第三方面的任意一种实现方式,第一电子设备与第二电子设备为预设的电子设备。According to the third aspect, or any implementation manner of the above third aspect, the first electronic device and the second electronic device are preset electronic devices.
根据第三方面,或者以上第三方面的任意一种实现方式,第一传输带宽为1MHz、2MHz、4MHz或5MHz。According to the third aspect, or any one implementation manner of the above third aspect, the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz, or 5 MHz.
第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The third aspect and any implementation manner of the third aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the third aspect and any implementation manner of the third aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.
第四方面,本申请实施例提供一种电子设备。该电子设备包括存储器和处理器,存储器与处理器耦合;存储器存储有程序指令,当程序指令由处理器执行时,使得电子设备执行第二方面或第二方面的任意可能的实现方式中的第一电子设备所执行的蓝牙通信 方法。In a fourth aspect, an embodiment of the present application provides an electronic device. The electronic device includes a memory and a processor, and the memory is coupled to the processor; the memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the second aspect or any possible implementation of the second aspect. A Bluetooth communication method performed by an electronic device.
第五方面,本申请实施例提供一种电子设备。该电子设备包括存储器和处理器,存储器与处理器耦合;存储器存储有程序指令,当程序指令由处理器执行时,使得电子设备执行第三方面或第三方面的任意可能的实现方式中的第二电子设备所执行的蓝牙通信方法。In a fifth aspect, an embodiment of the present application provides an electronic device. The electronic device includes a memory and a processor, and the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device enables the electronic device to perform the third aspect or any possible implementation of the third aspect. A Bluetooth communication method performed by two electronic devices.
第六方面,本申请实施例提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。In a sixth aspect, embodiments of the present application provide a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
第七方面,本申请实施例提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第三方面或第三方面的任意可能的实现方式中的方法的指令。In a seventh aspect, embodiments of the present application provide a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the third aspect or the method in any possible implementation manner of the third aspect.
第八方面,本申请实施例提供了一种计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。In an eighth aspect, an embodiment of the present application provides a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
第九方面,本申请实施例提供了一种计算机程序,该计算机程序包括用于执行第三方面或第三方面的任意可能的实现方式中的方法的指令。In a ninth aspect, embodiments of the present application provide a computer program, where the computer program includes instructions for executing the third aspect or the method in any possible implementation manner of the third aspect.
第十方面,本申请实施例提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第二方面或第二方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In a tenth aspect, an embodiment of the present application provides a chip, where the chip includes a processing circuit and transceiver pins. Wherein, the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the second aspect or any possible implementation manner of the second aspect to control the receiving pin to receive a signal to Control the send pin to send the signal.
第十一方面,本申请实施例提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第三方面或第三方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In an eleventh aspect, an embodiment of the present application provides a chip, where the chip includes a processing circuit and a transceiver pin. Wherein, the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the third aspect or any possible implementation manner of the third aspect to control the receiving pin to receive signals, so as to Control the send pin to send the signal.
附图说明Description of drawings
图1为示例性示出的电子设备的硬件结构示意图;FIG. 1 is a schematic diagram of the hardware structure of an exemplary electronic device;
图2为示例性示出的电子设备的软件结构示意图;FIG. 2 is a schematic diagram of the software structure of an exemplary electronic device;
图3为示例性示出的应用场景示意图;3 is a schematic diagram of an exemplary application scenario;
图4a~图4c为示例性示出的用户界面示意图;4a-4c are schematic diagrams of user interfaces shown in an exemplary manner;
图5为示例性示出的手机与无线耳机之间的交互示意图;FIG. 5 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset;
图6a为示例性示出的蓝牙数据包的格式示意图;Figure 6a is a schematic diagram of the format of an exemplary Bluetooth data packet;
图6b为示例性示出的蓝牙数据包的格式示意图;6b is a schematic diagram of the format of an exemplary Bluetooth data packet;
图7为示例性示出的用户界面示意图;FIG. 7 is a schematic diagram of an exemplary user interface;
图8为示例性示出的带宽更新的流程示意图;8 is a schematic flowchart of an exemplary bandwidth update;
图9a~图9b为示例性示出的蓝牙数据包的格式示意图;9a-9b are schematic diagrams of formats of Bluetooth data packets exemplarily shown;
图10为示例性示出的蓝牙数据包的格式示意图;10 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图11a~图11b为示例性示出的蓝牙数据包的格式示意图;11a-11b are schematic diagrams of formats of Bluetooth data packets exemplarily shown;
图12为示例性示出的NESN字段和SN字段的指示示意图;FIG. 12 is a schematic diagram of the indication of the NESN field and the SN field shown by way of example;
图13为示例性示出的应用场景示意图;13 is a schematic diagram of an exemplary application scenario;
图14a~图14b为示例性示出的蓝牙数据包的格式示意图;14a-14b are schematic diagrams of formats of Bluetooth data packets exemplarily shown;
图15为示例性示出的数据传输方式示意图;15 is a schematic diagram of an exemplary data transmission mode;
图16为示例性示出的手机与无线耳机之间的交互示意图;16 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset;
图17为示例性示出的蓝牙数据包的格式示意图;FIG. 17 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图18为示例性示出的蓝牙数据包的格式示意图;FIG. 18 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图19为示例性示出的蓝牙数据包的格式示意图;FIG. 19 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图20a为示例性示出的手机与无线耳机之间的交互示意图;FIG. 20a is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset;
图20b为示例性示出的手机与无线耳机的数据重传流程示意图;FIG. 20b is a schematic diagram of a data retransmission process between a mobile phone and a wireless headset exemplarily shown;
图21为示例性示出的蓝牙数据包的格式示意图;21 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图22为示例性示出的蓝牙数据包的格式示意图;22 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图23为示例性示出的蓝牙数据包的格式示意图;23 is a schematic diagram of the format of an exemplary Bluetooth data packet;
图24为示例性示出的装置的结构示意图。FIG. 24 is a schematic structural diagram of an exemplarily shown device.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases.
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiments or designs described in the embodiments of the present application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of the present application, unless otherwise specified, the meaning of "plurality" refers to two or more. For example, multiple processing units refers to two or more processing units; multiple systems refers to two or more systems.
图1示出了电子设备100的结构示意图。应该理解的是,图1所示电子设备100仅 是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图1中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。FIG. 1 shows a schematic structural diagram of an electronic device 100 . It should be understood that the electronic device 100 shown in FIG. 1 is only an example of an electronic device, and the electronic device 100 may have more or less components than those shown in the figure, and two or more components may be combined , or can have a different component configuration. The various components shown in FIG. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2. Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以 采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个 器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他 数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架 构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
图2是本申请实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
电子设备100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture of the electronic device 100 divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层 的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,Wi-Fi驱动等。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, Wi-Fi driver, etc.
可以理解的是,图2示出的系统框架层、系统库与运行时层包含的部件,并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。It can be understood that the components included in the system framework layer, system library and runtime layer shown in FIG. 2 do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
图3为示例性示出的应用场景示意图。如图3所示,该应用场景包括手机和无线耳机。示例性的,手机与无线耳机通过蓝牙连接进行数据交互。需要说明的是,本申请实施例仅以手机和无线耳机之间的数据交互为例进行说明。本申请实施例中的蓝牙通信方法还可以应用于其它电子设备之间的通信场景。例如,本申请实施例中的蓝牙通信方法还可以应用于手机、平板、可穿戴设备、笔记本、蓝牙音箱、电视等具有蓝牙功能的电子设备之间的通信。图3中所示的设备类型和数量仅为示意性举例,本申请不做限定。FIG. 3 is a schematic diagram of an exemplary application scenario. As shown in Figure 3, the application scenarios include mobile phones and wireless headsets. Exemplarily, the mobile phone and the wireless headset perform data interaction through a Bluetooth connection. It should be noted that, the embodiments of the present application only take the data interaction between the mobile phone and the wireless headset as an example for description. The Bluetooth communication method in the embodiments of the present application can also be applied to communication scenarios between other electronic devices. For example, the Bluetooth communication method in the embodiments of the present application may also be applied to communication between electronic devices with Bluetooth functions, such as mobile phones, tablets, wearable devices, notebooks, Bluetooth speakers, and TVs. The types and numbers of devices shown in FIG. 3 are only illustrative examples, and are not limited in this application.
结合图3,图4a~4c为示例性示出的手机与无线耳机建立蓝牙连接时的用户界面示意图。如图4a所示,示例性的,手机的显示界面显示主页面402。主页面402上包括一个或多个控件。控件包括但不限于:应用控件、网络控件、蓝牙控件404、电池电量显示控件等。其中,蓝牙控件404用于指示手机的蓝牙功能已开启。可选地,用户可通过下拉菜单栏启动手机的蓝牙功能,也可以通过设置应用启动蓝牙功能,本申请不做限定。Referring to FIG. 3 , FIGS. 4 a to 4 c are schematic diagrams of user interfaces when a mobile phone and a wireless headset establish a Bluetooth connection. As shown in FIG. 4a, exemplarily, the display interface of the mobile phone displays a home page 402. Home page 402 includes one or more controls. Controls include, but are not limited to, application controls, network controls, Bluetooth controls 404, battery level display controls, and the like. The Bluetooth control 404 is used to indicate that the Bluetooth function of the mobile phone has been turned on. Optionally, the user can activate the Bluetooth function of the mobile phone through the pull-down menu bar, or activate the Bluetooth function through the setting application, which is not limited in this application.
请继续参照图4a,示例性的,在本申请实施例中,以无线耳机与手机进行初次配对为例进行说明。需要说明的是,初次配对可选地为无线耳机与手机未曾配过对(即未曾建立过蓝牙连接),或者,无线耳机和/或手机重置后需要重新配对的过程(即曾经建立过蓝牙连接)。也可以理解为,手机与无线耳机中的任一端未存储有建立蓝牙连接所需的指纹信息。可选地,指纹信息可以包括但不限于蓝牙地址信息、设备标识信息等。示例性的,在初始配对过程中,手机显示提示框410。可选地,提示框410包括提示信息、取消选项408和连接选项410。示例性的,提示信息包括但不限于当前待连接的电子设备的标识信息。例如,标识信息可以包括但不限于电子设备(即无线耳机)的设备名称、设备型号、设备图标等。示例性的,取消选项408用于指示取消与该电子设备的蓝牙连接。示例性的,连接选项410用于指示允许与电子设备进行蓝牙连接。Please continue to refer to FIG. 4a , exemplarily, in the embodiment of the present application, the first pairing of a wireless headset and a mobile phone is used as an example for description. It should be noted that the initial pairing can optionally be that the wireless headset and the mobile phone have never been paired (that is, the Bluetooth connection has not been established), or, the wireless headset and/or the mobile phone needs to be re-paired after being reset (that is, the Bluetooth connection has been established once. connect). It can also be understood that the fingerprint information required for establishing a Bluetooth connection is not stored at either end of the mobile phone and the wireless headset. Optionally, the fingerprint information may include, but is not limited to, Bluetooth address information, device identification information, and the like. Exemplarily, during the initial pairing process, the mobile phone displays a prompt box 410 . Optionally, prompt box 410 includes prompt information, cancel option 408 and connect option 410 . Exemplarily, the prompt information includes, but is not limited to, identification information of the electronic device currently to be connected. For example, the identification information may include, but is not limited to, the device name, device model, device icon, etc. of the electronic device (ie, the wireless headset). Exemplarily, the cancel option 408 is used to instruct to cancel the Bluetooth connection with the electronic device. Exemplarily, the connection option 410 is used to indicate that a Bluetooth connection with the electronic device is allowed.
示例性的,用户点击连接选项410。如图4b所示,手机响应于接收到的用户操作,手机与无线耳机建立蓝牙连接。在蓝牙连接建立成功后,手机显示提示框412。可选地,提示框412包括提示信息,该提示信息用于指示已连接至无线耳机。Illustratively, the user clicks on the connect option 410 . As shown in Figure 4b, in response to the received user operation, the mobile phone establishes a Bluetooth connection with the wireless headset. After the Bluetooth connection is successfully established, the mobile phone displays a prompt box 412 . Optionally, the prompt box 412 includes prompt information for indicating that the wireless headset has been connected.
手机与无线耳机建立蓝牙连接后,手机可与无线耳机通过蓝牙连接进行数据交互。本申请实施例中以音乐场景为例。示例性的,如图4c所示,手机响应于用户的操作,显 示音乐应用界面414。可选地,音乐应用界面414包括歌曲标题、歌曲海报等。示例性的,手机可以响应于用户的操作,显示音质调节选项框416。可选地,音质条件选项框416包括一个或多个控件,控件包括但不限于:标准品质控件、高品质控件、无损品质控件。需要说明的是,本申请实施例所述的不同的品质(也可以称为音质)可以理解为编码后的音频文件的数据量不同。其中,品质越高,数据量越大,其传输时所需的传输带宽也就越大。可选地,按照所需带宽从小到大顺序,分别为:标准品质、高品质、无损品质。After the mobile phone and the wireless headset establish a Bluetooth connection, the mobile phone and the wireless headset can perform data interaction through the Bluetooth connection. In the embodiments of the present application, a music scene is used as an example. Exemplarily, as shown in Figure 4c, the mobile phone displays a music application interface 414 in response to the user's operation. Optionally, the music application interface 414 includes song titles, song posters, and the like. Exemplarily, the mobile phone may display a sound quality adjustment option box 416 in response to the user's operation. Optionally, the sound quality condition option box 416 includes one or more controls, and the controls include, but are not limited to, standard quality controls, high quality controls, and lossless quality controls. It should be noted that the different qualities (which may also be referred to as sound quality) described in the embodiments of the present application may be understood as different data amounts of the encoded audio files. Among them, the higher the quality, the larger the amount of data, and the larger the transmission bandwidth required for its transmission. Optionally, in descending order of the required bandwidth, they are: standard quality, high quality, and lossless quality.
示例性的,以用户点击标准品质控件为例。相应的,手机响应于用户的操作,生成对应的蓝牙数据包(也可以称为数据帧、音频帧、蓝牙信息等),并将生成的蓝牙数据包通过与无线耳机之间的蓝牙连接发送至无线耳机。Illustratively, take the user clicking on a standard quality control as an example. Correspondingly, in response to the user's operation, the mobile phone generates corresponding Bluetooth data packets (also called data frames, audio frames, Bluetooth information, etc.), and sends the generated Bluetooth data packets to the wireless headset through the Bluetooth connection. Wireless Headphones.
图5为示例性示出的手机与无线耳机之间的交互示意图。如图5所示,具体包括:FIG. 5 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 5, it includes:
S101,无线耳机向手机发送Discovery Request(探测请求)消息。S101, the wireless headset sends a Discovery Request message to the mobile phone.
示例性的,无线耳机开始配对后,其通过蓝牙接口,以广播的方式发送Discovery Request消息。Exemplarily, after the wireless headset starts pairing, it sends a Discovery Request message in a broadcast manner through the Bluetooth interface.
可选地,Discovery Request消息中包括但不限于:无线耳机的标识信息、无线耳机的蓝牙地址等信息。示例性的,无线耳机的标识信息可以为无线耳机的设备名称等,本申请不做限定。Optionally, the Discovery Request message includes, but is not limited to, the identification information of the wireless headset, the Bluetooth address of the wireless headset, and other information. Exemplarily, the identification information of the wireless headset may be the device name of the wireless headset, etc., which is not limited in this application.
S102,手机向无线耳机发送Discovery Response(探测响应)消息。S102, the mobile phone sends a Discovery Response (detection response) message to the wireless headset.
示例性的,手机接收到无线耳机发送的Discovery Request消息后,手机的界面如图4a所示。Exemplarily, after the mobile phone receives the Discovery Request message sent by the wireless headset, the interface of the mobile phone is shown in Figure 4a.
示例性的,如图4a所示,手机接收到用户点击连接选项410的操作,手机向无线耳机发送Discovery Response消息,用于指示与无线耳机建立蓝牙连接。示例性的,Discovery Response包括但不限于:手机的标识信息、手机的蓝牙地址等信息。Exemplarily, as shown in FIG. 4a, the mobile phone receives the operation of the user clicking the connection option 410, and the mobile phone sends a Discovery Response message to the wireless headset, which is used to instruct to establish a Bluetooth connection with the wireless headset. Exemplarily, the Discovery Response includes, but is not limited to, the identification information of the mobile phone, the Bluetooth address of the mobile phone, and other information.
S103,无线耳机与手机建立蓝牙连接。S103, the wireless headset establishes a Bluetooth connection with the mobile phone.
示例性的,无线耳机与手机通过多次蓝牙信令的交互,传输建立蓝牙连接所需的信息。例如,可在S103的多次交互中,协商蓝牙加密密钥,该加密密钥可用于在数据传输过程中,对蓝牙数据进行加密。具体交互过程和内容和参照蓝牙协议中的描述,本申请不再赘述。Exemplarily, the wireless headset and the mobile phone transmit information required for establishing a Bluetooth connection through multiple Bluetooth signaling interactions. For example, a Bluetooth encryption key may be negotiated in multiple interactions of S103, and the encryption key may be used to encrypt Bluetooth data during data transmission. The specific interaction process and content refer to the description in the Bluetooth protocol, which will not be repeated in this application.
S104,无线耳机与手机进行数据传输。S104, the wireless earphone and the mobile phone perform data transmission.
示例性的,无线耳机与手机可基于已建立的蓝牙连接进行数据交互。例如,手机可向无线耳机发送蓝牙数据包,其中,蓝牙数据包中包括音频数据。Exemplarily, the wireless headset and the mobile phone can perform data interaction based on the established Bluetooth connection. For example, the mobile phone may send a Bluetooth data packet to the wireless headset, wherein the Bluetooth data packet includes audio data.
需要说明的是,本申请实施例中所述的手机与无线耳机之间建立蓝牙连接,可选地为以S101为蓝牙连接过程的起始时刻,以S103作为蓝牙连接建立完成时刻。在其他实施例中,手机与无线耳机之间建立蓝牙连接也可以以S102、或S103作为起始时刻,本申请不做限定。It should be noted that, for establishing a Bluetooth connection between the mobile phone and the wireless headset described in the embodiments of the present application, optionally, S101 is used as the start time of the Bluetooth connection process, and S103 is used as the completion time of the Bluetooth connection establishment. In other embodiments, the establishment of the Bluetooth connection between the mobile phone and the wireless headset may also take S102 or S103 as the starting time, which is not limited in this application.
可选地,手机与无线耳机之间的蓝牙连接可以是通过BLE(Bluetooth Low Energy,低功耗蓝牙)协议维持的。可选地,手机与无线耳机之间的蓝牙连接可以是通过经典蓝牙协议,包括BR(basic rate,基础速率)和EDR(enhanced date rate,扩展数据速率) 维持的。需要说明的是,BLE协议维持的蓝牙连接,其支持1Mbps、2Mbps、500Kbps和125Kbps的传输速率,支持的带宽为1MHz或2MHz。BR/EDR协议维持的蓝牙连接,其最高支持3Mbps的传输速率,支持的带宽为1MHz。Optionally, the Bluetooth connection between the mobile phone and the wireless headset may be maintained through a BLE (Bluetooth Low Energy, Bluetooth Low Energy) protocol. Optionally, the Bluetooth connection between the mobile phone and the wireless headset may be maintained through classic Bluetooth protocols, including BR (basic rate, basic rate) and EDR (enhanced date rate, extended data rate). It should be noted that the Bluetooth connection maintained by the BLE protocol supports transmission rates of 1Mbps, 2Mbps, 500Kbps and 125Kbps, and the supported bandwidth is 1MHz or 2MHz. The Bluetooth connection maintained by the BR/EDR protocol supports a maximum transmission rate of 3Mbps and a supported bandwidth of 1MHz.
图6a为示例性示出的BLE协议中的蓝牙数据包的格式示意图。如图6a所示,蓝牙数据包包括但不限于:Preamble(前导)字段、Access Code(接入码)字段、PDU(Protocol Data Unit,协议数据单元)字段、CRC(Cyclic Redundancy Check,循环冗余校验)字段和CTE(Constant Tone Extension,单音扩展)字段。示例性的,PDU字段包括但不限于:Header(头部)字段、Payload(负载)字段等。示例性的,以手机向无线耳机发送的蓝牙数据包为例,PDU字段用于承载手机向无线耳机发送的数据。Header字段可用于承载控制信息。FIG. 6a is a schematic diagram of the format of a Bluetooth data packet in an exemplary BLE protocol. As shown in Figure 6a, the Bluetooth data packet includes but is not limited to: Preamble (preamble) field, Access Code (Access Code) field, PDU (Protocol Data Unit, Protocol Data Unit) field, CRC (Cyclic Redundancy Check, Cyclic Redundancy Check) Check) field and CTE (Constant Tone Extension, monophonic extension) field. Exemplarily, the PDU fields include, but are not limited to: a Header (header) field, a Payload (load) field, and the like. Exemplarily, taking the Bluetooth data packet sent by the mobile phone to the wireless headset as an example, the PDU field is used to carry the data sent by the mobile phone to the wireless headset. The Header field can be used to carry control information.
图6b为示例性示出的BR协议中的蓝牙数据包的格式示意图。如图6b所示,蓝牙数据包包括但不限于:Access Code字段、Header字段、Payload HDR字段、User Payload(用户负载)字段、MIC字段和CRC字段。示例性的,仍以手机向无线耳机发送的蓝牙数据包为例,Header字段用于承载控制信息,User Payload字段用于承载手机向无线耳机发送的数据。FIG. 6b is an exemplary schematic diagram of the format of a Bluetooth data packet in the BR protocol. As shown in Fig. 6b, the Bluetooth data packet includes but is not limited to: Access Code field, Header field, Payload HDR field, User Payload (user payload) field, MIC field and CRC field. Exemplarily, still taking the Bluetooth data packet sent by the mobile phone to the wireless headset as an example, the Header field is used to carry the control information, and the User Payload field is used to carry the data sent by the mobile phone to the wireless headset.
示例性的,手机与无线耳机可基于两者之间的蓝牙连接传输具有指定格式,例如BLE蓝牙数据包、BR蓝牙数据包或EDR蓝牙数据包。举例说明,手机与无线耳机之间的蓝牙连接为BLE蓝牙连接,即基于BLE协议维护的蓝牙连接,并且,当前传输带宽为1MHz。需要说明的是,初始传输带宽可以为1MHz,也可以为2MHz,本申请不做限定。如图7所示,在手机与无线耳机通过蓝牙连接进行数据交互的过程中,用户点击音质调节选项框416中的无损品质控件。相应的,手机响应于接收到的用户操作,其将生成对应于无损品质的音频帧,以及包含该音频帧的蓝牙数据包。如上文所述,不同的品质对应的编码后的数据量是不同的。以图7中为例,在音乐播放时长相同的情况下,标准品质对应的音频文件大小,即数据量大小为3.9MB,高品质对应的音频文件大小为9.8MB,无损品质对应的音频文件大小为30.2MB。举例说明,若音乐播放时长为1分钟,则无损品质要求在1分钟内,手机向无线耳机传输30.2MB大小的音频文件。为满足传输速率需求,手机可通过将当前的1MHz带宽,切换为BLE连接所支持的最大带宽,即2M带宽,以提高数据传输对带宽和速率的需求。图8为示例性示出的带宽更新的流程示意图。如图8所示,具体包括:Exemplarily, the mobile phone and the wireless headset may transmit a specified format based on the Bluetooth connection between the two, such as a BLE Bluetooth data packet, a BR Bluetooth data packet or an EDR Bluetooth data packet. For example, the Bluetooth connection between the mobile phone and the wireless headset is a BLE Bluetooth connection, that is, a Bluetooth connection maintained based on the BLE protocol, and the current transmission bandwidth is 1 MHz. It should be noted that the initial transmission bandwidth may be 1 MHz or 2 MHz, which is not limited in this application. As shown in FIG. 7 , in the process of data interaction between the mobile phone and the wireless headset through the Bluetooth connection, the user clicks the lossless quality control in the sound quality adjustment option box 416 . Correspondingly, in response to the received user operation, the mobile phone will generate an audio frame corresponding to the lossless quality, and a Bluetooth data packet containing the audio frame. As mentioned above, the amount of encoded data corresponding to different qualities is different. Taking Figure 7 as an example, when the music playback duration is the same, the audio file size corresponding to standard quality, that is, the data volume, is 3.9MB, the audio file size corresponding to high quality is 9.8MB, and the audio file size corresponding to lossless quality. is 30.2MB. For example, if the music playback time is 1 minute, the lossless quality requires that within 1 minute, the mobile phone transmits a 30.2MB audio file to the wireless headset. In order to meet the transmission rate requirements, the mobile phone can switch the current 1MHz bandwidth to the maximum bandwidth supported by the BLE connection, that is, 2M bandwidth, so as to increase the bandwidth and rate requirements for data transmission. FIG. 8 is a schematic flowchart of an exemplary bandwidth update. As shown in Figure 8, it specifically includes:
S201,手机向无线耳机发送带宽更新请求消息。S201, the mobile phone sends a bandwidth update request message to the wireless headset.
示例性的,手机响应于接收到的用户操作,向无线耳机发送带宽更新请求消息,以指示将当前的带宽(例如1MHz),更新为2MHz。Exemplarily, in response to the received user operation, the mobile phone sends a bandwidth update request message to the wireless headset to instruct to update the current bandwidth (for example, 1 MHz) to 2 MHz.
示例性的,图9a为示例性示出的蓝牙数据包的格式示意图。如图9a所示,手机发送的带宽更新请求消息中的PDU字段中的Header字段包括信令指示信息,用于指示该消息为控制消息。Payload字段中包括带宽切换指示信息。示例性的,该带宽切换指示信息用于指示切换带宽。举例说明,若当前手机与无线耳机之间的传输带宽为1MHz,则无线耳机可基于该带宽切换指示信息,确定将当前的1MHz带宽切换为2MHz。若当前 手机的与无线耳机之间的传输带宽为2MHz,则无线耳机可基于该带宽切换指示信息,确定将当前的2MHz带宽切换为1MHz带宽。在该实施例中,以当前手机与无线耳机的传输带宽为1MHz,切换后的带宽为2MHz为例进行说明。Exemplarily, FIG. 9a is a schematic diagram of the format of an exemplary Bluetooth data packet. As shown in Fig. 9a, the Header field in the PDU field in the bandwidth update request message sent by the mobile phone includes signaling indication information, which is used to indicate that the message is a control message. The Payload field includes bandwidth switching indication information. Exemplarily, the bandwidth switching indication information is used to indicate switching bandwidth. For example, if the current transmission bandwidth between the mobile phone and the wireless headset is 1 MHz, the wireless headset can determine to switch the current 1 MHz bandwidth to 2 MHz based on the bandwidth switching indication information. If the current transmission bandwidth between the mobile phone and the wireless headset is 2MHz, the wireless headset can determine to switch the current 2MHz bandwidth to a 1MHz bandwidth based on the bandwidth switching indication information. In this embodiment, the current transmission bandwidth of the mobile phone and the wireless headset is 1 MHz, and the bandwidth after switching is 2 MHz as an example for description.
S202,无线耳机向手机发送带宽更新响应消息。S202, the wireless headset sends a bandwidth update response message to the mobile phone.
示例性的,无线耳机接收到手机发送的带宽更新请求消息后,向手机发送带宽更新响应消息,用于指示无线耳机可基于无线耳机指示的带宽进行更新。Exemplarily, after receiving the bandwidth update request message sent by the mobile phone, the wireless headset sends a bandwidth update response message to the mobile phone to indicate that the wireless headset can be updated based on the bandwidth indicated by the wireless headset.
S203,手机向无线耳机发送带宽更新确认消息。S203, the mobile phone sends a bandwidth update confirmation message to the wireless headset.
示例性的,手机接收到无线耳机发送的带宽更新响应消息后,可向无线耳机发送带宽更新确认消息,用于指示切换带宽的具体时刻。以使得无线耳机可在指定的时刻在指定的带宽上接收手机发送的蓝牙数据包。Exemplarily, after receiving the bandwidth update response message sent by the wireless headset, the mobile phone may send a bandwidth update confirmation message to the wireless headset, which is used to indicate the specific moment for switching the bandwidth. So that the wireless headset can receive the Bluetooth data packets sent by the mobile phone on the specified bandwidth at the specified time.
S204,无线耳机更新带宽配置。S204, the wireless headset updates the bandwidth configuration.
示例性的,无线耳机更新带宽配置,以在指定的时刻在指定的带宽(例如2MHz带宽)上接收手机发送的蓝牙数据包。Exemplarily, the wireless headset updates the bandwidth configuration to receive the Bluetooth data packets sent by the mobile phone on a specified bandwidth (for example, a 2MHz bandwidth) at a specified moment.
如上文所述,目前的蓝牙协议支持的最大带宽为2MHz。本申请实施例中以无损品质对应的文件大小为30MB,且音乐播放时长为1分钟为例进行说明,也就是说,目前的2MHz带宽可足够支持上述无损品质音频的传输。但是,若同样是音乐播放时长为1分钟,无损品质的音频文件更大,例如为100MB(即所需的带宽大于2MHz),或者,在其他大数量传输的场景中,则已有的BLE协议与BR协议的带宽均无法支持数据传输需求。例如,在音频场景下,由于手机与无线耳机之间的带宽限制,可能导致无法通过无线耳机播放对带宽需求较大的无损品质音乐。As mentioned above, the current Bluetooth protocol supports a maximum bandwidth of 2MHz. In the embodiment of the present application, the file size corresponding to the lossless quality is 30MB, and the music playing time is 1 minute for illustration, that is to say, the current 2MHz bandwidth is sufficient to support the above-mentioned transmission of the lossless quality audio. However, if the same music playback time is 1 minute, the lossless quality audio file is larger, for example, 100MB (that is, the required bandwidth is greater than 2MHz), or, in other large-scale transmission scenarios, the existing BLE protocol Neither the bandwidth with the BR protocol can support the data transmission requirements. For example, in an audio scenario, due to the bandwidth limitation between the mobile phone and the wireless headset, it may be impossible to play lossless-quality music that requires a large bandwidth through the wireless headset.
需要说明的是,图8中所示的手机与无线耳机的上层信令交互的流程图。在手机与无线耳机的物理层交互过程中,以无线耳机为例,无线耳机每接收到手机发送的消息(或信令)后,对消息进行相应处理,例如解封装、校验等处理,并在指定的带宽(即更新后的带宽,例如2MHz)上,向手机回复ACK(Acknowledgement,确认)信息或NACK(Negative Acknowledgement,否定)信息,以指示无线耳机是否正确接收到消息。It should be noted that the flow chart of the upper-layer signaling interaction between the mobile phone and the wireless headset shown in FIG. 8 is shown. In the process of physical layer interaction between the mobile phone and the wireless headset, taking the wireless headset as an example, each time the wireless headset receives a message (or signaling) sent by the mobile phone, it processes the message accordingly, such as decapsulation, verification, etc. On the specified bandwidth (that is, the updated bandwidth, for example, 2MHz), reply ACK (Acknowledgement, confirmation) information or NACK (Negative Acknowledgement, negative) information to the mobile phone to indicate whether the wireless headset correctly receives the message.
举例说明,以无线耳机向手机发送ACK信息为例。图9b为示例性示出的蓝牙数据包的格式示意图。如图9b所示,蓝牙数据包的PDU字段中的Header字段中携带ACK信息。相应的,手机接收该数据包,并对数据包进行译码、解密、解封装等处理后,获取到PDU字段中的Header字段携带的ACK信息,以确定无线耳机成功接收到上一次发送的蓝牙数据包。手机可继续发送下一个蓝牙数据包。NACK信息的发送类似,手机可响应于接收到的NACK信息,重新发送上一次发送的蓝牙数据包。For example, take the wireless headset sending ACK information to the mobile phone as an example. FIG. 9b is a schematic diagram of the format of an exemplary Bluetooth data packet. As shown in Figure 9b, the Header field in the PDU field of the Bluetooth data packet carries ACK information. Correspondingly, the mobile phone receives the data packet, decodes, decrypts, and decapsulates the data packet, and then obtains the ACK information carried in the Header field in the PDU field to determine that the wireless headset successfully received the last bluetooth sent. data pack. The phone can continue to send the next Bluetooth data packet. Similar to the sending of NACK information, the mobile phone can resend the last sent Bluetooth data packet in response to the received NACK information.
需要说明的是,本申请实施例仅以带宽切换为例进行说明,在已有蓝牙协议中,功率切换的方式与带宽切换方式类似,均是采用单独指示,即单独发送指示切换功率的信令,并多次交互的方式完成带宽或功率的切换。It should be noted that the embodiments of the present application only take bandwidth switching as an example for description. In the existing Bluetooth protocol, the power switching method is similar to the bandwidth switching method, and both use separate instructions, that is, separate signaling indicating switching power is sent. , and complete the switching of bandwidth or power in multiple interactive ways.
本申请实施例提供一种蓝牙通信方法。在该方法中,通信双方采用具有设定的格式的蓝牙数据包,可实现大带宽场景下的数据传输,并且有效提高带宽和/或功率的切换效率,以及提升资源利用率。The embodiments of the present application provide a Bluetooth communication method. In this method, both communicating parties use Bluetooth data packets with a set format, which can realize data transmission in a large bandwidth scenario, effectively improve bandwidth and/or power switching efficiency, and improve resource utilization.
下面以几个具体实施例,对本申请实施例的蓝牙通信方法进行详细说明。The Bluetooth communication method according to the embodiment of the present application will be described in detail below with several specific embodiments.
场景一scene one
具体的,手机与无线耳机建立蓝牙连接。蓝牙连接的具体建立过程可参照图5的相关描述,此处不再赘述。示例性的,在蓝牙连接的建立过程中,手机与无线耳机交互各自的能力信息,以指示是否为预设的设备。其中,预设的设备可选地为支持本申请实施例中的蓝牙协议的设备。也可以理解为,通信双方确定对端是否可以生成并发送具有设定的格式的蓝牙数据包,和/或,正确接收并解析具有设定的格式的蓝牙数据包。Specifically, a Bluetooth connection is established between the mobile phone and the wireless headset. For the specific establishment process of the Bluetooth connection, reference may be made to the related description in FIG. 5 , and details are not repeated here. Exemplarily, in the process of establishing a Bluetooth connection, the mobile phone and the wireless headset exchange respective capability information to indicate whether it is a preset device. The preset device is optionally a device that supports the Bluetooth protocol in this embodiment of the present application. It can also be understood that both parties in the communication determine whether the opposite end can generate and send a Bluetooth data packet with a set format, and/or correctly receive and parse a Bluetooth data packet with a set format.
可选地,手机与无线耳机进行蓝牙通信的任一消息中可包括能力信息。例如,手机与无线耳机可以在探测阶段发送各自的能力信息。可选地,能力信息携带于Discovery Request消息或Discovery Response消息中。Optionally, any message for Bluetooth communication between the mobile phone and the wireless headset may include capability information. For example, a mobile phone and a wireless headset can send their respective capability information during the detection phase. Optionally, the capability information is carried in the Discovery Request message or the Discovery Response message.
可选地,能力信息也可以携带在S103的多次消息交互时的任一消息中,本申请不做限定。Optionally, the capability information may also be carried in any message during multiple message exchanges in S103, which is not limited in this application.
示例性的,若手机与无线耳机断开蓝牙连接后,手机与无线耳机再次进行蓝牙连接。一个示例中,若手机和无线耳机存储有上一次蓝牙连接时的指纹信息(概念可见上文),并且,手机存储的指纹信息包括指示无线耳机为预设的设备的信息,且无线耳机存储的指纹信息包括指示手机为预设的设备的信息。示例性的,手机与无线耳机在建立蓝牙连接的信令交互过程中,各信令可基于本申请实施例中所述的具有设定的格式的蓝牙数据包进行交互。并且,在蓝牙连接完成后,基于本申请实施例中所述的具有设定的格式的蓝牙数据包进行交互。示例性的,手机与无线耳机在建立蓝牙连接的信令交互中,也可以基于已有蓝牙协议中的蓝牙数据包格式进行交互。可选地,连接建立过程中可以无需再传输电子设备是否为预设的设备的信息。并在蓝牙连接完成后,基于本申请实施例中所述的具有设定的格式的蓝牙数据包进行交互。Exemplarily, if the Bluetooth connection between the mobile phone and the wireless headset is disconnected, the Bluetooth connection between the mobile phone and the wireless headset is performed again. In an example, if the mobile phone and the wireless headset store the fingerprint information of the last Bluetooth connection (the concept can be seen above), and the fingerprint information stored in the mobile phone includes information indicating that the wireless headset is a preset device, and the The fingerprint information includes information indicating that the mobile phone is a preset device. Exemplarily, in the signaling interaction process of establishing a Bluetooth connection between the mobile phone and the wireless headset, each signaling may be exchanged based on the Bluetooth data packets in the preset format described in the embodiments of the present application. Moreover, after the Bluetooth connection is completed, the interaction is performed based on the Bluetooth data packets with the set format described in the embodiments of the present application. Exemplarily, in the signaling interaction of establishing the Bluetooth connection between the mobile phone and the wireless headset, the interaction may also be based on the Bluetooth data packet format in the existing Bluetooth protocol. Optionally, during the connection establishment process, there may be no need to transmit information on whether the electronic device is a preset device. And after the bluetooth connection is completed, the interaction is performed based on the bluetooth data packets with the set format described in the embodiments of the present application.
图10为示例性示出的蓝牙数据包的结构示意图。如图10所示,以无线耳机为例,示例性的,无线耳机广播Discovery Request消息。该消息的PDU字段中携带是否为预设的设备的信息。在本申请实施例中,以无线耳机和手机均为预设的设备为例进行说明。在其他实施例中,若无线耳机和手机中的任一设备为非预设的设备,即无线耳机和手机中的任一设备不支持本申请实施例中的蓝牙协议,则手机和无线耳机仍按照已有的蓝牙协议进行蓝牙通信。FIG. 10 is a schematic structural diagram of an exemplary Bluetooth data packet. As shown in FIG. 10 , taking a wireless headset as an example, the wireless headset broadcasts a Discovery Request message exemplarily. The PDU field of the message carries information about whether it is a preset device. In the embodiment of the present application, the wireless earphone and the mobile phone are both preset devices as an example for description. In other embodiments, if any device in the wireless headset and the mobile phone is a non-preset device, that is, any device in the wireless headset and the mobile phone does not support the Bluetooth protocol in the embodiment of the present application, the mobile phone and the wireless headset are still Bluetooth communication is performed according to the existing Bluetooth protocol.
示例性的,手机接收到无线耳机发送的Discovery Request消息后,可确定无线耳机为预设的设备。相应的,手机向无线耳机发送的Discovery Response消息中,携带用于指示手机为预设的设备的信息。无线耳机可根据接收到的Discovery Response,确定手机为预设的设备。在蓝牙连接建立成功后,无线耳机与手机则可基于本申请实施例中提出的蓝牙协议进行数据交互。Exemplarily, after receiving the Discovery Request message sent by the wireless headset, the mobile phone may determine that the wireless headset is a preset device. Correspondingly, the Discovery Response message sent by the mobile phone to the wireless headset carries information used to indicate that the mobile phone is a preset device. The wireless headset can determine that the mobile phone is the default device according to the received Discovery Response. After the Bluetooth connection is successfully established, the wireless headset and the mobile phone can perform data interaction based on the Bluetooth protocol proposed in the embodiments of the present application.
图11a和11b为示例性示出的蓝牙数据包的格式示意图。如图11a所示,蓝牙数据包的格式包括但不限于:Preamble字段、AccessCode字段、PHY_IND(physical identify,物理层指示)字段、HEC(Header Error Check,帧头差错校验)字段、Guard(保护间隔)、sync(同步)字段、Header字段、至少一个payload字段、至少一个CRC字段。可选地,蓝牙数据包还可以包括Tailer(尾部)字段。Figures 11a and 11b are schematic diagrams of formats of Bluetooth data packets exemplarily shown. As shown in Figure 11a, the format of the Bluetooth data packet includes but is not limited to: Preamble field, AccessCode field, PHY_IND (physical identify, physical layer indication) field, HEC (Header Error Check, frame header error check) field, Guard (protection) field interval), sync (synchronization) field, Header field, at least one payload field, at least one CRC field. Optionally, the Bluetooth data packet may also include a Tailer field.
示例性的,Preamble字段、AccessCode字段、PHY_IND字段、HEC字段、Guard 字段可选地称为控制字段(或帧头)。至少一个payload字段、至少一个CRC字段以及Tailer字段可选地称为数据字段(或帧体)。Exemplarily, the Preamble field, the AccessCode field, the PHY_IND field, the HEC field, and the Guard field are optionally referred to as control fields (or frame headers). The at least one payload field, the at least one CRC field, and the Tailer field are optionally referred to as a data field (or frame body).
下面对各字段进行详细说明:Each field is described in detail below:
示例性的,Acess Code字段长度为32bit。其调制方式采用1Mbps GFSK(Gauss frequency Shift Keying,高斯频移键控)调制。Acess Code字段的描述可参照已有蓝牙协议中的描述,本申请不在重复说明。可选地,Preamble字段、Access Code字段无编码。Exemplarily, the length of the Access Code field is 32 bits. Its modulation method adopts 1Mbps GFSK (Gauss frequency Shift Keying, Gauss frequency shift keying) modulation. For the description of the Access Code field, reference may be made to the description in the existing Bluetooth protocol, which is not repeated in this application. Optionally, the Preamble field and the Access Code field are not encoded.
示例性的,PHY_IND字段长度为10bit,其调制方式采用1Mbps GFSK调制,包括:BW(带宽)字段、MCS(Modulation and Coding Scheme,调制与编码策略)字段、NESN(Next Expected Sequence Number,下一期望序列号)字段和SN(Sequence Number,当前序列号)字段。示例性的,HEC字段的长度为16bit,同样采用1Mbps GFSK调制方式。Exemplarily, the length of the PHY_IND field is 10 bits, and its modulation mode adopts 1Mbps GFSK modulation, including: BW (bandwidth) field, MCS (Modulation and Coding Scheme, modulation and coding strategy) field, NESN (Next Expected Sequence Number, next expected Sequence Number) field and SN (Sequence Number, current sequence number) field. Exemplarily, the length of the HEC field is 16 bits, and 1Mbps GFSK modulation is also used.
可选地,PHY_IND字段与HEC字段采用N=64的Polar码编码为一个码块,即编码后的长度为64bit。Optionally, the PHY_IND field and the HEC field are encoded into one code block by using the Polar code of N=64, that is, the encoded length is 64 bits.
其中,BW字段长度为3bit,用于指示帧体(即数据字段)的带宽。示例性的,BW字段的映射方式如表1所示:The length of the BW field is 3 bits, which is used to indicate the bandwidth of the frame body (ie, the data field). Exemplarily, the mapping method of the BW field is shown in Table 1:
表1Table 1
BWBW 带宽(MHz)Bandwidth (MHz)
00 11
11 22
22 44
33 55
44 保留 reserve
55 保留reserve
66 保留reserve
77 保留reserve
参照表1,示例性的,BW字段携带信息为0,即二进制为000时,指示带宽为1MHz。BW字段携带信息为1,即二进制为001时,指示带宽为2MHz。BW字段携带信息为2,即二进制为010时,指示带宽为4MHz。BW字段携带信息为3,即二进制为011时,指示带宽为5MHz。示例性的,其它指示信息对应的带宽可作为保留,以在以后的协议中作为扩展使用。Referring to Table 1, exemplarily, when the information carried in the BW field is 0, that is, when the binary value is 000, the indicated bandwidth is 1 MHz. The information carried in the BW field is 1, that is, when the binary value is 001, the indicated bandwidth is 2MHz. The information carried in the BW field is 2, that is, when the binary value is 010, the indicated bandwidth is 4MHz. The information carried in the BW field is 3, that is, when the binary value is 011, the indicated bandwidth is 5MHz. Exemplarily, the bandwidth corresponding to the other indication information may be reserved for use as an extension in a future protocol.
也就是说,本申请实施例的蓝牙协议可支持1MHz、2MHz、4MHz和5MHz带宽。并且,BW字段包含于控制字段中。相应的,接收端(可以为手机,也可以为无线耳机)在接收到包含BW字段的蓝牙数据包后,可在控制字段中获取到带宽信息,而无需对数据字段进行解封装、校验等处理,即可确定后续的蓝牙数据传输对应的带宽。That is to say, the Bluetooth protocol of the embodiments of the present application can support bandwidths of 1 MHz, 2 MHz, 4 MHz, and 5 MHz. Also, the BW field is included in the control field. Correspondingly, after receiving the Bluetooth data packet containing the BW field, the receiver (which can be a mobile phone or a wireless headset) can obtain the bandwidth information in the control field without decapsulating and verifying the data field. After processing, the bandwidth corresponding to the subsequent Bluetooth data transmission can be determined.
示例性的,蓝牙数据包中包括BW字段和数据字段。相应的,发送端(可以为手机,也可以为无线耳机)可通过该格式实时控制带宽变换,而无需单独发送用于指示带宽切换(或更新)消息,以有效节省资源。并且,相较于已有蓝牙协议中需要进行多次交互才能完成带宽切换(或功率切换)的问题,本申请实施例中的蓝牙通信方法可有效缩短切换耗时。具体使用方式将在下面的实施例中进行详细说明。Exemplarily, the Bluetooth data packet includes a BW field and a data field. Correspondingly, the sending end (which can be a mobile phone or a wireless headset) can control the bandwidth conversion in real time through this format without sending a separate message for indicating bandwidth switching (or updating), so as to effectively save resources. Moreover, compared with the problem that bandwidth switching (or power switching) needs to be performed multiple times in the existing Bluetooth protocol, the Bluetooth communication method in the embodiment of the present application can effectively shorten the switching time. The specific usage will be described in detail in the following examples.
请继续参照图11a,示例性的,MCS字段长度为5bit,用于指示帧体(即数据字段)采用的调制方式和编码码率。示例性的,MCS字段的映射方式如表2所示:Please continue to refer to FIG. 11a, exemplarily, the length of the MCS field is 5 bits, which is used to indicate the modulation mode and coding rate adopted by the frame body (ie, the data field). Exemplarily, the mapping method of the MCS field is shown in Table 2:
表2Table 2
Figure PCTCN2022079978-appb-000001
Figure PCTCN2022079978-appb-000001
可选地,BW字段和MCS字段可以合并,用于指示带宽、调制方式和编码码率。示例性的,具体映射方式如表3所示:Optionally, the BW field and the MCS field can be combined to indicate the bandwidth, modulation mode and coding rate. Exemplarily, the specific mapping method is shown in Table 3:
表3table 3
   带宽(MHz)Bandwidth (MHz) 调制方式 Modulation 编码码率code rate
00 11 DQPSK DQPSK 1/21/2
11 22 DQPSK DQPSK 1/21/2
22 22 DQPSK DQPSK 3/43/4
33 44 DQPSK DQPSK 1/21/2
44 44 DQPSK DQPSK 3/43/4
55 55 DQPSK DQPSK 5/65/6
66 55 DQPSK DQPSK 11
77 55 D8PSK D8PSK 5/65/6
88 55 D8PSK D8PSK 11
需要说明的是,表1、表2和表3的映射方式仅为示意性举例,本申请不做限定。It should be noted that the mapping manners of Table 1, Table 2, and Table 3 are only schematic examples, and are not limited in this application.
请继续参照图11a。示例性的,NESN字段和SN字段的长度各为1bit,两个字段的总长度为2bit,用于指示数据包为新包或者是重发数据包,还可用于指示ACK信息或NACK信息。Please continue to refer to Figure 11a. Exemplarily, the lengths of the NESN field and the SN field are each 1 bit, and the total length of the two fields is 2 bits, which are used to indicate that the data packet is a new packet or a retransmitted data packet, and can also be used to indicate ACK information or NACK information.
示例性的,在音频播放等非对称业务场景,即接收端(例如无线耳机)只需要回复ACK信息或NACK信息的场景下,本申请实施例还提供一种简单的ACK或NACK回复方式,可选的,通过BW字段和MCS字段的8个bit设置为全1(即11111111)或者全0(即00000000),以表示本次传输的蓝牙数据包仅有帧头部分(即控制字段),并且传输的是ACK信息或NACK信息。相较于已有的蓝牙协议中的ACK信息或NACK信息携带于数据字段中的方式,接收端需要从帧头开始解析,一直解析到PDU字段才可以获取到ACK信息或NACK信息的方式。本申请实施例提供一种更加高效的回复方式,接收端(例如手机)可通过读取控制字段即可获取到ACK信息或NACK信息。并且,对于发送端,其只需要传输携带有ACK信息或NACK信息的帧头部分,而无需传输帧体部分,可有效节省传输开销。Exemplarily, in an asymmetric service scenario such as audio playback, that is, in a scenario where the receiving end (for example, a wireless headset) only needs to reply to ACK information or NACK information, the embodiment of the present application also provides a simple ACK or NACK reply method, which can Optionally, set the 8 bits of the BW field and MCS field to all 1s (ie 11111111) or all 0s (ie 00000000) to indicate that the Bluetooth data packet transmitted this time has only the frame header part (ie the control field), and What is transmitted is ACK information or NACK information. Compared with the way in which the ACK information or NACK information is carried in the data field in the existing Bluetooth protocol, the receiving end needs to start parsing from the frame header and continue to parse to the PDU field to obtain the ACK information or NACK information. The embodiment of the present application provides a more efficient reply method, and the receiving end (eg, a mobile phone) can obtain the ACK information or the NACK information by reading the control field. Moreover, for the sender, it only needs to transmit the frame header part carrying the ACK information or NACK information, and does not need to transmit the frame body part, which can effectively save transmission overhead.
需要说明的是,NESN字段和SN字段指示数据包新包或者是重发数据包,以及指示ACK信息或NACK信息的方式与已有蓝牙协议中的指示方式相同。为使本领域人员更好的理解本申请中的技术方案,下面结合图12所示NESN字段和SN字段的指示示意图,对NESN字段和SN字段的指示方式进行简单说明:It should be noted that the NESN field and the SN field indicate that the data packet is a new packet or a retransmitted data packet, and the manner of indicating the ACK information or the NACK information is the same as that in the existing Bluetooth protocol. In order to make those skilled in the art better understand the technical solutions in this application, the following briefly describes the indication modes of the NESN field and the SN field in conjunction with the schematic diagram of the indication of the NESN field and the SN field shown in FIG. 12 :
1)判断ACK信息或NACK信息。1) Determine ACK information or NACK information.
以手机为例。手机本地存储有NESN字段的数值(以下简称本地NESN)和SN字段的数值(以下简称本地SN)。如图12的(1)所示,示例性的,手机接收到无线耳机发 送的蓝牙数据包。手机将蓝牙数据包中的NESN字段与本地SN比较。一个示例中,若蓝牙数据包中的NESN字段与本地SN相同,则手机可确定无线耳机发送的是NACK信息。也就是说,无线耳机请求未成功接收到手机前一次发送的数据,通过NACK信息请求手机重新发送前一次发送的数据。可选地,若手机配置有重传功能,手机可响应于NACK信息,重新向无线耳机发送前一次发送的数据。Take mobile phones for example. The mobile phone locally stores the value of the NESN field (hereinafter referred to as the local NESN) and the value of the SN field (hereinafter referred to as the local SN). As shown in (1) of Fig. 12, exemplarily, the mobile phone receives the Bluetooth data packet sent by the wireless headset. The mobile phone compares the NESN field in the Bluetooth data packet with the local SN. In one example, if the NESN field in the Bluetooth data packet is the same as the local SN, the mobile phone can determine that the wireless headset sends NACK information. That is to say, the wireless headset request fails to receive the data sent by the mobile phone last time, and requests the mobile phone to resend the data sent last time through the NACK message. Optionally, if the mobile phone is configured with a retransmission function, the mobile phone may re-send the previously sent data to the wireless headset in response to the NACK information.
在另一个示例中,若蓝牙数据包中的NESN字段与本地SN不相同,则手机可确定无线耳机发送的是ACK信息。也就是说,无线耳机已成功接收到手机前一次发送的数据。相应的,手机将本地SN的数值加1。例如,当前本地存储的本地SN数值为0,则手机获取到ACK信息后,本地SN的数值变为1。并且,手机可响应于接收到的ACK信息,向无线耳机发送新的数据。In another example, if the NESN field in the Bluetooth data packet is different from the local SN, the mobile phone can determine that the wireless headset sends ACK information. That is to say, the wireless headset has successfully received the data previously sent by the mobile phone. Correspondingly, the mobile phone increments the value of the local SN by 1. For example, if the current locally stored local SN value is 0, after the mobile phone obtains the ACK information, the local SN value becomes 1. And, the mobile phone can send new data to the wireless headset in response to the received ACK information.
需要说明的是,手机在发送蓝牙数据包中的NESN字段和SN字段分别与本地NESN和本地SN相同。It should be noted that the NESN field and the SN field in the bluetooth data packet sent by the mobile phone are respectively the same as the local NESN and the local SN.
2)判断新包或重发数据包。2) Determine the new packet or retransmit the data packet.
仍以手机为例。如图12的(2)所示,示例性的,手机接收到无线耳机发送的蓝牙数据包。手机将蓝牙数据包中的SN字段与本地NESN比较。一个示例中,若蓝牙数据包中的SN字段与本地NESN相同,则手机可确定该数据包传输的是新的数据。相应的,手机接收新数据,以及,手机将本地NESN数值加1。Still take the mobile phone as an example. As shown in (2) of FIG. 12 , exemplarily, the mobile phone receives the Bluetooth data packet sent by the wireless headset. The mobile phone compares the SN field in the Bluetooth data packet with the local NESN. In one example, if the SN field in the Bluetooth data packet is the same as the local NESN, the mobile phone can determine that the data packet transmits new data. Accordingly, the mobile phone receives the new data, and the mobile phone increments the local NESN value by 1.
在另一个示例中,若蓝牙数据包中的SN字段与本地NESN相同,则手机可确定该数据包传输的是旧的数据,即无线耳机发送的是前一次发送的数据。示例性的,若手机检测到无线耳机上一次回复的是ACK信息,即手机已经成功接收到无线耳机前一次发送的数据,则手机可不对本次接收到的旧数据作任何处理。示例性的,若手机检测到上一次回复的是NACK信息,即手机未成功接收到无线耳机前一次发送的数据。也就是说,无线耳机是响应于手机发送的NACK信息,重新发送的数据。手机可接收该旧数据,并对旧数据进行相应处理,具体处理过程将在下面的实施例中进行详细说明。In another example, if the SN field in the Bluetooth data packet is the same as the local NESN, the mobile phone can determine that the data packet transmits old data, that is, the wireless headset transmits the data that was previously transmitted. Exemplarily, if the mobile phone detects that the last reply from the wireless headset is ACK information, that is, the mobile phone has successfully received the data sent by the wireless headset last time, the mobile phone may not do anything to the old data received this time. Exemplarily, if the mobile phone detects that the last reply was a NACK message, that is, the mobile phone failed to successfully receive the data sent by the wireless headset last time. That is to say, the wireless headset is the data that is resent in response to the NACK information sent by the mobile phone. The mobile phone can receive the old data and process the old data accordingly, and the specific processing process will be described in detail in the following embodiments.
请继续参照图11a。示例性的,由于蓝牙数据包的帧头和帧体的调制方式不相同,例如,帧头采用GFSK调制方式,帧体采用GPSK调制方式。因此,帧头和帧体之间包括Guard字段。示例性的,Gurd字段和sync字段的描述可参照已有蓝牙协议中,本申请不再重复说明。Please continue to refer to Figure 11a. Exemplarily, since the modulation modes of the frame header and the frame body of the Bluetooth data packet are different, for example, the frame header adopts the GFSK modulation mode, and the frame body adopts the GPSK modulation mode. Therefore, the Guard field is included between the frame header and the frame body. Exemplarily, the description of the Gurd field and the sync field may refer to the existing Bluetooth protocol, and the description will not be repeated in this application.
示例性的,Header字段长度可选地为24bit。其采用与数据字段相同的带宽和调制方式,并且,可选的,采用N=128(即长度为128bit)的Polar码编码为一个码块。根据不同类型的数据包,Header字段携带的内容不同。示例性的,数据包的类型包括:ACL(Asynchronous Connection link,异步连接链路)、CIS(Connected Isochronous Stream,连接等时流)、BIS(broadcast isochronous stream,广播等时流)和TWS(True Wireless Stereo,真无线立体声)(TWS是指TWS耳机的两个耳机之间的数据传输流)。需要说明的是,对于不同类型的数据帧,Header的具体字段的比特位宽和具体含义可以有差异,但是总的长度为固定值(例如24bit)。Exemplarily, the length of the Header field is optionally 24 bits. It adopts the same bandwidth and modulation mode as the data field, and optionally, adopts the Polar code with N=128 (that is, the length is 128 bits) to encode into one code block. According to different types of data packets, the content carried in the Header field is different. Exemplarily, the types of data packets include: ACL (Asynchronous Connection link, asynchronous connection link), CIS (Connected Isochronous Stream, connection isochronous stream), BIS (broadcast isochronous stream, broadcast isochronous stream) and TWS (True Wireless Stereo, true wireless stereo) (TWS refers to the data transfer stream between two earphones of TWS earphones). It should be noted that, for different types of data frames, the bit width and specific meaning of the specific fields of the Header may be different, but the total length is a fixed value (for example, 24 bits).
示例性的,ACL数据类型的Header字段包括LLID(logical link identify,逻辑链路 指示)字段、Length(长度)字段、MD(more data,更多数据)字段、CP(CTEInfo Present,CTE存在指示)字段、APC(auto power contorl,自动功率控制)字段和RFU(Reserved for future use,保留给未来使用)字段。Exemplarily, the Header field of the ACL data type includes an LLID (logical link identify, logical link indication) field, a Length (length) field, an MD (more data, more data) field, and a CP (CTEInfo Present, CTE presence indication) field, APC (auto power control) field and RFU (Reserved for future use, reserved for future use) field.
示例性的,APC字段长度为2bit,用于指示对端在当前功率基础上增加或减少的功率值。其映射方式如表4所示:Exemplarily, the length of the APC field is 2 bits, and is used to indicate the power value that the opposite end increases or decreases based on the current power. Its mapping method is shown in Table 4:
表4Table 4
APC APC dBdB
00 00
11 -1-1
22 11
33 33
参照图4,示例性的,APC字段携带字符为0,即为00时,用于指示仍采用当前功率。示例性的,APC字段携带字符为1,即为01时,用于指示在当前功率基础上减少1dB。示例性的,APC字段携带字符为2,即为10时,用于指示在当前功率基础上增加1dB。示例性的,APC字段携带字符为3,即为11时,用于指示在当前功率基础上增加3dB。与带宽指示类似,本申请实施例可通过蓝牙数据包中的APC字段指示电子设备的功率切换,使得对端设备可基于接收到的APC字段指示的功率,发送蓝牙数据包。相较于已有蓝牙协议中的需要单独指示功率切换,且进行多次信令交互的方式,本申请实施例提供一种实时的功率切换方式,在传输数据时,可指示功率切换,也就是说,可以通过复用信令的方式,以降低信令开销,提高功率切换效率。Referring to FIG. 4, exemplarily, when the character carried in the APC field is 0, that is, 00, it is used to indicate that the current power is still used. Exemplarily, when the character carried in the APC field is 1, that is, 01, it is used to indicate that the current power is reduced by 1 dB. Exemplarily, when the character carried in the APC field is 2, that is, 10, it is used to indicate that the current power is increased by 1 dB. Exemplarily, when the character carried in the APC field is 3, that is, 11, it is used to indicate that the current power is increased by 3 dB. Similar to the bandwidth indication, this embodiment of the present application may indicate power switching of the electronic device through the APC field in the Bluetooth data packet, so that the peer device may send the Bluetooth data packet based on the power indicated by the received APC field. Compared with the existing Bluetooth protocol in which power switching needs to be separately indicated and multiple signaling interactions are performed, the embodiments of the present application provide a real-time power switching method, which can indicate power switching when transmitting data, that is, In other words, the signaling overhead can be reduced and the power switching efficiency can be improved by multiplexing signaling.
在一种可能的实现方式中,在指示功率切换时,蓝牙数据包也可以不包括数据字段。示例性的,Header字段中的Length字段可指示数据字段的长度为0,以表示该蓝牙数据包中不包括数据字段。In a possible implementation manner, when power switching is indicated, the Bluetooth data packet may also not include a data field. Exemplarily, the Length field in the Header field may indicate that the length of the data field is 0, indicating that the Bluetooth data packet does not include the data field.
需要说明的是,Header字段的其它字段的描述可参照已有蓝牙协议,本申请不再赘述。It should be noted that, for the description of other fields in the Header field, reference may be made to the existing Bluetooth protocol, which will not be repeated in this application.
示例性的,本申请实施例中的数据字段可采用Polar编码或者无编码。如图11a所示,发送端根据编码码率将数据分为多个数据块(即payload1字段~payload n字段所承载的数据块)。示例性的,每个数据块为通过单独信道编码生成的。Exemplarily, the data field in this embodiment of the present application may adopt Polar coding or no coding. As shown in Figure 11a, the sender divides the data into multiple data blocks (that is, the data blocks carried by the payload1 field to the payload n field) according to the coding rate. Exemplarily, each data block is generated by separate channel coding.
需要说明的是,各数据块的长度可根据实际需求设置,本申请不做限定。示例性的,每个数据块对应一个CRC字段。多个数据块和多个CRC校验的具体使用方式将在下面的实施例中进行详细说明。It should be noted that the length of each data block can be set according to actual requirements, which is not limited in this application. Exemplarily, each data block corresponds to one CRC field. The specific usage of multiple data blocks and multiple CRC checks will be described in detail in the following embodiments.
如图11b为示例性示出的蓝牙数据包格式。其中,图11b所示的蓝牙数据包为以卷积编码为编码方式生成的。示例性的,蓝牙数据包包括:Preamble字段、AccessCode字段、PHY_IND字段、FEC 1/2字段、Guard字段、sync字段、Header字段、HEC字段、 FEC 1/2字段、至少一个payload字段、至少一个CRC字段、至少一个term字段以及Tailer字段。FIG. 11b is an exemplary Bluetooth data packet format. Among them, the Bluetooth data packet shown in FIG. 11b is generated using convolutional coding as the coding method. Exemplarily, the Bluetooth data packet includes: Preamble field, AccessCode field, PHY_IND field, FEC 1/2 field, Guard field, sync field, Header field, HEC field, FEC 1/2 field, at least one payload field, at least one CRC field, at least one term field, and Tailer field.
其中,FEC1/2字段是码率为1/2的信道编码。经过编码后数据长度会增加。在本申请实施例中,采用1/2码率编码后的比特增加一倍。Wherein, the FEC1/2 field is channel coding with a code rate of 1/2. After encoding, the data length will increase. In this embodiment of the present application, the bits encoded by the 1/2 code rate are doubled.
term字段是卷积编码特有的一个字段,它附着在编码块最后,所占比特数与编码参数相关。The term field is a field unique to convolutional coding. It is attached at the end of the coding block, and the number of bits occupied is related to coding parameters.
示例性的,Header字段包括:Blocklen(块数)字段、payload字段、MD字段、LLID字段、APC字段和RFU字段。其中,Blocklen字段用于指示CRC分块的块数。payload字段用于指示数据包长度。其它未描述字段可参照已有蓝牙协议的相关内容,本申请不做限定。Exemplarily, the Header field includes: a Blocklen (block number) field, a payload field, an MD field, an LLID field, an APC field, and an RFU field. The Blocklen field is used to indicate the number of blocks in the CRC block. The payload field is used to indicate the packet length. For other undescribed fields, reference may be made to the related content of the existing Bluetooth protocol, which is not limited in this application.
下面以几个具体实施例,对本申请实施例中的蓝牙通信方法进行详细说明。The Bluetooth communication method in the embodiments of the present application will be described in detail below with several specific embodiments.
场景一scene one
图13为示例性示出的应用场景示意图。如图13的(1)所示,手机与无线耳机建立蓝牙连接。示例性的,手机与无线耳机建立蓝牙连接的过程可参照图4a~图4c,以及图5的相关描述,此处不再赘述。FIG. 13 is a schematic diagram of an exemplary application scenario. As shown in (1) of FIG. 13 , a Bluetooth connection is established between the mobile phone and the wireless headset. Exemplarily, for the process of establishing a Bluetooth connection between the mobile phone and the wireless headset, reference may be made to FIG. 4a to FIG. 4c and the related description of FIG. 5 , which will not be repeated here.
示例性的,本申请实施例以手机与无线耳机的初始带宽为1MHz为例进行说明。可选地,初始带宽可以是在连接过程中进行协商后确定的。可选地,初始带宽也可以是蓝牙协议中设定的,例如,各电子设备的可预先配置有初始带宽,且每个电子设备配置的初始带宽是相同的(例如均为1MHz)。Exemplarily, the embodiments of the present application are described by taking the initial bandwidth of the mobile phone and the wireless headset as 1 MHz as an example. Optionally, the initial bandwidth may be determined after negotiation during the connection process. Optionally, the initial bandwidth may also be set in the Bluetooth protocol. For example, each electronic device may be preconfigured with an initial bandwidth, and the initial bandwidth configured by each electronic device is the same (for example, 1 MHz).
示例性的,本申请实施例中,手机与无线耳机在建立蓝牙连接的过程中,确定对端为预设的设备,即为支持本申请实施例的蓝牙数据包的设备。因此,手机与无线耳机可基于本申请实施例所提出的具有设定的格式的蓝牙数据包进行数据交互。Exemplarily, in this embodiment of the present application, during the process of establishing a Bluetooth connection between the mobile phone and the wireless headset, it is determined that the opposite end is a preset device, that is, a device that supports the Bluetooth data package of the embodiment of the present application. Therefore, the mobile phone and the wireless headset can perform data interaction based on the Bluetooth data packets with the set format proposed in the embodiments of the present application.
需要说明的是,在其他实施例中,手机与无线耳机均为预设的设备的情况下,手机与无线耳机也可以基于已有蓝牙协议进行数据交互,并且设定的条件触发的情况下,再通过本申请实施例提出的蓝牙协议,即基于具有设定的格式的蓝牙数据包进行数据交互。可选地,设定的条件可以为手机启动的应用为音乐应用。可选地,设定的条件也可以是带传输的文件所需的带宽大于设定的阈值(例如可以为1MHz),当然,也可以是其它条件,本申请不做限定。It should be noted that, in other embodiments, when the mobile phone and the wireless headset are both preset devices, the mobile phone and the wireless headset can also perform data interaction based on the existing Bluetooth protocol, and when the set conditions are triggered, Then, data interaction is performed based on the Bluetooth protocol proposed in the embodiments of the present application, that is, based on the Bluetooth data packets having a set format. Optionally, the set condition may be that the application started by the mobile phone is a music application. Optionally, the set condition may also be that the bandwidth required by the file to be transmitted is greater than the set threshold (for example, it may be 1 MHz). Of course, other conditions may also be used, which are not limited in this application.
请参照图13的(2),示例性的,手机与无线耳机通过蓝牙连接进行数据交互。示例性的,手机与无线耳机当前的蓝牙通信带宽为1MHz。图14a为示例性示出的蓝牙数据包的格式示意图。如图14a所示,手机发送的蓝牙数据包中包括但不限于:Preamble字段、Acess Code字段、PHY_IND字段以及其他字段。Please refer to (2) of FIG. 13 , exemplarily, the mobile phone and the wireless headset perform data interaction through a Bluetooth connection. Exemplarily, the current Bluetooth communication bandwidth between the mobile phone and the wireless headset is 1 MHz. FIG. 14a is a schematic diagram of the format of an exemplary Bluetooth data packet. As shown in Figure 14a, the Bluetooth data packet sent by the mobile phone includes, but is not limited to, the Preamble field, the Access Code field, the PHY_IND field, and other fields.
示例性的,PHY_IND字段中的BW字段中携带的字符为000。根据表1所示的映射关系,000对应的带宽为1MHz。Exemplarily, the character carried in the BW field in the PHY_IND field is 000. According to the mapping relationship shown in Table 1, the bandwidth corresponding to 000 is 1MHz.
示例性的,MCS字段中中携带字符为00001。根据表2所示的映射关系,00001指示的调制方式为GFSK、编码码率为1。Exemplarily, the character carried in the MCS field is 00001. According to the mapping relationship shown in Table 2, the modulation mode indicated by 00001 is GFSK, and the coding rate is 1.
需要说明的是,本实施例中仅为更好地说明带宽切换的过程,NESN字段与SN字段 的指示方式将在下面的实施例中进行说明。It should be noted that, in this embodiment, only the process of bandwidth switching is better described, and the indication manner of the NESN field and the SN field will be described in the following embodiments.
示例性的,图15为示例性示出的数据传输方式示意图。如图15的(1)所示,无线耳机在指定的频段上接收控制字段。示例性的,在本申请实施例中,控制字段的带宽为1MHz,其中心频率为fc。需要说明的是,中心频率为手机与无线耳机在建立蓝牙连接的过程中,或者在建立蓝牙连接之后协商的,具体协商过程可参照已有协议,本申请不做赘述。Exemplarily, FIG. 15 is a schematic diagram of an exemplary data transmission manner. As shown in (1) of FIG. 15, the wireless earphone receives the control field on the designated frequency band. Exemplarily, in this embodiment of the present application, the bandwidth of the control field is 1 MHz, and the center frequency thereof is fc. It should be noted that the center frequency is negotiated during the process of establishing the Bluetooth connection between the mobile phone and the wireless headset, or after the Bluetooth connection is established.
示例性的,无线耳机在中心频率为fc,带宽为1MHz的频段上接收到如图14a所示的蓝牙数据包中的控制字段。示例性的,无线耳机对控制字段进行相应处理。示例性的,无线耳机可读取Preamble字段、Access Code字段携带的信息,并进行相应处理。示例性的,无线耳机读取PHY_IND字段,获取BW字段中携带的信息(即000)。并且,无线耳机可基于BW字段,确定数据字段的传输带宽为1MHz。示例性的,无线耳机可基于MCS字段,获取到数据字段的调制方式。Exemplarily, the wireless headset receives the control field in the Bluetooth data packet as shown in FIG. 14a on a frequency band with a center frequency of fc and a bandwidth of 1 MHz. Exemplarily, the wireless headset performs corresponding processing on the control field. Exemplarily, the wireless headset can read the information carried in the Preamble field and the Access Code field, and perform corresponding processing. Exemplarily, the wireless headset reads the PHY_IND field to obtain the information (ie, 000) carried in the BW field. Moreover, the wireless headset may determine that the transmission bandwidth of the data field is 1 MHz based on the BW field. Exemplarily, the wireless headset may obtain the modulation mode of the data field based on the MCS field.
请继续参照图15的(1),示例性的,无线耳机可基于控制字段中携带的BW字段,确定数据字段的带宽为1MHz。相应的,无线耳机可在中心频率为fc,带宽为1MHz的频段上接收手机发送的蓝牙数据包中的数据字段。示例性的,无线耳机可基于MCS字段指示的编码方式,对数据字段进行相应处理,以获取数据字段中携带的信息或数据,例如无线耳机可获取到数据字段携带的音频数据。接着,无线耳机可播放获取到的音频数据。需要说明的是,对于数据字段的处理将在下面的实施例中进行说明,本实施例仅对带宽切换场景进行说明。Please continue to refer to (1) of FIG. 15 , exemplarily, the wireless headset may determine that the bandwidth of the data field is 1 MHz based on the BW field carried in the control field. Correspondingly, the wireless earphone can receive the data field in the Bluetooth data packet sent by the mobile phone in a frequency band with a center frequency of fc and a bandwidth of 1 MHz. Exemplarily, the wireless headset may perform corresponding processing on the data field based on the encoding method indicated by the MCS field to obtain information or data carried in the data field. For example, the wireless headset may obtain audio data carried in the data field. Then, the wireless earphone can play the acquired audio data. It should be noted that the processing of the data field will be described in the following embodiments, and this embodiment only describes the bandwidth switching scenario.
如图13的(3)所示,示例性的,无线耳机与手机通过1MHz带宽的蓝牙连接进行交互的过程中,手机可响应于接收到的用户操作,基于更大的带宽,例如4MHz,与无线耳机进行数据交互。As shown in (3) of FIG. 13, exemplarily, during the interaction between the wireless headset and the mobile phone through a Bluetooth connection with a bandwidth of 1 MHz, the mobile phone can respond to the received user operation, based on a larger bandwidth, such as 4 MHz, and Wireless headset for data interaction.
举例说明,手机响应于接收到的用户操作(例如图7所示),确定需要将带宽切换为4MHz。手机生成蓝牙数据包,蓝牙数据包的格式如图14b所示。请参照图14b,示例性的,PHY_IND字段中的BW字段携带信息为010。根据表1所示的映射关系,010指示的带宽为4MHz。MCS字段携带信息为00001,用于指示调制方式为GFSK、编码码率为1。需要说明的是,本申请实施例中仅以用户指示切换带宽的方式为例进行说明。在其他实施例中,手机可以基于带传输的数据量大小和/或当前传输条件(也可以称为蓝牙通信条件),自适应切换传输带宽。举例说明,若手机与耳机之间的距离较近(例如小于2米),则手机与耳机之间收到的干扰较小,蓝牙通信条件较好,手机可选择通过更大的带宽(例如5MHz)与耳机进行蓝牙通信。带宽的选择以及判断条件可根据实际需求设置,本申请不做限定。For example, in response to a received user operation (eg, as shown in FIG. 7 ), the mobile phone determines that the bandwidth needs to be switched to 4 MHz. The mobile phone generates a Bluetooth data packet, and the format of the Bluetooth data packet is shown in Figure 14b. Referring to FIG. 14b, exemplarily, the information carried in the BW field in the PHY_IND field is 010. According to the mapping relationship shown in Table 1, the bandwidth indicated by 010 is 4MHz. The information carried in the MCS field is 00001, which is used to indicate that the modulation mode is GFSK and the coding rate is 1. It should be noted that, in this embodiment of the present application, only the manner in which the user instructs to switch the bandwidth is used as an example for description. In other embodiments, the mobile phone can adaptively switch the transmission bandwidth based on the amount of data to be transmitted and/or current transmission conditions (also referred to as Bluetooth communication conditions). For example, if the distance between the mobile phone and the headset is close (for example, less than 2 meters), the interference received between the mobile phone and the headset is small, and the Bluetooth communication conditions are better, and the mobile phone can choose to pass a larger bandwidth (for example, 5MHz). ) for Bluetooth communication with the headset. The bandwidth selection and judgment conditions can be set according to actual needs, which are not limited in this application.
示例性的,如图15的(2)所示,如图15的(2)所示,无线耳机在指定的频段上接收控制字段。示例性的,在本申请实施例中,控制字段的带宽为1MHz,其中心频率为fc。需要说明的是,本申请实施例中仅以图15的(1)与图15的(2)中的中心频率相同为例进行说明。在其他实施例中,在手机与无线耳机进行蓝牙通信的过程中,中心频率可变,本申请不做限定。Exemplarily, as shown in (2) of FIG. 15 , as shown in (2) of FIG. 15 , the wireless headset receives a control field on a specified frequency band. Exemplarily, in this embodiment of the present application, the bandwidth of the control field is 1 MHz, and the center frequency thereof is fc. It should be noted that, in the embodiments of the present application, only the center frequencies in (1) of FIG. 15 and (2) of FIG. 15 are the same as an example for description. In other embodiments, during the process of Bluetooth communication between the mobile phone and the wireless headset, the center frequency is variable, which is not limited in this application.
示例性的,无线耳机在中心频率为fc,带宽为1MHz的频段上接收到如图14b所示 的蓝牙数据包中的控制字段。无线耳机可读取Preamble字段、Access Code字段携带的信息,并进行相应处理。Exemplarily, the wireless headset receives the control field in the Bluetooth data packet as shown in Fig. 14b on a frequency band with a center frequency of fc and a bandwidth of 1 MHz. The wireless headset can read the information carried in the Preamble field and the Access Code field, and process it accordingly.
示例性的,无线耳机读取PHY_IND字段,获取BW字段中携带的信息(即010)。无线耳机可基于BW字段,确定该蓝牙数据包中的数据字段的传输带宽为4MHz。示例性的,无线耳机可基于MCS字段,获取到数据字段的调制方式。并且,无线耳机可基于NESN字段和SN字段确定当前蓝牙数据包传输的是新数据。Exemplarily, the wireless headset reads the PHY_IND field to obtain the information (ie, 010) carried in the BW field. The wireless headset may determine, based on the BW field, that the transmission bandwidth of the data field in the Bluetooth data packet is 4MHz. Exemplarily, the wireless headset may obtain the modulation mode of the data field based on the MCS field. Moreover, the wireless headset may determine that the current Bluetooth data packet transmits new data based on the NESN field and the SN field.
请继续参照图15的(2),示例性的,无线耳机可基于控制字段中携带的BW字段,确定数据字段的带宽为4MHz。相应的,无线耳机可在中心频率为fc,带宽为4MHz的频段上接收数据字段。示例性的,无线耳机可基于MCS字段指示的编码方式,对数据字段进行解码,以获取数据字段中携带的信息或数据,例如无线耳机可获取到数据字段携带的音频数据。接着,无线耳机可播放获取到的音频数据。Please continue to refer to (2) of FIG. 15 , exemplarily, the wireless headset may determine that the bandwidth of the data field is 4 MHz based on the BW field carried in the control field. Correspondingly, the wireless headset can receive data fields in a frequency band with a center frequency of fc and a bandwidth of 4 MHz. Exemplarily, the wireless headset may decode the data field based on the encoding method indicated by the MCS field to obtain information or data carried in the data field, for example, the wireless headset may obtain audio data carried in the data field. Then, the wireless earphone can play the acquired audio data.
需要说明的是,如图15的(1)所示,若数据字段的数据量相同的情况下,采用1MHz带宽传输时,数据字段的传输时长为1ms。如图15的(2)所示,采用4MHz带宽传输时,数据字段的传输时长为0.25ms。在本申请实施例中,蓝牙协议可支持4MHz及以上带宽的传输方式,可有效提高蓝牙数据包的传输效率。It should be noted that, as shown in (1) of FIG. 15 , if the data amount of the data field is the same, when the 1MHz bandwidth is used for transmission, the transmission duration of the data field is 1ms. As shown in (2) of FIG. 15 , when 4MHz bandwidth is used for transmission, the transmission duration of the data field is 0.25ms. In the embodiment of the present application, the Bluetooth protocol can support a transmission mode with a bandwidth of 4 MHz and above, which can effectively improve the transmission efficiency of Bluetooth data packets.
进一步需要说明的是,在本申请实施例中,以电子设备的初始带宽为1MHz为例进行说明的,也就是说,控制字段在约定的1MHz带宽上传输,使得电子设备之间可以正确读取控制字段。在其他实施例中,若电子设备约定的初始带宽2MHz,控制字段的传输带宽也可以是2MHz,本申请不做限定。It should be further noted that, in the embodiments of the present application, the initial bandwidth of the electronic device is 1 MHz as an example for illustration, that is, the control field is transmitted on the agreed 1 MHz bandwidth, so that the electronic devices can be correctly read. Control field. In other embodiments, if the initial bandwidth agreed by the electronic device is 2 MHz, the transmission bandwidth of the control field may also be 2 MHz, which is not limited in this application.
进一步需要说明的是,本申请实施例中仅以手机向无线耳机发送蓝牙数据包,并且,通过蓝牙数据包指示带宽切换为例进行说明。示例性的,无线耳机同样可通过上述方式,向手机发送蓝牙数据包,并在蓝牙数据包的控制字段中,指示数据字段对应的带宽。在一个示例中,无线耳机向手机所指示的带宽与手机向无线耳机所指示的带宽可以相同。在另一个示例中,无线耳机向手机所指示的带宽与手机向无线耳机所指示的带宽可以不相同。举例说明,手机向无线耳机指示的带宽为4MHz,即手机发送的数据字段所占带宽为4MHz。无线耳机向手机指示的带宽为1MHz,即无线耳机发送的数据字段所占带宽为1MHz。从而在无线耳机发送的数据的数据量较小的情况下,可以以较小的带宽传输蓝牙数据包,以进一步节省传输资源。It should be further noted that, in the embodiments of the present application, only the mobile phone sends a Bluetooth data packet to the wireless headset, and the bandwidth switching is indicated by the Bluetooth data packet as an example for description. Exemplarily, the wireless headset can also send a Bluetooth data packet to the mobile phone in the above manner, and indicate the bandwidth corresponding to the data field in the control field of the Bluetooth data packet. In one example, the bandwidth indicated by the wireless headset to the handset may be the same as the bandwidth indicated by the handset to the wireless headset. In another example, the bandwidth indicated by the wireless headset to the cell phone may not be the same as the bandwidth indicated by the cell phone to the wireless headset. For example, the bandwidth indicated by the mobile phone to the wireless headset is 4 MHz, that is, the bandwidth occupied by the data field sent by the mobile phone is 4 MHz. The bandwidth indicated by the wireless headset to the mobile phone is 1 MHz, that is, the bandwidth occupied by the data field sent by the wireless headset is 1 MHz. Therefore, when the amount of data sent by the wireless headset is relatively small, the Bluetooth data packets can be transmitted with a relatively small bandwidth, so as to further save transmission resources.
进一步需要说明的是,本申请实施例中仅以一次带宽切换为例。实际上,通过本申请实施例中的通信方式,手机与无线耳机可基于网络情况、数据量大小、应用需求等参数,动态确定各自的传输带宽。例如,当本次播放的无损音乐播放结束,切换到下一首音乐。并且,下一首音乐的数据量较小,例如仅需要2MHz带宽即可。相应的,手机向无线耳机发送的数据包中的BW字段可指示数据字段传输带宽为2MHz。从而通过灵活的带宽切换方式,根据用户指示或实际需求,动态且实时的切换带宽,以有效节省资源,并提高资源利用率。It should be further noted that, only one bandwidth switching is used as an example in this embodiment of the present application. In fact, through the communication methods in the embodiments of the present application, the mobile phone and the wireless headset can dynamically determine their respective transmission bandwidths based on parameters such as network conditions, data volume, and application requirements. For example, when the current play of the lossless music ends, switch to the next piece of music. Moreover, the data amount of the next piece of music is small, for example, only 2MHz bandwidth is required. Correspondingly, the BW field in the data packet sent by the mobile phone to the wireless headset may indicate that the transmission bandwidth of the data field is 2MHz. Therefore, through a flexible bandwidth switching method, the bandwidth can be dynamically and real-time switched according to user instructions or actual needs, so as to effectively save resources and improve resource utilization.
场景二scene two
图16为示例性示出的手机与无线耳机交互示意图。如图16所示,示例性的,具体 包括:FIG. 16 is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 16, exemplary, specifically includes:
S301,无线耳机接收手机发送的蓝牙数据包。S301, the wireless earphone receives the Bluetooth data packet sent by the mobile phone.
示例性的,为更好的说明本申请实施例中的ACK信息或NACK信息的回复方式。本实施例中以无线耳机与手机之间的第一次数据交互,也就是说,手机与无线耳机建立蓝牙连接后,向无线耳机发送的第一个蓝牙数据包为例进行说明。对于手机与无线耳机在蓝牙通信过程中的其它数据包,均可采用本申请实施例中的方式,本申请不再重复说明。Exemplarily, in order to better illustrate the way of replying to the ACK information or the NACK information in the embodiment of the present application. This embodiment takes the first data interaction between the wireless headset and the mobile phone, that is, the first Bluetooth data packet sent to the wireless headset after the mobile phone and the wireless headset establish a Bluetooth connection as an example for description. For other data packets in the Bluetooth communication process between the mobile phone and the wireless headset, the methods in the embodiments of the present application may be adopted, and the description will not be repeated in this application.
示例性的,如上文所述,手机与无线耳机分别存储有NESN字段的数值和SN字段的数值,即本地NESN和本地SN。示例性的,在本申请实施例中,以手机与无线耳机配置的本地初始NESN的数值为1,本地初始SN的数值为1为例进行说明。可选地,本地NESN和本地SN的初始值可以是连接建立过程中协商的,也可以是预先配置的,本申请不做限定。也可以理解为,只有手机与无线耳机互相确定对方存储的本地NESN和本地SN后,才能通过修改数据包中的NESN字段和SN字段的数值,以指示数据包传输的是新数据或旧数据,和/或,指示的是ACK信息或NACK信息。Exemplarily, as described above, the mobile phone and the wireless headset store the value of the NESN field and the value of the SN field, that is, the local NESN and the local SN, respectively. Exemplarily, in the embodiment of the present application, the value of the local initial NESN configured by the mobile phone and the wireless headset is 1, and the value of the local initial SN is 1 as an example for description. Optionally, the initial values of the local NESN and the local SN may be negotiated during the connection establishment process, or may be pre-configured, which are not limited in this application. It can also be understood that only after the mobile phone and the wireless headset mutually determine the local NESN and local SN stored by each other, the values of the NESN field and SN field in the data packet can be modified to indicate that the data packet transmits new data or old data. And/or, ACK information or NACK information is indicated.
如图17为示例性示出的蓝牙数据包的格式示意图。如图17所示,BW字段和MCS字段的描述可参照上文,此处不再赘述。如上文所述,蓝牙数据包中的NESN字段和SN字段与手机当前存储的本地NESN和本地SN相同。示例性的,本申请实施例中,手机当前存储的本地NESN数值为1,本地SN数值为1。相应的,手机发送的蓝牙数据包中的NESN字段数值为1,SN字段数值为1。FIG. 17 is an exemplary schematic diagram of the format of a Bluetooth data packet. As shown in FIG. 17 , for the description of the BW field and the MCS field, reference may be made to the above, which will not be repeated here. As mentioned above, the NESN field and the SN field in the Bluetooth data packet are the same as the local NESN and local SN currently stored in the mobile phone. Exemplarily, in this embodiment of the present application, the local NESN value currently stored in the mobile phone is 1, and the local SN value is 1. Correspondingly, the value of the NESN field in the Bluetooth data packet sent by the mobile phone is 1, and the value of the SN field is 1.
示例性的,无线耳机接收到蓝牙数据包,并获取控制字段。对控制字段中的BW字段以及MCS字段等字段的处理可参照上文,此处不赘述。示例性的,无线耳机读取NESN字段和SN字段。Exemplarily, the wireless headset receives the Bluetooth data packet and obtains the control field. For the processing of fields such as the BW field and the MCS field in the control field, reference may be made to the above, and details are not described here. Exemplarily, the wireless headset reads the NESN field and the SN field.
在本申请实施例中,无线耳机当前存储的本地NESN数值为1,SN数值为1。示例性的,根据上文所述的NESN字段和SN字段的指示方式。无线耳机确定蓝牙数据包中的SN字段中的数值(即为1)与本地NESN的数值(即为1)相同。相应的,无线耳机可确定当前接收到的蓝牙数据包传输的是新数据。并且,无线耳机将本地NESN的数值(即为1)加1,更新后的本地NESN的数值为0。In the embodiment of the present application, the local NESN value currently stored in the wireless headset is 1, and the SN value is 1. Exemplarily, according to the indication manner of the NESN field and the SN field described above. The wireless headset determines that the value (ie, 1) in the SN field in the Bluetooth data packet is the same as the value (ie, 1) of the local NESN. Correspondingly, the wireless headset can determine that the currently received Bluetooth data packet transmits new data. In addition, the wireless headset adds 1 to the value of the local NESN (ie, 1), and the updated value of the local NESN is 0.
可选地,在本实施例中,以非对称业务,即无线耳机仅接收手机发送的数据,而无需向手机发送数据为例进行说明。也就是说,无线耳机未向手机发送过数据,手机无需向无线耳机发送ACK信息或NACK信息。因此,无线耳机无需执行ACK信息或NACK信息的判断过程。Optionally, in this embodiment, an asymmetric service, that is, the wireless headset only receives data sent by the mobile phone, and does not need to send data to the mobile phone, is used as an example for description. That is to say, the wireless headset has not sent data to the mobile phone, and the mobile phone does not need to send ACK information or NACK information to the wireless headset. Therefore, the wireless headset does not need to perform a process of judging ACK information or NACK information.
示例性的,无线耳机确定该数据包携带的是新数据后,无线耳机可基于BW字段和MCS字段的指示,在指定的频段上接收该蓝牙数据包的数据字段。Exemplarily, after the wireless earphone determines that the data packet carries new data, the wireless earphone may receive the data field of the Bluetooth data packet on the specified frequency band based on the indications of the BW field and the MCS field.
请继续参照图17,无线耳机接收到的蓝牙数据包中的数据字段包括三个数据块,以及对应的三个CRC字段。其中,三个数据块分别携带于payload1字段、payload2字段和payload3字段。三个CRC字段分别为CRC1字段、CRC2字段和CRC3字段。其中,CRC1字段对应于payload1字段中的数据块。CRC2字段对应于payload2字段中的数据块。CRC3字段对应于payload3字段中的数据块。Please continue to refer to FIG. 17 , the data field in the Bluetooth data packet received by the wireless headset includes three data blocks and three corresponding CRC fields. Among them, three data blocks are carried in the payload1 field, the payload2 field and the payload3 field respectively. The three CRC fields are the CRC1 field, the CRC2 field, and the CRC3 field, respectively. Among them, the CRC1 field corresponds to the data block in the payload1 field. The CRC2 field corresponds to the data block in the payload2 field. The CRC3 field corresponds to the data block in the payload3 field.
其它字段的描述可参照上述实施例的相关内容,此处不再赘述。For the description of other fields, reference may be made to the relevant content of the foregoing embodiments, which will not be repeated here.
S302a,无线耳机基于CRC1字段,对payload1字段进行校验。S302a, the wireless headset verifies the payload1 field based on the CRC1 field.
S302b,无线耳机基于CRC2字段,对payload2字段进行校验。S302b, the wireless headset verifies the payload2 field based on the CRC2 field.
S302c,无线耳机基于CRC3字段,对payload3字段进行校验。S302c, the wireless headset verifies the payload3 field based on the CRC3 field.
示例性的,无线耳机在中心频率为fc,带宽为4MHz的频段上接收到数据字段。无线耳机可基于MCS字段指示的调制方式,对数据字段进行解调,以获取数据字段中的各字段。下面仅对无线耳机对payload字段和CRC字段的处理过程进行说明,对于其它字段,可参照已有蓝牙协议,本申请不做限定。Exemplarily, the wireless earphone receives the data field on a frequency band with a center frequency of fc and a bandwidth of 4 MHz. The wireless headset can demodulate the data field based on the modulation mode indicated by the MCS field to obtain each field in the data field. The following only describes the processing process of the payload field and the CRC field by the wireless headset. For other fields, reference may be made to the existing Bluetooth protocol, which is not limited in this application.
示例性的,无线耳机可基于CRC1字段,对payload1字段中携带的数据块进行校验,以确定payload1字段中的数据块是否正确接收。可选地,正确接收可选地为接收到的数据对应的多个字符的长度、顺序、具体数字均正确。示例性的,无线耳机依次基于接收到的CRC2字段和CRC3字段,分别对payload2字段和payload3字段进行校验。Exemplarily, the wireless headset may check the data block carried in the payload1 field based on the CRC1 field to determine whether the data block in the payload1 field is correctly received. Optionally, the correct reception is optionally that the length, sequence, and specific numbers of multiple characters corresponding to the received data are all correct. Exemplarily, the wireless headset checks the payload2 field and the payload3 field, respectively, based on the received CRC2 field and the CRC3 field.
S303,无线耳机确定CRC1字段~CRC3字段校验成功,获取payload1字段~payload3字段的数据。S303, the wireless headset determines that the verification of the CRC1 field to the CRC3 field is successful, and obtains the data of the payload1 field to the payload3 field.
示例性的,无线耳机基于CRC1~CRC3字段,分别对payload1字段~payload3字段校验成功,也就是说,无线耳机确定payload1字段~payload3字段正确接收。示例性的,无线耳机获取payload1字段~payload3字段包括的数据(即上文所述数据块)。举例说明,示例性的,无线耳机可将获取到的多个数据块(包括payload1字段包括的数据块、payload2字段包括的数据块和payload3字段包括的数据块)按照数据块的顺序进行合并,以得到对应的音频帧。无线耳机可进一步对音频帧进行处理,以播放音频帧对应的音频数据。本申请实施例中仅以音频数据的传输场景为例进行说明,在其他实施例中,对于其它类型的数据与音频数据的传输过程相同。不同的可能是无线耳机端的处理过程,例如,无线耳机端需要对音频帧进行音频解码后,得到对应的音频数据。若是其它类型的帧,例如图像帧,无线耳机需要对图像帧进行图像解码后,得到对应的图像数据,本申请不再一一举例说明。Exemplarily, based on the CRC1 to CRC3 fields, the wireless headset verifies the payload1 to payload3 fields successfully, that is, the wireless headset determines that the payload1 to payload3 fields are correctly received. Exemplarily, the wireless headset obtains the data included in the payload1 field to the payload3 field (ie, the data block described above). For example, the wireless headset can exemplarily combine the acquired multiple data blocks (including the data block included in the payload1 field, the data block included in the payload2 field, and the data block included in the payload3 field) in the order of the data blocks, to Get the corresponding audio frame. The wireless headset may further process the audio frame to play audio data corresponding to the audio frame. In the embodiments of the present application, only a transmission scenario of audio data is used as an example for description. In other embodiments, the transmission process of other types of data is the same as that of audio data. The difference may be the processing process at the wireless earphone end. For example, the wireless earphone end needs to perform audio decoding on the audio frame to obtain corresponding audio data. For other types of frames, such as image frames, the wireless headset needs to perform image decoding on the image frames to obtain corresponding image data, which will not be described one by one in this application.
S304,无线耳机向手机发送ACK信息。S304, the wireless headset sends ACK information to the mobile phone.
示例性的,无线耳机确定正确接收payload1字段~payload3字段后,可基于手机的蓝牙地址信息(该信息是在蓝牙连接建立过程中获取到的),向手机发送ACK信息。Exemplarily, after determining that the payload1 field to the payload3 field are correctly received, the wireless headset may send ACK information to the mobile phone based on the Bluetooth address information of the mobile phone (the information is obtained during the establishment of the Bluetooth connection).
示例性的,图18为示例性示出的蓝牙数据包的格式示意图。如图18所示,蓝牙数据包包括:Preamble字段、Access Code字段和PHY_IND字段。Preamble字段、Acess Code字段的描述可参照上文,此处不再赘述。Exemplarily, FIG. 18 is a schematic diagram of the format of an exemplary Bluetooth data packet. As shown in Figure 18, the Bluetooth data packet includes: Preamble field, Access Code field and PHY_IND field. For the description of the Preamble field and the Access Code field, refer to the above, and will not be repeated here.
示例性的,PHY_IND字段包括BW字段、MCS字段、NESN字段和SN字段。示例性的,BW字段、MCS字段中的8个比特均为1,用于指示该蓝牙数据包仅包含帧头(即未携带数据字段)。Exemplarily, the PHY_IND field includes the BW field, the MCS field, the NESN field, and the SN field. Exemplarily, all 8 bits in the BW field and the MCS field are 1, which are used to indicate that the Bluetooth data packet only includes a frame header (ie, does not carry a data field).
示例性的,如上文所述,无线耳机发送的蓝牙数据包中的NESN字段和SN字段与无线耳机当前存储的NESN字段和SN字段相同。示例性的,无线耳机当前存储的本地NESN的数值为0,本地SN的数值为1。相应的,如图16所示,蓝牙数据包中的NESN字段为0,SN字段为1。Exemplarily, as described above, the NESN field and the SN field in the Bluetooth data packet sent by the wireless headset are the same as the NESN field and SN field currently stored by the wireless headset. Exemplarily, the value of the local NESN currently stored in the wireless headset is 0, and the value of the local SN is 1. Correspondingly, as shown in FIG. 16 , the NESN field in the Bluetooth data packet is 0, and the SN field is 1.
示例性的,手机接收到图18所示的蓝牙数据包。手机读取BW字段和MCS字段,检测到BW字段和MCS字段的8个比特位均为1,确定该蓝牙数据包仅包括帧头,不包括帧体,且用于指示ACK信息或NACK信息。手机可进一步通过读取NESN字段和SN字段,确定蓝牙数据包指示的是ACK信息(具体判断方式可参照上文,下文中不再重复说明)。相应的,手机可确定无线耳机正确接收到手机前一次发送的数据。如上文所述,手机已确定该蓝牙数据包不包括数据字段,手机无需进一步接收数据字段,达到节省功耗的目的。相较于已有蓝牙协议中,需要对数据字段解析才能获取到ACK信息或NACK信息的方案,本申请实施例中的电子设备(例如手机)可以更快速地确定无线耳机是否正确接收到数据。手机快速确定无线耳机是否正确接收到数据后,手机即可根据无线耳机的接收结果,确定需要重新发送数据或者是发送新的数据。从而提高了手机的数据处理以及传输效率。Exemplarily, the mobile phone receives the Bluetooth data packet shown in FIG. 18 . The mobile phone reads the BW field and the MCS field, detects that the 8 bits of the BW field and the MCS field are all 1, and determines that the Bluetooth data packet only includes the frame header, not the frame body, and is used to indicate ACK information or NACK information. The mobile phone can further determine that the Bluetooth data packet indicates ACK information by reading the NESN field and the SN field (for the specific judgment method, please refer to the above, and the description will not be repeated below). Correspondingly, the mobile phone can determine that the wireless headset has correctly received the data previously sent by the mobile phone. As mentioned above, the mobile phone has determined that the Bluetooth data packet does not include a data field, and the mobile phone does not need to receive further data fields, so as to achieve the purpose of saving power consumption. Compared with the solution in the existing Bluetooth protocol, which requires parsing of the data field to obtain the ACK information or NACK information, the electronic device (eg, mobile phone) in the embodiment of the present application can more quickly determine whether the wireless headset has correctly received data. After the mobile phone quickly determines whether the wireless headset has correctly received the data, the mobile phone can determine whether to resend the data or send new data according to the reception result of the wireless headset. Thus, the data processing and transmission efficiency of the mobile phone is improved.
需要说明的是,本申请实施例的音频传输场景,即非对称业务场景中,无线耳机仅需要回复ACK信息或NACK信息。在其他实施例中,例如通话场景,无线耳机与手机之间需要交互数据以及ACK信息(或NACK信息)。It should be noted that, in the audio transmission scenario of the embodiment of the present application, that is, in the asymmetric service scenario, the wireless headset only needs to reply with ACK information or NACK information. In other embodiments, for example, in a call scenario, interactive data and ACK information (or NACK information) are required between the wireless headset and the mobile phone.
举例说明,手机向无线耳机发送包括语音数据的蓝牙数据包。无线耳机成功接收到手机发送的蓝牙数据包后,无线耳机可选地向手机发送ACK信息。示例性的,无线耳机通过麦克风,获取到语音数据。无线耳机可选地向手机发送获取到的语音数据。For example, the mobile phone sends a Bluetooth data packet including voice data to the wireless headset. After the wireless headset successfully receives the Bluetooth data packet sent by the mobile phone, the wireless headset optionally sends ACK information to the mobile phone. Exemplarily, the wireless headset obtains voice data through a microphone. The wireless headset optionally sends the acquired voice data to the mobile phone.
在一个示例中,无线耳机可基于图18所示的蓝牙数据包,向手机发送ACK信息。接着,无线耳机基于图11a或11b所示的蓝牙数据包,向手机发送语音数据。In one example, the wireless headset can send ACK information to the mobile phone based on the Bluetooth data packet shown in FIG. 18 . Next, the wireless headset sends voice data to the mobile phone based on the Bluetooth data packet shown in FIG. 11a or 11b.
在另一个示例中,无线耳机可向手机发送包含ACK信息和语音数据的蓝牙数据包。图19为示例性示出的蓝牙数据包的格式示意图。如图19所示,蓝牙数据包包括Preamble字段、Access Code字段、PHY_IND字段、以及数据字段。示例性的,PHY_IND字段中的BW字段和MCS字段的8个比特位非全1。手机可基于确定该蓝牙数据包包含数据字段。手机可进一步通过读取BW字段和MCS字段,确定数据字段的带宽和调制方式等,具体细节可参照上文的相关内容,此处不再赘述。示例性的,手机可基于NESN字段和SN字段,确定无线耳机回复的是ACK信息,并且,该蓝牙数据包携带的是新数据。具体判断方式可参照上文,此处不再赘述,下文中不再重复说明。In another example, the wireless headset may send a Bluetooth data packet containing ACK information and voice data to the cell phone. FIG. 19 is a schematic diagram of an exemplary format of a Bluetooth data packet. As shown in Figure 19, the Bluetooth data packet includes a Preamble field, an Access Code field, a PHY_IND field, and a data field. Exemplarily, the 8 bits of the BW field and the MCS field in the PHY_IND field are not all 1s. The handset may be based on determining that the Bluetooth data packet contains a data field. The mobile phone can further determine the bandwidth and modulation mode of the data field by reading the BW field and the MCS field. For details, please refer to the relevant content above, which will not be repeated here. Exemplarily, the mobile phone may determine, based on the NESN field and the SN field, that the wireless headset responds with ACK information, and the Bluetooth data packet carries new data. For the specific determination method, reference may be made to the above, which will not be repeated here, and the description will not be repeated hereinafter.
示例性的,数据字段中包括payload1字段、CRC1字段等。手机可对数据字段进行处理,以获取无线耳机发送的语音数据。具体处理过程可参照上文,此处不再赘述。Exemplarily, the data field includes a payload1 field, a CRC1 field, and the like. The mobile phone can process the data field to obtain the voice data sent by the wireless headset. The specific processing process can refer to the above, and details are not repeated here.
场景三scene three
图20a为示例性示出的手机与无线耳机交互示意图。如图20a所示,示例性的,具体包括:FIG. 20a is an exemplary schematic diagram of interaction between a mobile phone and a wireless headset. As shown in Figure 20a, it is exemplary and specifically includes:
S401,无线耳机接收手机发送的蓝牙数据包。S401, the wireless earphone receives the Bluetooth data packet sent by the mobile phone.
示例性的,仍以图16所示的蓝牙数据包为例,具体描述可参照S301,此处不再赘述。Illustratively, the Bluetooth data packet shown in FIG. 16 is still taken as an example, and the specific description may refer to S301, which will not be repeated here.
S402a,无线耳机基于CRC1字段,对payload1字段进行校验。S402a, the wireless headset verifies the payload1 field based on the CRC1 field.
S402b,无线耳机基于CRC2字段,对payload2字段进行校验。S402b, the wireless headset verifies the payload2 field based on the CRC2 field.
S402c,无线耳机基于CRC3字段,对payload3字段进行校验。S402c, the wireless headset verifies the payload3 field based on the CRC3 field.
S402a~S402c的描述可参照S302a~S302c的相关内容,此处不再赘述。For the description of S402a-S402c, reference may be made to the related content of S302a-S302c, which will not be repeated here.
S403,无线耳机确定CRC1字段和CRC2字段校验成功,获取payload1字段和payload2字段的数据。无线耳机确定CRC3字段校验失败,等待重传。S403, the wireless headset determines that the verification of the CRC1 field and the CRC2 field is successful, and obtains the data of the payload1 field and the payload2 field. The wireless headset determines that the CRC3 field check fails and waits for retransmission.
示例性的,无线耳机基于CRC1~CRC3字段,分别对payload1字段~payload3字段进行校验。校验结果为:CRC1字段和CRC2字段校验成功,CRC3字段校验失败。无线耳机可获取校验成功的数据字段,即payload1字段和payload2字段的数据。Exemplarily, the wireless headset checks the payload1 field to the payload3 field based on the CRC1 to CRC3 fields, respectively. The verification result is: the verification of the CRC1 field and the CRC2 field succeeds, and the verification of the CRC3 field fails. The wireless headset can obtain the data fields that are successfully verified, that is, the data of the payload1 field and the payload2 field.
示例性的,无线耳机在确定CRC3字段校验失败后,将payload1字段~payload3字段的缓存在存储器中。Exemplarily, after determining that the verification of the CRC3 field fails, the wireless headset caches the payload1 field to the payload3 field in the memory.
其它未描述内容可参照S303,此处不再赘述。For other undescribed content, reference may be made to S303, which will not be repeated here.
S404,无线耳机向手机发送NACK信息。S404, the wireless headset sends NACK information to the mobile phone.
示例性的,无线耳机确定未正确接收到payload3字段。无线耳机可基于手机的蓝牙地址信息,向手机发送NACK信息。也就是说,手机发送的蓝牙数据包中的数据字段中的任一payload字段接收失败,则确定数据字段接收失败。Exemplarily, the wireless headset determines that the payload3 field is not correctly received. The wireless headset can send NACK information to the mobile phone based on the Bluetooth address information of the mobile phone. That is to say, if any payload field in the data field in the Bluetooth data packet sent by the mobile phone fails to be received, it is determined that the data field fails to be received.
示例性的,图21为示例性示出的蓝牙数据包的格式示意图。如图21所示,蓝牙数据包包括:Preamble字段、Acess Code字段和PHY IND字段。Preamble字段、Acess Code字段的描述可参照上文,此处不再赘述。Exemplarily, FIG. 21 is a schematic diagram of the format of an exemplary Bluetooth data packet. As shown in Figure 21, the Bluetooth data packet includes: Preamble field, Access Code field and PHY IND field. For the description of the Preamble field and the Access Code field, refer to the above, and will not be repeated here.
示例性的,PHY IND字段包括BW字段、MCS字段、NESN字段和SN字段。其中,BW字段、MCS字段中的8个比特均为1,用于指示该蓝牙数据包仅包含帧头(即控制字段),不包括帧体(即数据字段)。Exemplarily, the PHY IND field includes the BW field, the MCS field, the NESN field, and the SN field. The 8 bits in the BW field and the MCS field are all 1, which are used to indicate that the Bluetooth data packet only includes the frame header (ie, the control field), and does not include the frame body (ie, the data field).
示例性的,无线耳机未正确接收到数据,无线耳机不更新本地NESN和本地SN的数值。也就是说,无线耳机当前保存的本地NESN的数值为1,本地SN的数值为1。在本实施例中,无线耳机需要向手机反馈NACK信息。示例性的,无线耳机发送的蓝牙数据包中的NESN字段和SN字段与无线耳机当前存储的NESN字段和SN字段相同。如图21所示,示例性的,蓝牙数据包中的NESN字段为1,SN字段为1。Exemplarily, the wireless headset does not receive data correctly, and the wireless headset does not update the values of the local NESN and the local SN. That is to say, the value of the local NESN currently stored in the wireless headset is 1, and the value of the local SN is 1. In this embodiment, the wireless headset needs to feed back NACK information to the mobile phone. Exemplarily, the NESN field and the SN field in the Bluetooth data packet sent by the wireless headset are the same as the NESN field and SN field currently stored by the wireless headset. As shown in FIG. 21 , exemplarily, the NESN field in the Bluetooth data packet is 1, and the SN field is 1.
示例性的,手机接收到图21所示的蓝牙数据包。手机读取BW字段和MCS字段,检测到BW字段和MCS字段的8个比特位均为1,确定该蓝牙数据包仅包括帧头,且用于指示ACK信息或NACK信息。手机可进一步通过读取NESN字段和SN字段,并基于本地NESN的数值(即为1)和本地SN的数值(即为1),确定蓝牙数据包指示的是NACK信息(即本地SN的数值与数据包中的NESN字段中的数值相同)。相应的,手机可确定无线耳机未正确接收到手机发送的数据。Exemplarily, the mobile phone receives the Bluetooth data packet shown in FIG. 21 . The mobile phone reads the BW field and the MCS field, detects that the 8 bits of the BW field and the MCS field are all 1, determines that the Bluetooth data packet only includes the frame header, and is used to indicate ACK information or NACK information. The mobile phone can further read the NESN field and the SN field, and based on the value of the local NESN (that is, 1) and the value of the local SN (that is, 1), determine that the Bluetooth data packet indicates NACK information (that is, the value of the local SN is the same as the value of the local SN). the same value in the NESN field in the packet). Correspondingly, the mobile phone can determine that the wireless headset has not correctly received the data sent by the mobile phone.
示例性的,手机在确定无线耳机为正确接收到手机发送的数据的情况下,手机可检测预设的重传机制。可选地,手机预设的重传机制可设置重传次数,例如可以设置为重传一次或重传三次,本申请不做限定。Exemplarily, when the mobile phone determines that the wireless headset has correctly received the data sent by the mobile phone, the mobile phone can detect a preset retransmission mechanism. Optionally, the preset retransmission mechanism of the mobile phone can set the number of retransmissions, for example, it can be set as one retransmission or three retransmissions, which is not limited in this application.
在一种可能的实现方式中,若手机是以广播的方式传输数据流,或者是,手机未设置有重传机制的场景下,耳机可选地无需回复ACK信息或NACK信息。In a possible implementation manner, if the mobile phone transmits the data stream in a broadcast manner, or if the mobile phone is not provided with a retransmission mechanism, the headset optionally does not need to reply ACK information or NACK information.
如图20b为示例性示出的手机与无线耳机的数据重传流程示意图。如图20b所示,示例性的,具体包括:FIG. 20b is an exemplary schematic diagram of a data retransmission process between a mobile phone and a wireless headset. As shown in Figure 20b, exemplary, specifically including:
S501,无线耳机接收手机重传的蓝牙数据包。S501, the wireless headset receives the Bluetooth data packet retransmitted by the mobile phone.
示例性的,在本申请实施例中,手机确定无线耳机未成功接收上一次发送的蓝牙数据后,手机向耳机重新发送该蓝牙数据。图22为示例性示出的重传蓝牙数据包的结构示意图。如图22所示,蓝牙数据包中的NESN字段与SN字段的数值与手机当前存储的本地NESN的数值(即为1)和本地SN字段的数值(即为1)相同。其它字段的信息可参照图11b中的描述,此处不再赘述。Exemplarily, in this embodiment of the present application, after the mobile phone determines that the wireless headset failed to successfully receive the Bluetooth data sent last time, the mobile phone resends the Bluetooth data to the headset. FIG. 22 is a schematic structural diagram of an exemplary retransmission of a Bluetooth data packet. As shown in Figure 22, the values of the NESN field and the SN field in the Bluetooth data packet are the same as the local NESN value (ie, 1) and the value of the local SN field (ie, 1) currently stored in the mobile phone. For the information of other fields, reference may be made to the description in FIG. 11b , which will not be repeated here.
示例性的,无线耳机接收到手机发送的蓝牙数据包。无线耳机当前存储的本地NESN的数值为0,本地SN的数值为1。示例性的,无线耳机可基于本地NESN的数值(即为0)和蓝牙数据包中的SN字段的数值(即为1),确定该蓝牙数据包中传输的是上一次传输的旧数据。并且,无线耳机检测到无线耳机上一次回复的是NACK信息,则无线耳机接收数据字段,并执行后续的处理步骤。Exemplarily, the wireless headset receives the Bluetooth data packet sent by the mobile phone. The value of the local NESN currently stored in the wireless headset is 0, and the value of the local SN is 1. Exemplarily, the wireless headset may determine, based on the value of the local NESN (ie, 0) and the value of the SN field in the Bluetooth data packet (ie, 1), that the last transmitted old data is transmitted in the Bluetooth data packet. Moreover, if the wireless headset detects that the last reply from the wireless headset is NACK information, the wireless headset receives the data field and performs subsequent processing steps.
S502,无线耳机基于CRC3字段,对第一次接收到的payload3字段和第二次接收到的payload3字段进行合并校验。S502, the wireless headset performs combined verification on the payload3 field received for the first time and the payload3 field received for the second time based on the CRC3 field.
示例性的,无线耳机可从存储器中获取第一次接收到的payload3字段的数据。无线耳机可基于CRC字段,对第一次接收到的payload3字段中的数据和第二次(即当前接收到的)接收到的payload3字段中的数据进行合并校验。具体合并校验的方式可参照已有技术的CRC校验方式,本申请不再重复说明。本申请实施例中的蓝牙数据包中的数据字段包括多个数据块,接收端(例如无线耳机)在任一数据块接收错误的情况下,可在接收到重传的数据包后,仅对上一次错误接收的数据包进行合并校验。而无需如已有蓝牙协议中,需要对整个数据字段进行合并校验。从而有效提升数据接收效率,降低接收端的处理压力。Exemplarily, the wireless headset may obtain the data of the payload3 field received for the first time from the memory. Based on the CRC field, the wireless headset may perform a combined check on the data in the payload3 field received for the first time and the data in the payload3 field received for the second time (ie, currently received). For the specific method of combining and checking, reference may be made to the CRC checking method in the prior art, and the description will not be repeated in this application. The data field in the Bluetooth data packet in the embodiment of the present application includes multiple data blocks, and the receiving end (for example, a wireless headset) can receive the retransmitted data packet after receiving the retransmitted data packet in the case that any data block is received incorrectly. A packet received in error is merged and checked. There is no need to merge and check the entire data field as in the existing Bluetooth protocol. Thereby, the data receiving efficiency is effectively improved and the processing pressure on the receiving end is reduced.
S503,无线耳机确定CRC3字段校验成功,获取payload1字段~payload3字段的数据。S503, the wireless headset determines that the verification of the CRC3 field is successful, and obtains data from the payload1 field to the payload3 field.
示例性的,无线耳机对payload3字段进行合并校验成功后,无线耳机可获取上一次获取到的payload1字段和payload2字段的数据,以及本次获取到的payload3字段的数据。其中,payload3字段的数据是指两次合并校验成功后获取到的数据。示例性的,无线耳机对payload1字段~payload3字段的数据进行相应处理,具体描述可参照S303,此处不再赘述。Exemplarily, after the wireless headset successfully merges and checks the payload3 field, the wireless headset can obtain the data of the payload1 field and the payload2 field obtained last time, and the data of the payload3 field obtained this time. Among them, the data in the payload3 field refers to the data obtained after two successful merge verifications. Exemplarily, the wireless headset performs corresponding processing on the data in the payload1 field to the payload3 field, and the specific description can refer to S303, which will not be repeated here.
S504,无线耳机向手机发送ACK信息。S504, the wireless headset sends ACK information to the mobile phone.
示例性的,无线耳机确定正确接收payload1字段~payload3字段后,可基于手机的蓝牙地址信息(该信息是在蓝牙连接建立过程中获取到的),向手机发送ACK信息。具体细节可参照S304,此处不再赘述。Exemplarily, after determining that the payload1 field to the payload3 field are correctly received, the wireless headset may send ACK information to the mobile phone based on the Bluetooth address information of the mobile phone (the information is obtained during the establishment of the Bluetooth connection). For specific details, refer to S304, which will not be repeated here.
需要说明的是,上文中均是以蓝牙数据包中包括多个payload字段和CRC字段为例进行说明。在本申请实施例中,蓝牙数据包中的数据也可以仅划分为一个数据块,并承载于payload字段,该payload字段可对应一个CRC字段。也就是说,本申请实施例中的帧头部分可以与已有蓝牙协议中的帧体部分,即仅包括一个payload字段和一个CRC字段的帧体进行结合。可以理解为,本申请实施例中的带宽指示方式、ACK/NACK指示方式、功率指示方式以及多个payload字段和CRC字段的方式可以独立使用,也可以任意结合,本申请不做限定。It should be noted that the above descriptions are given by taking the example that the Bluetooth data packet includes multiple payload fields and CRC fields. In this embodiment of the present application, the data in the Bluetooth data packet may also be divided into only one data block and carried in the payload field, and the payload field may correspond to a CRC field. That is to say, the frame header part in this embodiment of the present application can be combined with the frame body part in the existing Bluetooth protocol, that is, the frame body including only one payload field and one CRC field. It can be understood that the bandwidth indication manner, the ACK/NACK indication manner, the power indication manner, and the manners of multiple payload fields and CRC fields in the embodiments of the present application may be used independently, or may be arbitrarily combined, which is not limited in this application.
如上文所述,在对称业务场景中,无线耳机可选地与手机之间交互数据以及ACK信息(或NACK信息)。仍以通话场景为例,手机向无线耳机发送包括语音数据的蓝牙数据包。无线耳机未能正确接收到手机发送的至少一个数据字段,无线耳机可选地向手机发送NACK信息。示例性的,无线耳机通过麦克风,获取到语音数据。无线耳机可选地向手机发送获取到的语音数据。As described above, in a symmetric service scenario, the wireless headset optionally exchanges data and ACK information (or NACK information) with the mobile phone. Still taking a call scenario as an example, the mobile phone sends a Bluetooth data packet including voice data to the wireless headset. If the wireless headset fails to correctly receive at least one data field sent by the mobile phone, the wireless headset optionally sends a NACK message to the mobile phone. Exemplarily, the wireless headset obtains voice data through a microphone. The wireless headset optionally sends the acquired voice data to the mobile phone.
在一个示例中,无线耳机可基于图21所示的蓝牙数据包,向手机发送NACK信息。接着,无线耳机基于图11a或11b所示的蓝牙数据包,向手机发送语音数据。In one example, the wireless headset can send NACK information to the mobile phone based on the Bluetooth data packet shown in FIG. 21 . Next, the wireless headset sends voice data to the mobile phone based on the Bluetooth data packet shown in FIG. 11a or 11b.
在另一个示例中,无线耳机可向手机发送包含NACK信息和语音数据的蓝牙数据包。图23为示例性示出的蓝牙数据包的格式示意图。如图23所示,蓝牙数据包包括Preamble字段、Access Code字段、PHY IND字段、以及数据字段。示例性的,PHY IND字段中的BW字段和MCS字段的8个比特位非全1。手机可基于确定该蓝牙数据包包含数据字段。手机可进一步通过读取BW字段和MCS字段,确定数据字段的带宽和调制方式等,具体细节可参照上文的相关内容,此处不再赘述。In another example, the wireless headset may send a Bluetooth data packet containing NACK information and voice data to the cell phone. FIG. 23 is a schematic diagram of an exemplary format of a Bluetooth data packet. As shown in Figure 23, the Bluetooth data packet includes a Preamble field, an Access Code field, a PHY IND field, and a data field. Exemplarily, the 8 bits of the BW field and the MCS field in the PHY IND field are not all 1s. The handset may be based on determining that the Bluetooth data packet contains a data field. The mobile phone can further determine the bandwidth and modulation mode of the data field by reading the BW field and the MCS field. For details, please refer to the relevant content above, which will not be repeated here.
请继续参照图23,示例性的,NESN字段为0,SN字段为1。示例性的,手机可基于NESN字段和SN字段,确定无线耳机未正确接收语音数据,并且,该数据包中携带数据为新数据。Please continue to refer to FIG. 23 , exemplarily, the NESN field is 0, and the SN field is 1. Exemplarily, the mobile phone may determine, based on the NESN field and the SN field, that the wireless headset has not correctly received the voice data, and the data carried in the data packet is new data.
示例性的,数据字段中包括payload1字段、CRC1字段等。手机可对数据字段进行处理,以获取无线耳机发送的语音数据。具体处理过程可参照上文,此处不再赘述。Exemplarily, the data field includes a payload1 field, a CRC1 field, and the like. The mobile phone can process the data field to obtain the voice data sent by the wireless headset. The specific processing process can refer to the above, and details are not repeated here.
示例性的,若手机正确接收到无线耳机发送的所有数据字段。手机需向无线耳机发送ACK信息。示例性的,如上文所述,手机已确定无线耳机未正确接收到上一次发送的蓝牙数据。手机同时发送ACK信息和给无线耳机重传蓝牙数据。可选地,手机可向无线耳机发送包括ACK信息和重传的蓝牙数据的蓝牙数据包。本申请不做限定。Exemplarily, if the mobile phone correctly receives all the data fields sent by the wireless headset. The mobile phone needs to send an ACK message to the wireless headset. Exemplarily, as described above, the mobile phone has determined that the wireless headset has not correctly received the last sent Bluetooth data. The mobile phone simultaneously sends the ACK message and retransmits the Bluetooth data to the wireless headset. Optionally, the mobile phone may send a Bluetooth data packet including ACK information and retransmitted Bluetooth data to the wireless headset. This application is not limited.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above-mentioned functions, the electronic device includes corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
一个示例中,图24示出了本申请实施例的一种装置2400的示意性框图装置2400可包括:处理器2401和收发器/收发管脚2402,可选地,还包括存储器2403。In an example, FIG. 24 shows a schematic block diagram of an apparatus 2400 according to an embodiment of the present application. The apparatus 2400 may include: a processor 2401 , a transceiver/transceiver pin 2402 , and optionally, a memory 2403 .
装置2400的各个组件通过总线2404耦合在一起,其中总线2404除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都称为总线2404。The various components of the device 2400 are coupled together through a bus 2404, wherein the bus 2404 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity, however, the various buses are referred to as bus 2404 in the figures.
可选地,存储器2403可以用于前述方法实施例中的指令。该处理器2401可用于执行存储器2403中的指令,并控制接收管脚接收信号,以及控制发送管脚发送信号。Optionally, the memory 2403 may be used for the instructions in the foregoing method embodiments. The processor 2401 can be used to execute the instructions in the memory 2403, and control the receive pins to receive signals, and control the transmit pins to transmit signals.
装置2400可以是上述方法实施例中的电子设备或电子设备的芯片。The apparatus 2400 may be the electronic device or the chip of the electronic device in the above method embodiments.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的蓝牙通信方法。This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above related method steps to implement the Bluetooth communication method in the above embodiment.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的蓝牙通信方法。This embodiment also provides a computer program product, which, when the computer program product runs on the computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the Bluetooth communication method in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的蓝牙通信方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the Bluetooth communication method in the above method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by different The function module is completed, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
本申请各个实施例的任意内容,以及同一实施例的任意内容,均可以自由组合。对上述内容的任意组合均在本申请的范围之内。Any content of each embodiment of the present application and any content of the same embodiment can be freely combined. Any combination of the above is within the scope of this application.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单 片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of this application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions. Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, read only memory (Read Only Memory, ROM), erasable programmable read only memory ( Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium may reside in an ASIC.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that, in one or more of the above examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented in software, 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 medium can be any available medium that can be accessed by a general purpose or special purpose computer.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (44)

  1. 一种蓝牙通信系统,其特征在于,包括第一电子设备和第二电子设备,所述第一电子设备与所述第二电子设备之间通过蓝牙连接进行数据交互;A Bluetooth communication system, characterized in that it includes a first electronic device and a second electronic device, and data interaction is performed between the first electronic device and the second electronic device through a Bluetooth connection;
    所述第一电子设备,用于:The first electronic device is used for:
    向所述第二电子设备发送第一蓝牙数据包;所述第一蓝牙数据包包括帧头和帧体,所述第一蓝牙数据包的帧头包括第一带宽指示信息,所述第一带宽指示信息用于指示所述第一蓝牙数据包的帧体的第一传输带宽;Send a first Bluetooth data packet to the second electronic device; the first Bluetooth data packet includes a frame header and a frame body, the frame header of the first Bluetooth data packet includes first bandwidth indication information, and the first bandwidth The indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet;
    所述第二电子设备,用于:The second electronic device is used for:
    接收所述第一蓝牙数据包;receiving the first Bluetooth data packet;
    获取所述第一蓝牙数据包的帧头中的所述第一带宽指示信息;obtaining the first bandwidth indication information in the frame header of the first Bluetooth data packet;
    根据所述第一带宽指示信息,在所述第一传输带宽上接收所述第一蓝牙数据包的帧体。According to the first bandwidth indication information, the frame body of the first Bluetooth data packet is received on the first transmission bandwidth.
  2. 根据权利要求1所述的系统,其特征在于,The system of claim 1, wherein:
    所述第一电子设备,还用于:The first electronic device is also used for:
    向所述第二电子设备发送第二蓝牙数据包,所述第二蓝牙数据包包括帧头和帧体,所述第二蓝牙数据包的帧头包括所述第二带宽指示信息,所述第二带宽指示信息用于指示所述第二蓝牙数据包的帧体的第二传输带宽;其中,所述第一传输带宽与所述第二传输带宽不同;Send a second Bluetooth data packet to the second electronic device, the second Bluetooth data packet includes a frame header and a frame body, the frame header of the second Bluetooth data packet includes the second bandwidth indication information, and the first Bluetooth data packet includes the second bandwidth indication information. The second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein, the first transmission bandwidth is different from the second transmission bandwidth;
    所述第二电子设备,还用于:The second electronic device is also used for:
    接收所述第二蓝牙数据包;receiving the second Bluetooth data packet;
    获取所述第二蓝牙数据包的帧头中的第二带宽指示信息;acquiring the second bandwidth indication information in the frame header of the second Bluetooth data packet;
    根据所述第二带宽指示信息,在所述第二传输带宽上接收所述第二蓝牙数据包的帧体。According to the second bandwidth indication information, the frame body of the second Bluetooth data packet is received on the second transmission bandwidth.
  3. 根据权利要求1所述的系统,其特征在于,所述第一蓝牙数据包的帧头还包括第一调制指示信息,所述第一调制指示信息用于指示所述帧体的调制方式;The system according to claim 1, wherein the frame header of the first Bluetooth data packet further includes first modulation indication information, and the first modulation indication information is used to indicate the modulation mode of the frame body;
    所述第二电子设备,还用于:The second electronic device is also used for:
    获取所述第一调制指示信息;obtaining the first modulation indication information;
    根据所述第一调制指示信息指示的调制方式,对所述第一蓝牙数据包的帧体进行解调。The frame body of the first Bluetooth data packet is demodulated according to the modulation mode indicated by the first modulation indication information.
  4. 根据权利要求3所述的系统,其特征在于,所述第一调制指示信息和所述第一带宽指示信息承载于所述第一蓝牙数据包的帧头的物理层指示字段。The system according to claim 3, wherein the first modulation indication information and the first bandwidth indication information are carried in a physical layer indication field of a frame header of the first Bluetooth data packet.
  5. 根据权利要求1所述的系统,其特征在于,所述第一蓝牙数据包的帧体包括头部Header字段和数据字段,所述Header字段包括第一功率指示信息,所述第一功率指示信 息用于指示所述第二电子设备的发送功率;所述数据字段包括蓝牙数据。The system according to claim 1, wherein the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information used to indicate the transmit power of the second electronic device; the data field includes Bluetooth data.
  6. 根据权利要求1所述的系统,其特征在于,所述第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,所述多个数据字段与所述多个校验字段一一对应,且每个数据字段包括蓝牙数据。The system according to claim 1, wherein the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields The fields are in one-to-one correspondence, and each data field includes Bluetooth data.
  7. 根据权利要求6所述的系统,其特征在于,The system of claim 6, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验。Based on each of the plurality of check fields, the corresponding data field is checked.
  8. 根据权利要求7所述的系统,其特征在于,The system of claim 7, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    当所述多个数据字段中的至少一个数据字段校验失败,向所述第一电子设备发送第三蓝牙数据包;所述第三蓝牙数据包包括帧头和帧体,所述第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,所述第三带宽指示信息用于指示所述第三蓝牙数据包的帧体的第三传输带宽;所述第一接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包;When the verification of at least one of the plurality of data fields fails, a third Bluetooth data packet is sent to the first electronic device; the third Bluetooth data packet includes a frame header and a frame body, and the third Bluetooth data packet includes a frame header and a frame body. The frame header of the data packet includes third bandwidth indication information and first reception indication information, where the third bandwidth indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; the first reception indication The information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet;
    所述第一电子设备,还用于:The first electronic device is also used for:
    接收所述第三蓝牙数据包;receiving the third Bluetooth data packet;
    获取所述第三蓝牙数据包的帧头中的所述第三带宽指示信息和所述第一接收指示信息;acquiring the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet;
    根据所述第三带宽指示信息,在所述第三传输带宽上接收所述第三蓝牙数据包的帧体;以及,receiving the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and,
    根据所述第一接收指示信息,向所述第二电子设备发送第四蓝牙数据包,所述第四蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段。According to the first reception indication information, a fourth Bluetooth data packet is sent to the second electronic device, and the frame body of the fourth Bluetooth data packet includes the plurality of data fields and the plurality of check fields, and the frame body of the fourth Bluetooth data packet includes the plurality of data fields and the plurality of check fields. The plurality of data fields include the at least one data field that failed verification.
  9. 根据权利要求8所述的系统,其特征在于,The system of claim 8, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    接收所述第四蓝牙数据包;receiving the fourth Bluetooth data packet;
    响应于接收到的所述第四蓝牙数据包,基于所述第四蓝牙数据包中的所述至少一个数据字段与所述多个数据字段中校验成功的其它数据字段进行合并校验;In response to the received fourth Bluetooth data packet, performing a combined check based on the at least one data field in the fourth Bluetooth data packet and other data fields that are successfully verified in the plurality of data fields;
    当合并校验成功,获取所述多个数据字段中的蓝牙数据。When the merge verification succeeds, acquire the Bluetooth data in the multiple data fields.
  10. 根据权利要求7所述的系统,其特征在于,The system of claim 7, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    当所述多个数据字段中的至少一个数据字段校验失败,向所述第一电子设备发送第五蓝牙数据包;所述第五蓝牙数据包包括帧头,所述第五蓝牙数据包的帧头包括第二接 收指示信息,所述第二接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包,且所述第五蓝牙数据包不包括帧体;When the verification of at least one data field in the plurality of data fields fails, a fifth Bluetooth data packet is sent to the first electronic device; the fifth Bluetooth data packet includes a frame header, and the The frame header includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not include a frame body;
    所述第一电子设备,还用于:The first electronic device is also used for:
    接收所述第五蓝牙数据包;receiving the fifth Bluetooth data packet;
    获取所述第五蓝牙数据包的帧头中的所述第二接收指示信息;acquiring the second reception indication information in the frame header of the fifth Bluetooth data packet;
    根据所述第二接收指示信息,向所述第二电子设备发送第六蓝牙数据包,所述第六蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段。According to the second reception indication information, a sixth Bluetooth data packet is sent to the second electronic device, and the frame body of the sixth Bluetooth data packet includes the plurality of data fields and the plurality of check fields. The plurality of data fields include the at least one data field that failed verification.
  11. 根据权利要求10所述的系统,其特征在于,The system of claim 10, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    接收所述第六蓝牙数据包;receiving the sixth Bluetooth data packet;
    响应于接收到的所述第六蓝牙数据包,基于所述第六蓝牙数据包中的所述至少一个数据字段与所述多个数据字段中校验成功的其它数据字段进行合并校验;In response to the received sixth Bluetooth data packet, performing a combined check based on the at least one data field in the sixth Bluetooth data packet and other data fields that are successfully verified in the plurality of data fields;
    当合并校验成功,获取所述多个数据字段中的蓝牙数据。When the merge verification succeeds, acquire the Bluetooth data in the multiple data fields.
  12. 根据权利要求7所述的系统,其特征在于,The system of claim 7, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    当所述多个数据字段校验成功,向所述第一电子设备发送第七蓝牙数据包;所述第七蓝牙数据包包括帧头和帧体,所述第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,所述第四带宽指示信息用于指示所述第七蓝牙数据包的帧体的第四传输带宽;所述第三接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包;When the multiple data fields are successfully verified, a seventh Bluetooth data packet is sent to the first electronic device; the seventh Bluetooth data packet includes a frame header and a frame body, and the frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, where the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used to indicate the The second electronic device correctly receives the first Bluetooth data packet;
    所述第一电子设备,还用于:The first electronic device is also used for:
    接收所述第七蓝牙数据包;receiving the seventh Bluetooth data packet;
    获取所述第七蓝牙数据包的帧头中的所述第四带宽指示信息和所述第三接收指示信息;acquiring the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet;
    根据所述第四带宽指示信息,在所述第四传输带宽上接收所述第七蓝牙数据包的帧体;以及,receiving the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; and,
    根据所述第三接收指示信息,确定所述第二电子设备正确接收到所述第一蓝牙数据包。According to the third reception indication information, it is determined that the second electronic device correctly receives the first Bluetooth data packet.
  13. 根据权利要求7所述的系统,其特征在于,The system of claim 7, wherein:
    所述第二电子设备,还用于:The second electronic device is also used for:
    当所述多个数据字段校验成功,向所述第一电子设备发送第八蓝牙数据包;所述第八蓝牙数据包包括帧头,所述第八蓝牙数据包的帧头包括第四接收指示信息,所述第四接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包,且所述第八蓝牙数据包不包括帧体;When the multiple data fields are successfully verified, send an eighth Bluetooth data packet to the first electronic device; the eighth Bluetooth data packet includes a frame header, and the frame header of the eighth Bluetooth data packet includes a fourth receive indication information, the fourth receiving indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body;
    所述第一电子设备,还用于:The first electronic device is also used for:
    接收所述第八蓝牙数据包;receiving the eighth Bluetooth data packet;
    获取所述第八蓝牙数据包的帧头中的所述第四接收指示信息;acquiring the fourth reception indication information in the frame header of the eighth Bluetooth data packet;
    根据所述第四接收指示信息,确定所述第二电子设备正确接收到所述第一蓝牙数据包。According to the fourth reception indication information, it is determined that the second electronic device correctly receives the first Bluetooth data packet.
  14. 根据权利要求1所述的系统,其特征在于,所述第一电子设备与所述第二电子设备为预设的电子设备。The system according to claim 1, wherein the first electronic device and the second electronic device are preset electronic devices.
  15. 根据权利要求1至14任一项所述的系统,其特征在于,所述第一传输带宽为1MHz、2MHz、4MHz或5MHz。The system according to any one of claims 1 to 14, wherein the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz or 5 MHz.
  16. 一种蓝牙通信方法,其特征在于,应用于第一电子设备,所述方法包括:A Bluetooth communication method, characterized in that, applied to a first electronic device, the method comprising:
    向第二电子设备发送第一蓝牙数据包;所述第一蓝牙数据包包括帧头和帧体,所述第一蓝牙数据包的帧头包括第一带宽指示信息,所述第一带宽指示信息用于指示所述第一蓝牙数据包的帧体的第一传输带宽。Send a first Bluetooth data packet to the second electronic device; the first Bluetooth data packet includes a frame header and a frame body, and the frame header of the first Bluetooth data packet includes first bandwidth indication information, and the first bandwidth indication information It is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet.
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method of claim 16, wherein the method further comprises:
    向所述第二电子设备发送第二蓝牙数据包,所述第二蓝牙数据包包括帧头和帧体,所述第二蓝牙数据包的帧头包括所述第二带宽指示信息,所述第二带宽指示信息用于指示所述第二蓝牙数据包的帧体的第二传输带宽;其中,所述第一传输带宽与所述第二传输带宽不同。Send a second Bluetooth data packet to the second electronic device, the second Bluetooth data packet includes a frame header and a frame body, the frame header of the second Bluetooth data packet includes the second bandwidth indication information, and the first The second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein the first transmission bandwidth is different from the second transmission bandwidth.
  18. 根据权利要求16所述的方法,其特征在于,所述第一蓝牙数据包的帧头还包括第一调制指示信息,所述第一调制指示信息用于指示所述帧体的调制方式。The method according to claim 16, wherein the frame header of the first Bluetooth data packet further includes first modulation indication information, and the first modulation indication information is used to indicate a modulation mode of the frame body.
  19. 根据权利要求18所述的方法,其特征在于,所述第一调制指示信息和所述第一带宽指示信息承载于所述第一蓝牙数据包的帧头的物理层指示字段。The method according to claim 18, wherein the first modulation indication information and the first bandwidth indication information are carried in a physical layer indication field of a frame header of the first Bluetooth data packet.
  20. 根据权利要求16所述的方法,其特征在于,所述第一蓝牙数据包的帧体包括头部Header字段和数据字段,所述Header字段包括第一功率指示信息,所述第一功率指示信息用于指示所述第二电子设备的发送功率;所述数据字段包括蓝牙数据。The method according to claim 16, wherein the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information used to indicate the transmit power of the second electronic device; the data field includes Bluetooth data.
  21. 根据权利要求16所述的方法,其特征在于,所述第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,所述多个数据字段与所述多个校验字段一一对应,且每个数据字段包括蓝牙数据。The method according to claim 16, wherein the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields The fields are in one-to-one correspondence, and each data field includes Bluetooth data.
  22. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    接收所述第二电子设备发送的第三蓝牙数据包;所述第三蓝牙数据包为所述第二电子设备基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验,且所述多个数据字段中的至少一个数据字段校验失败时发送的;所述第三蓝牙数据包包括帧头和帧体,所述第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,所述第三带宽指示信息用于指示所述第三蓝牙数据包的帧体的第三传输带宽;所述第一接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包;Receive a third Bluetooth data packet sent by the second electronic device; the third Bluetooth data packet is based on the second electronic device, based on each check field in the plurality of check fields, for the corresponding data field It is sent when verification is performed, and at least one data field in the plurality of data fields fails to verify; the third Bluetooth data packet includes a frame header and a frame body, and the frame header of the third Bluetooth data packet includes the first Three bandwidth indication information and first reception indication information, the third bandwidth indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; the first reception indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; The second electronic device does not correctly receive the first Bluetooth data packet;
    获取所述第三蓝牙数据包的帧头中的所述第三带宽指示信息和所述第一接收指示信息;acquiring the third bandwidth indication information and the first reception indication information in the frame header of the third Bluetooth data packet;
    根据所述第三带宽指示信息,在所述第三传输带宽上接收所述第三蓝牙数据包的帧体;以及,receiving the frame body of the third Bluetooth data packet on the third transmission bandwidth according to the third bandwidth indication information; and,
    根据所述第一接收指示信息,向所述第二电子设备发送第四蓝牙数据包,所述第四蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段。According to the first reception indication information, a fourth Bluetooth data packet is sent to the second electronic device, and the frame body of the fourth Bluetooth data packet includes the plurality of data fields and the plurality of check fields, and the frame body of the fourth Bluetooth data packet includes the plurality of data fields and the plurality of check fields. The plurality of data fields include the at least one data field that failed verification.
  23. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    接收所述第二电子设备发送的第五蓝牙数据包;所述第五蓝牙数据包为所述第二电子设备基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验,且所述多个数据字段中的至少一个数据字段校验失败时发送的;所述第五蓝牙数据包包括帧头,所述第五蓝牙数据包的帧头包括第二接收指示信息,所述第二接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包,且所述第五蓝牙数据包不包括帧体;Receive a fifth Bluetooth data packet sent by the second electronic device; the fifth Bluetooth data packet is based on the second electronic device for each check field in the plurality of check fields, for the corresponding data field It is sent when verification is performed, and at least one data field in the plurality of data fields fails to verify; the fifth Bluetooth data packet includes a frame header, and the frame header of the fifth Bluetooth data packet includes a second reception indication information, the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not include a frame body;
    获取所述第五蓝牙数据包的帧头中的所述第二接收指示信息;acquiring the second reception indication information in the frame header of the fifth Bluetooth data packet;
    根据所述第二接收指示信息,向所述第二电子设备发送第六蓝牙数据包,所述第六蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段。According to the second reception indication information, a sixth Bluetooth data packet is sent to the second electronic device, and the frame body of the sixth Bluetooth data packet includes the plurality of data fields and the plurality of check fields. The plurality of data fields include the at least one data field that failed verification.
  24. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    接收所述第二电子设备发送的第七蓝牙数据包;所述第七蓝牙数据包为所述第二电子设备基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验,且所述多个数据字段校验成功时发送的;所述第七蓝牙数据包包括帧头和帧体,所述第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,所述第四带宽指示信息用于指示所述第七蓝牙数据包的帧体的第四传输带宽;所述第三接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包;Receive a seventh Bluetooth data packet sent by the second electronic device; the seventh Bluetooth data packet is based on the second electronic device, based on each check field in the plurality of check fields, for the corresponding data field It is sent when verification is performed, and the verification of the multiple data fields is successful; the seventh Bluetooth data packet includes a frame header and a frame body, and the frame header of the seventh Bluetooth data packet includes the fourth bandwidth indication information and the first Three reception indication information, the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used to instruct the second electronic device to correctly receive the the first Bluetooth data packet;
    获取所述第七蓝牙数据包的帧头中的所述第四带宽指示信息和所述第三接收指示信息;acquiring the fourth bandwidth indication information and the third reception indication information in the frame header of the seventh Bluetooth data packet;
    根据所述第四带宽指示信息,在所述第四传输带宽上接收所述第七蓝牙数据包的帧体;以及,receiving the frame body of the seventh Bluetooth data packet on the fourth transmission bandwidth according to the fourth bandwidth indication information; and,
    根据所述第三接收指示信息,确定所述第二电子设备正确接收到所述第一蓝牙数据包。According to the third reception indication information, it is determined that the second electronic device correctly receives the first Bluetooth data packet.
  25. 根据权利要求21所述的方法,其特征在于,所述方法还包括:The method of claim 21, wherein the method further comprises:
    接收所述第二电子设备发送的第八蓝牙数据包;所述第八蓝牙数据包为所述第二电子设备基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验,且所述多个数据字段校验成功时发送的;所述第八蓝牙数据包包括帧头,所述第八蓝牙数据包的帧头包括第四接收指示信息,所述第四接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包,且所述第八蓝牙数据包不包括帧体;Receive an eighth Bluetooth data packet sent by the second electronic device; the eighth Bluetooth data packet is based on the second electronic device, based on each check field in the plurality of check fields, for the corresponding data field It is sent when verification is performed and the multiple data fields are successfully verified; the eighth Bluetooth data packet includes a frame header, and the frame header of the eighth Bluetooth data packet includes fourth reception indication information, and the fourth The reception indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body;
    获取所述第八蓝牙数据包的帧头中的所述第四接收指示信息;acquiring the fourth reception indication information in the frame header of the eighth Bluetooth data packet;
    根据所述第四接收指示信息,确定所述第二电子设备正确接收到所述第一蓝牙数据包。According to the fourth reception indication information, it is determined that the second electronic device correctly receives the first Bluetooth data packet.
  26. 根据权利要求16所述的方法,其特征在于,所述第一电子设备与所述第二电子设备为预设的电子设备。The method according to claim 16, wherein the first electronic device and the second electronic device are preset electronic devices.
  27. 根据权利要求16至26任一项所述的方法,其特征在于,所述第一传输带宽为1MHz、2MHz、4MHz或5MHz。The method according to any one of claims 16 to 26, wherein the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz or 5 MHz.
  28. 一种蓝牙通信方法,其特征在于,应用于第二电子设备,所述方法包括:A Bluetooth communication method, characterized in that, applied to a second electronic device, the method comprising:
    接收第一电子设备发送的第一蓝牙数据包;其中,所述第一蓝牙数据包包括帧头和帧体,所述第一蓝牙数据包的帧头包括第一带宽指示信息,所述第一带宽指示信息用于指示所述第一蓝牙数据包的帧体的第一传输带宽;Receive a first Bluetooth data packet sent by a first electronic device; wherein, the first Bluetooth data packet includes a frame header and a frame body, the frame header of the first Bluetooth data packet includes first bandwidth indication information, and the first Bluetooth data packet includes first bandwidth indication information. The bandwidth indication information is used to indicate the first transmission bandwidth of the frame body of the first Bluetooth data packet;
    获取所述第一蓝牙数据包的帧头中的所述第一带宽指示信息;obtaining the first bandwidth indication information in the frame header of the first Bluetooth data packet;
    根据所述第一带宽指示信息,在所述第一传输带宽上接收所述第一蓝牙数据包的帧体。According to the first bandwidth indication information, the frame body of the first Bluetooth data packet is received on the first transmission bandwidth.
  29. 根据权利要求28所述的方法,其特征在于,所述方法还包括:The method of claim 28, wherein the method further comprises:
    接收所述第一电子设备发送的第二蓝牙数据包;所述第二蓝牙数据包包括帧头和帧体,所述第二蓝牙数据包的帧头包括所述第二带宽指示信息,所述第二带宽指示信息用于指示所述第二蓝牙数据包的帧体的第二传输带宽;其中,所述第一传输带宽与所述第二传输带宽不同;Receive a second Bluetooth data packet sent by the first electronic device; the second Bluetooth data packet includes a frame header and a frame body, the frame header of the second Bluetooth data packet includes the second bandwidth indication information, and the The second bandwidth indication information is used to indicate the second transmission bandwidth of the frame body of the second Bluetooth data packet; wherein the first transmission bandwidth is different from the second transmission bandwidth;
    获取所述第二蓝牙数据包的帧头中的第二带宽指示信息;acquiring the second bandwidth indication information in the frame header of the second Bluetooth data packet;
    根据所述第二带宽指示信息,在所述第二传输带宽上接收所述第二蓝牙数据包的帧体。According to the second bandwidth indication information, the frame body of the second Bluetooth data packet is received on the second transmission bandwidth.
  30. 根据权利要求28所述的方法,其特征在于,所述第一蓝牙数据包的帧头还包括第一调制指示信息,所述第一调制指示信息用于指示所述帧体的调制方式;所述方法还包括:The method according to claim 28, wherein the frame header of the first Bluetooth data packet further includes first modulation indication information, and the first modulation indication information is used to indicate the modulation mode of the frame body; the The method also includes:
    获取所述第一调制指示信息;obtaining the first modulation indication information;
    根据所述第一调制指示信息指示的调制方式,对所述第一蓝牙数据包的帧体进行解调。The frame body of the first Bluetooth data packet is demodulated according to the modulation mode indicated by the first modulation indication information.
  31. 根据权利要求30所述的方法,其特征在于,所述第一调制指示信息和所述第一带宽指示信息承载于所述第一蓝牙数据包的帧头的物理层指示字段。The method according to claim 30, wherein the first modulation indication information and the first bandwidth indication information are carried in a physical layer indication field of a frame header of the first Bluetooth data packet.
  32. 根据权利要求28所述的方法,其特征在于,所述第一蓝牙数据包的帧体包括头部Header字段和数据字段,所述Header字段包括第一功率指示信息,所述第一功率指示信息用于指示所述第二电子设备的发送功率;所述数据字段包括蓝牙数据。The method according to claim 28, wherein the frame body of the first Bluetooth data packet includes a header field and a data field, the Header field includes first power indication information, and the first power indication information used to indicate the transmit power of the second electronic device; the data field includes Bluetooth data.
  33. 根据权利要求28所述的方法,其特征在于,所述第一蓝牙数据包的帧体包括多个数据字段和多个校验字段,其中,所述多个数据字段与所述多个校验字段一一对应,且每个数据字段包括蓝牙数据。The method according to claim 28, wherein the frame body of the first Bluetooth data packet includes a plurality of data fields and a plurality of check fields, wherein the plurality of data fields and the plurality of check fields The fields are in one-to-one correspondence, and each data field includes Bluetooth data.
  34. 根据权利要求33所述的方法,其特征在于,所述方法还包括:The method of claim 33, wherein the method further comprises:
    基于所述多个校验字段中的每个校验字段,对对应的数据字段进行校验。Based on each of the plurality of check fields, the corresponding data field is checked.
  35. 根据权利要求34所述的方法,其特征在于,所述方法还包括:The method of claim 34, wherein the method further comprises:
    当所述多个数据字段中的至少一个数据字段校验失败,向所述第一电子设备发送第三蓝牙数据包;所述第三蓝牙数据包包括帧头和帧体,所述第三蓝牙数据包的帧头包括第三带宽指示信息和第一接收指示信息,所述第三带宽指示信息用于指示所述第三蓝牙数据包的帧体的第三传输带宽;所述第一接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包。When the verification of at least one of the plurality of data fields fails, a third Bluetooth data packet is sent to the first electronic device; the third Bluetooth data packet includes a frame header and a frame body, and the third Bluetooth data packet includes a frame header and a frame body. The frame header of the data packet includes third bandwidth indication information and first reception indication information, where the third bandwidth indication information is used to indicate the third transmission bandwidth of the frame body of the third Bluetooth data packet; the first reception indication The information is used to indicate that the first Bluetooth data packet is not correctly received by the second electronic device.
  36. 根据权利要求35所述的方法,其特征在于,所述方法还包括:The method of claim 35, wherein the method further comprises:
    接收所述第一电子设备发送的第四蓝牙数据包;所述第四蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段;Receive a fourth Bluetooth data packet sent by the first electronic device; the frame body of the fourth Bluetooth data packet includes the plurality of data fields and the plurality of check fields, and the plurality of data fields include check the at least one data field that failed;
    基于所述第四蓝牙数据包中的所述至少一个数据字段与所述多个数据字段中校验成功的其它数据字段进行合并校验;Perform a combined check based on the at least one data field in the fourth Bluetooth data packet and other data fields that are successfully checked among the plurality of data fields;
    当合并校验成功,获取所述多个数据字段中的蓝牙数据。When the merge verification succeeds, acquire the Bluetooth data in the multiple data fields.
  37. 根据权利要求34所述的方法,其特征在于,所述方法还包括:The method of claim 34, wherein the method further comprises:
    当所述多个数据字段中的至少一个数据字段校验失败,向所述第一电子设备发送第五蓝牙数据包;所述第五蓝牙数据包包括帧头,所述第五蓝牙数据包的帧头包括第二接收指示信息,所述第二接收指示信息用于指示所述第二电子设备未正确接收所述第一蓝牙数据包,且所述第五蓝牙数据包不包括帧体。When the verification of at least one data field in the plurality of data fields fails, a fifth Bluetooth data packet is sent to the first electronic device; the fifth Bluetooth data packet includes a frame header, and the The frame header includes second reception indication information, and the second reception indication information is used to indicate that the second electronic device does not correctly receive the first Bluetooth data packet, and the fifth Bluetooth data packet does not include a frame body.
  38. 根据权利要求37所述的方法,其特征在于,所述方法还包括:The method of claim 37, wherein the method further comprises:
    接收所述第一电子设备发送的第六蓝牙数据包;所述第六蓝牙数据包的帧体包括所述多个数据字段和所述多个校验字段,所述多个数据字段包括校验失败的所述至少一个数据字段;Receive a sixth Bluetooth data packet sent by the first electronic device; the frame body of the sixth Bluetooth data packet includes the plurality of data fields and the plurality of check fields, and the plurality of data fields include check the at least one data field that failed;
    基于所述第六蓝牙数据包中的所述至少一个数据字段与所述多个数据字段中校验成功的其它数据字段进行合并校验;Perform a combined check based on the at least one data field in the sixth Bluetooth data packet and other data fields that are successfully checked in the plurality of data fields;
    当合并校验成功,获取所述多个数据字段中的蓝牙数据。When the merge verification succeeds, acquire the Bluetooth data in the multiple data fields.
  39. 根据权利要求34所述的方法,其特征在于,所述方法还包括:The method of claim 34, wherein the method further comprises:
    当所述多个数据字段校验成功,向所述第一电子设备发送第七蓝牙数据包;所述第七蓝牙数据包包括帧头和帧体,所述第七蓝牙数据包的帧头包括第四带宽指示信息和第三接收指示信息,所述第四带宽指示信息用于指示所述第七蓝牙数据包的帧体的第四传输带宽;所述第三接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包。When the multiple data fields are successfully verified, a seventh Bluetooth data packet is sent to the first electronic device; the seventh Bluetooth data packet includes a frame header and a frame body, and the frame header of the seventh Bluetooth data packet includes fourth bandwidth indication information and third reception indication information, where the fourth bandwidth indication information is used to indicate the fourth transmission bandwidth of the frame body of the seventh Bluetooth data packet; the third reception indication information is used to indicate the The second electronic device correctly receives the first Bluetooth data packet.
  40. 根据权利要求34所述的方法,其特征在于,The method of claim 34, wherein:
    当所述多个数据字段校验成功,向所述第一电子设备发送第八蓝牙数据包;所述第八蓝牙数据包包括帧头,所述第八蓝牙数据包的帧头包括第四接收指示信息,所述第四接收指示信息用于指示所述第二电子设备正确接收所述第一蓝牙数据包,且所述第八蓝牙数据包不包括帧体。When the multiple data fields are successfully verified, send an eighth Bluetooth data packet to the first electronic device; the eighth Bluetooth data packet includes a frame header, and the frame header of the eighth Bluetooth data packet includes a fourth receive Indication information, the fourth receiving indication information is used to instruct the second electronic device to correctly receive the first Bluetooth data packet, and the eighth Bluetooth data packet does not include a frame body.
  41. 根据权利要求28所述的方法,其特征在于,所述第一电子设备与所述第二电子设备为预设的电子设备。The method according to claim 28, wherein the first electronic device and the second electronic device are preset electronic devices.
  42. 根据权利要求28至41任一项所述的方法,其特征在于,所述第一传输带宽为1MHz、2MHz、4MHz或5MHz。The method according to any one of claims 28 to 41, wherein the first transmission bandwidth is 1 MHz, 2 MHz, 4 MHz or 5 MHz.
  43. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器和处理器,所述存储器与所述处理器耦合;a memory and a processor, the memory coupled to the processor;
    所述存储器存储有程序指令,当所述程序指令由所述处理器执行时,使得所述电子设备执行权利要求16至权利要求27任一项中的第一电子设备所执行的蓝牙通信方法。The memory stores program instructions, which, when executed by the processor, cause the electronic device to execute the Bluetooth communication method executed by the first electronic device in any one of claims 16 to 27 .
  44. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器和处理器,所述存储器与所述处理器耦合;a memory and a processor, the memory coupled to the processor;
    所述存储器存储有程序指令,当所述程序指令由所述处理器执行时,使得所述电子设备执行权利要求28至权利要求42任一项中的第二电子设备所执行的蓝牙通信方法。The memory stores program instructions, which, when executed by the processor, cause the electronic device to execute the Bluetooth communication method executed by the second electronic device in any one of claims 28 to 42.
PCT/CN2022/079978 2021-03-12 2022-03-09 Bluetooth communication method and system, and electronic device WO2022188813A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110272348.6 2021-03-12
CN202110272348.6A CN115086924A (en) 2021-03-12 2021-03-12 Bluetooth communication method, system and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022188813A1 true WO2022188813A1 (en) 2022-09-15

Family

ID=83227442

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/079978 WO2022188813A1 (en) 2021-03-12 2022-03-09 Bluetooth communication method and system, and electronic device

Country Status (2)

Country Link
CN (1) CN115086924A (en)
WO (1) WO2022188813A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404737A (en) * 2008-11-06 2009-04-08 东软集团股份有限公司 Apparatus for forwarding CMMB signal by using bluetooth module and its control method
CN102740476A (en) * 2011-03-31 2012-10-17 北京新岸线无线技术有限公司 Method, device and system for resource allocation
US20120327871A1 (en) * 2011-06-24 2012-12-27 Interdigital Patent Holdings, Inc. Non-legacy preamble for wireless local area networks
CN103426432A (en) * 2012-05-14 2013-12-04 德克萨斯仪器股份有限公司 Bandwidth dependent audio quality adjustment
CN109565524A (en) * 2016-09-05 2019-04-02 英特尔Ip公司 With the devices, systems, and methods for the bandwidth information for signaling channel width
CN110166989A (en) * 2018-02-14 2019-08-23 华为技术有限公司 A kind of method and apparatus of high-speed transfer audio data
US20190306842A1 (en) * 2018-03-30 2019-10-03 Comcast Cable Communications, Llc Beam Failure Recovery Procedures Using Bandwidth Parts

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404737A (en) * 2008-11-06 2009-04-08 东软集团股份有限公司 Apparatus for forwarding CMMB signal by using bluetooth module and its control method
CN102740476A (en) * 2011-03-31 2012-10-17 北京新岸线无线技术有限公司 Method, device and system for resource allocation
US20120327871A1 (en) * 2011-06-24 2012-12-27 Interdigital Patent Holdings, Inc. Non-legacy preamble for wireless local area networks
CN103426432A (en) * 2012-05-14 2013-12-04 德克萨斯仪器股份有限公司 Bandwidth dependent audio quality adjustment
CN109565524A (en) * 2016-09-05 2019-04-02 英特尔Ip公司 With the devices, systems, and methods for the bandwidth information for signaling channel width
CN110166989A (en) * 2018-02-14 2019-08-23 华为技术有限公司 A kind of method and apparatus of high-speed transfer audio data
US20190306842A1 (en) * 2018-03-30 2019-10-03 Comcast Cable Communications, Llc Beam Failure Recovery Procedures Using Bandwidth Parts

Also Published As

Publication number Publication date
CN115086924A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN112868244B (en) Point-to-multipoint data transmission method and device
WO2020107485A1 (en) Bluetooth connection method and device
WO2020124610A1 (en) Transmission speed control method and device
WO2021051986A1 (en) Method for establishing connection between apparatuses, and electronic device
WO2020133183A1 (en) Audio data synchronization method and device
WO2020113588A1 (en) Point-to-multipoint data transmission method, and electronic device
WO2020124611A1 (en) Rate control method and device
WO2020124581A1 (en) Audio data transmission method and electronic device
EP4132098A1 (en) Implementation method for wi-fi peer-to-peer service and related device
WO2021082829A1 (en) Bluetooth connection method and related apparatus
WO2021027666A1 (en) Bluetooth reconnection method and related apparatus
WO2021175300A1 (en) Data transmission method and apparatus, electronic device, and readable storage medium
WO2022033296A1 (en) Bluetooth communication method, wearable device, and system
EP4213512A1 (en) Screen projection method and system, and electronic device
WO2023025075A1 (en) Outbound data transmission method and system in beidou communication system, and related apparatus
WO2020118532A1 (en) Bluetooth communication method and electronic device
KR102491006B1 (en) Data Transmission Methods and Electronic Devices
WO2021179990A1 (en) Application server access method and terminal
EP4106394A1 (en) Service type-based data transmission policy adjusting chip, device, and method
WO2020134868A1 (en) Connection establishment method, and terminal apparatus
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2022188813A1 (en) Bluetooth communication method and system, and electronic device
WO2021114950A1 (en) Multipath http channel multiplexing method and terminal
CN113678481B (en) Wireless audio system, audio communication method and equipment
WO2022267917A1 (en) Bluetooth communication method and system

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: 22766335

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22766335

Country of ref document: EP

Kind code of ref document: A1