Broadcasting method, chip system, electronic equipment and storage medium
Patent Information
- Application Number
- CN202411030704.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2026-02-06
AI Technical Summary
BLE broadcasting cannot meet the real-time requirements of data transmission when carrying multi-service data content.
BLE extended broadcast is carried by Wi-Fi frames. By broadcasting Wi-Fi channel information and offset time on the BLE channel, extended broadcast on the Wi-Fi channel is realized.
It enables the simultaneous release or transmission of large amounts of business data while meeting the real-time requirements of data transmission.
Smart Images

Figure CN121486784A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart terminal technology, and in particular to a broadcasting method, chip system, electronic device and storage medium. Background Technology
[0002] BLE (Bluetooth Low Energy) is a type of Bluetooth technology characterized by low power consumption, low cost, and fast connection, and is widely used in IoT fields such as smart homes. Smart devices typically discover each other through BLE broadcasting and BLE scanning.
[0003] As the types of devices and services supported by interconnectivity scenarios increase, BLE broadcasting needs to carry more business data. Therefore, how to carry more business data while meeting the real-time requirements of data transmission is an urgent problem to be solved. Summary of the Invention
[0004] This application provides a broadcasting method, a chip system, an electronic device, and a storage medium. In this method, the broadcasting device uses Wi-Fi frames to carry BLE extended broadcast, which can publish or transmit a large amount of service data content at once, and can also meet the real-time requirements of data transmission.
[0005] In a first aspect, embodiments of this application provide a broadcasting method. The method includes:
[0006] At a first moment, the first electronic device broadcasts a first BLE message on the first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content;
[0007] The second electronic device listens to the first BLE channel and receives the first BLE message on the first BLE channel;
[0008] At the second moment, the first electronic device broadcasts the target Wi-Fi message on the target Wi-Fi channel; wherein the second moment is later than the first moment.
[0009] When the first offset time arrives, or before the first offset time arrives, the second electronic device listens to the target Wi-Fi channel and receives the target Wi-Fi message on the target Wi-Fi channel.
[0010] The first electronic device is a broadcasting device, and the second electronic device is a scanning device.
[0011] For example, the first BLE channel is the main broadcast channel, such as channel 37, channel 38, or channel 39.
[0012] For example, before the first offset time arrives, it can be some time before the first offset time, and the time interval between this time and the first offset time can be a few microseconds.
[0013] In this way, given that Wi-Fi frames can carry a large amount of data, when broadcasting devices use Wi-Fi frames for Bluetooth extended broadcasting, they can publish or transmit a large amount of business data content at once, while also meeting the real-time requirements of data transmission.
[0014] According to the first aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel and the channel number of the Wi-Fi channel.
[0015] According to the first aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, and the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
[0016] For example, the frequency band information of the Wi-Fi channel can be found in the Band field of the WifiInfo field below, the channel number of the Wi-Fi channel can be found in the Channel field of the WifiInfo field below, the type information of the Wi-Fi frame can be found in the Type field of the WifiInfo field below, and the Wi-Fi signal modulation and coding strategy information can be found in the MCS field of the WifiInfo field below.
[0017] According to the first aspect, or any implementation of the first aspect above, the Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel; the Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
[0018] For example, the Extended Header field can be found in the Extended Header field below, and the Wi-Fi Information field can be found in the WifiInfo field below.
[0019] To ensure compatibility with existing BLE broadcast message frame structures, this implementation can reuse the target field in the extended header field. The value of this field indicates whether the WifiInfo field is active, which means whether the broadcasting device is using Wi-Fi technology for extended broadcasting.
[0020] According to the first aspect, or any of the above implementations of the first aspect, the target field is the AUX PHY field, and the default value is the current reserved value of the AUX PHY field, such as 111b.
[0021] According to the first aspect, or any implementation of the first aspect above, before the first electronic device broadcasts the first BLE message on the first BLE channel, the method further includes: the first electronic device acquiring multiple currently available Wi-Fi channels; and the first electronic device selecting one Wi-Fi channel from the multiple available Wi-Fi channels as the target Wi-Fi channel.
[0022] According to the first aspect, or any implementation of the first aspect above, the method further includes: a first electronic device periodically scanning each Wi-Fi channel to determine multiple currently available Wi-Fi channels.
[0023] For example, the first electronic device scans all Wi-Fi channels separately and determines each Wi-Fi channel with better quality, such as a Wi-Fi channel with interference signal strength less than threshold 1 or a Wi-Fi channel with signal-to-noise ratio greater than threshold 2, as multiple available Wi-Fi channels.
[0024] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0025] At the third moment, the first electronic device broadcasts a second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content;
[0026] The second electronic device listens to the second BLE channel and receives the second BLE message on the second BLE channel;
[0027] At the fourth moment, the first electronic device broadcasts a third BLE message on the third BLE channel; the fourth moment is later than the third moment.
[0028] When the second offset time arrives, or before the second offset time arrives, the second electronic device listens to the third BLE channel and receives the third BLE message on the third BLE channel.
[0029] For example, the second BLE channel is the main broadcast channel, such as channel 37, channel 38, or channel 39.
[0030] The third BLE channel is the second broadcast channel mentioned below, which is one of the channels 0-36.
[0031] In this implementation, the broadcasting device can flexibly select the broadcasting method based on the data volume of the broadcast content. When the data volume of the broadcast content is large, the broadcasting device uses Wi-Fi frames to carry the extended broadcast data, thereby meeting the needs of broadcast services and the real-time requirements of data transmission. When the data volume of the broadcast content is small, the broadcasting device can continue to use the existing Bluetooth extended transmission scheme.
[0032] Secondly, embodiments of this application provide a broadcasting method. The method includes:
[0033] At a first moment, the first electronic device broadcasts a first BLE message on the first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content;
[0034] At a second moment, the first electronic device broadcasts a target Wi-Fi message on the target Wi-Fi channel; wherein the second moment is later than the first moment.
[0035] The first electronic device is a broadcasting device.
[0036] According to the second aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel and the channel number of the Wi-Fi channel.
[0037] According to the second aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, and the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
[0038] According to the second aspect, or any implementation of the second aspect above, the Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel; the Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
[0039] According to the second aspect, or any of the implementation methods of the second aspect above, the target field is the AUX PHY field, and the default value is the current reserved value of the AUX PHY field.
[0040] According to the second aspect, or any implementation thereof, the first electronic device includes a combined chip, which includes a BLE module and a Wi-Fi module. Specifically, the first electronic device broadcasts a first BLE message on a first BLE channel, including: the BLE module broadcasting the first BLE message on the first BLE channel; the first electronic device broadcasts a target Wi-Fi message on a target Wi-Fi channel, including: the Wi-Fi module broadcasting the target Wi-Fi message on the target Wi-Fi channel.
[0041] According to the second aspect, or any implementation of the second aspect above, before the BLE module broadcasts the first BLE message on the first BLE channel, the method further includes:
[0042] The BLE module obtains multiple available Wi-Fi channels and selects one as the target Wi-Fi channel. The BLE module then sends the target Wi-Fi channel information to the Wi-Fi module.
[0043] For example, the BLE module can send the target Wi-Fi channel information to the Wi-Fi module based on the IPC communication method.
[0044] According to the second aspect, or any implementation of the second aspect above, the method further includes:
[0045] The Wi-Fi module periodically scans each Wi-Fi channel to determine the multiple available Wi-Fi channels and sends the information about these channels to the BLE module.
[0046] For example, the Wi-Fi module can send information about multiple available Wi-Fi channels to the BLE module based on IPC communication.
[0047] According to the second aspect, or any implementation of the second aspect above, the method further includes:
[0048] At the third moment, the first electronic device broadcasts a second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content;
[0049] At the fourth moment, the first electronic device broadcasts a third BLE message on the third BLE channel; the fourth moment is later than the third moment.
[0050] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0051] Thirdly, embodiments of this application provide a broadcasting method. The method includes:
[0052] The second electronic device listens to the first BLE channel and receives the first BLE message on the first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content;
[0053] When the first offset time arrives, or before the first offset time arrives, the second electronic device listens to the target Wi-Fi channel and receives the target Wi-Fi message on the target Wi-Fi channel.
[0054] The second electronic device is a scanning device.
[0055] According to the third aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel and the channel number of the Wi-Fi channel.
[0056] According to the third aspect, the information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, and the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
[0057] According to the third aspect, or any implementation of the third aspect above, the Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel; the Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
[0058] According to the third aspect, or any of the above implementation methods of the third aspect, the target field is the AUX PHY field, and the default value is the current reserved value of the AUX PHY field.
[0059] According to the third aspect, or any implementation of the third aspect above, it also includes:
[0060] The second electronic device listens to the second BLE channel and receives the second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content;
[0061] When the second offset time arrives, or before the second offset time arrives, the second electronic device listens to the third BLE channel and receives the third BLE message on the third BLE channel.
[0062] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0063] Fourthly, embodiments of this application provide an electronic device. This electronic device has BLE communication functionality and Wi-Fi communication functionality. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when executed by the one or more processors, cause the electronic device to perform the broadcasting method of the second aspect and any one thereof, or cause the electronic device to perform the broadcasting method of the third aspect and any one thereof.
[0064] According to the fourth aspect, the electronic device includes a combined chip in which BLE communication and Wi-Fi communication functions are integrated.
[0065] The fourth aspect and any implementation thereof correspond to the second aspect and any implementation thereof, or to the third aspect and any implementation thereof. The technical effects of the fourth aspect and any implementation thereof can be found in the technical effects of the second aspect and any implementation thereof, or in the technical effects of the third aspect and any implementation thereof, and will not be repeated here.
[0066] Fifthly, embodiments of this application provide a chip system. This chip system is applied in an electronic device and includes instructions and at least one processor. The at least one processor executes the instructions to cause the electronic device to perform the broadcasting method of the second aspect and any one thereof, or to cause the electronic device to perform the broadcasting method of the third aspect and any one thereof.
[0067] The fifth aspect and any implementation thereof correspond to the second aspect and any implementation thereof, or to the third aspect and any implementation thereof. The technical effects corresponding to the fifth aspect and any implementation thereof can be found in the technical effects corresponding to the second aspect and any implementation thereof, or in the technical effects corresponding to the third aspect and any implementation thereof, and will not be repeated here.
[0068] Sixthly, embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium includes a computer program that, when executed on an electronic device, causes the electronic device to perform the broadcasting method of the second aspect and any one thereof, or causes the electronic device to perform the broadcasting method of the third aspect and any one thereof.
[0069] The sixth aspect and any implementation thereof correspond to the second aspect and any implementation thereof, or to the third aspect and any implementation thereof. The technical effects corresponding to the sixth aspect and any implementation thereof can be found in the technical effects corresponding to the second aspect and any implementation thereof, or in the technical effects corresponding to the third aspect and any implementation thereof, and will not be repeated here. Attached Figure Description
[0070] Figure 1a This is a schematic diagram illustrating the requirements for interconnectivity of electronic devices;
[0071] Figure 1b This is an illustrative diagram illustrating a scenario where electronic devices discover each other based on BLE broadcasting and BLE scanning.
[0072] Figure 2 This is a schematic diagram illustrating a traditional BLE broadcasting method as an example;
[0073] Figure 3 This is a schematic diagram illustrating an extended BLE broadcasting method as an example;
[0074] Figure 4 This is a schematic diagram illustrating the frame structure of a BLE broadcast message as an example.
[0075] Figure 5 This is a schematic diagram illustrating an extended BLE broadcasting method as an example;
[0076] Figure 6 This is a schematic diagram illustrating the frame structure of a Wi-Fi Action frame as an example.
[0077] Figure 7 This is an illustrative diagram illustrating BLE extended broadcast transmission based on a Wi-Fi channel;
[0078] Figure 8 A schematic diagram of the hardware structure of an electronic device as an example;
[0079] Figure 9 This is a schematic diagram illustrating the Wi-Fi and BEL software structure in an electronic device, as an example.
[0080] Figure 10 This is a schematic diagram illustrating the module interactions involved in the broadcasting method as an example.
[0081] Figure 11 This is a schematic diagram illustrating the frame structure of a BLE broadcast message as an example.
[0082] Figure 12 This is an illustrative diagram illustrating a scenario of transmitting BLE broadcasts based on BLE channels and Wi-Fi channels.
[0083] Figure 13 This is an illustrative diagram illustrating a scenario of transmitting BLE broadcasts via a BLE channel. Detailed Implementation
[0084] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0085] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0086] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0087] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0088] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0089] Bluetooth Low Energy (BLE) is a personal area network (LAN) technology designed and marketed by the Bluetooth Special Interest Group (SIG). It is designed for emerging applications in healthcare, sports and fitness, beacons, security, and home entertainment. Compared to classic Bluetooth, Bluetooth Low Energy aims to significantly reduce power consumption and cost while maintaining the same communication range.
[0090] Reference Figure 1a In daily life, an increasing number of electronic devices, such as mobile phones, tablets, smartwatches, smart earphones, smart screens, routers, and laptops, need to form a wireless network to achieve interconnection. This allows electronic devices to work collaboratively, providing users with a better user experience.
[0091] In one implementation, multiple electronic devices logged into the same account can form a wireless network. First, the electronic devices need to discover other electronic devices logged into the same account through functions such as device discovery and service discovery. Then, a communication link is established between two electronic devices logged into the same account, followed by authentication, authorization, and networking processes to enable collaborative work between the devices.
[0092] To reduce system power consumption, device discovery between electronic devices is typically achieved through BLE broadcasting and BLE scanning. For example, to improve user experience and reduce device discovery latency, electronic devices such as mobile phones, tablets, and laptops (with Bluetooth enabled) can periodically and continuously broadcast via BLE, enabling nearby electronic devices to discover each other. Figure 1b As shown, mobile phones can periodically and around the clock broadcast BLE messages. Nearby mobile phones, tablets, laptops, and other electronic devices can perform BLE scans to receive the corresponding BLE broadcasts, enabling devices to discover each other. In the following text, the device performing BLE broadcasts is called the broadcasting device (or BLE broadcasting device), and the device performing BLE scans is called the scanning device (or BLE scanning device).
[0093] BLE operates in the 2.4 GHz unlicensed spectrum (ISM) band, ranging from 2400 MHz to 2483.5 MHz. BLE uses 40 channels, each spaced 2 MHz apart, divided into data channels and broadcast channels. Three broadcast channels are used: channels 37, 38, and 39, for device discovery, connection establishment, and data broadcasting. The remaining 37 data channels (channels 0-36) are used for data communication between already connected devices.
[0094] As the types of electronic devices and services supported by interconnectivity scenarios increase, BLE broadcasts need to carry more business data content. For example, the content that BLE broadcast messages for interconnectivity services need to carry may include, but is not limited to: device ID (identity document), device account information, communication capabilities supported by the device, and services provided by the device.
[0095] In a traditional BLE broadcasting method (such as BLE versions below 5.0), the broadcasting device sequentially transmits BLE broadcast messages on three primary advertising channels: channel 37 (2402MHz), channel 38 (2426MHz), and channel 39 (2480MHz). A scanning device listens on one of these primary advertising channels to receive the broadcasting device's BLE broadcast messages. If a scannable broadcast message is nearby and its broadcast time falls within the scanning device's scanning window, the scanning device can receive the BLE broadcast message from the broadcasting device.
[0096] Taking the BLE broadcast message as ADV_IND (connectable non-directional broadcast) as an example, such as Figure 2 As shown, the broadcasting device sends ADV_IND message 201 on channel 37 at time t1, ADV_IND message 202 on channel 38 at time t2, and ADV_IND message 203 on channel 39 at time t3. The data content carried by ADV_IND messages 201, 202, and 203 is identical. Furthermore, the time interval between t1 and t2 is less than or equal to 10 ms, and the time interval between t2 and t3 is less than or equal to 10 ms. In this implementation, time t1 is the start time of this broadcast event, and the time when the broadcasting device completes sending ADV_IND message 203 on channel 39 is the end time of this broadcast event.
[0097] When performing a BLE scan, the scanning device listens to any one of the main broadcast channels 37, 38, and 39 to receive ADV_IND messages sent by the broadcasting device. Taking channel 38 as an example, if the broadcasting device broadcasts an ADV_IND message on channel 38 within the scanning device's scanning window, the scanning device can receive the ADV_IND message 202 sent by the broadcasting device on channel 38.
[0098] In this traditional BLE broadcasting method, the payload of the BLE broadcast message sent by the broadcasting device can only carry 31 bytes of data.
[0099] In an extended BLE broadcasting method (such as BLE 5.0 and later versions), BLE broadcast channels are divided into two categories: primary broadcast channels (channels 37, 38, and 39) and secondary broadcast channels (channels 0-36). The broadcasting device first sends a primary advertising message (or extended advertising primary channel message) on the primary broadcast channel, and then sends an extended advertising message (or auxiliary packet, extended advertising secondary channel message, etc.) on the secondary broadcast channel after a specified time offset. The primary broadcast message indicates that the broadcast content will be sent through the secondary broadcast channel. When a scanning device receives the primary broadcast message and can identify the data it carries, it listens on a specific secondary broadcast channel based on the information carried in the primary broadcast message to receive the extended advertising message.
[0100] Taking the main broadcast message as ADV_EXT_IND and the extended broadcast message as AUX_ADV_IND as an example, such as Figure 3 As shown, the broadcasting device sequentially sends ADV_EXT_IND message 301 on channel 37, ADV_EXT_IND message 302 on channel 38, and ADV_EXT_IND message 303 on channel 39. ADV_IND messages 301, 302, and 303 carry the same data content.
[0101] Specifically, ADV_EXT_IND message 301 indicates that the broadcast content will be sent via the second broadcast channel after an offset duration of "Aux Offset(1)", ADV_EXT_IND message 302 indicates that the broadcast content will be sent via the second broadcast channel after an offset duration of "Aux Offset(2)", and ADV_EXT_IND message 303 indicates that the broadcast content will be sent via the second broadcast channel after an offset duration of "Aux Offset(3)". The offset duration can be represented by the number of Offset Units (offset units or offset unit duration). For example, Offset Units can be 30μs or 300μs. For example, Figure 3 The time t4 shown is the time indicated by the offset "Aux Offset(1)". Figure 3 The time t5 shown is the time indicated by the offset "Aux Offset(2)". Figure 3 The time t6 shown is the time indicated by the offset "Aux Offset(3)". For fault tolerance, a certain deviation in the timing of the broadcast device sending auxiliary packets is allowed, but the deviation needs to be controlled within one offset unit. Therefore, Figure 3 The times t4, t5, and t6 shown can be the same time or different times with a deviation within one offset unit. Understandably, times t4, t5, and t6 are all earlier than the actual transmission time of the AUX_ADV_IND message. (Continue to refer to...) Figure 3 After times t4, t5, and t6, the broadcasting equipment will send an AUX_ADV_IND message 304 on a second broadcast channel indicated by the ADV_EXT_IND message.
[0102] When performing a BLE scan, the scanning device listens to any one of the main broadcast channels 37, 38, or 39 to receive ADV_EXT_IND messages sent by the broadcasting device. Taking channel 38 as an example, if the broadcasting device broadcasts an ADV_EXT_IND message on channel 38 within the scanning device's scanning window, the scanning device can receive the ADV_EXT_IND message 302 sent by the broadcasting device on channel 38. The scanning device parses the data carried in ADV_EXT_IND message 302 to determine that the broadcasting device is sending an AUX_ADV_IND message on a secondary broadcast channel (such as channel 35). Then, the scanning device listens to channel 35 to receive the AUX_ADV_IND message 304 sent by the broadcasting device.
[0103] In this extended BLE broadcasting method, the broadcast data content of the broadcasting device is transmitted on the second broadcast channel, and the amount of data carried by the payload in the auxiliary packet can be increased to 254 bytes.
[0104] Figure 4 An example frame structure for a BLE broadcast message is shown. For example... Figure 4 As shown, a BLE broadcast message may include a preamble, an access address, a PDU (Protocol Data Unit), and a CRC (Cyclic Redundancy Check). For example, the access address is a specific value 0x8E89BED6.
[0105] Continue to refer to Figure 4 A broadcast message's PDU, or Advertising Physical Channel PDU, can include a header and a payload. Different PDU types correspond to different broadcast message types. The ADV_EXT_IND message mentioned above is a broadcast message with an ADV_EXT_IND PDU, and the AUX_ADV_IND message is a broadcast message with an AUX_ADV_IND PDU. The same applies to other BLE messages, which will not be elaborated upon here.
[0106] In the extended BLE broadcast mode, the payload format of the broadcast message PDU can refer to the Common Extended Advertising Payload Format. That is, the PDUs of the main broadcast message and the extended broadcast message mentioned above can both refer to the Common Extended Advertising Payload Format.
[0107] Continue to refer to Figure 4 In the Common Extended Advertising Payload Format, the payload of a broadcast message PDU (i.e., Advertising Physical Channel PDU) can include Extended Header Length, AdvMode, Extended Header, and AdvData.
[0108] Wherein, Extended Header Length indicates the length of the Extended Header field, which is variable in length.
[0109] The value of AdvMode indicates the mode the device is in when a broadcast event occurs, indicating whether the broadcast message can be connected and scanned. For example, when AdvMode is 00b, it indicates that the broadcast message cannot be connected or scanned; when AdvMode is 01b, it indicates that the broadcast message can be connected but cannot be scanned; and when AdvMode is 10b, it indicates that the broadcast message cannot be connected but can be scanned. 01b is a reserved value for AdvMode, for use by subsequent functions.
[0110] The AdvData field is also variable-length, meaning the length of the data it carries is dynamic, and it can carry a maximum of 254 bytes of data.
[0111] Continue to refer to Figure 4 The Extended Header may include Extended Header Flags (switch flags for each field in the extended protocol header), AdvA (broadcast device address), TargetA (scanning device or initiating device address), CETInfo (precise location information), AdvDataInfo (broadcast data information), AuxPtr (pointer to auxiliary packets), SyncInfo (periodic broadcast packet information), TxPower (transmit power), and ACAD (Additional Controller Advertising Data).
[0112] The Extended Header Flags field has 8 bits. The first 7 bits correspond to AdvA, TargetA, CETInfo, ADI, AuxPtr, SyncInfo, and TxPower, respectively. Setting it to "1" indicates that the corresponding field is included, and setting it to "0" indicates that the corresponding field is not included. The 8th bit is not associated with the ACAD field and is a reserved bit.
[0113] AdvA is the address of the broadcast device (Advertiser), which can be a public device address or a random device address, consistent with TxAdd in the PDU Header.
[0114] TargetA is the address of the scanning device (Scanner) or initiator (Initiator), which can be a public device address or a random device address, consistent with RxAdd in the PDU Header.
[0115] CETInfo can contain CTETime and CTEType, used for indoor positioning calculations of AoA (Angle of Arrival) or AoD (Angle of Departure). CTETime is a value in 8μs units, indicating the audio spread time, with a range of 2-20 μs (16-160 μs).
[0116] AdvDataInfo can include DID (Advertising Data ID, the identifier of sub-packets within the same broadcast packet) and SID (Advertising Set ID, the identifier of different broadcasts from the same device). A broadcast may send different data; to distinguish these differences, the data can be numbered using DID. A device has only one Bluetooth address but can enable multiple broadcasts; SID can be used to differentiate between multiple broadcasts sent by the same device. That is, if a broadcast packet consists of multiple sub-packets, these sub-packets have the same SID but different DIDs. If two sub-packets have the same SID and DID, it means that the content of these two packets is the same.
[0117] SyncInfo is the synchronization packet window offset information, which can include synchronization information of AUX_SYNC_IND messages, such as period interval (Interval), channel mapping (ChM), sleep clock precision (SCA), broadcast event counter (EventCounter), etc.
[0118] TxPower is the transmit power of the broadcast equipment. ACAD can be used to transmit additional broadcast data.
[0119] AuxPtr can be seen as a pointer to the next Secondary Advertising PDU. (Continue to refer to...) Figure 4 AuxPtr can include: Channel Index, CA (Clock Accuracy), OffsetUnits, AUX Offset, and AUX PHY.
[0120] The Channel Index is used to describe the second broadcast channel (i.e., the Secondary Advertising Physical Channel) for receiving auxiliary packets. In other words, the Channel Index indicates which channel the auxiliary packets are sent on.
[0121] The value of CA indicates the accuracy of the clock. For example, a CA value of 0 indicates that the clock accuracy of the broadcasting equipment is 51ppm to 500ppm; a CA value of 1 indicates that the clock accuracy of the broadcasting equipment is 0ppm to 50ppm.
[0122] Offset Units is the offset unit. For example, a value of 0 in the Offset Units field means that Offset Units equals 30 μs, and a value of 1 in the Offset Units field means that Offset Units equals 300 μs.
[0123] The value of AUX Offset indicates how many OffsetUnits are between the time the auxiliary packet was received and the current time.
[0124] The AUX PHY is the physical port for receiving auxiliary packets. That is, the value of the AUX PHY indicates which physical port the scanning device uses to receive auxiliary packets. For example, an AUX PHY value of 000b indicates that the scanning device needs to use an LE (Low Power) 1M physical port to receive auxiliary packets; an AUX PHY value of 001b indicates that the scanning device needs to use an LE 2M physical port to receive auxiliary packets; and an AUX PHY value of 010b indicates that the scanning device needs to use an LE Coded physical port to receive auxiliary packets. Values 011b-111b are reserved for AUX PHY and are used for subsequent functions.
[0125] Regarding the frame structure of BLE broadcast messages in the extended BLE broadcast mode, details not explained here can be found in existing technologies and will not be elaborated further.
[0126] While extending broadcast messages can increase the broadcast data size to 254 bytes, if this is still insufficient for the upper-layer application's broadcast data volume, then linked extended messages (such as AUX_CHAIN_IND messages) must continue to be used for data transmission. The AuxPtr field of an extended broadcast message indicates the working channel and offset time of its next linked extended message, and vice versa. Both extended broadcast messages and each linked extended message can carry 254 bytes of broadcast data.
[0127] It should be noted that in the extended BLE broadcast mode, the link extension message is also an extended broadcast message sent on the second broadcast channel, linking to other extended broadcast messages following the first extended broadcast message. That is, the link extension message is not the first extended broadcast message. The payload format of the link extension message PDU can also be found in the Common Extended Advertising Payload Format, and will not be elaborated further here.
[0128] The broadcasting equipment first sends a main broadcast message on the main broadcast channel, then sends an extended broadcast message on a second broadcast channel after a specified time offset, and finally sends a link extended broadcast message on the same second broadcast channel after another specified time offset. The main broadcast message indicates that the broadcast content will be sent via the second broadcast channel. When the scanning device receives the main broadcast message and can identify the data it carries, it listens on a specific second broadcast channel based on the information in the main broadcast message to receive the extended broadcast message. Similarly, when the scanning device receives an extended broadcast message and can identify the data it carries, it listens on the same second broadcast channel based on the information in the extended broadcast message to receive the link extended broadcast message.
[0129] Taking the primary broadcast message as ADV_EXT_IND, the extended broadcast message as AUX_ADV_IND, and the link extension message as AUX_CHAIN_IND as an example, such as Figure 5 As shown, the broadcasting device sequentially sends ADV_EXT_IND message 401 on channel 37, ADV_EXT_IND message 402 on channel 38, and ADV_EXT_IND message 403 on channel 39. ADV_IND messages 401, 402, and 403 carry the same data content.
[0130] The AuxPtr field of the ADV_EXT_IND message indicates the operating channel and offset time of the AUX_ADV_IND message 404. That is, the broadcasting device will transmit the AUX_ADV_IND message 404 on a certain second broadcast channel indicated by the ADV_EXT_IND message. The AuxPtr field of the AUX_ADV_IND message 404 also indicates the operating channel and offset time of the AUX_CHAIN_IND message 405. That is, the broadcasting device will transmit the AUX_CHAIN_IND message 405 on a certain second broadcast channel indicated by the AUX_ADV_IND message 404.
[0131] Continue to refer to Figure 5The start time of the broadcast device sending the ADV_EXT_IND message 401 on channel 37 is the start time of this broadcast event, and also the start time of this extended broadcast event. The completion time of the broadcast device sending the ADV_EXT_IND message 403 on channel 39 is the end time of this broadcast event. The completion time of the broadcast device sending the AUX_CHAIN_IND message 405 on a certain second broadcast channel is the end time of this extended broadcast event.
[0132] When performing a BLE scan, the scanning device listens to any one of the main broadcast channels 37, 38, and 39 to receive ADV_EXT_IND messages sent by the broadcasting device. When the scanning device receives an ADV_EXT_IND message and can identify the data it carries, it listens to a specific second broadcast channel based on the information carried and receives an AUX_ADV_IND message 404. When the scanning device receives an AUX_ADV_IND message 404 and can identify the data it carries, it listens to a specific second broadcast channel based on the information carried and receives an AUX_CHAIN_IND message 405.
[0133] Understandably, a broadcast device can continuously transmit multiple AUX_CHAIN_IND messages on one or more second broadcast channels. The information carried in the previous AUX_CHAIN_IND message, such as the information in the AuxPtr field, can indicate the working channel and offset time of the next AUX_CHAIN_IND message. Thus, when a scanning device receives a link-extended broadcast message and can identify the data it carries, it listens on a specific second broadcast channel based on the information carried in the link-extended broadcast message to receive the next link-extended broadcast message.
[0134] It should be pointed out that, Figure 4 The frame structure shown for BLE extended broadcast messages is also applicable to linked extended broadcast messages (such as AUX_CHAIN_IND messages).
[0135] In this extended BLE broadcast method, the broadcast data content of the broadcast device can be transmitted through one or more linked extended broadcast messages. Although the number of extended broadcast messages increases, the total broadcast time of the broadcast device (i.e., the sum of the times of the main broadcast message, extended broadcast messages, and linked extended messages) increases because each linked extended broadcast message has a certain offset time, which cannot meet the real-time requirements of broadcast services.
[0136] This application provides a broadcasting method. In this method, the broadcasting device first broadcasts a BLE basic message (i.e., a BLE main broadcast message) on a main broadcast channel, and then, after a specified time offset, sends a Wi-Fi extended broadcast message carrying the broadcast content on a Wi-Fi (Wireless Fidelity) channel. The BLE basic message carries information such as the broadcast channel and offset time of the Wi-Fi extended broadcast message. When a scanning device receives the BLE basic message and can identify the data it carries, it listens to a specific Wi-Fi channel based on the information carried in the BLE basic message to receive the Wi-Fi extended broadcast message sent by the broadcasting device.
[0137] In other words, this broadcasting method uses Wi-Fi frames to carry BLE extended broadcasts. Given that Wi-Fi frames can carry a large amount of data, broadcasting devices using Wi-Fi frames for extended broadcasts can publish or transmit a significant amount of service data at once, while also meeting the real-time requirements of data transmission.
[0138] The frame type of the Wi-Fi extended broadcast message can be any frame type that can carry a large amount of data, such as a Wi-Fi management frame, a Wi-Fi control frame, or a Wi-Fi data frame. For example, a Wi-Fi extended broadcast message can be a Wi-Fi Action frame, which is a type of Wi-Fi management frame. It is understood that the frame type of the Wi-Fi extended broadcast message can also be a type of Wi-Fi control frame or a type of Wi-Fi data frame; this embodiment does not limit the frame type of the Wi-Fi extended broadcast message.
[0139] Figure 6 An example is shown illustrating the frame structure of a Wi-Fi Action frame. For example... Figure 6 As shown, the payload of a Wi-Fi Action frame includes: Category (Action type), Action (action type), and Element (information carried). The Element can carry 2310 bytes of data. For details regarding Wi-Fi Action frames not explained here, please refer to existing technologies; further explanation is unnecessary.
[0140] Taking the Wi-Fi Action frame as an example, as an extended broadcast message, it can carry 10 times more data than the BLE extended broadcast message, enabling the transmission of more service data content at once. The broadcast time is also short, which can meet the real-time requirements of data transmission.
[0141] Taking the BLE base message as ADV_EXT_IND and the Wi-Fi extended broadcast message type as a Wi-Fi Action frame as an example, such as Figure 7 As shown, the broadcasting device sequentially sends ADV_EXT_IND message 501 on channel 37, ADV_EXT_IND message 502 on channel 38, and ADV_EXT_IND message 503 on channel 39. ADV_IND messages 501, 502, and 503 carry the same data content.
[0142] Specifically, ADV_EXT_IND message 501 indicates that the broadcast content will be sent via the Wi-Fi channel after an offset duration of "Aux Offset(4)", ADV_EXT_IND message 502 indicates that the broadcast content will be sent via the Wi-Fi channel after an offset duration of "Aux Offset(5)", and ADV_EXT_IND message 503 indicates that the broadcast content will be sent via the Wi-Fi channel after an offset duration of "Aux Offset(6)". The offset duration can be represented by the number of Offset Units. For example, the Offset Units can be 30μs or 300μs. For example, Figure 7 The time t7 shown is the time indicated by the offset "Aux Offset(4)". Figure 7 The time t8 shown is the time indicated by the offset "Aux Offset(5)". Figure 7 The time t9 shown is the time indicated by the offset "AuxOffset(6)". For fault tolerance, a certain deviation is allowed in the timing of broadcast devices sending Wi-Fi extended broadcast messages, but this deviation needs to be controlled within one offset unit. Therefore, Figure 3 The times t7, t8, and t9 shown can be the same time or different times with a deviation of one offset unit. Understandably, times t7, t8, and t9 are all earlier than the actual transmission time of the Wi-Fi extended broadcast message. (Continue to refer to...) Figure 7 After times t7, t8, and t9, once the broadcasting device has won the Wi-Fi channel, it sends a Wi-Fi extended broadcast message, such as Wi-Fi Action frame 504, on the Wi-Fi channel.
[0143] When performing a BLE scan, the scanning device listens to any one of the main broadcast channels 37, 38, or 39 to receive ADV_EXT_IND messages sent by the broadcasting device. Taking channel 38 as an example, if the broadcasting device broadcasts an ADV_EXT_IND message on channel 38 within the scanning device's scanning window, the scanning device can receive the ADV_EXT_IND message 502 sent by the broadcasting device on channel 38. The scanning device parses the data carried in the ADV_EXT_IND message 502 to determine that the broadcasting device is sending an AUX_ADV_IND message on a specific Wi-Fi channel (such as Wi-Fi 3). Subsequently, the scanning device listens to the Wi-Fi 3 channel to receive the Wi-Fi Action frame 504 sent by the broadcasting device.
[0144] In this broadcasting method, the broadcast data content of the broadcasting device is transmitted on the Wi-Fi channel. The amount of data carried in the payload of the Wi-Fi extended broadcast message can be increased to 2310 bytes, which solves the problem of large number of service transmissions.
[0145] Figure 8 A schematic diagram of the electronic device is shown. It should be understood that... Figure 8 The electronic device shown is merely an example of an electronic device, and electronic devices may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 8 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0146] The electronic device 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, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0147] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. In this embodiment, the application processor may be an AP chip.
[0148] The controller can serve as the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0149] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0150] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0151] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0152] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0153] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0154] The mobile communication module 150 can provide solutions for wireless communication applications, including 2G / 3G / 4G / 5G, in electronic devices.
[0155] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0156] In this embodiment, the wireless communication module 160 may include a Wi-Fi / Bluetooth combo chip. This Wi-Fi / Bluetooth combo chip integrates Wi-Fi and Bluetooth functionality. Within the Wi-Fi / Bluetooth combo chip, the Wi-Fi module and the Bluetooth module can communicate with each other to share data.
[0157] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks and other devices via wireless communication technology.
[0158] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0159] Display screen 194 is used to display images, videos, etc. The electronic device can implement shooting functions through an ISP, camera 193, video codec, GPU, display screen 194, and application processor. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.
[0160] The external storage 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. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0161] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0162] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.
[0163] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc., which will not be listed here, and this application does not limit them.
[0164] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses a layered Wi-Fi system and a layered Bluetooth system as examples to illustrate the software architecture of the electronic device.
[0165] The layered architecture of electronic devices divides Wi-Fi and Bluetooth systems into several layers, each with a clear role and function. Layers communicate with each other via software interfaces. This embodiment does not limit this approach.
[0166] Reference Figure 9 The Wi-Fi system of an electronic device may include Wi-Fi connection-related functional modules in the AP chip of the electronic device and Wi-Fi connection-related functional modules in the Wi-Fi-Bluetooth combination chip of the electronic device.
[0167] The Wi-Fi connection-related functional modules in the AP chip may include WPA_Supplicant. WPA_Supplicant is an independently running daemon responsible for Wi-Fi connections. Its core is a message loop, in which it processes the WPA state machine, control commands, driver events, configuration information, etc.
[0168] The Wi-Fi connectivity modules in a Wi-Fi / Bluetooth combo chip can include a MAC (Medium Access Control) module and a PHY (Physical Layer) module. The MAC module can include a UMAC (Upper MAC) module and a LMAC (Lower MAC) module. The main difference between UMAC and LMAC lies in their respective functions. UMAC primarily handles MAC management functions, such as beacon detection, authentication, association, reassociation, and deassociation, and also manages power, time synchronization, and MAC sublayer management entity (MLME) related tasks. LMAC, on the other hand, handles time-sensitive operations like ACK (acknowledgment frames). In short, UMAC focuses on management and control functions, while LMAC is more focused on time-sensitive real-time operations. In soft-MAC devices, UMAC is typically implemented by a kernel module, while LMAC interacts and operates more directly with the hardware.
[0169] For details regarding Wi-Fi systems that are not explained in sufficient detail, please refer to existing technologies; further explanation will not be provided here.
[0170] Continue to refer to Figure 9 The BLE system of an electronic device may include the application layer module (Profiles) and the host protocol layer module (Host) in the AP chip of the electronic device, as well as the control layer module (Controller) in the Wi-Fi / Bluetooth combo chip of the electronic device.
[0171] like Figure 9 As shown, a Host can include GATT (Generic Attribute profile), ATT (Attribute protocol), GAP (Generic access profile), and L2CAP (Logical Link Control and Adaptation Protocol).
[0172] L2CAP provides multiplexing, data segmentation and reassembly services for the upper layer, and supports logical end-to-end data communication.
[0173] ATT defines a set of rules for accessing data on a peer device. It is the foundation of the GATT specification and the cornerstone of Bluetooth Low Energy. It defines the host-side attribute message format and message type.
[0174] GATT itself does not provide data; it is a service that combines attributes provided by ATT. ATT can read and write attribute values of the peer device. GATT is responsible for understanding the relationships between these attributes and how they are combined.
[0175] GAP defines: the basic functions of all Bluetooth devices; the process of device discovery, connection, and pairing; the four roles in Bluetooth devices; the format of broadcast and scan response messages; and some common Bluetooth parameter definitions, such as device address, device name, pairing key, and device appearance characteristics. GAP also clarifies the basic requirements of a Bluetooth Low Energy device, including the layers involved and how they work together.
[0176] like Figure 9 As shown, the controller may include HCI (Host Controller Interface), LL (Link Layer), and PHY (Physical Layer).
[0177] HCI provides a set of standard interfaces for the Host to access the Controller.
[0178] LL controls the radio frequency state of the device, such as putting the device into one of the following states: Standby, Advertising, Scanning, Initiating, Connection, Synchronization, or Isochronous Broadcasting.
[0179] For details regarding the BLE system that are not explained in sufficient detail, please refer to existing technologies; they will not be elaborated upon here.
[0180] In this embodiment, GAP encapsulates the BLE broadcast message, including a main broadcast message and an extended broadcast message. After receiving the BLE main broadcast message and the BLE extended broadcast message, LL notifies UMAC of the content of the BLE extended broadcast and the offset time of the BLE extended broadcast via IPC (Interprocess Communication). Optionally, LL can also send information such as the extended broadcast timeout and clock precision to UMAC via IPC.
[0181] The BLE LL is responsible for broadcasting the BLE main broadcast message sequentially on channels 37, 38, and 39 via the BLE PHY. This BLE main broadcast message includes information such as the offset time of the Wi-Fi extended broadcast message and the Wi-Fi broadcast channel.
[0182] When the offset time arrives, the Wi-Fi UMAC encapsulates the content of the BLE extended broadcast into a Wi-Fi frame, and the LMAC jumps to the corresponding Wi-Fi broadcast channel to compete for the Wi-Fi channel. After successfully competing for the Wi-Fi channel, the Wi-Fi frame is sent out through the Wi-Fi PHY.
[0183] Understandable, Figure 9 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer layers than illustrated, and each layer may include more or fewer components, or combine some components, or split some components, or arrange the components differently; this application does not impose any limitations.
[0184] It is understood that, in order to implement the broadcasting method in the embodiments of this application, the electronic device includes hardware and / or software modules that perform various functions. Based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0185] like Figure 10 The diagram shows the interaction between each module. (Refer to...) Figure 10 The broadcasting method provided in this application, applied to electronic devices that need to broadcast, specifically includes:
[0186] S601, the Wi-Fi UMAC periodically sends a full-channel scan instruction to the Wi-Fi LMAC.
[0187] The full-channel scan indicator is used to instruct the Wi-Fi LMAC to scan all Wi-Fi channels.
[0188] The Wi-Fi UMAC can send a full-channel scan instruction to the Wi-Fi LMAC when a preset time arrives, or it can send the full-channel scan instruction to the Wi-Fi LMAC periodically. This embodiment does not limit the frequency at which the Wi-Fi LMAC performs a full-channel Wi-Fi scan.
[0189] S602, Wi-Fi LMAC scans each Wi-Fi channel, generates a list of available Wi-Fi channels, and returns the list of available Wi-Fi channels to Wi-Fi UMAC.
[0190] Wi-Fi LMAC scans all Wi-Fi channels individually to identify those with better quality, such as Wi-Fi channels with interference signal strength less than threshold 1 or Wi-Fi channels with signal-to-noise ratio greater than threshold 2.
[0191] Wi-Fi LMAC generates a list of available Wi-Fi channels based on information about these higher-quality Wi-Fi channels. In other words, the list stores information about these higher-quality Wi-Fi channels. For example, Wi-Fi LMAC creates a new list of available Wi-Fi channels and directly adds the information of these higher-quality channels to it. Another example is that Wi-Fi LMAC retrieves an existing list of available Wi-Fi channels and updates it based on the information of these higher-quality channels.
[0192] For example, in the list of available Wi-Fi channels, the information for each Wi-Fi channel may include, but is not limited to, the Wi-Fi channel frequency band (such as the 2.4 GHz band or the 5 GHz band), the Wi-Fi channel number, etc.
[0193] S603, the Wi-Fi UMAC sends a list of available Wi-Fi channels to the BLE Link Layer.
[0194] The Wi-Fi UMAC receives the list of available Wi-Fi channels from the Wi-Fi LMAC and sends the list of available Wi-Fi channels to the BLE Link Layer.
[0195] The Wi-Fi UMAC and BLE Link Layer can communicate using IPC, meaning the Wi-Fi UMAC sends the list of available Wi-Fi channels to the BLE Link Layer via IPC.
[0196] S604, BLE Link Layer updates the list of available Wi-Fi channels.
[0197] If the available Wi-Fi channel list sent by Wi-Fi UMAC is not stored locally, the BLE Link Layer will store the available Wi-Fi channel list upon receiving it. If the available Wi-Fi channel list sent by Wi-Fi UMAC is stored locally, the BLE Link Layer will update the locally stored available Wi-Fi channel list with the latest received list upon receiving it.
[0198] S605 When BLE broadcasting is required, the BLE GAP sends a main broadcast message PDU and an extended broadcast message PDU to the BLE Link Layer.
[0199] For example, if an electronic device needs to perform BLE broadcasts at preset time intervals, the electronic device determines that it needs to perform a BLE broadcast each time the preset time interval is reached. As another example, the electronic device needs to perform a BLE broadcast when a user enables its Bluetooth function. Yet another example, the electronic device needs to perform a BLE broadcast when it needs to execute some custom broadcast events. This embodiment does not limit the scenarios in which the electronic device needs to perform BLE broadcasts.
[0200] Understandably, the amount of data that an electronic device needs to broadcast varies depending on the broadcast event. It may need to broadcast more content or less content.
[0201] When the amount of data that an electronic device needs to broadcast is less than or equal to a preset threshold of 1 (e.g., 31 bytes), the electronic device can use the traditional BLE broadcast method. The BLE GAP assembles a broadcast message PDU (such as an ADV_IND PDU) according to the content to be broadcast and sends the broadcast message PDU to the BLE Link Layer.
[0202] When the amount of data that an electronic device needs to broadcast is greater than a preset threshold 1 but less than or equal to a preset threshold 2 (for example, 254 bytes), the electronic device can use an extended BLE broadcast method. The BLE GAP assembles a main broadcast message PDU (such as ADV_EXT_IND PDU) and an extended broadcast message PDU (such as AUX_ADV_IND PDU) according to the content to be broadcast, and sends both the main broadcast message PDU and the extended broadcast message PDU to the BLE Link Layer.
[0203] When the amount of data that an electronic device needs to broadcast exceeds a preset threshold of 2, the electronic device can use an extended BLE broadcast method. The BLE GAP assembles a main broadcast message PDU (such as ADV_EXT_IND PDU), an extended broadcast message PDU (such as AUX_ADV_IND PDU), and at least one link extended message PDU (such as AUX_CHAIN_IND PDU) according to the content to be broadcast, and sends the main broadcast message PDU, the extended broadcast message PDU, and at least one link extended message PDU to the BLE Link Layer.
[0204] Among them, BLE GAP can send various message PDUs to the BLE Link Layer based on HCI.
[0205] In step S606, the BLE Link Layer determines whether it needs to send an extended broadcast message on the Wi-Fi channel. If yes, it executes step S607; otherwise, it executes step S612.
[0206] As an optional implementation, after receiving the various PDUs sent by the BLE GAP, the BLE Link Layer parses each PDU to determine the amount of data the electronic device needs to broadcast, and then determines whether to send an extended broadcast message on the Wi-Fi channel based on the required amount of data. For example, if the amount of data to be broadcast is greater than a preset threshold of 2, it is determined that an extended broadcast message needs to be sent on the Wi-Fi channel; otherwise, it is determined that an extended broadcast message does not need to be sent on the Wi-Fi channel.
[0207] As another optional implementation, after receiving each message PDU sent by BLE GAP, the BLE Link Layer determines whether it needs to send extended broadcast messages on the Wi-Fi channel based on the type of each message PDU.
[0208] For example, in this broadcast event, if the BLE Link Layer receives only one broadcast message PDU (such as ADV_IND PDU), the BLE Link Layer determines that it does not need to send an extended broadcast message on the Wi-Fi channel.
[0209] For example, in this broadcast event, if the BLE Link Layer receives a primary advertising message PDU (such as ADV_EXT_IND PDU) and an extended advertising message PDU (such as AUX_ADV_IND PDU), then the BLE Link Layer determines that it does not need to send an extended advertising message on the Wi-Fi channel.
[0210] For another example, in this broadcast event, if the BLE Link Layer receives a main broadcast message PDU (such as ADV_EXT_IND PDU), an extended broadcast message PDU (such as AUX_ADV_IND PDU), and at least one link extended message PDU (such as AUX_CHAIN_IND PDU), then the BLE Link Layer determines that it needs to send an extended broadcast message on the Wi-Fi channel.
[0211] S607, the BLE Link Layer selects the target Wi-Fi channel from the list of available Wi-Fi channels and obtains the offset time of the extended broadcast message in the main broadcast message PDU.
[0212] When it is determined that an extended broadcast message needs to be sent on a Wi-Fi channel, the BLE Link Layer selects a Wi-Fi channel from the list of available Wi-Fi channels as the target Wi-Fi channel. This target Wi-Fi channel is the Wi-Fi channel used to transmit the extended broadcast content.
[0213] The BLE Link Layer can select a target Wi-Fi channel from the list of available Wi-Fi channels according to a preset strategy. For example, the BLE Link Layer can randomly select a Wi-Fi channel from the list of available Wi-Fi channels as the target Wi-Fi channel. Another example is that the BLE Link Layer can select a 5GHz Wi-Fi channel from the list of available Wi-Fi channels as the target Wi-Fi channel. Yet another example is that the BLE Link Layer can query the Wi-Fi UMAC for a currently available Wi-Fi channel and use that channel as the target Wi-Fi channel. This embodiment does not limit the strategy by which the BLE Link Layer selects a target Wi-Fi channel from the list of available Wi-Fi channels.
[0214] Reference Figure 4 As shown, in the main broadcast message PDU, the AuxPtr field includes Offset Units and AUX Offset. The BLE Link Layer parses the main broadcast message PDU, obtains the values of Offset Units and AUX Offset, and determines the offset time of the Wi-Fi extended broadcast message based on these values.
[0215] For example, the BLE Link Layer can directly use the Offset Units field, the AUX Offset field, and the values of these two fields as the offset time of Wi-Fi extended broadcast messages.
[0216] For example, the BLE Link Layer can calculate the offset time based on the values of the Offset Units field and the AUX Offset field, and use the calculated time value as the offset time of the Wi-Fi extended broadcast message. Specifically, the BLE Link Layer can determine the Offset Units based on the value of the Offset Units field. For instance, if the value of Offset Units is 0, the BLE Link Layer determines the Offset Units to be 30 μs; if the value of Offset Units is 1, the BLE Link Layer determines the Offset Units to be 300 μs. Then, the BLE Link Layer can calculate the product of the Offset Units and the value of the AUX Offset field, and use the calculated time value as the offset time of the Wi-Fi extended broadcast message.
[0217] This embodiment does not limit the representation of the offset time of Wi-Fi extended broadcast messages.
[0218] S608, the BLE Link Layer sends the extended broadcast content, target Wi-Fi channel information, and offset time to the Wi-Fi UMAC.
[0219] Among them, the BLE Link Layer can send the extended broadcast content, target Wi-Fi channel information, and Wi-Fi extended broadcast message offset time to the Wi-Fi UMAC based on IPC.
[0220] In this embodiment, the content of the extended broadcast can be either the individual BLE extended broadcast message PDUs or the payload within the individual BLE extended broadcast message PDUs; there is no limitation on this.
[0221] For example, the BLE Link Layer receives a main broadcast message PDU (such as ADV_EXT_IND PDU), an extended broadcast message PDU (such as AUX_ADV_IND PDU), and two link extended message PDUs (such as AUX_CHAIN_IND PDU). In this case, the extended broadcast content sent by the BLE Link Layer to the Wi-Fi UMAC can be the extended broadcast message PDU (such as AUX_ADV_IND PDU) and the two link extended message PDUs, or it can be the payload in the extended broadcast message PDU (such as AUX_ADV_IND PDU) and the payload in each link extended message PDU.
[0222] In this embodiment, the information of the target Wi-Fi channel may include, but is not limited to, the Wi-Fi frame type, the frequency band of the target Wi-Fi channel (such as the 2.4 GHz band or the 5 GHz band), the channel number of the target Wi-Fi channel, and the Wi-Fi signal modulation and coding mode. The Wi-Fi frame type refers to the frame type of the Wi-Fi extended broadcast message.
[0223] Alternatively, the target Wi-Fi channel information may include, but is not limited to, the target Wi-Fi channel's frequency band (such as the 2.4 GHz band or the 5 GHz band), the target Wi-Fi channel's channel number, and the Wi-Fi signal modulation and coding mode. In this case, the frame type of the Wi-Fi extended broadcast message is the default Wi-Fi frame type, which is not transmitted in the main broadcast message PDU.
[0224] Alternatively, the target Wi-Fi channel information may include, but is not limited to, the target Wi-Fi channel's frequency band (such as the 2.4 GHz band or the 5 GHz band), the target Wi-Fi channel's channel number, and the Wi-Fi frame type. In this case, the Wi-Fi signal modulation and coding mode is the default mode, which is not transmitted in the main broadcast message PDU.
[0225] Alternatively, the target Wi-Fi channel information may include, but is not limited to, the frequency band of the target Wi-Fi channel (such as the 2.4 GHz band or the 5 GHz band) and the channel number of the target Wi-Fi channel. In this case, the frame type of the Wi-Fi extended broadcast message is the default Wi-Fi frame type, which is not transmitted in the main broadcast message PDU. At this time, the Wi-Fi signal modulation and coding mode is also the default mode, which is not transmitted in the main broadcast message PDU.
[0226] Optionally, the BLE Link Layer can also send information such as the extended broadcast timeout and clock precision to the Wi-Fi UMAC. The extended broadcast timeout can be used to indicate within which the Wi-Fi UMAC needs to complete the transmission of the extended broadcast message.
[0227] S609, the BLE Link Layer adjusts the main broadcast message PDU according to the information of the target Wi-Fi channel, generates a BLE main broadcast message based on the adjusted main broadcast message PDU, and broadcasts the BLE main broadcast message on the main broadcast channel through the PHY.
[0228] In this embodiment, since the BLE Link Layer determines that it needs to send an extended broadcast message on the Wi-Fi channel, the BLE Link Layer needs to indicate in the main broadcast message which Wi-Fi channel the scanning device should receive the extended broadcast message on.
[0229] Therefore, the BLE Link Layer adjusts the main broadcast message PDU based on the target Wi-Fi channel information, ensuring that the adjusted main broadcast message PDU includes the target Wi-Fi channel information. Furthermore, the adjusted main broadcast message PDU needs to specify that Wi-Fi technology is used to transmit the extended broadcast message PDU.
[0230] In the adjusted main broadcast message PDU, the information of the target Wi-Fi channel may include, but is not limited to, the Wi-Fi frame type, the frequency band of the target Wi-Fi channel (such as the 2.4 GHz band or the 5 GHz band), the channel number of the target Wi-Fi channel, and the Wi-Fi signal modulation and coding mode. Among them, the Wi-Fi frame type is the frame type of the Wi-Fi extended broadcast message.
[0231] Alternatively, in the adjusted main broadcast message PDU, the target Wi-Fi channel information may include, but is not limited to, the target Wi-Fi channel's frequency band (such as the 2.4 GHz band or the 5 GHz band), the target Wi-Fi channel's channel number, and the Wi-Fi signal modulation and coding mode. In this case, the frame type of the Wi-Fi extended broadcast message is the default Wi-Fi frame type, which is not transmitted in the main broadcast message PDU.
[0232] Alternatively, in the adjusted main broadcast message PDU, the target Wi-Fi channel information may include, but is not limited to, the frequency band of the target Wi-Fi channel (such as the 2.4 GHz band or the 5 GHz band) and the channel number of the target Wi-Fi channel. In this case, the frame type of the Wi-Fi extended broadcast message is the default Wi-Fi frame type, which is not transmitted in the main broadcast message PDU. The Wi-Fi signal modulation and coding mode is also the default mode, which is not transmitted in the main broadcast message PDU.
[0233] It is understandable that if a Wi-Fi channel can be uniquely identified solely by its channel number, the information of the target Wi-Fi channel may not include the frequency band information of the Wi-Fi channel. This example does not impose any restrictions on this.
[0234] In one implementation, the BLE Link Layer can reuse a field of the broadcast message PDU payload to carry information about the target Wi-Fi channel. For example, the BLE Link Layer can reuse the 8th bit of the Extended Header Flags in the broadcast message PDU payload. For instance, when the 8th bit of the Extended Header Flags is set to "1", it indicates that the ACAD field carries information about the target Wi-Fi channel.
[0235] In this implementation, when the BLE Link Layer determines that an extended broadcast message needs to be sent on the Wi-Fi channel, it sets the 8th bit of the Extended Header Flags in the main broadcast message PDU to "1" and adds the target Wi-Fi channel information to the ACAD field, thus adjusting the main broadcast message PDU. Subsequently, the BLE Link Layer can encapsulate the main broadcast message PDU into a main broadcast message and broadcast it on the main broadcast channel via the PHY.
[0236] In another implementation, the BLE Link Layer can add new fields (such as the WifiInfo field) to the broadcast message PDU payload to carry information about the target Wi-Fi channel. Additionally, the BLE Link Layer can reuse the value of a field to indicate whether the newly added field is effective.
[0237] Therefore, embodiments of this application provide a new frame structure for BLE broadcast messages. For example... Figure 11 As shown, a BLE broadcast message may include a preamble, access address, PDU, and CRC. The PDU of the broadcast message, also known as the Advertising Physical Channel PDU, may include a header and a payload.
[0238] In this embodiment, the payload format of the broadcast message PDU can be referred to Figure 11 The format of the extended broadcast payload is shown. That is, the PDU of the main broadcast message, the PDU of the extended broadcast message, and the PDU of the link extended message mentioned above can all refer to this format of the extended broadcast payload.
[0239] Continue to refer to Figure 11 In this extended broadcast payload format, the payload of the broadcast message PDU (i.e., Advertising Physical Channel PDU) may include Extended Header Length, AdvMode, Extended Header, WifiInfo (Wi-Fi information), and AdvData.
[0240] For explanations regarding Extended Header Length, AdvMode, Extended Header, and AdvData, please refer to the previous explanation of Common Extended Advertising Payload Format; these will not be repeated here.
[0241] Optionally, the Extended Header field and the WifiInfo field together occupy 0-63 octets. Optionally, the WifiInfo field and the AdvData field together occupy 0-254 octets. This embodiment does not limit this.
[0242] like Figure 11 As shown, the WifiInfo field may include: Type (Wi-Fi frame type), Band (Wi-Fi channel frequency band), Channel (Wi-Fi channel number), and MCS (Modulation and Coding Scheme).
[0243] Optionally, the WifiInfo field may also include: Band, Channel, and MCS. In this case, the Wi-Fi frame type is the default type, and this embodiment does not limit the default type.
[0244] Optionally, the WifiInfo field may also include: Type, Band, and Channel. In this case, the modulation and encoding strategy is the default method, and this embodiment does not limit the default method.
[0245] Optionally, the WifiInfo field may also include: Band and Channel. In this case, the Wi-Fi frame type is the default type, and the modulation and coding strategy is the default method. This embodiment does not limit the default type and default method.
[0246] Understandably, if a Wi-Fi channel can be uniquely identified solely by its channel number, the WifiInfo field may not include the frequency band information of the Wi-Fi channel. This example does not impose any restrictions on this.
[0247] Here, Type refers to the type of Wi-Fi frame used to carry BLE Extended Broadcast content. Different values in the Type field indicate different types of Wi-Fi frames used to carry BLE Extended Broadcast content. For example, the Type field occupies 3 bits, and each value represents a preset Wi-Fi frame type. The Wi-Fi frame type is not limited in this embodiment.
[0248] Band refers to the frequency band of Wi-Fi broadcasting. For example, the Band field occupies 1 bit. When the Band field is set to "1", it indicates that the Wi-Fi broadcasting frequency band is the 5G band; when the Band field is set to "0", it indicates that the Wi-Fi broadcasting frequency band is the 2.4G band.
[0249] Channel refers to the channel through which Wi-Fi broadcasts are conducted, also known as the target Wi-Fi channel mentioned above. For example, the Channel field occupies 6 bits. Different values in the Channel field indicate different Wi-Fi channels used to transmit the Wi-Fi extended broadcast frames.
[0250] MCS stands for Modulation and Coding Mode of Wi-Fi Signal. For example, the MCS field occupies 4 bits. Of the 16 values in the MCS field, 4 are reserved, and the remaining 12 represent one of the modulation and coding modes from MCS0 to MCS11.
[0251] To ensure compatibility with existing BLE broadcast message frame structures, a certain field value can be reused to indicate whether the WifiInfo field is active, i.e., whether Wi-Fi technology is used for extended broadcasting.
[0252] For example, the AUX PHY in the AuxPtr field can be reused to determine whether the WifiInfo field is effective. For instance, when the value of AUX PHY is any reserved value (any value between 011b and 111b), it indicates that the WifiInfo field is effective and extended broadcasting is performed using Wi-Fi technology.
[0253] For example, the 8th bit of Extended Header Flags can be reused to determine whether the WifiInfo field is active. For instance, when the value of the 8th bit of Extended Header Flags is "1", it indicates that the WifiInfo field is active and extended broadcasting is performed using Wi-Fi technology; when the value of the 8th bit of Extended Header Flags is "0", it indicates that the WifiInfo field is invalid and extended broadcasting is not performed using Wi-Fi technology.
[0254] Taking the reuse of the AUX PHY in the AuxPtr field as an example, when the BLE Link Layer determines that it needs to send an extended broadcast message on the Wi-Fi channel, it modifies the value of AUX PHY in the main broadcast message PDU to any reserved value (such as 111b) and adds the target Wi-Fi channel information to the WifiInfo field, thus completing the adjustment of the main broadcast message PDU. Subsequently, the BLELink Layer can encapsulate the main broadcast message PDU into a main broadcast message and broadcast it on the main broadcast channel via the PHY.
[0255] Thus, the broadcasting device broadcasts information such as the offset time of the extended broadcast (refer to Offset Units and AUX Offset in the AuxPtr field), clock precision (refer to CA in the AuxPtr field), and the Wi-Fi channel through the BLE master broadcast message. When performing a BLE scan, the scanning device listens to any one of the master broadcast channels (channels 37, 38, and 39) to receive the BLE master broadcast message sent by the broadcasting device. Upon receiving the BLE master broadcast message, the scanning device parses it to obtain information such as the offset time of the extended broadcast and the Wi-Fi channel through which it is transmitted. Therefore, the scanning device can listen to the Wi-Fi channel through which the extended broadcast is transmitted when the offset time arrives and receive the extended broadcast on that Wi-Fi channel. Optionally, to improve compatibility and avoid the impact of different clock precisions of electronic devices, the scanning device can also listen to the Wi-Fi channel through which the extended broadcast is transmitted before the offset time arrives and receive the extended broadcast on that Wi-Fi channel. For example, a scanning device can listen to the Wi-Fi channel transmitting the spread broadcast at a point in time before the spread broadcast offset time arrives (this point can be a few microseconds away from the spread broadcast offset time).
[0256] In one optional implementation, the BLE master broadcast message may also include an extended broadcast timeout. When the scanning device receives the BLE master broadcast message, it can parse the extended broadcast offset time and the extended broadcast timeout. For example, starting from the extended broadcast offset time, the scanning device listens to the target Wi-Fi channel and begins timing. If, by the extended broadcast timeout, the scanning device has not received a Wi-Fi frame from the broadcasting device on the target Wi-Fi channel, it can stop listening to the target Wi-Fi channel to avoid unnecessary resource waste. Alternatively, at a certain point before the extended broadcast offset time, the scanning device listens to the target Wi-Fi channel and begins timing. If, by the extended broadcast timeout, the scanning device has not received a Wi-Fi frame from the broadcasting device on the target Wi-Fi channel, it can stop listening to the target Wi-Fi channel. For example, at some point before the offset time of the extended broadcast, the scanning device listens to the target Wi-Fi channel and starts timing when the offset time of the extended broadcast arrives. If the scanning device still has not received the Wi-Fi frame sent by the broadcasting device on the target Wi-Fi channel when the timeout time of the extended broadcast is reached, it can stop listening to the target Wi-Fi channel.
[0257] For example, an extended broadcast timeout field can be added to the BLE broadcast message. The value of the extended broadcast timeout field indicates the extended broadcast timeout period allowed by the broadcasting device. For instance, an extended broadcast timeout field can be added to the WifiInfo field of the BLE broadcast message, or an extended broadcast timeout field can be added to the Payload field of the BLE broadcast message. This embodiment does not limit this.
[0258] This embodiment does not limit the order of S608 and S609.
[0259] S610, when the offset time arrives, the Wi-Fi UMAC encapsulates the extended broadcast content into a Wi-Fi frame and instructs the Wi-Fi LMAC to send the Wi-Fi frame on the target Wi-Fi channel.
[0260] After receiving the spreadcast content, target Wi-Fi channel information, and offset time, the Wi-Fi UMAC can start a timer based on the offset time. When the timer expires, the offset time is determined, and the Wi-Fi UMAC encapsulates the spreadcast content into a Wi-Fi frame.
[0261] It should be noted that if the BLE Link Layer does not transmit Wi-Fi frame type information to the Wi-Fi UMAC, it indicates that the Wi-Fi LMAC can encapsulate the extended broadcast content according to the default Wi-Fi frame type; if the BLE Link Layer transmits Wi-Fi frame type information to the Wi-Fi UMAC, it indicates that the Wi-Fi LMAC needs to encapsulate the extended broadcast content according to the Wi-Fi frame type indicated by the BLE Link Layer.
[0262] When the Wi-Fi UMAC instructs the Wi-Fi LMAC to send a Wi-Fi frame on the target Wi-Fi channel, it is also necessary to pass the MCS mode indicated by the BLELink Layer to the Wi-Fi LMAC.
[0263] Additionally, it should be noted that the data content carried by the Wi-Fi frame in this embodiment is BLE extended broadcast content. When the UMAC encapsulates the Wi-Fi frame, it does not need to encrypt the data content to avoid the scanning device being unable to parse the data content after receiving the Wi-Fi frame.
[0264] When the S611 Wi-Fi LMAC wins the competition for the target Wi-Fi channel, it transmits a Wi-Fi frame on the target Wi-Fi channel through the PHY.
[0265] When the Wi-Fi UMAC instructs the Wi-Fi LMAC to transmit a Wi-Fi frame on the target Wi-Fi channel, the Wi-Fi LMAC competes for the target Wi-Fi channel. When it wins the competition for the target Wi-Fi channel, it instructs the Wi-Fi PHY to transmit the Wi-Fi frame on the target Wi-Fi channel in accordance with the MCS mode indicated by the BLE Link Layer.
[0266] Subsequently, the scanning device parses the main broadcast message and obtains information such as the offset time of the extended broadcast and the Wi-Fi channel used to transmit the extended broadcast. Then, when the offset time arrives, or at some point before the offset time arrives, it switches to the Wi-Fi channel specified by the broadcasting device to receive Wi-Fi frames. If the scanning device's Wi-Fi function is not enabled, when the offset time arrives, or before the offset time arrives, the scanning device needs to first enable its Wi-Fi function before switching to the Wi-Fi channel specified by the broadcasting device to receive Wi-Fi frames.
[0267] In one possible scenario, when the spread broadcast offset time is reached, the Wi-Fi LMAC competes for the target Wi-Fi channel, but for some reason, it fails to acquire the target Wi-Fi channel before the spread broadcast timeout period arrives. In this case, the Wi-Fi LMAC can discard the Wi-Fi frame carrying the spread broadcast content and stop transmitting it. Therefore, the scanning device will also fail to receive the Wi-Fi frame on the Wi-Fi channel specified in the main BLE main broadcast message. When the scanning device times out to the spread broadcast timeout period, it can stop listening to the target Wi-Fi channel to avoid unnecessary resource waste.
[0268] S612, the BLE Link Layer generates a BLE main broadcast message based on the main broadcast message PDU, and broadcasts the BLE main broadcast message on the main broadcast channel through the PHY.
[0269] When the BLE Link Layer determines that it does not need to send extended broadcast messages on the Wi-Fi channel, it directly encapsulates the main broadcast message PDU sent by the BLE GAP into a main broadcast message and broadcasts it on the main broadcast channel through the PHY.
[0270] In the main broadcast message PDU, the AuxPtr field specifies information such as channel index, clock precision, offset unit, auxiliary packet offset, and auxiliary packet physical port.
[0271] In this way, the broadcasting device broadcasts information such as the offset time of the extended broadcast and the BLE channel through the BLE main broadcast message. When performing a BLE scan, the scanning device listens to any one of the main broadcast channels to receive the main broadcast messages sent by the broadcasting device. Upon receiving the main broadcast message, the scanning device parses it to obtain information such as the offset time of the extended broadcast and the BLE channel through which the extended broadcast is transmitted.
[0272] S613, when the offset time arrives, the BLE Link Layer generates a BLE extended broadcast message based on the extended broadcast message PDU, and broadcasts the BLE extended broadcast message on the second broadcast channel through the PHY.
[0273] The BLE Link Layer obtains the offset time of the extended broadcast message from the main broadcast message PDU, and generates a BLE extended broadcast message based on the extended broadcast message PDU when the offset time arrives. The BLE extended broadcast message is then broadcast on the second broadcast channel specified by the AuxPtr field in the main broadcast message PDU via the PHY.
[0274] After the scanning device parses the main broadcast message and learns information such as the offset time of the extended broadcast and the BLE channel through which the extended broadcast is transmitted, it listens to the BLE channel (i.e., the second broadcast channel) when the offset time arrives or before the offset time arrives (e.g., at some point before the offset time arrives) to receive the BLE extended broadcast message.
[0275] For any parts of this process that are not explained in detail, please refer to existing technologies; they will not be elaborated upon here.
[0276] The following uses two specific application scenarios as examples to explain the broadcasting method provided in the embodiments of this application. In scenario one and scenario two, the broadcasting device is a tablet computer and the scanning device is a smartphone, respectively, for the explanation.
[0277] Scene 1
[0278] In this scenario, the broadcast messages sent by the tablet need to carry a large amount of data. The solution of using Wi-Fi frames to carry extended broadcasts solves the problem of large number of service transmissions and also meets the real-time requirements of data transmission.
[0279] like Figure 12 As shown in (1), at time T0, the smartphone listens to the BLE main broadcast channel. This scenario is illustrated using the example of a smartphone listening to BLE channel 37. (Continue referring to...) Figure 12 In step (2), at time T1 (which is later than time T0), the tablet computer needs to perform BLE broadcasting by sequentially sending BLE main broadcast messages on BLE channels 37, 38, and 39. The BLE main broadcast message carries Wi-Fi channel information for transmitting extended broadcast messages, as well as the offset time for transmitting the extended broadcast messages. For example, in the BLE main broadcast message, the Wi-Fi channel for transmitting the extended broadcast messages is the first Wi-Fi channel, and the offset time for transmitting the extended broadcast messages is the first duration. That is, the BLE main broadcast message indicates that the extended broadcast messages are transmitted in the form of Wi-Fi frames, instructing the scanning device to listen to the first Wi-Fi channel when the offset time reaches the first duration to receive the extended broadcast messages.
[0280] For example, the frame structure of a BLE master broadcast message can be referred to Figure 11 As shown. In the AuxPtr field of the BLE main broadcast message PDU, the value of AUX PHY is 111b, indicating that the WifiInfo field is valid. In the WifiInfo field, the value of Channel is the channel number of the first Wi-Fi channel.
[0281] Continue to refer to Figure 12In step (3), at time T2 (T2 is no earlier than T1), the smartphone receives the BLE master broadcast message on the BLE 37 channel. The smartphone parses the content carried by the BLE master broadcast message, finds that the value of AUX PHY is 111b, and determines that the WifiInfo field is valid. Based on the value of the WifiInfo field, the smartphone determines that the extended broadcast message will be transmitted in the form of a Wi-Fi frame on the first Wi-Fi channel. The smartphone can also calculate the offset time of the extended broadcast message as the first duration based on the value of AuxPtr, that is, the value of OffsetUnits and the value of AUX Offset. At time T3 (T3 is later than T2), the smartphone times out to the first duration and listens to the first Wi-Fi channel. If the smartphone does not have Wi-Fi enabled, it needs to enable Wi-Fi before listening to the first Wi-Fi channel. Optionally, the smartphone may also listen to the first Wi-Fi channel at a time before time T3 (the time difference between this time and time T3 may be a few microseconds) to receive Wi-Fi frames carrying extended broadcast on the first Wi-Fi channel.
[0282] Continue to refer to Figure 12 In (4), at time T4 (which is later than time T3), the tablet computer sends a Wi-Fi frame carrying an extended broadcast on the first Wi-Fi channel.
[0283] Continue to refer to Figure 12 In (5), at time T5 (time T5 is no earlier than time T4), the smartphone receives a Wi-Fi frame on the first Wi-Fi channel. The Bluetooth Extended Broadcast Message (PDU) can be obtained by parsing the Wi-Fi frame.
[0284] It should be noted that if the BLE master broadcast message does not carry the Wi-Fi frame type, the smartphone will parse the Wi-Fi frames received on the first Wi-Fi channel according to the default Wi-Fi frame type. If the BLE master broadcast message carries the Wi-Fi frame type, the smartphone will parse the Wi-Fi frames received on the first Wi-Fi channel according to the Wi-Fi frame type specified in the BLE master broadcast message.
[0285] In this scenario, the tablet first broadcasts the main broadcast message via BLE, and then broadcasts the extended broadcast message via Wi-Fi, thus completing the broadcast event. This broadcast event not only carries more broadcast data at once, but also meets the real-time data transmission requirements.
[0286] Scene 2
[0287] In this scenario, the broadcast messages sent by the tablet do not need to carry a large amount of data, so the solution of carrying broadcast data based on BLE extended broadcast messages can continue to be used.
[0288] like Figure 13 As shown in (1), at time T6, the smartphone listens to the BLE main broadcast channel. This scenario is illustrated using the example of a smartphone listening to BLE channel 37. (Continue referring to...) Figure 13 In step (2), at time T7 (which is later than time T6), the tablet computer needs to perform BLE broadcasting by sequentially sending BLE main broadcast messages on BLE channels 37, 38, and 39. The BLE main broadcast message carries BLE channel information for transmitting extended broadcast messages, as well as the offset time for transmitting the extended broadcast messages. For example, in the BLE main broadcast message, the BLE channel for transmitting extended broadcast messages is BLE36, and the offset time for transmitting extended broadcast messages is the second duration. That is, the BLE main broadcast message indicates that the broadcast content is transmitted in the form of BLE extended broadcast messages, instructing the scanning device to listen to BLE36 when the offset time reaches the second duration to receive the extended broadcast messages.
[0289] For example, the frame structure of a BLE master broadcast message can be referred to Figure 11 As shown. In the AuxPtr field of the BLE master broadcast message PDU, if the value of AUX PHY is not a reserved value (such as not 111b), it indicates that the WifiInfo field is invalid.
[0290] Continue to refer to Figure 13 In step (3), at time T8 (T8 is no earlier than T7), the smartphone receives the BLE main broadcast message on the BLE 37 channel. The smartphone parses the content carried by the BLE main broadcast message and finds that the value of AUX PHY is not 111b, thus determining that the WifiInfo field is invalid. The smartphone can determine that the transmission channel of the BLE extended broadcast message is the BLE 36 channel based on the value of Channel Index in the AuxPtr field. The smartphone can also calculate the offset time of the BLE extended broadcast message as the second duration based on the values of OffsetUnits and AUX Offset in the AuxPtr field. At time T9 (T9 is later than T8), the smartphone times to the second duration and listens to the BLE 36 channel. Optionally, the smartphone can also listen to the BLE 36 channel at a time before time T9 (the time difference between this time and time T9 can be several microseconds) to receive the BLE extended broadcast message on the BLE 36 channel.
[0291] Continue to refer to Figure 13In (4), at time T10 (which is later than time T9), the tablet computer sends a BLE extended broadcast message carrying broadcast content on BLE channel 36.
[0292] Continue to refer to Figure 13 In (5), at time T11 (time T11 is no earlier than time T10), the smartphone receives a BLE extended broadcast message on the BLE 36 channel. The Bluetooth extended broadcast message PDU can be obtained by parsing the BLE extended broadcast message.
[0293] In this scenario, the tablet computer first broadcasts the main broadcast message on the main broadcast channel, and then broadcasts the extended broadcast message on the second broadcast channel to complete the broadcast event.
[0294] In the broadcasting method provided in this application embodiment, the broadcasting device can flexibly select the broadcasting method according to the data volume of the broadcast content. When the data volume of the broadcast content is large, the broadcasting device uses Wi-Fi frames to carry the extended broadcast data, thereby meeting the broadcast service requirements and the real-time requirements of data transmission. When the data volume of the broadcast content is small, the broadcasting device can continue to use the existing Bluetooth extended transmission scheme.
[0295] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the broadcasting method in the above embodiment.
[0296] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the broadcasting method described in the above embodiment.
[0297] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, chip system, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the broadcasting method in the above method embodiments.
[0298] In this embodiment, the electronic devices (such as mobile phones), computer storage media, computer program products, or chips are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0299] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0300] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0301] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A broadcasting method, characterized in that, include: At a first moment, the first electronic device broadcasts a first BLE message on a first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content; The second electronic device listens to the first BLE channel and receives the first BLE message on the first BLE channel; At a second moment, the first electronic device broadcasts the target Wi-Fi message on the target Wi-Fi channel; wherein the second moment is later than the first moment; When the first offset time arrives, or before the first offset time arrives, the second electronic device listens to the target Wi-Fi channel and receives the target Wi-Fi message on the target Wi-Fi channel.
2. The method according to claim 1, characterized in that, The target Wi-Fi channel information includes the Wi-Fi channel frequency band information and the Wi-Fi channel number; or, The information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
3. The method according to claim 2, characterized in that, The Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel. The Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
4. The method according to claim 3, characterized in that, The target field is the AUX PHY field, and the preset value is the current reserved value of the AUX PHY field.
5. The method according to claim 1, characterized in that, Before the first electronic device broadcasts the first BLE message on the first BLE channel, it also includes: The first electronic device acquires multiple currently available Wi-Fi channels; The first electronic device selects one of the plurality of available Wi-Fi channels as the target Wi-Fi channel.
6. The method according to claim 5, characterized in that, Also includes: The first electronic device periodically scans each Wi-Fi channel to determine the multiple available Wi-Fi channels.
7. The method according to any one of claims 1-6, characterized in that, Also includes: At the third moment, the first electronic device broadcasts a second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content; The second electronic device listens to the second BLE channel and receives the second BLE message on the second BLE channel; At the fourth moment, the first electronic device broadcasts the third BLE message on the third BLE channel; wherein the fourth moment is later than the third moment; When the second offset time arrives, or before the second offset time arrives, the second electronic device listens to the third BLE channel and receives the third BLE message on the third BLE channel.
8. A broadcasting method, characterized in that, include: At a first moment, the first electronic device broadcasts a first BLE message on a first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content; At a second moment, the first electronic device broadcasts the target Wi-Fi message on the target Wi-Fi channel; wherein the second moment is later than the first moment.
9. The method according to claim 8, characterized in that, The target Wi-Fi channel information includes the Wi-Fi channel frequency band information and the Wi-Fi channel number; or, The information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
10. The method according to claim 9, characterized in that, The Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel. The Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
11. The method according to claim 10, characterized in that, The target field is the AUX PHY field, and the preset value is the current reserved value of the AUX PHY field.
12. The method according to claim 8, characterized in that, The first electronic device includes a combined chip, which includes a BLE module and a Wi-Fi module; The first electronic device broadcasts a first BLE message on the first BLE channel, including: The BLE module broadcasts a first BLE message on the first BLE channel; The first electronic device broadcasts the target Wi-Fi message on the target Wi-Fi channel, including: The Wi-Fi module broadcasts the target Wi-Fi message on the target Wi-Fi channel.
13. The method according to claim 12, characterized in that, Before broadcasting the first BLE message on the first BLE channel, the BLE module further includes: The BLE module obtains multiple currently available Wi-Fi channels and selects one of them as the target Wi-Fi channel. The BLE module sends the target Wi-Fi channel information to the Wi-Fi module.
14. The method according to claim 13, characterized in that, The Wi-Fi module periodically scans each Wi-Fi channel to determine the multiple currently available Wi-Fi channels, and sends the information of the multiple currently available Wi-Fi channels to the BLE module.
15. The method according to any one of claims 8-14, characterized in that, Also includes: At the third moment, the first electronic device broadcasts a second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content; At the fourth moment, the first electronic device broadcasts the third BLE message on the third BLE channel; wherein the fourth moment is later than the third moment.
16. A broadcasting method, characterized in that, include: The second electronic device listens to the first BLE channel and receives the first BLE message on the first BLE channel; wherein, the first BLE message includes: information about the target Wi-Fi channel and a first offset time for broadcasting the target Wi-Fi message on the target Wi-Fi channel; the target Wi-Fi message carries BLE broadcast content; When the first offset time arrives, or before the first offset time arrives, the second electronic device listens to the target Wi-Fi channel and receives the target Wi-Fi message on the target Wi-Fi channel.
17. The method according to claim 16, characterized in that, The target Wi-Fi channel information includes the Wi-Fi channel frequency band information and the Wi-Fi channel number; or, The information of the target Wi-Fi channel includes the frequency band information of the Wi-Fi channel, the channel number of the Wi-Fi channel, the type information of the Wi-Fi frame, and / or the modulation and coding strategy information of the Wi-Fi signal.
18. The method according to claim 17, characterized in that, The Payload field of the first BLE message PDU includes an extended header field and a Wi-Fi information field; the Wi-Fi information field is used to carry information about the target Wi-Fi channel. The Wi-Fi information field is valid when the value of the target field in the extended header field is a preset value.
19. The method according to claim 18, characterized in that, The target field is the AUX PHY field, and the preset value is the current reserved value of the AUX PHY field.
20. The method according to any one of claims 16-19, characterized in that, The second electronic device listens to the second BLE channel and receives the second BLE message on the second BLE channel; wherein, the second BLE message includes: information of the third BLE channel and a second offset time for broadcasting the third BLE message on the third BLE channel; the third BLE message carries BLE broadcast content; When the second offset time arrives, or before the second offset time arrives, the second electronic device listens to the third BLE channel and receives the third BLE message on the third BLE channel.
21. An electronic device, characterized in that, The electronic device has BLE communication and Wi-Fi communication functions; the electronic device includes: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, cause the electronic device to perform the broadcasting method as claimed in any one of claims 8-15, or cause the electronic device to perform the broadcasting method as claimed in any one of claims 16-20.
22. The electronic device of claim 21, wherein the electronic device comprises a combined chip, and the BLE communication function and the Wi-Fi communication function are integrated in the combined chip.
23. A chip system, characterized in that, The chip system, used in an electronic device, includes instructions and at least one processor, wherein the at least one processor executes the instructions to cause the electronic device to perform the broadcasting method as described in any one of claims 8-15, or to cause the electronic device to perform the broadcasting method as described in any one of claims 16-20.
24. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the broadcasting method as described in any one of claims 8-15, or causes the electronic device to perform the broadcasting method as described in any one of claims 16-20.