Bluetooth data transmission method and device, storage medium and wireless communication equipment
By sending a CTS-TO-SELF frame before the BLE connection event and switching to WiFi transmission after the BLE transmission is completed, the problem of WiFi interfering with BLE connection is solved, and the stability of BLE connection and WiFi transmission efficiency is improved.
Patent Information
- Application Number
- CN202510157774.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-13
AI Technical Summary
In the case where WiFi and BLE share the same RF module, WiFi transmission may interfere with the BLE connection, resulting in unstable or disconnected BLE connection, especially in high-density wireless environments.
By accurately calculating the starting time point P1 of the BLE connection event and sending a CTS-TO-SELF frame before this time point, other WiFi devices are notified to temporarily occupy the channel to avoid conflicts. Then, after the BLE data frame is transmitted, switch to WiFi data transmission.
It effectively avoids communication conflicts between BLE connection events and other WiFi devices, improves the stability and reliability of BLE connections, and optimizes WiFi transmission efficiency.
Smart Images

Figure CN119996981A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communications, and in particular to a Bluetooth data transmission method, device, storage medium and wireless communication equipment. Background Art
[0002] With the rapid development of wireless communication technology, more and more devices are integrating multiple wireless communication technologies to meet different application requirements. In the fields of smart home, wearable devices and Internet of Things (IoT), there is a demand for both WiFi and Bluetooth Low Energy (BLE) technologies. WiFi technology has become the first choice for many devices to access the Internet with its high-speed data transmission capability, while BLE technology occupies an important position in short-distance communication between devices with its low power consumption and fast connection characteristics.
[0003] Especially in some high-level smart terminal devices, in order to optimize user experience and reduce hardware costs, designers tend to integrate WiFi and BLE on the same 2.4GHz radio frequency (RF) module. Although this design improves the utilization of hardware resources, it also brings challenges to RF resource management. Since WiFi and BLE both operate in the 2.4GHz frequency band, there is a natural spectrum competition problem between them.
[0004] In practical applications, WiFi transmission usually requires a continuous data stream to ensure high-speed data transmission efficiency, while BLE communication performs regular data exchange according to the negotiated connection interval. Each BLE connection event includes a communication process between the master and slave devices, which needs to ensure low latency and high reliability. However, when WiFi and BLE share the same RF module, if proper time domain management is not performed, WiFi transmission may interfere with BLE connection events, resulting in instability or even disconnection of BLE connections.
[0005] See also Figure 1 As shown, in order to alleviate this interference, the prior art adopts a time-sharing transmission strategy. That is, when the BLE connection interval is about to arrive, the device will interrupt the WiFi transmission to ensure the smooth progress of the BLE connection event. In the connection event, the BLE host and slave will communicate on the agreed frequency according to the pre-negotiated frequency hopping algorithm, thereby reducing the interference of other 2.4GHz devices to a certain extent. However, although this strategy can improve the stability of the BLE connection to a certain extent, it still cannot completely avoid interference from other WiFi devices using the 2.4GHz frequency band.
[0006] Especially in high-density wireless environments, such as home networks and office networks, other WiFi devices are active frequently, which makes BLE devices susceptible to interference, affecting the stability and reliability of data transmission. Therefore, how to improve the stability of BLE connections while ensuring WiFi transmission efficiency has become a technical problem that needs to be solved in the current wireless communication field. Summary of the invention
[0007] The embodiments of the present application provide a method, device, storage medium and wireless communication device for transmitting Bluetooth data, which can solve the problem that Bluetooth data transmission is easily interfered in the related art. The technical solution is as follows:
[0008] In a first aspect, an embodiment of the present application provides a method for transmitting Bluetooth data, wherein a wireless communication device has a built-in WiFi4 controller and a BLE controller, and the WiFi4 controller and the BLE controller share a 2.4G radio frequency module;
[0009] Wherein, the method comprises:
[0010] The wireless communication device establishes a Bluetooth connection with the BLE slave through the BLE controller;
[0011] The wireless communication device calculates a starting time point P1 of a next BLE connection event;
[0012] The wireless communication device calculates the time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe interval;
[0013] The wireless communication device sends a CTS-TO-SELF frame at the time point P2, waits for SIFS when the CTS-TO-SELF frame is sent, and then transmits a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices that receive the CTS-TO-SELF frame set their own NAV to T, where T=the duration of the CTS-TO-SELF frame+SIFS+the duration of the BLE connection event;
[0014] When the wireless communication device detects that the Bluetooth data frame has been transmitted, it transmits the WiFi data frame at the second frequency point through the built-in WiFi4 controller.
[0015] In a second aspect, an embodiment of the present application provides a Bluetooth data transmission device, the Bluetooth data transmission device comprising:
[0016] A connection unit, used to establish a Bluetooth connection with a BLE slave device through a BLE controller;
[0017] A calculation unit, used to calculate the starting time point P1 of the next BLE connection event;
[0018] The calculation unit is further used to calculate the time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe interval;
[0019] A sending unit, configured to send a CTS-TO-SELF frame at the time point P2, wait for SIFS when the CTS-TO-SELF frame is sent, and then transmit a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices receiving the CTS-TO-SELF frame set their own NAV to T, where T = the duration of the CTS-TO-SELF frame + SIFS + the duration of the BLE connection event;
[0020] The sending unit is also used to transmit the WiFi data frame at the second frequency point through the built-in WiFi4 controller when it is detected that the Bluetooth data frame is transmitted.
[0021] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0022] In a fourth aspect, an embodiment of the present application provides a wireless communication device, which may include: a WiFi4 controller, a BLE controller, a 2.4G radio frequency module, a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0023] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0024] By accurately calculating the starting time point P1 of the BLE connection event and determining the time point P2 for sending the CTS-TO-SELF frame based on it, this technical solution can notify other WiFi devices that the current frequency band will be occupied for a period of time by sending a CTS-TO-SELF frame when the BLE connection event is about to occur. After receiving the CTS-TO-SELF frame, other devices will adjust their own NAV (network allocation vector) according to the information in the frame, thereby avoiding data transmission on the frequency band during this period, effectively avoiding communication conflicts between the BLE connection event and other WiFi devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 It is a timing diagram of transmitting WiFi data and Bluetooth data in the prior art;
[0027] Figure 2 It is a flowchart of a method for transmitting Bluetooth data provided in an embodiment of the present application;
[0028] Figure 3 yes Figure 2 The corresponding timing diagram of Bluetooth data transmission;
[0029] Figure 4 is a schematic diagram of a hidden node provided in an embodiment of the present application;
[0030] Figure 5 is another flowchart of the Bluetooth data transmission method provided in an embodiment of the present application;
[0031] Figure 6 Figure 5 The corresponding timing diagram of Bluetooth data transmission;
[0032] Figure 7 It is a structural schematic diagram of a Bluetooth data transmission device provided by the present application;
[0033] Figure 8 It is a structural schematic diagram of a wireless communication device provided by the present application. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0035] See also Figure 2 , is a flow chart of a method for transmitting Bluetooth data provided in an embodiment of the present application. The method of the present application may include the following steps:
[0036] S201. The wireless communication device establishes a Bluetooth connection with a BLE slave device through a BLE controller.
[0037] Among them, the wireless communication device has a built-in WiFi4 controller and a BLE controller, and the WiFi4 controller and the BLE controller share a 2.4G radio frequency module. The wireless communication device first initializes its built-in BLE controller. The device scans the surrounding BLE devices through the BLE controller to find a specific BLE slave. Once the target BLE slave is found, the wireless communication device will initiate a Bluetooth connection request. This request includes information such as the device's MAC address and service UUID to ensure the correctness and security of the connection. After receiving the connection request, the BLE slave will verify and respond with a connection confirmation frame. Once the connection confirmation frame is received by the wireless communication device, the two parties have established a Bluetooth connection. It is worth noting that since the WiFi4 controller and the BLE controller in the wireless communication device share a 2.4G radio frequency module, during the Bluetooth connection process, it is necessary to ensure that the WiFi4 controller does not occupy the radio frequency module to avoid interference.
[0038] Assume that the wireless communication device is a smartphone and the BLE slave is a smart bracelet. The smartphone first scans the surrounding BLE devices, finds the MAC address of the smart bracelet, and then initiates a connection request. After the smart bracelet verifies the request, the two parties establish a Bluetooth connection and can start data transmission.
[0039] S202: The wireless communication device calculates the starting time point P1 of the next BLE connection event.
[0040] Among them, BLE connection events occur periodically and are used to send Bluetooth data frames. The wireless communication device calculates the starting time point P1 of the next BLE connection event based on the parameters of the established Bluetooth connection (such as connection interval, slave delay, etc.). This time point is usually a future time point relative to the current time.
[0041] For example: See Figure 3 As shown, the starting time point P1 is the starting time of the transmission time period of the Bluetooth data frame, and the BLE connection interval represents the duration between two adjacent transmission time periods. If the BLE connection interval is set to 100ms and there is no slave delay, the wireless communication device will calculate that the next BLE connection event will start 100ms after the current time.
[0042] S203, the wireless communication device calculates the time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe space.
[0043] Among them, after calculating P1, the wireless communication device further calculates the time point P2. P2 is a time point before P1, and the duration between it and P1 is equal to the duration of the CTS-TO-SELF frame plus the duration of SIFS (Short Interframe Space). The CTS-TO-SELF frame is a special control frame used to notify other devices of upcoming transmissions so that they can adjust their transmission plans to avoid conflicts. SIFS is a fixed time interval used to provide sufficient intervals between frames to ensure that the receiving device can correctly process the received frames.
[0044] Assume that the duration of the CTS-TO-SELF frame is 160μs and SIFS is 10μs. If P1 is 100ms after the current time, then P2 will be 170μs before P1.
[0045] S204, the wireless communication device sends a CTS-TO-SELF frame at time point P2, waits for SIFS when the CTS-TO-SELF frame is sent, and then transmits a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices that receive the CTS-TO-SELF frame set their own NAV to T, where T = duration of the CTS-TO-SELF frame + SIFS + duration of the BLE connection event.
[0046] Among them, at time point P2, the wireless communication device sends a CTS-TO-SELF frame. The RA (ReceiveAddress) receiving address of the frame is set to the MAC address of the wireless communication device itself to indicate that this is the device's own sending behavior. Other devices that receive the CTS-TO-SELF frame set their NAV (Network Allocation Vector) to T, where T is equal to the duration of the CTS-TO-SELF frame plus SIFS plus the duration of the BLE connection event. Other devices refer to devices other than the device that sends the CTS-TO-SELF frame, which here means devices other than the wireless communication device. In this way, other devices know that the wireless channel will be occupied during the next period of time, and they should avoid sending data during this period of time. After the CTS-TO-SELF frame is sent and waits for SIFS, the wireless communication device transmits Bluetooth data frames with the BLE slave through the BLE controller at the first frequency (usually a channel in the 2.4GHz frequency band).
[0047] At time point P2, the smartphone sends a CTS-TO-SELF frame and waits for a SIFS of 10 μs. It then transmits Bluetooth data frames to the smart bracelet on a channel in the 2.4 GHz frequency band through the BLE controller.
[0048] S205: When the wireless communication device detects that the Bluetooth data frame transmission is completed, it transmits the WiFi data frame at the second frequency point through the built-in WiFi4 controller.
[0049] Among them, once the Bluetooth data frame transmission is completed, the wireless communication device immediately switches to the built-in WiFi4 controller. Since the WiFi4 controller and the BLE controller share a 2.4G RF module, it is necessary to ensure that the RF module has been released after the Bluetooth transmission is completed before starting the WiFi transmission. The wireless communication device selects a second frequency point (within the 2.4GHz frequency band) that is different from the Bluetooth transmission frequency point, and transmits the WiFi data frame on this frequency point through the WiFi4 controller. This can avoid interference between Bluetooth and WiFi.
[0050] After the Bluetooth data frame is transmitted, the smartphone switches to the WiFi4 controller and transmits the WiFi data frame on a channel in the 2.4GHz band that is different from the Bluetooth transmission frequency. This ensures that Bluetooth and WiFi transmissions can proceed in parallel without interfering with each other.
[0051] In summary, the beneficial effects of implementing the embodiments of the present application include:
[0052] By accurately calculating the starting time point P1 of the BLE connection event and determining the time point P2 for sending the CTS-TO-SELF frame based on it, this technical solution can notify other WiFi devices that the current frequency band will be occupied for a period of time by sending a CTS-TO-SELF frame when the BLE connection event is about to occur. After receiving the CTS-TO-SELF frame, other devices will adjust their own NAV (network allocation vector) according to the information in the frame, thereby avoiding data transmission on the frequency band during this period, effectively avoiding communication conflicts between the BLE connection event and other WiFi devices.
[0053] Since the sending of CTS-TO-SELF frames and the waiting of SIFS ensure that the BLE connection event is carried out without interference from other WiFi devices, the communication between the BLE host and the slave can maintain low latency and high reliability. This design greatly improves the stability of the BLE connection, especially in high-density wireless environments such as home networks and office networks, and can significantly reduce the possibility of BLE devices being interfered with.
[0054] This technical solution not only avoids communication conflicts, but also fully considers the efficiency of WiFi transmission. By switching to WiFi data transmission immediately after the BLE connection event ends, seamless switching between WiFi and BLE communication modes is achieved. This design not only improves the utilization of hardware resources, but also optimizes the communication timing, reduces the delay caused by mode switching, and thus improves the overall communication efficiency.
[0055] The technical solution is designed based on the existing WiFi and BLE technical standards, so it has good compatibility and scalability. It can adapt to wireless communication devices of different brands and models, and can also support higher versions of WiFi and BLE technologies that may appear in the future.
[0056] In wireless communications, hidden nodes are devices that are outside the communication range of the communicating parties but may interfere with or be interfered with. Figure 4 As shown in the figure, device C is a hidden node for device B because it cannot detect the CTS-TO-SELF frame sent by B. Similarly, device D is also a hidden node for device A. In this case, if only one of devices A or B sends a CTS-TO-SELF frame, the hidden node C or D may not receive the frame, and thus cannot correctly set the NAV (network allocation vector), which may cause interference when A and B are transmitting BLE data frames.
[0057] See also Figure 5 As shown, in order to solve the problem of hidden nodes, the present application further proposes a flow chart of a Bluetooth data transmission method, including:
[0058] S501 . The wireless communication device establishes a Bluetooth connection with a BLE slave device via a BLE controller.
[0059] Among them, the wireless communication device starts its BLE controller and enters the broadcast / scan mode to find nearby BLE slaves. Once the target BLE slave is found, the wireless communication device will initiate a connection request, which usually involves the negotiation of a series of connection parameters (such as connection interval, slave delay, monitoring timeout, etc.). Once these parameters are accepted by both parties, the BLE connection is established.
[0060] S502: The wireless communication device calculates the starting time point P1 of the next BLE connection event.
[0061] Once a BLE connection is established, the wireless communication device will calculate the start time point P1 of the next BLE connection event based on the negotiated connection parameters (especially the connection interval and slave delay). This time point marks the moment when data transmission can start between the wireless communication device and the BLE slave.
[0062] S503 , calculating the time point P2 according to the starting time point P1 , the duration between the time point P2 and the starting time point P1 is equal to the duration of the CTS-TO-SELF frame, the SIFS and the IDLE duration.
[0063] Among them, the wireless communication device will calculate the time point P2 according to the provisions of the BLE protocol and the current system status. P2 is the moment when the wireless communication device starts to send the CTS-TO-SELF frame. The duration between it and P1 is equal to the sum of the duration of the CTS-TO-SELF frame, SIFS (short frame interval) and IDLE duration. SIFS is a fixed time used for the inter-frame interval in the wireless LAN, and the IDLE duration is to ensure that the channel is in an idle state before sending the CTS-TO-SELF frame.
[0064] S504. The wireless communication device starts sending the first CTS-TO-SELF frame at time point P2. After sending, it waits for SIFS and IDLE, and then transmits the Bluetooth data frame to the BLE slave at the first frequency through the built-in BLE controller; wherein, the second CTS-TO-SELF frame refers to a CTS frame whose RA address is the MAC address of the wireless communication device. Other devices that receive the CTS-TO-SELF frame set NAV to Tm, where Tm = 2*(duration of the first CTS-TO-SELF frame + SIFS) + duration of the BLE connection event.
[0065] At time point P2, the wireless communication device starts sending CTS-TO-SELF frames. The RA (receiver address) field of this frame is set to the MAC address of the wireless communication device, in order to inform other devices that the wireless communication device will occupy the channel for data transmission in the next period of time. Other devices that receive the CTS-TO-SELF frame will set their NAV (network allocation vector) to Tm, see Figure 6 As shown in the figure, Tm = 2*(duration of the first CTS-TO-SELF frame + SIFS) + duration of the BLE connection event. This prevents attempts to occupy the channel during this period. After sending, the wireless communication device will wait for SIFS and IDLE durations, and then transmit Bluetooth data frames to the BLE slave through the first frequency point on its built-in BLE controller.
[0066] S505. When detecting the end of SIFS, the BLE slave sends a second CTS-TO-SELF frame, waits for SIFS, and then transmits Bluetooth data frames between wireless communication devices; the second CTS-TO-SELF frame refers to a CTS frame whose RA address is the MAC address of the BLE slave. Other devices that receive the second CTS-TO-SELF frame set their own NAV to Ts, where Ts = the duration of the second CTS-TO-SELF frame + SIFS + the duration of the BLE connection event.
[0067] Before the wireless communication device starts transmitting Bluetooth data frames (or at the end of SIFS), the BLE slave detects the idle state on the channel and sends its own CTS-TO-SELF frame (the second CTS-TO-SELF frame). The RA field of this frame is set to the MAC address of the BLE slave. Figure 6 As shown in the figure, other devices that receive this frame will set their NAV to Ts to prevent the channel from being occupied by other devices during the BLE slave transmission of the data frame. After sending, the BLE slave will wait for SIFS time and then transmit a Bluetooth data frame between wireless communication devices (actually with the BLE controller of the wireless communication device) as a response.
[0068] S506: After the wireless communication device detects that the Bluetooth data frame transmission is completed, it transmits the WiFi data frame at the second frequency point through the built-in WiFi4 controller.
[0069] Among them, once the Bluetooth data frame transmission is completed, the wireless communication device will switch to its built-in WiFi4 controller and start transmitting WiFi data frames on the second frequency. This process involves channel switching and data frame preparation. Since Bluetooth and WiFi usually use different frequency bands (or different channels in the same frequency band), the wireless communication device needs to ensure that the channel is idle before switching channels. Once the channel is idle, the wireless communication device will start transmitting WiFi data frames.
[0070] In this embodiment, the CTS-TO-SELF frame is sent to announce the upcoming data transmission to other devices in the network and request them not to occupy the channel during this period. Although hidden nodes cannot directly receive CTS frames sent to specific devices (because they are not within the communication range of the sending device), through clever design, we can use CTS-TO-SELF frames to indirectly notify these hidden nodes.
[0071] by Figure 4 For example, wireless communication devices A and B both send CTS-TO-SELF frames, which is to minimize interference caused by hidden nodes. When A sends a CTS-TO-SELF frame, although hidden node C cannot receive this frame, any device within the communication range of A (including devices that may act as relays or bridges) can receive it. These devices will then set their own NAV to avoid initiating transmission during A's data transmission.
[0072] Similarly, when B sends a CTS-TO-SELF frame, hidden node D cannot receive it, but devices within B's communication range will receive it and set NAV. Importantly, if A and B's communication ranges overlap (or are indirectly connected through other devices), then these co-covered devices (or relay devices) can act as "messengers" to indirectly inform hidden nodes C and D about the upcoming data transmission.
[0073] Of course, this notification is not direct, but depends on how the devices in the network respond to the CTS-TO-SELF frame and set the NAV. Ideally, each device in the network will update its own NAV based on the received CTS frame and remain silent during the NAV period to avoid conflicts with devices that are transmitting data.
[0074] Further, in an embodiment of the present application, regarding the duration of a BLE (Bluetooth Low Energy) connection event and the duration of a CTS-TO-SELF frame set by a wireless communication device, the following is a detailed description based on existing information:
[0075] The duration of a BLE connection event is determined by multiple factors, the most critical of which is the setting of connection parameters, including connection interval, slave latency, and supervision timeout.
[0076] Connection interval: This refers to the time interval between the start of two consecutive connection events. It can be any value between 7.5ms and 4s, but must be an integer multiple of 1.25ms. It determines the interaction frequency between the master device and the slave device.
[0077] Slave Delay: represents how many connection events the slave can ignore before it must listen. This parameter allows the slave to skip a certain number of connection events when it has no data to send, thereby saving power.
[0078] Monitoring timeout: Set a timeout. If BLE does not communicate within this time, it will automatically disconnect. The unit is 10ms. The range of this variable is 10 to 3200, which is converted into a time range of 100ms to 32s.
[0079] The duration of the connection event is actually determined by these parameters. For example, if the connection interval is 100ms and the slave delay is 9, the slave can ignore 9 connection events, but must listen for the 10th connection event. At this point, the duration of the connection event will depend on the data transmission rate and packet size between the master and slave devices.
[0080] The CTS-TO-SELF frame is a management frame used in 802.11 wireless networks to notify other devices that a channel will be occupied. Its duration is usually short because the main purpose of the CTS-TO-SELF frame is to quickly announce the use of the channel so that other devices can adjust their transmission plans accordingly.
[0081] However, the specific duration of the CTS-TO-SELF frame may vary depending on the device manufacturer, network configuration, and transmission rate. In addition, the duration of the CTS-TO-SELF frame may also be affected by factors such as network congestion, signal interference, and transmission distance.
[0082] It is complex for wireless communication devices to set the duration of BLE connection events and CTS-TO-SELF frames, which are affected by many factors. For the duration of BLE connection events, the interaction efficiency and power consumption between the master and slave devices can be optimized by adjusting the connection parameters. For the duration of CTS-TO-SELF frames, it needs to be determined based on the specific network configuration and device implementation.
[0083] In actual applications, it is recommended to set these parameters according to the specific needs of the device and the network environment to ensure the stability and efficiency of wireless communication. At the same time, it is also necessary to fully test and verify the device to ensure its performance and reliability in actual use.
[0084] Further, in some embodiments of the present application, the Bluetooth data frame size refers to the maximum data packet size that can be sent in one transmission, which determines the amount of information that can be transmitted in each communication between devices. In the Bluetooth LE (Low Energy) protocol, the size of the MTU has a direct impact on data transmission efficiency and power consumption.
[0085] Different application scenarios have different requirements for Bluetooth data frame size. For example:
[0086] Real-time data transmission: Applications that require continuous, real-time transmission, such as audio streaming or video streaming, may require a larger data frame size to reduce transmission times and delays.
[0087] Intermittent data transmission: For intermittent communication applications such as sensor data reporting, the requirements for data frame size may not be so strict, but it also needs to be reasonably set according to the data volume and transmission frequency.
[0088] Low power consumption requirement: For devices that need to run for a long time, such as wearable devices or IoT sensors, it may be necessary to minimize the data frame size to reduce power consumption while ensuring data transmission reliability.
[0089] In Bluetooth communication, adjusting the data frame size is usually achieved by adjusting the MTU. The following are the basic steps to adjust the MTU:
[0090] Connecting devices: First, wireless communication devices need to establish a connection through the Bluetooth protocol stack. This usually includes steps such as device discovery, pairing, and connection.
[0091] Request MTU: Once the connection is established, the master device (such as a smartphone or computer) can initiate an MTU request to the slave device (such as an external Bluetooth device). This request usually contains the maximum MTU value supported by the master device.
[0092] Negotiate MTU: After receiving the MTU request, the slave device will select an appropriate MTU value as a reply based on its own capabilities and the requirements of the master device. This negotiation process ensures that both parties can accept and process the selected MTU size.
[0093] Apply MTU: Once the MTU negotiation is successful, both parties can start transmitting data according to the negotiated MTU size.
[0094] In summary, adjusting the data frame size according to the application scenario in Bluetooth communication is an important optimization method for wireless communication devices. By properly setting the MTU size, data transmission efficiency can be improved, power consumption can be reduced, and user experience can be improved.
[0095] Furthermore, time division multiplexing (TDM) is a technology that divides time into time division multiplexing frames (TDM frames) of equal length. Each time division multiplexing user occupies a time slot with a fixed sequence number in each TDM frame, and the time slot occupied by each user appears periodically (the period is the length of the TDM frame). All time division multiplexing users occupy the same bandwidth at different times. This method can effectively avoid signal interference between different users.
[0096] In wireless communication devices, Bluetooth and WiFi usually work in the 2.4GHz frequency band, so their working channels almost completely overlap, which easily causes mutual interference. To avoid this interference, the device can use time division multiplexing to transmit Bluetooth data frames and WiFi data frames separately in time.
[0097] In specific implementation, the device will divide the channel into multiple time slices and allocate these time slices to Bluetooth and WiFi as needed. For example, you can set a time slice for Bluetooth data transmission, then set another time slice for WiFi data transmission, then return to Bluetooth data transmission, and so on. In this way, Bluetooth and WiFi can perform data transmission in different time slices respectively, thus avoiding interference with each other.
[0098] In an embodiment of the present application, in wireless communication, hidden nodes refer to devices that are outside the communication range of each other but can interfere with common receiving nodes. This technical solution effectively notifies potential interfering devices (i.e., hidden nodes) to avoid data transmission on this frequency band within a specific time period by sending CTS-TO-SELF frames by the BLE host and BLE slave before and after the connection event, and setting the corresponding NAV (network allocation vector). This method significantly reduces the communication conflicts and interference caused by hidden nodes and improves the stability of communication.
[0099] By accurately calculating and sending CTS-TO-SELF frames in time, this technical solution ensures that BLE connection events can proceed smoothly without interference from other devices. At the same time, after BLE data transmission is completed, it immediately switches to WiFi data transmission, achieving efficient use of spectrum resources. This design not only improves communication efficiency, but also reduces the waste of spectrum resources.
[0100] The communication between the BLE host and slave is effectively protected by sending CTS-TO-SELF frames in time, reducing the risk of connection interruption and data loss due to communication conflicts. This design enhances the reliability of communication, which is especially important in application scenarios that require high communication stability.
[0101] This technical solution is designed based on the existing WiFi and BLE technical standards, so it has good compatibility. It can adapt to wireless communication devices of different brands and models, and can also coexist with other wireless communication technologies (such as Zigbee, Z-Wave, etc.) in the same wireless environment, improving the overall compatibility and scalability of the system.
[0102] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0103] See also Figure 7 , which shows a schematic diagram of the structure of a Bluetooth data transmission device provided by an exemplary embodiment of the present application. The device can be implemented as all or part of a wireless communication device through software, hardware, or a combination of both. The Bluetooth data transmission device 7 (hereinafter referred to as the device 7) includes: a connection unit 701, a calculation unit 702, and a sending unit 703.
[0104] A connection unit 701 is used to establish a Bluetooth connection with a BLE slave through a BLE controller;
[0105] The calculation unit 702 is used to calculate the starting time point P1 of the next BLE connection event;
[0106] The calculation unit 702 is further configured to calculate a time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe interval;
[0107] The sending unit 703 is used to send a CTS-TO-SELF frame at the time point P2, wait for SIFS when the CTS-TO-SELF frame is sent, and then transmit a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices that receive the CTS-TO-SELF frame set their own NAV to T, where T = the duration of the CTS-TO-SELF frame + SIFS + the duration of the BLE connection event;
[0108] The sending unit 703 is further configured to transmit the WiFi data frame at the second frequency point through the built-in WiFi4 controller when the Bluetooth data frame transmission is detected to be completed.
[0109] In a possible implementation, it further includes:
[0110] The setting unit is used to set the duration of the BLE connection event and the duration of the SIFS.
[0111] In a possible implementation, the size of the Bluetooth data frame is adjusted according to the application scenario.
[0112] In a possible implementation, the Bluetooth data frames and the WiFi data frames are allocated to different times according to a time division multiplexing method.
[0113] It should be noted that, when the device 3 provided in the above embodiment executes the Bluetooth data transmission method, 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 is divided into different functional modules to complete all or part of the functions described above. In addition, the Bluetooth data transmission device provided in the above embodiment and the Bluetooth data transmission method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0114] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0115] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific execution process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.
[0116] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the Bluetooth data transmission method described in the above embodiments.
[0117] See also Figure 8 , is a schematic diagram of the structure of a wireless communication device provided in an embodiment of the present application. Figure 8 As shown, the wireless communication device 800 may include: at least one processor 801, a communication interface 803, a memory 804, at least one communication bus 802, a WiFi4 controller and a BLE controller ( Figure 8 not shown).
[0118] The communication bus 802 is used to realize the connection and communication between these components. The WiFi4 controller and the BLE controller, the processor and the memory are respectively connected to the communication bus.
[0119] The communication interface 803 includes a 2.4G radio frequency module, which can transmit data packets of the WiFi protocol and data packets of the Bluetooth protocol.
[0120] The processor 801 may include one or more processing cores. The processor 801 uses various interfaces and lines to connect various parts of the entire wireless communication device 800, and executes various functions and processes data of the wireless communication device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 804, and calling data stored in the memory 804.
[0121] Among them, the memory 804 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 804 includes a non-transitory computer-readable storage medium. The memory 804 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 804 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 804 may also be optionally at least one storage device located away from the aforementioned processor 801. As Figure 8 As shown, the memory 804 as a computer storage medium may include an operating system, a network communication module, and an application program.
[0122] exist Figure 8 In the wireless communication device 800 shown in FIG. 8 , the processor 801 may be used to call an application program stored in the memory 804 and specifically execute the following steps: Figure 2 The specific process can be referred to Figure 2 As shown, no further description is given here.
[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0124] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present application are still within the scope of the invention.
Claims
1. A method for transmitting Bluetooth data, characterized in that: The wireless communication device has a built-in WiFi4 controller and a BLE controller, and the WiFi4 controller and the BLE controller share a 2.4G radio frequency module; Wherein, the method comprises: The wireless communication device establishes a Bluetooth connection with the BLE slave through the BLE controller; The wireless communication device calculates a starting time point P1 of a next BLE connection event; The wireless communication device calculates the time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe interval; The wireless communication device sends a CTS-TO-SELF frame at the time point P2, waits for SIFS when the CTS-TO-SELF frame is sent, and then transmits a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices that receive the CTS-TO-SELF frame set their own NAV to T, where T=the duration of the CTS-TO-SELF frame+SIFS+the duration of the BLE connection event; When the wireless communication device detects that the Bluetooth data frame has been transmitted, it transmits the WiFi data frame at the second frequency point through the built-in WiFi4 controller.
2. A method for transmitting Bluetooth data, characterized in that: include: The wireless communication device establishes a Bluetooth connection with the BLE slave through the BLE controller; The wireless communication device calculates a starting time point P1 of a next BLE connection event; The wireless communication device calculates the time point P2 according to the starting time point P1, and the duration between the time point P2 and the starting time point P1 is equal to the duration of the CTS-TO-SELF frame, the SIFS and the IDLE duration; The wireless communication device starts to send the first CTS-TO-SELF frame at time point P2. After sending, after waiting for SIFS and IDLE, it transmits the Bluetooth data frame to the BLE slave at the first frequency through the built-in BLE controller; wherein, other devices receiving the CTS-TO-SELF frame set NAV to Tm, Tm=2*(duration of the first CTS-TO-SELF frame+SIFS)+duration of the BLE connection event; when the BLE slave detects that the SIFS ends, it sends the second CTS-TO-SELF frame to the outside, waits for SIFS, and then transmits the Bluetooth data frame between the wireless communication devices; other devices receiving the second CTS-TO-SELF frame set their own NAV to Ts, Ts=duration of the second CTS-TO-SELF frame+SIFS+duration of the BLE connection event; After the wireless communication device detects that the Bluetooth data frame has been transmitted, it transmits the WiFi data frame at the second frequency point through the built-in WiFi4 controller.
3. The method according to claim 1 or 2, characterized in that: Also includes: Set the duration of the BLE connection event and the SIFS duration.
4. The method according to claim 3, characterized in that: Adjust the size of the Bluetooth data frame according to the application scenario.
5. The method according to claim 4, characterized in that According to the time division multiplexing method, the Bluetooth data frames and the WiFi data frames are allocated to different times.
6. A Bluetooth data transmission device, characterized in that: include: A connection unit, used to establish a Bluetooth connection with a BLE slave device through a BLE controller; A calculation unit, used to calculate the starting time point P1 of the next BLE connection event; The calculation unit is further used to calculate the time point P2 according to the starting time point P1; the duration between the time point P2 and the time point P1 is equal to the sum of the duration of the CTS-TO-SELF frame and the SIFS short interframe interval; A sending unit, configured to send a CTS-TO-SELF frame at the time point P2, wait for SIFS when the CTS-TO-SELF frame is sent, and then transmit a Bluetooth data frame with the BLE slave at the first frequency through the BLE controller; wherein the CTS-TO-SELF frame refers to a CTS frame whose RA receiving address is the MAC address of the wireless communication device; other devices receiving the CTS-TO-SELF frame set their own NAV to T, where T = the duration of the CTS-TO-SELF frame + SIFS + the duration of the BLE connection event; The sending unit is also used to transmit the WiFi data frame at the second frequency point through the built-in WiFi4 controller when it is detected that the Bluetooth data frame is transmitted.
7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 5.
8. A wireless communication device, characterized in that: include: WiFi4 controller, BLE controller, 2.4G radio frequency module, processor and memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Data transmission method and device and storage medium
CN114567872A
Beam configuration for secondary cells
US20200100154A1