Bluetooth and WiFi coexistence communication method and device and terminal equipment
By detecting and eliminating interfering channels and using the time division multiplexing channel allocation method, the problem of low automotive diagnosis efficiency caused by mutual interference between Bluetooth and WiFi is solved, and a more stable and efficient diagnosis process is achieved.
Patent Information
- Application Number
- CN202510401169.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-11
AI Technical Summary
The mutual interference caused by the overlap of Bluetooth and WiFi in the 2.4G frequency band leads to failure of communication between automotive diagnostic equipment or taking too long, reducing diagnostic efficiency.
By detecting the signal strength and bit error rate of the communication channel in the frequency hopping channel library, the interference channel is eliminated, and the target frequency hopping channel library is formed, and the channels are allocated to WiFi and Bluetooth in a time division multiplexing method, ensuring that the communication channel includes the first time slice and the second time slice, which are used for WiFi and Bluetooth communication respectively.
It effectively avoids simultaneous data transmission interference between WiFi and Bluetooth, and improves the stability and efficiency of the diagnostic process of automotive diagnostic equipment.
Smart Images

Figure CN120302438A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data communication technologies, and particularly relates to a coexistence communication method, device, and terminal device for Bluetooth and WiFi. Background Art
[0002] With the increasing complexity of automotive electronic control systems, the demand for automotive diagnostic devices has also been continuously increasing. Automotive diagnostic devices support WiFi functions and Bluetooth functions. During the process of using an automotive diagnostic device to repair a vehicle, there are many scenarios where WiFi and Bluetooth need to work simultaneously. For example, while the automotive diagnostic device is performing Bluetooth communication with a terminal device in the vehicle, it is downloading diagnostic software using WiFi.
[0003] Since both Bluetooth and WiFi operate in the 2.4G frequency band and their working channels almost completely overlap, interference will occur when they work simultaneously. For example, when the WiFi of an automotive diagnostic device is downloading or updating diagnostic software, or during the process of the automotive diagnostic device performing ECU (Electronic Control Unit) flashing, communication failures or long communication delays are likely to occur, and even ECU flashing failures may occur, which will prolong the diagnostic time of the automotive diagnostic device and reduce the efficiency of automotive diagnosis.
[0004] Currently, no effective solution has been proposed for the problem in the related art that interference exists between Bluetooth communication and WiFi communication, resulting in a reduction in the efficiency of automotive diagnosis. Summary of the Invention
[0005] Embodiments of this application provide a coexistence communication method, device, and terminal device for Bluetooth and WiFi, so as to at least solve the problem in the related art that interference exists between Bluetooth communication and WiFi communication, resulting in a reduction in the efficiency of automotive diagnosis.
[0006] In a first aspect, embodiments of this application provide a coexistence communication method for Bluetooth and WiFi, which is applied to an automotive diagnostic device. The method includes: detecting the signal strength and bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores multiple communication channels applied to adaptive frequency hopping; if the signal strength of the communication channel is less than a first threshold or the bit error rate is greater than a second threshold, then removing the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library; and allocating the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice, where the first time slice is allocated to WiFi and the second time slice is allocated to Bluetooth.
[0007] In some embodiments, allocating the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, such that the communication channels include a first time slice and a second time slice, includes: obtaining a first communication priority of the WiFi and a second communication priority of the Bluetooth; based on the first communication priority and the second communication priority, allocating the communication channels in the target hopping channel library to the WiFi and the Bluetooth in a time-division multiplexing manner, such that the communication channels include the first time slice and the second time slice; wherein, if the first communication priority is higher than the second communication priority, the total time length of the first time slice is greater than the total time length of the second time slice; if the first communication priority is lower than the second communication priority, the total time length of the first time slice is less than the total time length of the second time slice.
[0008] In some embodiments, allocating the communication channels in the target hopping channel library to the WiFi and the Bluetooth in a time-division multiplexing manner includes: dividing the time slices of the communication channels in the target hopping channel library into 20 initial time slices per minute, with each initial time slice having a time length of 30 milliseconds; allocating a first preset number of the initial time slices as the first time slice to the WiFi, and allocating a second preset number of the initial time slices as the second time slice to the Bluetooth.
[0009] In some embodiments, if the first communication priority is higher than the second communication priority, the first preset number is 15 and the second preset number is 5; if the first communication priority is equal to the second communication priority, the first preset number is 10 and the second preset number is 10; if the first communication priority is lower than the second communication priority, the first preset number is 5 and the second preset number is 15.
[0010] In some embodiments, before obtaining the first communication priority of the WiFi and the second communication priority of the Bluetooth, the method further includes: detecting whether the vehicle diagnostic device is performing an ECU flashing operation; in the case where the vehicle diagnostic device is performing the ECU flashing operation and the ECU file is greater than a preset threshold, adjusting the first communication priority to be lower than the second communication priority.
[0011] In some embodiments, before obtaining the first communication priority of the WiFi and the second communication priority of the Bluetooth, the method further includes: detecting whether the ECU flashing operation performed by the vehicle diagnostic device has failed; in the case where the ECU flashing operation performed by the vehicle diagnostic device has failed, adjusting the first communication priority to be lower than the second communication priority.
[0012] In some embodiments, after removing the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library if the signal strength of the communication channel is less than a first threshold or the bit error rate is greater than a second threshold, the method further includes: detecting the signal strength and the bit error rate of each interference channel; if the signal strength of the interference channel is greater than the first threshold and the bit error rate is less than the second threshold, adding the interference channel as a working channel to the target hopping channel library.
[0013] In a second aspect, an embodiment of the present application provides a coexistence communication device for Bluetooth and WiFi, which is applied to an automotive diagnostic device. The device includes: a detection module, configured to detect the signal strength and the bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores a plurality of the communication channels applied to adaptive frequency hopping; a removal module, configured to remove the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library if the signal strength of the communication channel is less than a first threshold or the bit error rate is greater than a second threshold; an allocation module, configured to allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channel includes a first time slice and a second time slice, where the first time slice is allocated to the WiFi and the second time slice is allocated to the Bluetooth.
[0014] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the coexistence communication method for Bluetooth and WiFi according to any one of the first aspects is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, the coexistence communication method for Bluetooth and WiFi according to any one of the first aspects is executed.
[0016] Compared with the related art, the coexistence communication method, device, and terminal device of Bluetooth and WiFi provided by the embodiments of the present application detect the signal strength and bit error rate of each communication channel in the frequency hopping channel library, eliminate the interference channels that do not meet the expectations, and obtain the target frequency hopping channel library, so as to ensure that the communication channels applied to Adaptive Frequency Hopping (AFH) in the target frequency hopping channel library will not interfere with the data transmission of Bluetooth communication; then, the communication channels in the target frequency hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a second time slice allocated to Bluetooth for Bluetooth communication and a first time slice allocated to WiFi for WiFi communication, which can separate the use of the same communication channel by WiFi and Bluetooth in terms of time and avoid simultaneous data transmission by WiFi and Bluetooth. In this way, by optimizing the coexistence communication of Bluetooth and WiFi, the diagnostic process of the vehicle diagnostic device can be made more stable, thereby improving the efficiency of vehicle diagnosis. Through the present application, the problem that Bluetooth communication and WiFi communication interfere with each other in the related art, resulting in a decrease in the efficiency of vehicle diagnosis, is solved, and the technical effect of improving the efficiency of vehicle diagnosis is achieved.
[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 is a block diagram of the architecture of a communication system according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a coexistence communication method of Bluetooth and WiFi according to an embodiment of the present application;
[0021] Figure 3 is a flowchart of a time-division multiplexing allocation method of communication channels according to an embodiment of the present application;
[0022] Figure 4 is a schematic structural diagram of a coexistence communication device of Bluetooth and WiFi according to an embodiment of the present application;
[0023] Figure 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. Detailed implementation manners
[0024] In the following description, for purposes of illustration and not limitation, specific details such as specific system architectures, technologies, etc. are set forth in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to impede the description of the present application with unnecessary details.
[0025] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0026] It should also be understood that the term "and / or" as used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0027] As used in the specification of the present application and the appended claims, the term "if" may be construed, depending on the context, as "when", "once", "in response to determining", or "in response to detecting". Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be construed, depending on the context, as meaning "once determined", "in response to determining", "once detected [the described condition or event]", or "in response to detecting [the described condition or event]".
[0028] In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0029] Reference to "one embodiment" or "some embodiments" or the like described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0030] With the increasing complexity of automotive electronic control systems, the demand for automotive diagnostic equipment has also been continuously growing. The automotive diagnostic equipment supports WiFi function and Bluetooth function. During the process of using the automotive diagnostic equipment to repair a vehicle, many scenarios require WiFi and Bluetooth to work simultaneously. For example, while the automotive diagnostic equipment conducts Bluetooth communication with a terminal device in the vehicle, it is downloading diagnostic software using WiFi.
[0031] Since both Bluetooth and WiFi operate in the 2.4G frequency band and their working channels almost completely overlap, mutual interference will occur when they work simultaneously. For example, when the WiFi of the automotive diagnostic equipment is downloading or updating diagnostic software, or during the process of the automotive diagnostic equipment performing ECU (Electronic Control Unit) flashing, communication failures or long communication delays are likely to occur, and even ECU flashing failures may result, which will prolong the diagnostic time of the automotive diagnostic equipment and reduce the efficiency of automotive diagnosis.
[0032] Currently, regarding the problem in the related art that Bluetooth communication and WiFi communication interfere with each other, resulting in a reduction in the efficiency of automotive diagnosis, no effective solution has been proposed.
[0033] In view of this, the embodiments of the present application provide a coexistence communication method for Bluetooth and WiFi. By detecting the signal strength and bit error rate of each communication channel in the hopping channel library, interfering channels that do not meet the expectations are eliminated to obtain a target hopping channel library, thereby ensuring that the communication channels applied to adaptive frequency hopping in the target hopping channel library will not interfere with the data transmission of Bluetooth communication; then, the communication channels in the target hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a second time slice allocated to Bluetooth for Bluetooth communication and a first time slice allocated to WiFi for WiFi communication, which can separate the use of the same communication channel by WiFi and Bluetooth in terms of time and avoid simultaneous data transmission by WiFi and Bluetooth. In this way, by optimizing the coexistence communication of Bluetooth and WiFi, the diagnostic process of the automotive diagnostic equipment can be made more stable, thereby improving the efficiency of automotive diagnosis. Through the present application, the problem in the related art that Bluetooth communication and WiFi communication interfere with each other, resulting in a reduction in the efficiency of automotive diagnosis, is solved, and the technical effect of improving the efficiency of automotive diagnosis is achieved.
[0034] Next, the technical solutions in the present application will be described in conjunction with the accompanying drawings.
[0035] The technical solution of the embodiment of the present application can be applied to various communication systems, such as wireless fidelity (WiFi) systems, vehicle to everything (V2X) communication systems, device-to-device (D2D) communication systems, vehicle networking communication systems, 4th generation (4G) mobile communication systems, such as long term evolution (LTE) systems, worldwide interoperability for microwave access (WiMAX) communication systems, 5th generation (5G) mobile communication systems, such as new radio (NR) systems, and future communication systems, such as 6th generation (6G) mobile communication systems, etc.
[0036] The coexistence communication method of Bluetooth and WiFi provided by the embodiment of the present application can be used for Figure 1 the communication system shown. Please refer to Figure 1 , Figure 1 FIG. is a schematic structural diagram of a communication system 10 according to an embodiment of the present application. The communication system 10 includes: an automotive diagnostic device 110, an access network device 120, and an automotive vehicle to be diagnosed 130. Communication can be established between the automotive diagnostic device 110 and the automotive vehicle to be diagnosed 130, between the automotive diagnostic device 110 and the access network device 120, and between the automotive vehicle to be diagnosed 130 and the access network device 120.
[0037] Among them, the access network device 120 is a device located on the network side of the above communication system 10 and having a wireless transceiver function, or a chip or chip system that can be disposed in the device. The access network device 120 includes, but is not limited to: access points (APs) in a WiFi communication system, such as home gateways, routers, servers, switches, bridges, etc., evolved Node B (eNB), radio network controller (RNC), Node B (NB), base station controller (BSC), base transceiver station (BTS), home base station (for example, home evolved NodeB, or home Node B, HNB), baseband unit (BBU), wireless relay node, wireless backhaul node, transmission and reception point (TRP or transmission point, TP), etc. It can also be 5G, such as gNB in a new radio (NR) system, or a transmission point (TRP or TP), one or a group (including multiple antenna panels) of antenna panels of a base station in a 5G system, or it can also be a network node constituting a gNB or a transmission point, such as a baseband unit (BBU), or a distributed unit (DU), a roadside unit (RSU) with base station functions, etc.
[0038] The vehicle diagnostic device 110 can be applied to diagnose the vehicle to be diagnosed 130. The vehicle diagnostic device 110 can be a terminal that accesses the above communication system 10 and has a wireless transceiver function, or a chip or chip system that can be disposed in the terminal. In addition, the vehicle diagnostic device 110 can also be an in-vehicle module, in-vehicle module group, in-vehicle component, in-vehicle chip, or in-vehicle unit that is built into the vehicle to be diagnosed 130 as one or more components or units. The vehicle to be diagnosed 130 can implement the coexistence communication method of Bluetooth and WiFi provided in this application through the built-in in-vehicle module, in-vehicle module group, in-vehicle component, in-vehicle chip, or in-vehicle unit.
[0039] Specifically, the vehicle diagnostic device 110 can be used to detect the signal strength and bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores multiple communication channels applied to adaptive frequency hopping; if the signal strength of a communication channel is less than a first threshold or the bit error rate is greater than a second threshold, the communication channel is removed from the hopping channel library as an interference channel to obtain a target hopping channel library; the communication channels in the target hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channel includes a first time slice and a second time slice, where the first time slice is allocated to WiFi and the second time slice is allocated to Bluetooth.
[0040] In specific implementation, both the access network device 120 and the vehicle diagnostic device 110 can adopt Figure 5 the shown composition structure or include Figure 5 the shown components. Figure 5 FIG. is a schematic structural diagram of a terminal device according to an embodiment of the present application. When the terminal device 5 has the function of the access network device 120 described in the embodiment of the present application, the terminal device 5 can be the access network device 120 or a chip or system-on-chip in the access network device 120; when the terminal device 5 has the function of the vehicle diagnostic device 110 described in the embodiment of the present application, the terminal device 5 can be the vehicle diagnostic device 110 or a chip or system-on-chip in the vehicle diagnostic device 110.
[0041] In some embodiments, the vehicle diagnostic device 110 provided in the embodiments of the present application can be implemented in software. For example, it can be loaded in Figure 5 the memory 51 of the terminal device 5 shown in FIG., and the vehicle diagnostic device 110 can be software in the form of programs and plugins, including: a detection module 40, a removal module 41, and an allocation module 42. These modules are logical, so they can be arbitrarily combined or further split according to the functions to be implemented.
[0042] The functions of each module will be described below.
[0043] The coexistence communication method of Bluetooth and WiFi provided in the embodiments of the present application will be described in combination with the exemplary application architecture of the communication system 10 provided in the embodiments of the present application.
[0044] Next, Figure 2 will be combined with Figure 2 to describe the coexistence communication method of Bluetooth and WiFi provided in an embodiment of the present application. This method can be applied to a vehicle diagnostic device. Please refer to Figure 2 FIG., Figure 2 which is a flowchart of the coexistence communication method of Bluetooth and WiFi according to an embodiment of the present application. As
[0045] Step S201: Detect the signal strength and bit error rate of each communication channel in a preset frequency hopping channel library, where the frequency hopping channel library stores multiple communication channels applied to adaptive frequency hopping.
[0046] The adaptive frequency hopping technology has the advantages of strong anti-interference ability, strong concealment, high frequency band utilization rate, etc., which can optimize the Bluetooth communication in the diagnosis process of the vehicle to be diagnosed by the vehicle diagnostic device. However, if both the transmitter and receiver of the Bluetooth communication (the vehicle diagnostic device and the vehicle to be diagnosed) cannot effectively identify the interference, then when the frequency hopping point of the Bluetooth communication is within the interference bandwidth, it is difficult to avoid the interference, and the receiver cannot correctly demodulate, which will lead to an increase in the bit error rate.
[0047] In this embodiment, the interference channels in the Bluetooth communication can be detected by monitoring the signal strength and bit error rate of each communication channel in the frequency hopping channel library. Specifically, the signal strength and bit error rate of the communication channel can be detected at preset time intervals, and the preset time can be 0.5 seconds, 1 second, 2 seconds, 5 seconds, etc.
[0048] Step S202: If the signal strength of the communication channel is less than the first threshold or the bit error rate is greater than the second threshold, the communication channel is removed from the frequency hopping channel library as an interference channel to obtain a target frequency hopping channel library.
[0049] In this embodiment, the first threshold can be -70 dBm (decibel milliwatt), and the second threshold can be 3%. That is, if the signal strength of the communication channel in the frequency hopping channel library is less than -70 dBm or its bit error rate is greater than 3%, it can be determined that there is interference in the communication channel. If this communication channel is still used for Bluetooth communication, it may affect data transmission. Therefore, this communication channel can be removed from the frequency hopping channel library as an interference channel. After removing all the interference channels in the frequency hopping channel library, the target frequency hopping channel library can be obtained. Using the communication channels in the target frequency hopping channel library for Bluetooth communication can effectively avoid interference, reduce the bit error rate during demodulation, and improve the efficiency of vehicle diagnosis.
[0050] As an example, the preset frequency hopping channel library may include 15 frequency hopping points with frequency hopping serial numbers from F1 to F15. In the frequency hopping channel library, the normal frequency hopping is F1, F3, F7, F2, F4, F6, F11, F13, F10, F8, F9, F14, F5, F12, F15. If it is detected that F3 and F4 are interference channels, then F3 and F4 can be removed from the frequency hopping channel library to obtain the target frequency hopping channel library. The vehicle diagnostic device can perform adaptive frequency hopping based on the target frequency hopping channel library - F1, F7, F2, F6, F11, F13, F10, F8, F9, F14, F5, F12, F15, so as to avoid problems such as slow and failed data transmission caused by the vehicle diagnostic device using interference channels for Bluetooth communication.
[0051] In addition, each communication channel in the hopping channel library can be classified based on the signal strength. For example, if the signal strength of a communication channel is greater than -50 dBm, it can be defined as a strong signal channel; if the signal strength of a communication channel is greater than or equal to -70 dBm and less than or equal to -50 dBm, it can be defined as a medium channel; if the signal strength of a communication channel is less than -70 dBm, it can be defined as a weak signal channel. In some embodiments, the above medium channels and weak signal channels can be removed from the hopping channel library to further optimize the Bluetooth communication of the vehicle diagnostic device.
[0052] It should be noted that the "detecting the signal strength and bit error rate of each communication channel in the preset hopping channel library" in step S201 can be to detect the average signal strength and average bit error rate of the communication channel within a preset time period, or to detect the instantaneous signal strength and instantaneous bit error rate of the communication channel within a preset time period. In actual application scenarios, there are often instantaneous interferences. For instantaneous interferences, the above interference channel recognition mechanism is prone to misjudgment. Therefore, by setting a preset time period and adjusting the time period window, the average signal strength and average bit error rate of the communication channel within this time period can be detected, reducing the misjudgment of the instantaneous interference by the above interference channel recognition mechanism, further improving the recognition accuracy of the interference channel recognition mechanism, thereby optimizing the Bluetooth communication of the vehicle diagnostic device and improving the efficiency of vehicle diagnosis.
[0053] In addition, the interference situation of the communication channel may change over time. The vehicle diagnostic device can continuously update the communication channels in the target hopping channel library through steps S201 to S202 to adapt to the environment required by the vehicle diagnostic device.
[0054] Specifically, after step S202, the method further includes: detecting the signal strength and bit error rate of each interference channel; if the signal strength of the interference channel is greater than a first threshold and the bit error rate is less than a second threshold, the interference channel is added to the target hopping channel library as a working channel.
[0055] In this embodiment, since the interference situation of the communication channel may change over time, the interference channel may be transformed into a normal communication channel as time progresses, and the communication channels in the target hopping channel library may also be transformed into interference channels as time progresses. Therefore, a first time period can be preset. After detecting that a certain communication channel is an interference channel, after this first time period (for example, it can be set to 30 minutes, 1 hour, etc.), the signal strength and bit error rate of this interference channel are detected again. If the signal strength of this interference channel is greater than the first threshold and the bit error rate is less than the second threshold, then this interference channel is added to the target hopping channel library as a working channel.
[0056] Correspondingly, a second time period can also be preset. After obtaining the communication channels in the target hopping channel library, that is, after marking the communication channels without interference as working channels, after this second time period (for example, it can be set to 30 minutes, 1 hour, etc.), the signal strength and bit error rate of this working channel are detected again. If the signal strength of this working channel is less than the first threshold or the bit error rate is greater than the second threshold, then this working channel is removed from the hopping channel library as an interference channel.
[0057] In this way, the coexistence communication method of Bluetooth and WiFi provided by the embodiments of the present application can adapt to the constantly changing network environment, thereby improving the applicability of the vehicle diagnostic device to the usage environment and improving the stability of the Bluetooth communication of the vehicle diagnostic device.
[0058] Step S203: Allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channel includes a first time slice and a second time slice, where the first time slice is allocated to WiFi and the second time slice is allocated to Bluetooth.
[0059] In this embodiment, since both WiFi and Bluetooth operate in the 2.4G frequency band and the working channels almost completely overlap, mutual interference will occur when they work simultaneously. To avoid interference, a time-division multiplexing channel can be used. The communication channels in the target hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, separating WiFi and Bluetooth in time to avoid working simultaneously. WiFi works in the first time slice, and data transmission and reception with a wireless access point (AP) are achieved during this time (for example, the vehicle diagnostic device downloads diagnostic software, updates the diagnostic software, etc.). Bluetooth works in the second time slice, and Bluetooth data is transmitted during this time (the vehicle diagnostic device diagnoses the fault codes of the vehicle to be diagnosed, communicates with the Bluetooth of the vehicle to be diagnosed, performs ECU flashing, etc.). The first time slice and the second time slice are independent of each other and do not interfere with each other.
[0060] It should be noted that in practical applications, the allocation rules and time lengths of the first time slice and the second time slice can be adjusted adaptively according to the application environment of the vehicle diagnostic device. For example, the communication priority can be set, where WiFi has the first communication priority and Bluetooth has the second communication priority. Then, based on the first communication priority and the second communication priority, the communication channels in the target frequency hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include the first time slice and the second time slice.
[0061] Specifically, for the time-division multiplexing allocation method of the communication channels in step S203, reference can be made to Figure 3 , Figure 3 which is a flowchart of the time-division multiplexing allocation method of the communication channels according to an embodiment of the present application. As Figure 3 shown, the time-division multiplexing allocation method of the communication channels includes:
[0062] Step S301, obtain the first communication priority of WiFi and the second communication priority of Bluetooth.
[0063] Before step S301, the method further includes: detecting whether the vehicle diagnostic device is performing an ECU flashing operation; when the vehicle diagnostic device is performing an ECU flashing operation and the ECU file is greater than a preset threshold, adjust the first communication priority to be lower than the second communication priority.
[0064] Alternatively, the method further includes: detecting whether the ECU flashing operation performed by the vehicle diagnostic device fails; when the ECU flashing operation performed by the vehicle diagnostic device fails, adjust the first communication priority to be lower than the second communication priority.
[0065] In this embodiment, since the ECU file may be large, when the vehicle diagnostic device is performing ECU flashing and the WiFi of the vehicle diagnostic device is simultaneously downloading or updating the diagnostic software, the Bluetooth communication may easily fail or take a long time during the ECU flashing process, and even may cause the ECU flashing to fail. Therefore, multiple rules can be set. If it is detected that the vehicle diagnostic device is performing an ECU flashing operation and the ECU file is greater than a preset threshold, or if it is detected that the ECU flashing operation performed by the vehicle diagnostic device fails, the first communication priority can be adjusted to be lower than the second communication priority, that is, the communication priority of Bluetooth is adjusted to be higher than that of WiFi.
[0066] Step S302, determine whether the first communication priority is higher than the second communication priority. If so, go to step S303; otherwise, go to step S304.
[0067] Step S303: Allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice, and the total time length of the first time slice is greater than that of the second time slice.
[0068] In this embodiment, "allocating the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner" in Step S303 includes the following steps:
[0069] Step 1: Divide the time slices of the communication channels in the target hopping channel library according to 20 initial time slices per minute, and the time length of each initial time slice is 30 milliseconds.
[0070] Step 2: Allocate the first preset number of initial time slices as the first time slice to WiFi, and allocate the second preset number of initial time slices as the second time slice to Bluetooth.
[0071] Specifically, there can be 20 initial time slices per minute. Each initial time slice is numbered in chronological order. The initial time slices numbered 1 to 5 and 11 to 15 can be allocated as the second time slice to Bluetooth for use, and the initial time slices numbered 6 to 10 and 16 to 20 can be allocated as the first time slice to WiFi for use. It is also possible to allocate all the initial time slices numbered 1 to 15 to Bluetooth for use, reducing the number of initial time slices used by WiFi, thereby improving the anti-interference ability of Bluetooth communication.
[0072] Step S304: Allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice, and the total time length of the first time slice is less than that of the second time slice.
[0073] In this embodiment, if the first communication priority is higher than the second communication priority, the first preset number is 15 and the second preset number is 5; if the first communication priority is equal to the second communication priority, the first preset number is 10 and the second preset number is 10; if the first communication priority is lower than the second communication priority, the first preset number is 5 and the second preset number is 15.
[0074] In this way, dynamically adjusting the time lengths of the first time slice and the second time slice can effectively improve the anti-interference ability of the Bluetooth communication of the vehicle diagnostic device, reduce the communication time consumption and failure probability of the Bluetooth communication of the vehicle diagnostic device, and thus improve the efficiency of vehicle diagnosis.
[0075] Through the above steps S201 to S203, by detecting the signal strength and bit error rate of each communication channel in the hopping channel library, interfering channels that do not meet the expectations are eliminated to obtain a target hopping channel library, thereby ensuring that the communication channels applied to adaptive frequency hopping in the target hopping channel library will not interfere with the data transmission of Bluetooth communication; then, the communication channels in the target hopping channel library are allocated to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a second time slice allocated to Bluetooth for Bluetooth communication and a first time slice allocated to WiFi for WiFi communication. This can separate the use of the same communication channel by WiFi and Bluetooth in terms of time and avoid simultaneous data transmission by WiFi and Bluetooth. In this way, by optimizing the coexistence communication between Bluetooth and WiFi, the diagnostic process of the vehicle diagnostic device can be made more stable, thereby improving the efficiency of vehicle diagnosis. Through this application, the problem in the related art that Bluetooth communication and WiFi communication interfere with each other, resulting in a reduction in the efficiency of vehicle diagnosis, is solved, and the technical effect of improving the efficiency of vehicle diagnosis is achieved.
[0076] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0077] Corresponding to the coexistence communication method of Bluetooth and WiFi described in the above embodiments, Figure 4 The structural schematic diagram of a coexistence communication device for Bluetooth and WiFi according to an embodiment of the present application is shown. This coexistence communication device for Bluetooth and WiFi can be applied to a vehicle diagnostic device. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown.
[0078] Please refer to Figure 4 , the coexistence communication device 4 for Bluetooth and WiFi includes: a detection module 40, configured to detect the signal strength and bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores multiple communication channels applied to adaptive frequency hopping; an elimination module 41, configured to, if the signal strength of a communication channel is less than a first threshold or the bit error rate is greater than a second threshold, eliminate the communication channel from the hopping channel library as an interfering channel to obtain a target hopping channel library; an allocation module 42, configured to allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice, where the first time slice is allocated to WiFi and the second time slice is allocated to Bluetooth.
[0079] In one embodiment, the allocation module 42 is further configured to obtain the first communication priority of WiFi and the second communication priority of Bluetooth; based on the first communication priority and the second communication priority, allocate the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice; wherein, if the first communication priority is higher than the second communication priority, the total time length of the first time slice is greater than the total time length of the second time slice; if the first communication priority is lower than the second communication priority, the total time length of the first time slice is less than the total time length of the second time slice.
[0080] In one embodiment, the allocation module 42 is further configured to divide the time slices of the communication channels in the target hopping channel library according to 20 initial time slices per minute, and the time length of each initial time slice is 30 milliseconds; allocate the first preset number of initial time slices as the first time slice to WiFi, and allocate the second preset number of initial time slices as the second time slice to Bluetooth.
[0081] In one embodiment, if the first communication priority is higher than the second communication priority, the first preset number is 15 and the second preset number is 5; if the first communication priority is equal to the second communication priority, the first preset number is 10 and the second preset number is 10; if the first communication priority is lower than the second communication priority, the first preset number is 5 and the second preset number is 15.
[0082] In one embodiment, the allocation module 42 is further configured to detect whether the vehicle diagnostic device is performing an ECU flashing operation; when the vehicle diagnostic device is performing an ECU flashing operation and the ECU file is greater than a preset threshold, adjust the first communication priority to be lower than the second communication priority.
[0083] In one embodiment, the allocation module 42 is further configured to detect whether the ECU flashing operation performed by the vehicle diagnostic device fails; when the ECU flashing operation performed by the vehicle diagnostic device fails, adjust the first communication priority to be lower than the second communication priority.
[0084] In one embodiment, the detection module 40 is further configured to detect the signal strength and error rate of each interference channel; if the signal strength of the interference channel is greater than a first threshold and the error rate is less than a second threshold, add the interference channel as a working channel to the target hopping channel library.
[0085] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiments of the present application, their specific functions and the technical effects brought about can be specifically referred to in the method embodiment part, and will not be elaborated here.
[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0087] Figure 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As Figure 5 shown, the terminal device 5 includes: at least one processor 50 ( Figure 5 only one is shown in the figure), a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on at least one processor 50. When the processor 50 executes the computer program 52, the steps in any of the foregoing embodiments of the coexistence communication method for Bluetooth and WiFi are implemented.
[0088] The terminal device 5 can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that Figure 5 merely examples of the terminal device 5 do not constitute a limitation on the terminal device 5, and may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0089] The processor 50 may be a Central Processing Unit (CPU), and the processor 50 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0090] In some embodiments, the memory 51 may be an internal storage unit of the terminal device 5, such as the hard disk or memory of the terminal device 5. In some other embodiments, the memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device 5. In other embodiments, the memory 51 may further include both the internal storage unit and the external storage device of the terminal device 5. The memory 51 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program 52, etc. The memory 51 may also be used to temporarily store data that has been output or will be output.
[0091] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned embodiments of the coexistence communication method for Bluetooth and WiFi can be implemented.
[0092] The embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal is caused to execute the steps in the above-mentioned embodiments of the coexistence communication method for Bluetooth and WiFi.
[0093] The implementation of all or part of the processes in the method of the above embodiments in this application can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, USB flash drive, mobile hard disk, magnetic disk, or optical disc, etc.
[0094] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0095] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this document can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0096] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0097] The unit described as a separated component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A coexistence communication method for Bluetooth and WiFi, characterized in that, Applied to an automotive diagnostic device, the method includes: Detecting the signal strength and bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores a plurality of the communication channels applied to adaptive frequency hopping; If the signal strength of the communication channel is less than a first threshold or the bit error rate is greater than a second threshold, then removing the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library; Allocating the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice, where the first time slice is allocated to the WiFi and the second time slice is allocated to the Bluetooth.
2. The method according to claim 1, characterized in that, Allocating the communication channels in the target hopping channel library to WiFi and Bluetooth in a time-division multiplexing manner, so that the communication channels include a first time slice and a second time slice includes: Obtaining a first communication priority of the WiFi and a second communication priority of the Bluetooth; Based on the first communication priority and the second communication priority, allocating the communication channels in the target hopping channel library to the WiFi and the Bluetooth in a time-division multiplexing manner, so that the communication channels include the first time slice and the second time slice; Wherein, if the first communication priority is higher than the second communication priority, the total time length of the first time slice is greater than the total time length of the second time slice; if the first communication priority is lower than the second communication priority, the total time length of the first time slice is less than the total time length of the second time slice.
3. The method according to claim 2, wherein Allocating the communication channels in the target hopping channel library to the WiFi and the Bluetooth in a time-division multiplexing manner includes: Dividing the time slices of the communication channels in the target hopping channel library according to 20 initial time slices per minute, and the time length of each initial time slice is 30 milliseconds; Allocating a first preset number of the initial time slices as the first time slice to the WiFi, and allocating a second preset number of the initial time slices as the second time slice to the Bluetooth.
4. The method according to claim 3, characterized in that, If the first communication priority is higher than the second communication priority, the first preset number is 15 and the second preset number is 5; if the first communication priority is equal to the second communication priority, the first preset number is 10 and the second preset number is 10; if the first communication priority is lower than the second communication priority, the first preset number is 5 and the second preset number is 15.
5. The method according to any one of claims 2 to 4, characterized in that Before obtaining the first communication priority of the WiFi and the second communication priority of the Bluetooth, the method further includes: Detecting whether the automotive diagnostic device is performing an ECU flashing operation; When the automotive diagnostic device is performing the ECU flashing operation and the ECU file is greater than a preset threshold, adjusting the first communication priority to be lower than the second communication priority.
6. The method according to any one of claims 2 to 4, characterized in that Before obtaining the first communication priority of the Wi-Fi and the second communication priority of the Bluetooth, the method further includes: Detecting whether the ECU flashing operation performed by the vehicle diagnostic device fails; In the case where the ECU flashing operation performed by the vehicle diagnostic device fails, adjusting the first communication priority to be lower than the second communication priority.
7. The method according to any one of claims 1 to 4, characterized in that, After, if the signal strength of the communication channel is less than the first threshold or the bit error rate is greater than the second threshold, removing the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library, the method further includes: Detecting the signal strength and the bit error rate of each of the interference channels; If the signal strength of the interference channel is greater than the first threshold and the bit error rate is less than the second threshold, adding the interference channel as a working channel to the target hopping channel library.
8. A coexistence communication device for Bluetooth and WiFi, characterized in that, Applied to a vehicle diagnostic device, the apparatus includes: A detection module, configured to detect the signal strength and the bit error rate of each communication channel in a preset hopping channel library, where the hopping channel library stores a plurality of the communication channels applied to adaptive frequency hopping; A removal module, configured to, if the signal strength of the communication channel is less than the first threshold or the bit error rate is greater than the second threshold, remove the communication channel from the hopping channel library as an interference channel to obtain a target hopping channel library; An allocation module, configured to allocate the communication channels in the target hopping channel library to the Wi-Fi and the Bluetooth in a time-division multiplexing manner, so that the communication channel includes a first time slice and a second time slice, where the first time slice is allocated to the Wi-Fi and the second time slice is allocated to the Bluetooth.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the coexistence communication method of the Bluetooth and the Wi-Fi according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that, Including a computer program, when the computer program is run, the coexistence communication method of the Bluetooth and the Wi-Fi according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Data transmission method based on coexistence of WiFi and Bluetooth, and wireless communication device
CN120786654A