Method for rapid BLE provisioning and onboarding in multi-device scenario and electronic device
By alternating between sending connectable and non-connectable non-directional broadcasts and waiting time between transmissions, the problem of SCAN_RSP packet loss in multi-device Bluetooth networking is solved, improving the networking success rate, especially significantly improving the broadcast transmission and reception success rate when there are many devices.
Patent Information
- Application Number
- PCT/CN2025/104981
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2025-06-27
- Publication Date
- 2026-02-05
AI Technical Summary
In multi-device Bluetooth networking scenarios, especially when there are a large number of devices, SCAN_RSP packets are prone to loss, resulting in a low success rate of broadcast packet transmission and reception, which affects the networking success rate.
Electronic devices alternately send connectable non-directional broadcasts and non-connectable non-directional broadcasts, and wait for a random amount of time between sending different broadcasts to alleviate air interface congestion and improve the success rate of broadcast transmission and reception.
By alternating between sending different types of broadcasts and waiting for a certain period of time, the success rate of Bluetooth networking is improved, especially in multi-device scenarios, which effectively alleviates air interface congestion and improves the overall broadcast transmission and reception success rate.
Smart Images

Figure CN2025104981_05022026_PF_FP_ABST
Abstract
Description
A multi-device scene BLE fast networking online method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The present application claims priority to the Chinese patent application No. 202411050871.4, filed on July 31, 2024, and entitled "A multi-device scene BLE fast networking online method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of electronic devices, and in particular to a multi-device scene BLE fast networking online method and electronic device. BACKGROUND
[0004] One necessary process in the current multi-device Bluetooth networking scheme is that when an electronic device initiates Bluetooth networking, it needs to send a connectable undirected advertising event (ADVIND) package for a specific duration. If other electronic devices receive the ADVIND package, they can send a scanning request (SCAN_REQ) package for a specific duration. After receiving the SCAN_REQ package sent by other electronic devices, the electronic device that initiates Bluetooth networking can reply with a scanning response (SCAN_RSP) package. The information contained in the ADVIND package, SCAN_REQ package and SCAN_RSP package can be used for Bluetooth networking.
[0005] In the above method, when the number of electronic devices participating in Bluetooth networking is large, the problem of packet loss of SCAN_RSP packages is likely to occur, which will affect the success rate of broadcast package transmission in the multi-device networking scene, resulting in a low success rate of multi-device Bluetooth networking. SUMMARY
[0006] The present application provides a multi-device scene BLE fast networking online method and electronic device to improve the efficiency of multi-device Bluetooth networking.
[0007] In a first aspect, an embodiment of the present application provides a method for quickly networking and online of a plurality of devices in a BLE scene, applied to a first electronic device, the method comprising: sending a first broadcast; wherein the first broadcast comprises any one of a connectable non-directional broadcast and an unconnectable non-directional broadcast, and the unconnectable non-directional broadcast comprises information indicating whether to be connected or not for networking and online; and sending a second broadcast; wherein the second broadcast comprises one of the connectable non-directional broadcast and the unconnectable non-directional broadcast different from the first broadcast.
[0008] In the method, the connectable non-directional broadcast can be used for Bluetooth networking and online. The unconnectable non-directional broadcast contains information indicating whether to be connected or not for networking and online, and can also be used for Bluetooth networking and online. Based on the above method, the first electronic device can alternately send the connectable non-directional broadcast and the unconnectable non-directional broadcast, so that the first electronic device does not need to completely rely on the connectable non-directional broadcast to achieve Bluetooth networking and online. Compared with the existing method that only relies on the connectable non-directional broadcast to achieve Bluetooth networking and online, in the above method provided by the embodiment of the present application, the first electronic device can effectively improve the success rate of Bluetooth networking by sending the unconnectable non-directional broadcast. The first electronic device alternately sends the connectable non-directional broadcast and the unconnectable non-directional broadcast, which helps to alleviate the problem of low broadcast transceiving success rate caused by high packet loss rate when sending the connectable non-directional broadcast, and can improve the overall broadcast transceiving success rate, thereby improving the success rate of Bluetooth networking. Especially in the multi-device Bluetooth networking scene (air interface congestion scene, such as a scene where there are many networkable devices around the first electronic device), the method provided by the embodiment of the present application can effectively improve the success rate of Bluetooth networking.
[0009] In a possible design, after sending the first broadcast, before sending the second broadcast, the method further comprises: waiting for a first time length.
[0010] In the method, the first electronic device waits for a certain time length between sending different broadcasts, which can avoid or reduce the number of response messages received by the first electronic device in a short period of time, thereby reserving a certain time for the first electronic device to process the received response messages, helping to alleviate the air interface congestion on the first electronic device side, thereby improving the success rate of broadcast transceiving and further improving the success rate of Bluetooth networking.
[0011] In a possible design, the first time length is a time length randomly selected from a set first time length range.
[0012] Based on the method, the first electronic device can wait for a random duration between sending different broadcasts, which can improve the flexibility of the first electronic device in sending broadcasts, for example, the first electronic device can be flexibly reserved time to process broadcast messages from other electronic devices.
[0013] In a possible design, after sending the second broadcast, the method further includes: sending a third broadcast; and wherein the third broadcast includes an item different from the second broadcast in the connectable non-directional broadcast and the non-connectable non-directional broadcast.
[0014] Based on the method, the first electronic device can alternately send the connectable non-directional broadcast and the non-connectable non-directional broadcast multiple times, which can further improve the success rate of broadcast transmission and reception.
[0015] In a possible design, after sending the second broadcast, before sending the third broadcast, the method further includes: waiting for a second duration.
[0016] In the method, the first electronic device waits for a certain duration between sending different broadcasts, which can reserve time for the first electronic device to process broadcast messages from other electronic devices, can help to alleviate the situation of air interface congestion on the first electronic device side, and further improve the success rate of broadcast transmission and reception and the success rate of Bluetooth networking.
[0017] In a possible design, the second duration is a duration randomly selected in a set second duration range.
[0018] Based on the method, the first electronic device can wait for a random duration between sending different broadcasts, which can improve the flexibility of the first electronic device in sending broadcasts.
[0019] In a possible design, the sending the first broadcast includes: sending the first broadcast for a third duration; and the sending the second broadcast includes: sending the second broadcast for a fourth duration. Optionally, the third duration is the same as the fourth duration, or the third duration is different from the fourth duration.
[0020] In the method, the first electronic device can send different types of broadcasts according to corresponding durations, which has high flexibility and practicability.
[0021] In a possible design, the sending of the first broadcast for the third time length comprises: sending the first broadcast every fifth time length until the total time length reaches the third time length; and the sending of the second broadcast for the fourth time length comprises: sending the second broadcast every sixth time length until the total time length reaches the fourth time length. Optionally, the fifth time length is the same as the sixth time length, or the fifth time length is different from the sixth time length.
[0022] In the method, the first electronic device can send the different types of broadcast transmission processes according to the corresponding interval time lengths, and the flexibility and practicability are relatively high.
[0023] In a possible design, after the sending of the first broadcast, or after the sending of the second broadcast, the method further includes: receiving a first message; wherein the first message comprises one of a scan request from a second device and an unconnectable non-directional broadcast from the second device; and wherein the unconnectable non-directional broadcast from the second device comprises information indicating whether to be connected to the network.
[0024] In the method, the first electronic device can be connected to the network by receiving the first message from the second electronic device. The scan request or the unconnectable non-directional broadcast from the second electronic device can be used as the response message of the first broadcast or the second broadcast, which can further improve the success rate of the broadcast transmission and reception, and further improve the success rate of the Bluetooth network.
[0025] In a second aspect, an embodiment of the present application provides a multi-device scenario BLE fast network connection method, applied to a second electronic device, and the method comprises the following steps: in response to a received first broadcast, sending a first message; wherein the first message is one of a scan request and an unconnectable non-directional broadcast; in response to a received second broadcast, sending a second message; wherein the second message is one of the scan request and the unconnectable non-directional broadcast different from the first message; wherein the first broadcast and the second broadcast respectively comprise one of a connectable non-directional broadcast from a first electronic device and an unconnectable non-directional broadcast from the first electronic device; and any unconnectable non-directional broadcast comprises information indicating whether to be connected to the network.
[0026] In the method, the scanning request sent by the second electronic device can be used to implement Bluetooth networking on-line based on connectable non-directional broadcast. The non-connectable non-directional broadcast sent by the second electronic device contains information indicating whether to implement Bluetooth networking on-line in a connection-free manner, which can be used to implement Bluetooth networking on-line based on non-connectable non-directional broadcast. Based on the above method, the second electronic device can alternately send the scanning request and the non-connectable non-directional broadcast, so that the second electronic device can implement Bluetooth networking on-line without completely relying on the scanning request corresponding to the connectable non-directional broadcast. Compared with the existing method that only implements Bluetooth networking on-line based on the scanning request corresponding to the connectable non-directional broadcast, in the above method provided in the embodiments of the present application, the second electronic device can effectively improve the success rate of Bluetooth networking by sending the non-connectable non-directional broadcast. The second electronic device alternately sends the scanning request and the non-connectable non-directional broadcast, which helps to alleviate the problem of low broadcast transceiving success rate caused by high packet loss rate of the terminal device (i.e., the receiving end of the scanning request) in the scenario of sending the scanning request, so as to improve the overall broadcast transceiving success rate and further improve the success rate of Bluetooth networking. Especially in the multi-device Bluetooth networking scenario (air interface congestion scenario, for example, the scenario where there are many devices capable of networking around the second electronic device), the method provided in the embodiments of the present application can effectively improve the success rate of Bluetooth networking.
[0027] In a possible design, before sending the first message in response to the received first broadcast, the method further includes: when the first broadcast is received, waiting for a first time length.
[0028] In the method, the second electronic device waits for a certain time length after receiving the broadcast sent by the first electronic device, which can reserve a certain time for the first electronic device to process the message, helps to alleviate the air interface congestion on the first electronic device side, and further improves the success rate of the first electronic device sending the response message to the first message and the success rate of the second device receiving the response message. Therefore, the method can improve the overall broadcast transceiving success rate and further improve the success rate of Bluetooth networking.
[0029] In a possible design, the first time length is a time length randomly selected in a set first time length range.
[0030] Based on the method, the second electronic device can wait for a random time length before sending the corresponding response message after receiving the broadcast sent by the first electronic device, which can avoid the second electronic device and other devices receiving the broadcast of the first electronic device from sending the response message at the same time as much as possible, and further reduce the possibility of the first electronic device receiving a large number of response messages at the same time. The method can ensure that the first electronic device has enough processing time when processing each received response message as much as possible, and further improve the success rate of broadcast transmission and reception on the first electronic device side and the overall success rate of broadcast transmission and reception.
[0031] In a possible design, before sending the second message in response to the received second broadcast, the method further includes: when the second broadcast is received, waiting for a second time length. Optionally, the first time length is the same as the second time length, or the first time length is different from the second time length.
[0032] In the method, the second electronic device waits for a certain time length after receiving the broadcast sent by the first electronic device, which can reserve a certain time for the first electronic device to process the message, and helps to alleviate the air interface congestion on the first electronic device side, and further improves the success rate of the first electronic device sending the response message to the first message and the success rate of the second device receiving the response message. Therefore, the method can improve the overall success rate of broadcast transmission and reception, and further improve the success rate of Bluetooth networking.
[0033] In a possible design, the second time length is a time length randomly selected in a set second time length range. Optionally, the first time length range is the same as the second time length range, or the first time length range is different from the second time length range.
[0034] Based on the method, the second electronic device can wait for a random time length before sending the corresponding response message after receiving the broadcast sent by the first electronic device, which can avoid the second electronic device and other devices receiving the broadcast of the first electronic device from sending the response message at the same time as much as possible, and further reduce the possibility of the first electronic device receiving a large number of response messages at the same time. The method can ensure that the first electronic device has enough processing time when processing each received response message as much as possible, and further improve the success rate of broadcast transmission and reception on the first electronic device side and the overall success rate of broadcast transmission and reception.
[0035] In a possible design, after sending the second message in response to the received second broadcast, the method further includes: sending a third message in response to a received third broadcast; where the third broadcast comprises one of a connectable non-directional broadcast from the first electronic device and a non-connectable non-directional broadcast from the first electronic device; the third message is one of a scan request and a non-connectable non-directional broadcast different from the second message; and the information for indicating whether to connect to the group network is included in any non-connectable non-directional broadcast.
[0036] Based on the method, the second electronic device can alternately send the scan request and the non-connectable non-directional broadcast multiple times, which can further improve the success rate of broadcast transmission and reception.
[0037] In a possible design, before sending the third message in response to the received third broadcast, the method further includes: waiting for a third time duration when the third broadcast is received.
[0038] In a possible design, the third time duration is randomly selected within a set third time duration range. Optionally, the third time duration is the same as the first time duration or the second time duration, or the third time duration is different from the first time duration and the second time duration.
[0039] In a possible design, the sending the first message includes: sending the first message for a fourth time duration; and the sending the second message includes: sending the second message for a fifth time duration. Optionally, the fourth time duration is the same as the fifth time duration, or the fourth time duration is different from the fifth time duration.
[0040] In the method, the second electronic device can send different types of messages according to corresponding time durations, which is flexible and practical.
[0041] In a possible design, the sending the first message for the fourth time duration includes: sending the first message every sixth time duration until a total time duration reaches the fourth time duration; and the sending the second message for the fifth time duration includes: sending the second message every seventh time duration until a total time duration reaches the fifth time duration. Optionally, the sixth time duration is the same as the seventh time duration, or the sixth time duration is different from the seventh time duration.
[0042] In the method, the second electronic device can send different types of messages according to corresponding time durations, which is flexible and practical.
[0043] In a third aspect, the present application provides a Bluetooth networking system, which comprises at least the first electronic device of the first aspect and the second electronic device of the second aspect. In a possible design of the system, the system can further comprise at least one other electronic device, and each of the at least one other electronic device can be the second electronic device of the second aspect.
[0044] In a fourth aspect, the present application provides an electronic device, which comprises a memory and one or more processors, and the memory is configured to store computer program codes, and the computer program codes comprise computer instructions, and the computer instructions, when executed by the one or more processors, cause the electronic device to perform the method described in the first aspect or any possible design of the first aspect, or perform the method described in the second aspect or any possible design of the second aspect.
[0045] In a fifth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program, when running on an electronic device, causes the electronic device to perform the method described in the first aspect or any possible design of the first aspect, or perform the method described in the second aspect or any possible design of the second aspect.
[0046] In a sixth aspect, the present application provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions, when running on an electronic device, causes the electronic device to perform the method described in the first aspect or any possible design of the first aspect, or perform the method described in the second aspect or any possible design of the second aspect.
[0047] In a seventh aspect, the present application provides a chip system, which comprises a processor and a memory, and the memory stores instructions, and the instructions, when executed by the processor, implement the method described in the first aspect or any possible design of the first aspect, or implement the method described in the second aspect or any possible design of the second aspect. The chip system can be composed of a chip, or can comprise a chip and other discrete devices.
[0048] The advantages of the third aspect to the seventh aspect can refer to the advantages of the first aspect or the second aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0049] FIG. 1 is a schematic diagram of a method for Bluetooth networking based on ADV_IND;
[0050] FIG. 2 is a schematic diagram of a method for Bluetooth networking based on ADV_IND;
[0051] Fig. 3 is a schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present application;
[0052] Fig. 4 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;
[0053] Fig. 5 is a schematic diagram of a data structure of ADV_IND according to an embodiment of the present application;
[0054] Fig. 6 is a schematic diagram of a data structure of ADV_NONCONN_IND according to an embodiment of the present application;
[0055] Fig. 7 is a schematic diagram of an ADV_IND transceiving process according to an embodiment of the present application;
[0056] Fig. 8 is a schematic diagram of an ADV_NONCONN_IND transceiving process according to an embodiment of the present application;
[0057] Fig. 9 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0058] Fig. 10 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0059] Fig. 11 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0060] Fig. 12 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0061] Fig. 13 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0062] Fig. 14 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0063] Fig. 15 is a schematic diagram of a Bluetooth networking method according to an embodiment of the present application;
[0064] Fig. 16 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0066] In the description of the embodiments of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features.
[0067] It should be understood that "at least one" in the embodiments of the present application means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, wherein A and B can be singular or plural. The character " / " generally represents that the associated objects before and after it are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can represent a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b and c can be single or multiple.
[0068] Bluetooth networking is a wireless networking method designed based on Bluetooth low energy (BLE) technology. Through Bluetooth networking, a self-organizing network containing a large number of nodes can be created, and multiple-to-multiple connections and communications are formed between different devices in the network. There are mainly two scenarios for current multi-device Bluetooth networking. One of them is in the first networking scenario, different devices can be connected and networked online based on BLE broadcast. Among them, chain building means establishing a wireless communication link, which can also be understood as establishing a connection. The other is in the non-first networking scenario, different devices can be connected and networked online based on BLE broadcast.
[0069] Four types of broadcast are defined in the related Bluetooth standard, which are connectable undirected broadcast ADV IND, connectable directed broadcast (ADV DIRECT IND), non-connectable undirected broadcast (ADV NONCONN IND) and scannable undirected broadcast (ADV SCAN IND). Among them, ADV IND is the most common broadcast with the widest use, ADV IND includes broadcast data packet (i.e. ADV IND packet) and scanning response data packet (i.e. SCAN REQ packet), and ADV IND can be used to indicate that the current device can accept the connection request of any device. The device broadcasting ADV IND can be scanned by other devices, or can enter a connection when receiving a connection request. ADV IND can be sent without connection. ADV IND including ADV IND packet and SCAN REQ packet can be understood as the name of the combination of ADV IND packet and SCAN REQ packet. ADV IND can also be called undirected connectable broadcast, ADV DIRECT IND can also be called directed connectable broadcast, ADV NONCONN IND can also be called undirected non-connectable broadcast, and ADV SCAN IND can also be called undirected scannable broadcast or undirected scanning broadcast.
[0070] In the current multi-device Bluetooth networking scheme, ADV_IND is required to support both BLE broadcast connection establishment networking and BLE broadcast online in the above two scenarios. FIG. 1 is a schematic diagram of the current Bluetooth networking method based on ADV_IND. As shown in the (a) schematic diagram in FIG. 1, in the current Bluetooth networking scheme, the device A as the networking initiator can send a networking heartbeat broadcast, i.e., ADV_IND, for a specified time period (e.g., 10 seconds (s)) when initiating networking. In the 10 s, the device A can send ADV_IND at a specified time interval. For example, in the 10 s, the device A can send ADV_IND every 50 ms. The process of sending ADV_IND by the device A each time includes sending an ADV IND packet and sending a SCAN_RSP packet in response to a received SCAN_REQ packet. The ADV IND packet is used for negotiation of Bluetooth networking online related information, and the SCAN_RSP packet carries information for identifying whether to allow connectionless networking online. A device receiving the SCAN_RSP packet can determine whether to connectlessly network online based on the information. As shown in the (b) schematic diagram in FIG. 1, the device B in the surrounding of the device A can send a response packet in a broadcast manner for a specified time period (e.g., 2 s) after receiving the ADV_IND of the device A. In the 2 s, the device B can send the response packet at a specified time interval. For example, in the 2 s, the device B can send the response packet every 50 ms. The response packet sent by the device B is a SCAN_REQ packet.
[0071] For ease of description, the ADV IND packet is referred to as ADV IND, the SCAN_RSP packet is referred to as SCAN_RSP, and the SCAN_REQ packet is referred to as SCAN_REQ in the following embodiments of the present application.
[0072] Referring to FIG. 2, in the scenario shown in FIG. 1, in 10s, the device A first sends an ADV IND package each time it sends an ADV IND, and if the device B receives the ADV IND package, the device B can send a SCAN REQ package. The device A can send a SCAN RSP package after receiving the SCAN REQ package. Based on the above method, when there are many devices around the device A, each device around the device A sends a SCAN REQ package after receiving the ADV IND package of the device A, so the device A needs to receive a large number of SCAN REQ packages and send corresponding SCAN RSP packages in a very short time. In this process, it is easy to have the problem of packet loss of the SCAN RSP package, which reduces the success rate of broadcast transmission and reception. Therefore, when the number of networking devices is large, there is a problem of low success rate of device broadcast transmission and reception, which affects the device online performance and leads to a low success rate of networking. For example, in practical application scenarios such as home and Internet of Things, it can be known through the practice of multi-device Bluetooth networking that the device online performance becomes poor when the number of networking devices is greater than 4, and it is almost impossible to complete the online of multiple devices when the number of networking devices is greater than 8.
[0073] Based on the above problems, in order to improve the success rate of Bluetooth networking, the embodiment of the present application provides a multi-device scene BLE fast networking online method and an electronic device. In the multi-device Bluetooth networking scene, the electronic device can improve the success rate of broadcast transmission and reception by alternately sending ADV IND and ADV NONCONN IND. By improving the success rate of broadcast transmission and reception, the performance of device online in the Bluetooth networking process can be improved, and then the success rate of Bluetooth networking can be improved.
[0074] The technical scheme provided by the embodiment of the present application can be executed by any electronic device with BLE communication capability.
[0075] In some embodiments of the present application, the electronic device can be a portable device, such as a mobile phone, a tablet computer, a wearable device (e.g., a watch, a bracelet, etc.) with wireless communication function, a vehicle terminal device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a smart home device (e.g., a smart television, a smart speaker, etc.), a smart robot, a plant device, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, or a wireless terminal in smart home, a flying device (e.g., a smart robot, a drone, an airplane), etc. Among them, the wearable device is a portable device that can be directly worn on the body of a user or integrated into a clothing or accessory of the user.
[0076] In some embodiments of the present application, the electronic device can also be a portable terminal device with other functions. Exemplary embodiments of the portable terminal device include, but are not limited to, a portable terminal device running an Android operating system or other operating system. The portable terminal device described above can also be other portable terminal devices, such as a laptop with a touch-sensitive surface (e.g., a touch panel), etc. It should also be understood that in some other embodiments of the present application, the electronic device described above can also not be a portable terminal device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0077] The structure of the electronic device to which the method provided in the embodiments of the present application is applicable will be introduced below with reference to FIG. 3.
[0078] As shown in FIG. 3, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc.
[0079] The sensor module 180 can include a gyro sensor, an acceleration sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, a temperature sensor, a pressure sensor, a distance sensor, a magnetic sensor, an ambient light sensor, a barometric sensor, a bone conduction sensor, and the like.
[0080] It can be understood that the electronic device 100 shown in FIG. 3 is merely an example and does not constitute a limitation on the electronic device, and the electronic device can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. The various components shown in FIG. 3 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0081] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0082] The memory in the processor 110 can also be provided to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0083] The execution of the multi-device scene BLE fast networking online method provided in the embodiments of the present application can be controlled by the processor 110 or other components are called to complete, such as calling the processing program of the embodiments of the present application stored in the internal memory 121, or calling the processing program of the embodiments of the present application stored in the third party device through the external memory interface 120, to control the wireless communication module 160 to perform data communication with other devices, improve the intelligence and convenience of the electronic device 100, and improve the user experience. The processor 110 can include different devices, such as when the CPU and the GPU are integrated, the CPU and the GPU can cooperate to execute the multi-device scene BLE fast networking online method provided in the embodiments of the present application, such as part of the algorithm in the multi-device scene BLE fast networking online method is executed by the CPU, and another part of the algorithm is executed by the GPU, to obtain faster processing efficiency.
[0084] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1. The display screen 194 can be configured to display information input by a user or provided to the user, as well as various graphical user interfaces (GUIs). For example, the display screen 194 can display photos, videos, webpages, or files, and the like.
[0085] In the embodiments of the present application, the display screen 194 can be a flexible display screen as a whole, or can be a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
[0086] The camera 193 (front-facing camera or rear-facing camera, or one camera that can be used as both front-facing and rear-facing) is used to capture still images or videos. Generally, the camera 193 can include a light-sensing element such as a lens group and an image sensor, where the lens group includes multiple lenses (convex or concave) for collecting light signals reflected by an object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates a raw image of the object to be photographed according to the light signals.
[0087] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, codes of application programs (such as functions corresponding to the scheme of the present application, etc.), and the like. The data storage area can store data created during the use of the electronic device 100, and the like.
[0088] The internal memory 121 can also store one or more computer programs corresponding to the algorithm of the scheme of the present application. The one or more computer programs stored in the above-mentioned internal memory 121 and configured to be executed by the one or more processors 110 include instructions that can be used to perform the steps in the following embodiments.
[0089] In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
[0090] Of course, the code of the algorithm of the scheme of the present application embodiment can also be stored in the external memory. In this case, the processor 110 can run the code of the algorithm of the scheme of the present application stored in the external memory through the external memory interface 120.
[0091] The touch sensor, also known as a "touch panel". The touch sensor can be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch display screen, also known as a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
[0092] For example, the display 194 of the electronic device 100 can display a home interface including icons of a plurality of applications (e.g., a camera application, a sports health application, etc.). For example, a user can click the icon of the camera application in the home interface through the touch sensor, triggering the processor 110 to start the camera application and open the camera 193. The display 194 displays the interface of the camera application, for example, a viewfinder interface.
[0093] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, etc.
[0094] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0095] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated through the antenna 1. In some embodiments, at least part of the function modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device. In the embodiments of the present application, the mobile communication module 150 can also be used for information interaction with other devices.
[0096] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and can be disposed in the same device as the mobile communication module 150 or other functional modules.
[0097] The wireless communication module 160 can provide a wireless communication solution applied to the electronic device 100, including wireless local area networks (WLAN) (such as a wireless fidelity (WiFi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification, and radiate the signal to the antenna 2 as electromagnetic waves. In the embodiments of the present application, the wireless communication module 160 can be used to establish a connection with other electronic devices and exchange data. Alternatively, the wireless communication module 160 can be used to access an access point device, transmit control instructions to other electronic devices, or receive data transmitted from other electronic devices.
[0098] In addition, the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc. The electronic device 100 can receive the key 190 input, and generate a key signal input related to the user settings and function control of the electronic device 100. The electronic device 100 can generate a vibration prompt (such as an incoming call vibration prompt) by using the motor 191. The indicator 192 in the electronic device 100 can be an indicator light, which can be used to indicate the charging state, the power change, and can also be used to indicate the message, the missed call, the notification, etc. The SIM card interface 195 in the electronic device 100 is used to connect the SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize the contact and separation with the electronic device 100.
[0099] It should be understood that in actual applications, the electronic device 100 can include more or fewer components than those shown in FIG. 3, and the embodiments of the present application are not limited. The electronic device 100 shown in the figure is only an example, and the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0100] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. For example, as shown in FIG. 4, the software architecture can be divided into four layers, from top to bottom, the application layer, the application framework layer (FWK), the runtime and system library, and the (Linux) kernel layer.
[0101] The application layer is the uppermost layer of the operating system, which includes the native applications of the operating system, such as the camera, the gallery, the calendar, the Bluetooth, the music, the video, the information, etc., and can also include third-party applications. The application referred to in the embodiments of the present application is abbreviated as application (APP), which is a software program that can implement one or more specific functions. Generally, multiple applications can be installed in the electronic device, such as a camera application, a mailbox application, etc. The application mentioned below can be a system application installed when the electronic device is manufactured, or a third-party application downloaded from the network or obtained from other electronic devices during the use of the electronic device.
[0102] Of course, for developers, the developers can write applications and install to the layer. In one possible implementation, the applications can be developed using Java language, through calling application programming interface (API) provided by the application framework layer, the developers can interact with the underlying of the operating system (such as the kernel layer, etc.) through the application framework to develop their own applications.
[0103] The application framework layer is the API and programming framework for the application layer. The application framework layer can include some pre-defined functions. The application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0104] The window manager is used to manage the window program. The window manager can get the display screen size, determine whether there is a status bar, lock the display screen (or screen), intercept the display screen, etc.
[0105] The content provider is used to store and obtain data, and make the data accessible to the application. The data can include files (such as documents, videos, images, audio), text, etc.
[0106] The view system includes visual controls, such as controls for displaying text, pictures, document content, etc. The view system can be used to build applications. The interface in the display window can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0107] The phone manager is used to provide the communication function of the electronic device. The notification manager enables the application to display notification information in the status bar, which can be used to convey the type of message, which can automatically disappear after a short stay without user interaction.
[0108] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.
[0109] The core library of the system contains two parts: one is the function function that Java language needs to call, and the other is the core library of the system. The application layer and the application framework layer run in the virtual machine. Taking Java as an example, the virtual machine executes the Java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform the management of object life cycle, stack management, thread management, security and exception management, and garbage collection, etc.
[0110] The system library can include a plurality of functional modules. For example, a surface manager, a media library, a three-dimensional graphics processing library (e.g., OpenGL ES), a two-dimensional graphics engine (e.g., SGL), an image processing library, etc. The surface manager is used to manage the display subsystem and provides a plurality of applications with the fusion of two-dimensional and three-dimensional layers. The media library supports a plurality of commonly used audio, video format playback and recording, and static image files, etc. The media library can support a plurality of audio and video coding formats, such as MPEG4, H.564, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc. The two-dimensional graphics engine is a drawing engine for two-dimensional drawing.
[0111] The kernel layer provides core system services of the operating system, such as security, memory management, process management, network protocol stack, and a driver model, which are implemented based on the kernel layer. The kernel layer also serves as an abstraction layer between the hardware and the software stack. This layer has many device-related drivers, including: a display driver; a keyboard driver as an input device; a Flash driver based on a memory technology device; a camera driver; an audio driver; a Bluetooth driver; a WiFi driver, etc.
[0112] It should be understood that the functional services as described above are only examples, and in actual applications, the electronic device can also be divided into more or fewer functional services according to other factors, or the functions of each service can be divided in other ways, or the functional services can not be divided, but work as a whole.
[0113] The scheme provided by the embodiments of the present application can be applied to a communication system composed of a plurality of electronic devices. The electronic devices in the communication system can adopt the architecture shown in FIG. 3 and / or FIG. 4, or can adopt other architectures, which are not specifically limited in the embodiments of the present application. Each electronic device in the communication system can communicate with other electronic devices based on the scheme provided by the embodiments of the present application, so as to realize Bluetooth networking online.
[0114] Optionally, the electronic devices in the communication system can access a network (such as a mobile network or a wireless local area network, etc.), or can not access a network. Different electronic devices can access the same network (such as a wireless local area network under the same access point AP, etc.), or can access different networks, which are not specifically limited in the embodiments of the present application.
[0115] For ease of description, the device initiating Bluetooth networking in the communication system is referred to as a first electronic device in the following embodiments, and the device capable of Bluetooth networking with the first electronic device in the communication system is referred to as a second electronic device.
[0116] In the scheme provided in the embodiments of the present application, the first electronic device can alternately send ADV IND and ADV NONCONN IND in stages when initiating Bluetooth networking, and the second electronic device can respond based on the broadcast packet received from the first electronic device. Through this method, the success rate of broadcast transmission and reception can be improved, and thus the efficiency of Bluetooth networking can be improved. Among them, for the first electronic device, the stage in which the first electronic device sends ADV IND can be referred to as an ADV IND sending stage, and the stage in which the first electronic device sends ADV NONCONN IND can be referred to as an ADV NONCONN IND sending stage. For the second electronic device, the stage in which the second electronic device responds to ADV IND sent by the first electronic device can be referred to as an ADV IND responding stage, and the stage in which the second electronic device responds to ADV NONCONN IND sent by the first electronic device can be referred to as an ADV NONCONN IND responding stage.
[0117] The multi-device scenario BLE fast networking online method corresponding to the above-mentioned ADV IND sending stage, ADV NONCONN IND sending stage, ADV IND responding stage and ADV NONCONN IND responding stage will be described in detail below in combination with the following first part to fourth part.
[0118] First part, ADV IND sending stage
[0119] In the embodiments of the present application, as shown in FIG. 5, ADV IND includes two broadcast packets ADV IND and SCAN_RSP. Among them, ADV IND includes a negotiation field, which can be used for negotiation of information related to Bluetooth networking online. SCAN_RSP can be used for data synchronization before online. SCAN_RSP includes a state field, which can be used to identify whether to allow connectionless online. The device receiving SCAN_RSP can determine the online mode based on the state field.
[0120] In the embodiments of the present application, ADV IND can be referred to as AB packet, ADV IND included in ADV IND can be referred to as connectable A packet, and SCAN_RSP included in ADV IND can be referred to as B packet.
[0121] In the embodiments of the present application, each ADV_IND sending stage can have a corresponding sending duration (which can also be understood as a continuous duration) at the first electronic device side. Optionally, different ADV_IND sending stages can correspond to the same or different sending durations, which are not specifically limited in the embodiments of the present application. In each ADV_IND sending stage, the first electronic device can repeatedly send ADV_IND within the sending duration corresponding to the ADV_IND sending stage, that is, the first electronic device can repeatedly send ADV_IND until the total duration reaches the sending duration corresponding to the ADV_IND sending stage. The value of the sending duration corresponding to each ADV_IND sending stage can be preset, and the value of the sending duration corresponding to each ADV_IND sending stage is not limited in the embodiments of the present application. Under normal circumstances, the operation of the first electronic device for sending ADV_IND each time can include: sending ADV_IND, and in response to the received SCAN_REQ, sending SCAN_RSP. Under abnormal circumstances (for example, packet loss scenario), the operation of the first electronic device for sending ADV_IND can include the two operations in the normal circumstances, or can only include sending ADV_IND.
[0122] In some embodiments of the present application, each ADV_IND sending stage can have a corresponding interval duration at the first electronic device side. Optionally, different ADV_IND sending stages can correspond to the same or different interval durations, which are not specifically limited in the embodiments of the present application. The first electronic device can send ADV_IND within the sending duration corresponding to each ADV_IND sending stage according to the interval duration corresponding to the ADV_IND sending stage. That is, the first electronic device can send ADV_IND every interval duration corresponding to the ADV_IND sending stage until the total duration reaches the sending duration corresponding to the ADV_IND sending stage. The value of the interval duration corresponding to each ADV_IND sending stage can be preset, and the value of the interval duration corresponding to each ADV_IND sending stage is not limited in the embodiments of the present application.
[0123] For example, in the scenario where the sending duration corresponding to any ADV_IND sending stage is 2s and the interval duration is 50ms, the first electronic device can send ADV_IND every 50ms until the total duration reaches 2s.
[0124] Second part, ADV_NONCONN_IND sending stage
[0125] In the embodiments of the present application, the ADV_NONCONN_IND can be used as an online packet, and can realize fast online of the device. As shown in FIG. 6, the data structure of the ADV_NONCONN_IND can include a negotiation field and a state field. The negotiation field can be used for negotiation of information related to Bluetooth networking online, and the state field can be used for identifying whether to allow connection-free online. The device receiving the ADV_NONCONN_IND can complete Bluetooth networking online based on the negotiation field and the state field.
[0126] In the embodiments of the present application, the ADV_NONCONN_IND can be referred to as an A packet that is not connectable.
[0127] In the embodiments of the present application, on the first electronic device side, each ADV_NONCONN_IND sending stage can have a corresponding sending duration (which can also be understood as a continuous duration). Optionally, different ADV_NONCONN_IND sending stages can correspond to the same or different sending durations, which are not specifically limited in the embodiments of the present application. In each ADV_NONCONN_IND sending stage, the first electronic device can repeatedly send the ADV_NONCONN_IND within the sending duration corresponding to the ADV_NONCONN_IND sending stage, that is, the first electronic device can repeatedly send the ADV_NONCONN_IND until the total duration reaches the sending duration corresponding to the ADV_NONCONN_IND sending stage. The value of the sending duration corresponding to each ADV_NONCONN_IND sending stage can be pre-set, and the value of the sending duration corresponding to each ADV_NONCONN_IND sending stage is not limited in the embodiments of the present application.
[0128] Optionally, the sending duration corresponding to the ADV_NONCONN_IND sending stage and the sending duration corresponding to the ADV_IND sending stage can be the same or different.
[0129] In some embodiments of the present application, on the first electronic device side, each ADV_NONCONN_IND sending stage can have a corresponding interval duration. Optionally, different ADV_NONCONN_IND sending stages can correspond to the same or different interval durations, which are not specifically limited in the embodiments of the present application. The first electronic device can send ADV_NONCONN_IND according to the interval duration corresponding to each ADV_NONCONN_IND sending stage within the sending duration corresponding to the ADV_NONCONN_IND sending stage. That is, the first electronic device can send ADV_NONCONN_IND once every interval duration corresponding to the ADV_NONCONN_IND sending stage until the total duration reaches the sending duration corresponding to the ADV_NONCONN_IND sending stage. The value of the interval duration corresponding to each ADV_NONCONN_IND sending stage can be pre-set, and the value of the interval duration corresponding to each ADV_NONCONN_IND sending stage is not limited in the embodiments of the present application.
[0130] For example, in a scenario where the sending duration corresponding to any ADV_NONCONN_IND sending stage is 3s and the interval duration is 100ms, the first electronic device can send ADV_NONCONN_IND once every 100ms until the total duration reaches 3s.
[0131] Third part, ADV_IND response stage
[0132] In the first possible scheme, on the second electronic device side, when the second electronic device receives the ADV IND sent by the first electronic device, the second electronic device can enter the ADV_IND response stage. In this scheme, the ADV_IND response stage has a corresponding sending duration (which can also be understood as a continuous duration), which can be pre-set, and the value of the duration is not limited in the embodiments of the present application. When the second electronic device receives the ADV IND sent by the first electronic device, the second electronic device can repeatedly send SCAN_REQ within the sending duration corresponding to the ADV_IND response stage. That is, the second electronic device can repeatedly send SCAN_REQ until the total duration reaches the sending duration corresponding to the ADV_IND response stage.
[0133] In some embodiments of the present application, the ADV_IND response stage also has a corresponding interval duration, which can be preset, and the value of the duration is not limited in the embodiments of the present application. When the second electronic device receives the ADV IND sent by the first electronic device, the second electronic device can send the SCAN REQ according to the interval duration corresponding to the ADV IND response stage within the sending duration corresponding to the ADV IND response stage. That is, the second electronic device can send the SCAN REQ once every interval duration corresponding to the ADV IND response stage until the total duration reaches the sending duration corresponding to the ADV IND response stage.
[0134] Based on the above method, a successful ADV IND transmission and reception process between the first electronic device and the second electronic device can refer to FIG. 7. As shown in FIG. 7, the process includes:
[0135] S701: The first electronic device sends the ADV IND.
[0136] S702: After the second electronic device receives the ADV IND, the second electronic device sends the SCAN REQ.
[0137] Optionally, the SCAN REQ can be used to indicate the information related to the second electronic device, such as the device identifier of the second electronic device and the like, which is not limited in the embodiments of the present application.
[0138] S703: After the first electronic device receives the SCAN REQ, the first electronic device sends the SCAN RSP.
[0139] Wherein, the first electronic device and the second electronic device can determine the online mode based on the SCAN RSP, and complete the online of the peer device at the local end according to the determined online mode.
[0140] In the second possible scheme, on the second electronic device side, when the second electronic device receives the ADV NONCONN IND sent by the first electronic device, the second electronic device can enter the above-mentioned ADV IND response stage. That is, after the second electronic device receives the ADV NONCONN IND sent by the first electronic device, the second electronic device can send the SCAN REQ according to the method corresponding to the above-mentioned ADV IND response stage. In this scenario, when the first electronic device receives the SCAN REQ sent by the second electronic device, the first electronic device can send the SCAN RSP.
[0141] Fourth part, ADV NONCONN IND response stage
[0142] In a first possible solution, on the second electronic device side, when the second electronic device receives the ADV_NONCONN_IND sent by the first electronic device, the second electronic device can enter an ADV_NONCONN_IND response stage. In this solution, the ADV_NONCONN_IND response stage has a corresponding sending duration (which can also be understood as a continuous duration), which can be pre-set, and the value of the duration is not limited in the embodiments of the present application. When the second electronic device receives the ADV_NONCONN_IND sent by the first electronic device, the second electronic device can repeatedly send the ADV_NONCONN_IND within the sending duration corresponding to the ADV_NONCONN_IND response stage. That is, the second electronic device can repeatedly send the ADV_NONCONN_IND until the total duration reaches the sending duration corresponding to the ADV_NONCONN_IND response stage. The ADV_NONCONN_IND sent by the first electronic device can be used to implement the online of the first electronic device in the second electronic device. The ADV_NONCONN_IND sent by the second electronic device can be used to implement the online of the second electronic device in the first electronic device.
[0143] In some embodiments of the present application, the ADV_NONCONN_IND response stage also has a corresponding interval duration, which can be pre-set, and the value of the duration is not limited in the embodiments of the present application. When the second electronic device receives the ADV_NONCONN_IND sent by the first electronic device, the second electronic device can send the ADV_NONCONN_IND within the sending duration corresponding to the ADV_NONCONN_IND response stage according to the interval duration corresponding to the ADV_NONCONN_IND response stage. That is, the second electronic device can send the ADV_NONCONN_IND once every interval duration corresponding to the ADV_NONCONN_IND response stage until the total duration reaches the sending duration corresponding to the ADV_NONCONN_IND response stage.
[0144] Based on the above method, a successful ADV_NONCONN_IND transmission and reception process between the first electronic device and the second electronic device can refer to FIG. 8. As shown in FIG. 8, the process includes:
[0145] S801: The first electronic device sends the ADV_NONCONN_IND.
[0146] S802: After the second electronic device receives the ADV_NONCONN_IND, the second electronic device sends the ADV_NONCONN_IND.
[0147] In the second possible solution, on the second electronic device side, when the second electronic device receives the ADV IND sent by the first electronic device, the second electronic device can enter the above-mentioned ADV NONCONN IND response stage. That is, after receiving the ADV IND sent by the first electronic device, the second electronic device can send the ADV NONCONN IND according to the method corresponding to the above-mentioned ADV NONCONN IND response stage.
[0148] In some embodiments of the present application, in the Bluetooth networking online scenario, the first electronic device can alternately execute the method corresponding to the above-mentioned ADV IND sending stage in the first part of the content and the method corresponding to the above-mentioned ADV NONCONN IND sending stage in the second part of the content. If the second electronic device can receive the ADV IND or the ADV NONCONN IND sent by the first electronic device, the second electronic device can execute the method corresponding to the above-mentioned ADV IND response stage in the third part of the content or execute the method corresponding to the above-mentioned ADV NONCONN IND response stage in the fourth part of the content.
[0149] In some embodiments of the present application, on the first electronic device side, the order of alternately executing the method corresponding to the above-mentioned ADV IND sending stage in the first part of the content and the method corresponding to the above-mentioned ADV NONCONN IND sending stage in the second part of the content can be arbitrary. For example, the method corresponding to the ADV IND sending stage can be executed first, and the method corresponding to the ADV NONCONN IND sending stage can be executed later, and the order is repeated. Or, the method corresponding to the ADV NONCONN IND sending stage can be executed first, and the method corresponding to the ADV IND sending stage can be executed later, and the order is repeated.
[0150] In some embodiments of the present application, in the process of alternately executing the method corresponding to the above-mentioned ADV IND sending stage and the method corresponding to the above-mentioned ADV NONCONN IND sending stage, the total number and / or total time length of the ADV IND sending stage completed by the first electronic device can be preset, which is not specifically limited in the embodiments of the present application. The total number and / or total time length of the ADV NONCONN IND sending stage completed by the first electronic device can be preset, which is not specifically limited in the embodiments of the present application.
[0151] In the above scheme, the first electronic device and the second electronic device can implement the Bluetooth networking online process based on ADV_NONCONN_IND when processing broadcast transmission and reception, and thus do not need to completely rely on ADV_IND and SCAN_RSP to implement the Bluetooth networking online process. Therefore, by alternately executing the method corresponding to the ADV_IND transmission stage and the method corresponding to the ADV_NONCONN_IND transmission stage, on the one hand, the amount of transmission and reception of SCAN_RSP can be reduced, and thus the packet loss rate of SCAN_RSP can be reduced, which helps to improve the success rate of broadcast transmission and reception in the Bluetooth networking process, and thus improves the success rate of Bluetooth networking. On the other hand, the Bluetooth networking online based on ADV_NONCONN_IND can be supported, and thus the success rate of Bluetooth networking can be effectively improved.
[0152] The method provided by the above embodiment will be exemplarily described below in conjunction with the following Example 1.
[0153] In Example 1, in the scenario where the total time length of the alternately executed method corresponding to the ADV_IND transmission stage and the method corresponding to the ADV_NONCONN_IND transmission stage is 10 seconds, the time length of each stage accounts for the same proportion (i.e., the time length of the method executed in each transmission stage is 2 seconds each time or the transmission time length of each stage is 2 seconds each time), and the method corresponding to the ADV_IND transmission stage is preferentially executed in the alternation process, on the first electronic device side, in the scenario where the response mode adopted by the second electronic device is the first possible scheme described in the third part of the content above and the second possible scheme described in the fourth part of the content above, and the time length of each response stage is 1 second (i.e., the transmission time length of each response stage is 1 second), on the second electronic device side, the scheme provided by the above embodiment will be exemplarily described.
[0154] As shown in the (a) schematic diagram in FIG. 9, a possible communication process of the first electronic device side in this scenario can include the following steps A1-A5:
[0155] A1: The first electronic device transmits 2-second ADV_IND.
[0156] The data structure of the ADV_IND transmitted by the first electronic device can refer to FIG. 5, which will not be repeated here.
[0157] The first electronic device can transmit 2-second ADV_IND by referring to the method corresponding to the ADV_IND transmission stage described in the first part of the content above, which will not be described in detail here.
[0158] A2: The first electronic device transmits 2-second ADV_NONCONN_IND.
[0159] The data structure of the ADV_NONCONN_IND sent by the first electronic device can refer to FIG. 7, which will not be repeated here.
[0160] The first electronic device can send 2-second ADV_NONCONN_IND according to the method corresponding to the ADV_NONCONN_IND sending stage described in the second part of the content above, which will not be repeated here.
[0161] A3: The first electronic device sends 2-second ADV_IND.
[0162] Regarding step A3, it can refer to the aforementioned step A1, which will not be repeated here.
[0163] A4: The first electronic device sends 2-second ADV_NONCONN_IND.
[0164] Regarding step A4, it can refer to the aforementioned step A2, which will not be repeated here.
[0165] A5: The first electronic device sends 2-second ADV_IND.
[0166] Regarding step A5, it can refer to the aforementioned step A1, which will not be repeated here.
[0167] As shown in the (b) diagram in FIG. 9, a possible communication process of the second electronic device in this scenario can include the following steps B1-B2 and / or B3-B4:
[0168] B1: The second electronic device receives the ADV_IND sent by the first electronic device.
[0169] B2: The second electronic device sends 1-second SCAN_REQ.
[0170] In the process of the first electronic device alternately sending ADV_IND and ADV_NONCONN_IND based on the method shown in the (a) diagram in FIG. 9, the second electronic device can receive the ADV_IND and ADV_NONCONN_IND sent by the first electronic device. When the second electronic device receives the ADV_IND sent by the first electronic device, the second electronic device can send 1-second SCAN_REQ according to the method corresponding to the ADV_IND response stage described in the first part of the content above.
[0171] B3: The second electronic device receives the ADV_NONCONN_IND sent by the first electronic device.
[0172] B4: The second electronic device sends 1-second ADV_NONCONN_IND.
[0173] In the process that the first electronic device alternately transmits ADV_IND and ADV_NONCONN_IND based on the method shown in the schematic diagram (a) in FIG. 9, the second electronic device can receive the ADV_IND and ADV_NONCONN_IND transmitted by the first electronic device. Wherein, when the second electronic device receives the ADV_NONCONN_IND transmitted by the first electronic device, the second electronic device can transmit 1 second ADV_NONCONN_IND by referring to the method corresponding to the ADV_NONCONN_IND response stage described in the second part of the content above.
[0174] In one example, based on the method shown in FIG. 9, a possible schematic diagram of air interface interaction between the first electronic device and the second electronic device can refer to FIG. 10. As shown in FIG. 10, within the 2 seconds of the first stage (including the first ADV_IND transmission stage and the ADV_IND response stage), the first electronic device and the second electronic device can perform at least one of the following interaction processes: the first electronic device transmits ADV_IND, the second electronic device transmits SCAN_REQ in response to receiving the ADV_IND, the first electronic device transmits SCAN_RSP in response to receiving the SCAN_REQ, and the second electronic device receives the SCAN_RSP transmitted by the first electronic device. Within the 2 seconds of the second stage (including the first ADV_NONCONN_IND transmission stage and the ADV_NONCONN_IND response stage), the first electronic device and the second electronic device can perform at least one of the following interaction processes: the first electronic device transmits ADV_NONCONN_IND, the second electronic device transmits ADV_NONCONN_IND in response to receiving the ADV_NONCONN_IND, and the first electronic device receives the ADV_NONCONN_IND transmitted by the second electronic device. Within the 2 seconds of the third stage (including the second ADV_IND transmission stage and the ADV_IND response stage), the first electronic device and the second electronic device can perform similar interaction processes as the first stage. In this way, the interaction processes of the five stages can be completed.
[0175] Compared with the existing scheme shown in FIG. 1, the method described in Example 1 can improve the success rate of transmitting and receiving broadcast data packets in a multi-device scenario by splitting the existing 10s connectable broadcast into 3 2s connectable broadcasts and 2 2s non-connectable broadcasts and alternately transmitting them, thereby improving the success rate of Bluetooth networking.
[0176] It should be noted that the various numerical values (such as time values, execution times, etc.) and application scenarios in this example 1 are only used as examples to help understand the scheme provided by the embodiments of the present application, and do not represent the information that must be used or the scenarios that must be applied by the scheme provided by the embodiments of the present application, and therefore do not limit the scheme provided by the embodiments of the present application.
[0177] Based on the above method, the embodiments of the present application also provide a random delay dynamic start-stop scheme. The scheme can include the following scheme 1 and / or scheme 2:
[0178] In some embodiments of the present application, on the first electronic device side, in the process of alternately executing the method corresponding to the above ADV_IND sending stage and the method corresponding to the above ADV_NONCONN_IND sending stage, after the broadcast transceiving of the first electronic device in any stage is completed, the first electronic device can start to execute the broadcast transceiving of the next stage after waiting for a random duration. For example, when the first electronic device first executes the method corresponding to the ADV_IND sending stage, the first electronic device can generate a waiting duration randomly after sending the SCAN_RSP, and then continue to execute the method corresponding to the ADV_NONCONN_IND sending stage after the waiting duration. The first electronic device can generate a waiting duration randomly after executing the method corresponding to the ADV_NONCONN_IND sending stage, and then continue to execute the method corresponding to the ADV_IND sending stage after the waiting duration. In this way, the entire alternating process is completed. Optionally, the random duration that the first electronic device waits before starting the next stage after completing each stage can be a duration randomly selected within a set duration range.
[0179] In this scheme, the first electronic device can reserve a certain amount of time for processing broadcast response packets from other electronic devices by waiting for a random duration between adjacent two stages, which helps to improve the success rate of Bluetooth networking.
[0180] In some embodiments of the present application, on the second electronic device side, when the second electronic device receives the broadcast packet (ADV IND or ADV NONCONN IND) sent by the first electronic device, the second electronic device can first wait for a random time duration, and then start to execute the method corresponding to the corresponding response phase. For example, the second electronic device can generate a random waiting time duration each time it receives the ADV IND sent by the first electronic device, and then send the SCAN REQ after the waiting time duration. Alternatively, the second electronic device can generate a random waiting time duration each time it receives the ADV NONCONN IND sent by the first electronic device, and then send the ADV NONCONN IND after the waiting time duration. Optionally, the random time duration that the second electronic device waits each time can be a time duration randomly selected within a set time duration range.
[0181] This scheme can avoid the second electronic device and other devices receiving the broadcast packet of the first electronic device from simultaneously sending broadcast response packets as much as possible. In the case of a large number of Bluetooth networking devices, it can effectively avoid the first electronic device from simultaneously receiving a large number of broadcast response packets from electronic devices, thereby avoiding broadcast storm. This method can also help to reduce the packet loss rate in the communication process, thereby improving the success rate of Bluetooth networking.
[0182] The method provided by the above embodiments will be exemplarily described below in conjunction with the following example 2.
[0183] Example 2, in the scenario described in the above scheme one, scheme two and example 1, as shown in the (a) schematic diagram in FIG. 11, a possible communication process on the first electronic device side in this scenario can include the following steps C1-C9:
[0184] C1: The first electronic device sends 2 seconds of ADV IND.
[0185] C2: The first electronic device waits for a random time duration.
[0186] C3: The first electronic device sends 2 seconds of ADV NONCONN IND.
[0187] C4: The first electronic device waits for a random time duration.
[0188] C5: The first electronic device sends 2 seconds of ADV IND.
[0189] C6: The first electronic device waits for a random time duration.
[0190] C7: The first electronic device sends 2 seconds of ADV NONCONN IND.
[0191] C8: The first electronic device waits for a random time duration.
[0192] C9: The first electronic device sends 2 seconds ADV_IND.
[0193] In the above steps C2, C4, C7, the random time length in each step can be randomly determined by the first electronic device, and the random time length in each step can be the same as or different from the random time length in other steps, which is not limited in the embodiments of the present application. For example, in the above scheme one and scheme two, the set time length range is 100ms-500ms, and in the above steps C2, C4, C6, C8, the first electronic device can randomly determine the required waiting time length in 100ms-500ms.
[0194] For the above steps C1, C5, C9, reference can be made to the aforementioned step A1, which will not be repeated here. For the above steps C3, C7, reference can be made to the aforementioned step A2, which will not be repeated here.
[0195] As shown in the (b) schematic diagram in FIG. 11, one possible communication process of the second electronic device in this scenario can include the following steps D1-D3 and / or D4-D6:
[0196] D1: The second electronic device receives the ADV_IND sent by the first electronic device.
[0197] D2: The second electronic device waits for a random time length.
[0198] D3: The second electronic device sends 1 second SCAN_REQ.
[0199] For step D3, reference can be made to the aforementioned step B2, which will not be repeated here.
[0200] D4: The second electronic device receives the ADV_NONCONN_IND sent by the first electronic device.
[0201] D5: The second electronic device waits for a random time length.
[0202] D6: The second electronic device sends 1 second ADV_NONCONN_IND.
[0203] For step D6, reference can be made to the aforementioned step B4, which will not be repeated here.
[0204] For example, in the above scheme one and scheme two, the set time length range is 100ms-500ms, and in the above steps D2, D5, the second electronic device can randomly determine the required waiting time length in 100ms-500ms.
[0205] In one example, based on the method shown in FIG. 11, a possible schematic diagram of air interface interaction between the first electronic device and the second electronic device can refer to FIG. 12. As shown in FIG. 12, within the time length of 2 seconds of the first stage (including the first ADV_NONCONN_IND sending stage and the ADV_NONCONN_IND response stage), the first electronic device and the second electronic device can perform at least one of the following interaction processes: the first electronic device sends ADV_NONCONN_IND, the second electronic device sends ADV_NONCONN_IND in response to the received ADV_NONCONN_IND, and the first electronic device receives the ADV_NONCONN_IND sent by the second electronic device. Within the time length of 2 seconds of the second stage (including the first ADV_IND sending stage and the ADV_IND response stage), the first electronic device and the second electronic device can perform at least one of the following interaction processes: the first electronic device sends ADV_IND, the second electronic device sends SCAN_REQ in response to the received ADV_IND, the first electronic device sends SCAN_RSP in response to the received SCAN_REQ, and the second electronic device receives the SCAN_RSP sent by the first electronic device. Within the time length of 2 seconds of the third stage (including the second ADV_NONCONN_IND sending stage and the ADV_NONCONN_IND response stage), the first electronic device and the second electronic device can perform similar interaction processes as the first stage. In this way, the interaction processes of the five stages can be completed.
[0206] Compared with the existing scheme shown in FIG. 1, the method of example 2 can split the existing 10s connectable broadcast into 3 2s connectable broadcasts and 2 2s non-connectable broadcasts and send them alternately. By randomly waiting for a certain time length before alternation, the method can further reduce air interface congestion on the basis of improving the success rate of sending and receiving broadcast data packets in a multi-device scenario, and can better improve the Bluetooth networking success rate. Experimental verification shows that under the condition of ensuring the online performance, the number of devices that can simultaneously perform Bluetooth networking online can be increased from the current 4 to more than 20 by using the above method.
[0207] The method provided by the above embodiment is exemplarily described below in combination with example 3.
[0208] In example 3, the total time length of the method corresponding to the above ADV_IND sending stage and the method corresponding to the ADV_NONCONN_IND sending stage is 10 seconds, the method corresponding to the ADV_NONCONN_IND sending stage is preferentially performed in the alternation process, and the time length of some stages is the same and the time length of another part of the stages is different. The scheme provided by the above embodiment is exemplarily described in the scenario.
[0209] As shown in the (a) schematic diagram in FIG. 13, one possible communication procedure on the first electronic device side in this scenario can include the following steps E1-E7:
[0210] E1: The first electronic device sends 4s ADV_NONCONN_IND.
[0211] E2: The first electronic device waits for a random duration.
[0212] E3: The first electronic device sends 2s ADV_IND.
[0213] E4: The first electronic device waits for a random duration.
[0214] E5: The first electronic device sends 2s ADV_NONCONN_IND.
[0215] E6: The first electronic device waits for a random duration.
[0216] E7: The first electronic device sends 2s ADV_IND.
[0217] In the above steps E2, E4, and E6, the random duration in each step can be randomly determined by the first electronic device, and the random duration in each step can be the same as or different from the random duration in other steps, which is not limited in the embodiments of the present application. For example, in the above-mentioned time range of 100ms-300ms in the first and second schemes, the first electronic device can randomly determine the required waiting duration in 100ms-300ms in the above steps E2, E4, and E6.
[0218] For the specific implementation method of the above steps E1 and E5, reference can be made to the aforementioned step A1, which will not be described here again. For the above steps E3 and E7, reference can be made to the aforementioned step A2, which will not be described here again.
[0219] As shown in the (b) schematic diagram in FIG. 13, one possible communication procedure on the second electronic device side in this scenario can include the following steps F1-F3 and / or F4-F6:
[0220] F1: The second electronic device receives the ADV_IND or ADV_NONCONN_IND sent by the first electronic device.
[0221] F2: The second electronic device waits for a random duration.
[0222] F3: The second electronic device sends 2s ADV_NONCONN_IND.
[0223] For step F3, reference can be made to the aforementioned step B4, which will not be described here again.
[0224] F4: The second electronic device receives the ADV IND or ADV NONCONN IND sent by the first electronic device.
[0225] F5: The second electronic device waits for a random time length.
[0226] F6: The second electronic device sends a 1-second SCAN REQ.
[0227] Regarding step F6, reference can be made to the aforementioned step B2, which will not be repeated here.
[0228] It should be understood that the implementation processes provided in the above embodiments are only exemplary of the method processes applicable to the embodiments of the present application, and the execution order of the steps in each process can be adjusted accordingly according to actual needs, and other steps can be added or some steps can be reduced. The execution order of the steps that are not time-correlated in each embodiment can be arbitrary, and the present application does not limit this.
[0229] It should be noted that the application scenarios provided in the above embodiments are only exemplary of the scenarios applicable to the embodiments of the present application, and do not limit the scenarios applicable to the present application. Some methods or the same technical concepts provided in any of the above embodiments can also be applied in other embodiments or other scenarios, or can be combined with the methods provided in other embodiments for execution, and can be applied in combination with specific embodiments or specific scenarios. This will not be repeated in the present application.
[0230] Based on the above embodiments and the same technical concept, the present application further provides a multi-device scenario BLE fast networking online method, as shown in FIG. 14, which can include:
[0231] S1401: The first electronic device sends a first broadcast; wherein the first broadcast includes any one of a connectable non-directional broadcast and an unconnectable non-directional broadcast, and the unconnectable non-directional broadcast includes information for indicating whether to be exempted from connection networking online.
[0232] Wherein, regarding the connectable non-directional broadcast, reference can be made to the aforementioned ADV IND described in the embodiments, and regarding the unconnectable non-directional broadcast, reference can be made to the aforementioned ADV NONCONN IND described in the embodiments (wherein the information for indicating whether to be exempted from connection networking online included in the unconnectable non-directional broadcast can be the state field described in the aforementioned embodiments), which will not be described in detail here.
[0233] Optionally, the process that the first electronic device sends the first broadcast each time comprises: the first electronic device sending a connectable non-directional broadcast packet (i.e., ADV IND packet). On this basis, the process that the first electronic device sends the first broadcast each time can further comprise: sending a scan response in response to the received scan request. Wherein, the scan request can refer to the aforementioned SCAN_REQ, and the scan response can refer to the aforementioned SCAN_RSP, which will not be described here in detail.
[0234] Exemplarily, the first electronic device can be the first electronic device described in the foregoing embodiments.
[0235] In some embodiments of the present application, the first electronic device can send the first broadcast in the following manner: the first electronic device sends the first broadcast for a third time length. Wherein, the first electronic device can send the first broadcast every fifth time length within the third time length. That is, the first electronic device can send the first broadcast every fifth time length until the total time length reaches the third time length. Optionally, the third time length and the fifth time length can be the time length pre-configured by the first electronic device, or can be the time length pre-set by the user. The fifth time length is less than the third time length. Based on the above method, step S1401 can also be understood as: the first electronic device sends the first broadcast at least once; wherein, the time interval between the adjacent two times of sending the first broadcast by the first electronic device is the fifth time length, and the total time length of sending the first broadcast at least once by the first electronic device is the third time length; the first broadcast comprises any one of the connectable non-directional broadcast and the non-connectable non-directional broadcast, and the non-connectable non-directional broadcast comprises information for indicating whether to be online for connection-free networking.
[0236] Exemplarily, when the first broadcast is the connectable non-directional broadcast, the process that the first electronic device sends the first broadcast can be implemented by referring to the method described in the foregoing first part, which will not be described here in detail. When the first broadcast is the non-connectable non-directional broadcast, the process that the first electronic device sends the first broadcast can be implemented by referring to the method described in the foregoing second part, which will not be described here in detail.
[0237] S1402: The first electronic device sends the second broadcast; wherein, the second broadcast comprises an item different from the first broadcast in the connectable non-directional broadcast and the non-connectable non-directional broadcast.
[0238] In some embodiments of the present application, the first electronic device can send the second broadcast in the following manner: sending the second broadcast for a fourth time duration. In this case, the first electronic device can send the second broadcast once every sixth time duration within the fourth time duration. That is, the first electronic device can send the second broadcast once every sixth time duration until the total time duration reaches the fourth time duration. The fourth time duration and the sixth time duration can be respectively preconfigured by the first electronic device or preconfigured by the user. The sixth time duration is less than the fourth time duration. Optionally, the fourth time duration can be the same as or different from the third time duration described above. Optionally, the sixth time duration can be the same as or different from the fifth time duration described above. Based on the above method, step S1402 can also be understood as: the first electronic device sends the second broadcast at least once; the time interval between two adjacent sending of the second broadcast by the first electronic device is the sixth time duration; the total time duration for the first electronic device to send the second broadcast at least once is the fourth time duration; and the second broadcast includes one of the connectable non-directional broadcast and the non-connectable non-directional broadcast which is different from the first broadcast.
[0239] In some embodiments of the present application, after performing step S1401, the first electronic device can wait for a first time duration before performing step S1402. That is, after performing step S1401, the first electronic device can wait for the first time duration before performing step S1402. Optionally, the first time duration can be preconfigured by the first electronic device or the user, or the first time duration can be randomly selected within a preconfigured first time duration range. The first time duration range can be preconfigured by the electronic device or the user. For example, the first time duration range can be the preconfigured time duration range described in the above-mentioned scheme one or scheme two.
[0240] In a possible scheme, the first electronic device can repeatedly and alternately perform the above-mentioned step S1401 and step S1402. Optionally, the first electronic device can perform the above-mentioned step S1401 and step S1402 alternately for a set number of times, or the total time duration for the first electronic device to perform the above-mentioned step S1401 and step S1402 alternately can be a set time duration. For example, the set time duration can be 10s as described in the above-mentioned embodiments.
[0241] For example, the method for the first electronic device to alternately perform the above-mentioned step S1401 and step S1402 can be implemented by referring to the method described in the above-mentioned example 1 (for example, the method shown in the (a) schematic diagram in FIG. 9) or the method described in the above-mentioned example 2 (for example, the method shown in the (a) schematic diagram in FIG. 11) or the method described in the above-mentioned example 3 (for example, the method shown in the (a) schematic diagram in FIG. 13).
[0242] Based on the above method, in one example, as shown in FIG. 14, after performing step S1402, the first electronic device can further continue to perform the following step S1403.
[0243] S1403: The first electronic device sends a third broadcast; wherein the third broadcast includes one of the connectable non-directional broadcast and the non-connectable non-directional broadcast which is different from the second broadcast.
[0244] Wherein, the first electronic device sending the third broadcast can also be understood as the first electronic device sending the first broadcast again. For the specific implementation of step S1403, refer to the specific implementation of step S1401 or step S1402, which will not be described in detail in this embodiment of the application.
[0245] In some embodiments of the application, after performing step S1402, before performing step S1403, the first electronic device can wait for a second time length. Optionally, the second time length can be the same as or different from the first time length. Optionally, the second time length can be a time length pre-configured by the electronic device or the user, or the second time length can be a time length randomly selected within a set second time length range. Wherein, the second time length range can be a time length range pre-configured by the first electronic device or the user. Optionally, the second time length range can be the same as or different from the first time length range.
[0246] By analogy, in yet another example, as shown in FIG. 14, after performing step S1403, the first electronic device can further continue to perform the following step S1404.
[0247] S1404: The first electronic device sends a fourth broadcast; wherein the fourth broadcast includes one of the connectable non-directional broadcast and the non-connectable non-directional broadcast which is different from the third broadcast.
[0248] Wherein, the first electronic device sending the fourth broadcast can also be understood as the first electronic device sending the second broadcast again. For the specific implementation of step S1404, refer to the specific implementation of step S1402 or step S1403, which will not be described in detail in this embodiment of the application.
[0249] For example, for the process of the first electronic device performing the above steps S1401-S1404, refer to the method shown in the (a) schematic diagram of FIG. 9 or the method shown in the (a) schematic diagram of FIG. 11 or the method shown in the (a) schematic diagram of FIG. 13, which will not be described in detail in this embodiment.
[0250] In some embodiments of the present application, after performing each of steps S1401-S1404, the first electronic device can further perform the following step: receiving a first message. The first message includes one of a scan request from the second device and an unconnectable undirected broadcast from the second device, and the unconnectable undirected broadcast can include information indicating whether to connect to the network online.
[0251] In the above method, the specific steps performed by the first electronic device can refer to the related descriptions in the foregoing embodiments, which will not be repeated here.
[0252] Based on the above embodiments and the same technical concept, the embodiments of the present application further provide a multi-device scenario BLE fast networking online method, as shown in FIG. 15, which can include:
[0253] S1501: The second electronic device sends a first message in response to the received first broadcast. The first broadcast includes one of a connectable undirected broadcast and an unconnectable undirected broadcast from the first electronic device, and the first message is one of a scan request and an unconnectable undirected broadcast. Any unconnectable undirected broadcast includes information indicating whether to connect to the network online.
[0254] Wherein, the connectable undirected broadcast can refer to the ADV_IND described in the foregoing embodiments, the unconnectable undirected broadcast can refer to the ADV_NONCONN_IND described in the foregoing embodiments (the information indicating whether to connect to the network online included in the unconnectable undirected broadcast can be the state field described in the foregoing embodiments), and the scan request can refer to the SCAN_REQ described in the foregoing embodiments, which will not be described in detail here.
[0255] Optionally, the second electronic device can send the first message in the following manner: sending the first message for a fourth time duration. In this case, the second electronic device can send the first message every sixth time duration within the fourth time duration. That is, the second electronic device can send the first message every sixth time duration until the total time duration reaches the fourth time duration. Optionally, the fourth time duration and the sixth time duration can be the time durations preconfigured by the first electronic device, or can be the time durations preconfigured by the user. The sixth time duration is less than the fourth time duration. Based on the above method, step S1501 can also be understood as: the second electronic device sends the first message at least once; the time interval between two adjacent sending of the first message by the second electronic device is the sixth time duration, and the total time duration for the second electronic device to send the first message at least once is the fourth time duration; the first broadcast comprises one of the connectable non-directional broadcast and the non-connectable non-directional broadcast from the first electronic device, and the first message is one of the scan request and the non-connectable non-directional broadcast, and any non-connectable non-directional broadcast comprises information for indicating whether to connect to the online group network.
[0256] For example, when the first message is the scan request, the process of sending the first message by the second electronic device can be implemented by referring to the method described in the third part above, which will not be described in detail here. When the first message is the non-connectable non-directional broadcast, the process of sending the first message by the second electronic device can be implemented by referring to the method described in the fourth part above, which will not be described in detail here.
[0257] In some embodiments of the present application, before performing step S1501, the second electronic device further performs the following step: receiving the first broadcast. Optionally, when receiving the first broadcast, the second electronic device can first wait for a first time duration, and then perform step S1501 after waiting for the first time duration. Optionally, the first time duration can be a time duration preconfigured by the second electronic device or the user, or the first time duration can be a time duration randomly selected within a set first time duration range. The first time duration range can be a time duration range preconfigured by the electronic device or the user. For example, the first time duration range can be the set time duration range described in the first scheme or the second scheme above.
[0258] S1502: The second electronic device sends a second message in response to the received second broadcast; wherein the second broadcast comprises one of the connectable non-directional broadcast and the non-connectable non-directional broadcast from the first electronic device; and the second message is one different from the first message among the scan request and the non-connectable non-directional broadcast.
[0259] In some embodiments of the present application, the second electronic device can send the second message in the following manner: sending the second message for a fifth time duration. In this case, the second electronic device can send the second message every seventh time duration within the fifth time duration. That is, the second electronic device can send the second message every seventh time duration until the total time duration reaches the fifth time duration. The fifth time duration and the seventh time duration can be respectively preconfigured by the second electronic device or preconfigured by the user. The seventh time duration is less than the fifth time duration. Optionally, the fifth time duration can be the same as or different from the fourth time duration described above. Optionally, the seventh time duration can be the same as or different from the sixth time duration described above. Based on the above method, step S1502 can also be understood as: the second electronic device sends the second message at least once; the time interval between two adjacent sending of the second message by the second electronic device is the seventh time duration; the total time duration for the second electronic device to send the second message at least once is the fifth time duration; the second broadcast includes one of the connectable non-directional broadcast and the non-connectable non-directional broadcast from the first electronic device; and the second message is one of the scan request and the non-connectable non-directional broadcast, which is different from the first message.
[0260] In some embodiments of the present application, before performing step S1502, the second electronic device further performs the following step: receiving the second broadcast. Optionally, when receiving the second broadcast, the second electronic device can first wait for a second time duration, and then perform step S1502 after waiting for the second time duration. The second time duration can be preconfigured by the second electronic device or the user, or the second time duration can be randomly selected within a set second time duration range. Optionally, the second time duration can be the same as or different from the first time duration. The second time duration range can be preconfigured by the electronic device or the user. Optionally, the second time duration range can be the same as or different from the first time duration range. For example, the second time duration range can be the set time duration range described in the aforementioned scheme one or scheme two.
[0261] In one possible scheme, the second electronic device can repeatedly and alternately perform the above-mentioned steps S1501 and S1502. For example, the method for the second electronic device to alternately perform the above-mentioned steps S1501 and S1502 can be implemented by referring to the method described in the aforementioned example 1 (for example, the method shown in the (b) schematic diagram in FIG. 9) or the method described in the example 2 (for example, the method shown in the (b) schematic diagram in FIG. 11) or the method described in the example 3 (for example, the method shown in the (a) schematic diagram in FIG. 13).
[0262] Based on the above method, in one example, as shown in FIG. 15, after performing step S1502, the first electronic device can further perform the following step S1503.
[0263] S1503: The second electronic device sends a third message in response to the received third broadcast; wherein the third broadcast comprises one of the connectable non-directional broadcast and the non-connectable non-directional broadcast from the first electronic device; and the third message is one of the scan request and the non-connectable non-directional broadcast different from the second message.
[0264] The second electronic device sending the third message can also be understood as the second electronic device sending the first message again.
[0265] In some embodiments of the present application, the first electronic device, before performing step S1503, further performs the following step: receiving the third broadcast. Optionally, the second electronic device can wait for a third time duration after receiving the third broadcast, and then perform step S1503 after waiting for the third time duration. The third time duration can be a time duration pre-configured by the second electronic device or a user, or the third time duration can be a time duration randomly selected within a third time duration range. Optionally, the third time duration can be the same as or different from the first time duration or the second time duration. The third time duration range can be a time duration range pre-configured by the second electronic device or a user. Optionally, the third time duration range can be the same as or different from the first time duration range or the second time duration range. For example, the third time duration range can be the set time duration range described in the foregoing scheme one or scheme two, etc.
[0266] For the specific implementation of step S1503, refer to the specific implementation of step S1501 or step S1502, which will not be described in detail in the embodiments of the present application.
[0267] By analogy, in yet another example, as shown in FIG. 15, after performing step S1503, the first electronic device can further continue to perform the following step S1504.
[0268] S1504: The second electronic device sends a fourth message in response to the received fourth broadcast; wherein the fourth broadcast comprises one of the connectable non-directional broadcast and the non-connectable non-directional broadcast from the first electronic device; and the fourth message is one of the scan request and the non-connectable non-directional broadcast different from the third message.
[0269] The second electronic device sending the fourth message can also be understood as the second electronic device sending the second message again. For the specific implementation of step S1504, refer to the specific implementation of step S1504 or step S1503, which will not be described in detail in the embodiments of the present application.
[0270] For example, the process of the second electronic device performing the above steps S1501-S1504 can be implemented with reference to the method shown in the (b) schematic diagram of FIG. 9 or the method shown in the (b) schematic diagram of FIG. 11 or the method shown in the (b) schematic diagram of FIG. 13, and details are not described herein.
[0271] In the above method, the specific steps performed by the second electronic device can refer to the related descriptions in the foregoing embodiments, and details are not described herein.
[0272] Based on the above embodiments and the same technical concept, the embodiments of the present application further provide an electronic device for implementing the multi-device scenario BLE fast networking online method applied to the first electronic device or the second electronic device provided by the embodiments of the present application. As shown in FIG. 16, the electronic device 1600 can include a memory 1601, one or more processors 1602, and one or more computer programs (not shown in the figure). The above devices can be coupled through one or more communication buses 1603. Optionally, the electronic device 1600 can further include a display screen 1604.
[0273] Among them, the memory 1601 stores one or more computer programs (codes), and the one or more computer programs include computer instructions; the one or more processors 1602 call the computer instructions stored in the memory 1601, so that the electronic device 1600 executes the multi-device scenario BLE fast networking online method applied to the first electronic device or the second electronic device provided by the embodiments of the present application.
[0274] In a specific implementation, the memory 1601 can include a high-speed random access memory, and can also include a non-volatile memory, for example, one or more disk storage devices, flash devices, or other non-volatile solid-state storage devices. The memory 1601 can store an operating system (hereinafter referred to as a system), for example, an ANDROID, IOS, WINDOWS, or LINUX embedded operating system. The memory 1601 can be used to store the implementation program of the embodiments of the present application. The memory 1601 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more user devices, and one or more network devices.
[0275] The one or more processors 1602 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0276] The display screen 1604 is configured to display an application interface and other related user interfaces.
[0277] It should be noted that FIG. 16 is only one implementation of the electronic device 1600 provided by the embodiments of the present application, and in actual applications, the electronic device 1600 can also include more or fewer components, and the specific structure and description can be referred to the structure shown in FIG. 3 and the description, which is not limited here.
[0278] Based on the above embodiments and the same technical concept, the embodiments of the present application also provide a computer readable storage medium, which stores a computer program, when the computer program runs on a computer, the computer executes the method applied to the first electronic device or the second electronic device provided by the above embodiments.
[0279] Based on the above embodiments and the same technical concept, the embodiments of the present application also provide a computer program product, which includes a computer program or instructions, when the computer program or instructions run on a computer, the computer executes the method applied to the first electronic device or the second electronic device provided by the above embodiments.
[0280] Based on the above embodiments and the same technical concept, the embodiments of the present application also provide a computer program product, which includes a computer program or instructions, when the computer program or instructions run on a computer, the computer executes the method applied to the first electronic device or the second electronic device provided by the above embodiments.
[0281] The method provided by the embodiments of the present application can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the method can be implemented in the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the process or function according to the embodiments of the present application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (such as infrared, wireless, microwave, etc.)) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD), or a semiconductor medium (such as an SSD), etc.
[0282] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.
Claims
1. A method for multi-device scenario BLE fast networking on-line, applied to a first electronic device, and the method comprises the steps of: The method comprises: sending a first broadcast; wherein the first broadcast comprises any one of a connectable non-directional broadcast and an unconnectable non-directional broadcast, the unconnectable non-directional broadcast comprising information indicating whether to connect to the online network of the connection-free group; sending a second broadcast; wherein the second broadcast comprises a different one of the connectable non-directional broadcast and the unconnectable non-directional broadcast from the first broadcast.
2. The method of claim 1, wherein, After sending the first broadcast, before sending the second broadcast, the method further comprises: waiting for a first time length.
3. The method of claim 2, wherein, The first time length is a time length randomly selected within a set first time length range.
4. The method according to any one of claims 1 to 3, characterized in that, After sending the second broadcast, the method further comprises: sending a third broadcast; wherein the third broadcast comprises a different one of the connectable non-directional broadcast and the unconnectable non-directional broadcast from the second broadcast.
5. The method of claim 4, wherein, After sending the second broadcast, before sending the third broadcast, the method further comprises: waiting for a second time length.
6. The method of claim 5, wherein, The second time length is a time length randomly selected within a set second time length range.
7. The method according to any one of claims 1 to 6, characterized in that, The sending of the first broadcast comprises: sending the first broadcast for a third time length; The sending of the second broadcast comprises: sending the second broadcast for a fourth time length.
8. The method of claim 7, wherein, The sending of the first broadcast for a third time length comprises: sending the first broadcast every fifth time length until a total time length reaches the third time length; The sending of the second broadcast for a fourth time length comprises: sending the second broadcast every sixth time length until a total time length reaches the fourth time length.
9. The method according to any one of claims 1 to 8, characterized in that, After sending the first broadcast, or, after sending the second broadcast, the method further comprises: receiving a first message; wherein the first message comprises one of a scan request from a second device and an unconnectable non-directional broadcast from the second device; wherein the unconnectable non-directional broadcast from the second device comprises information indicating whether to connect to the online network of the connection-free group.
10. A multi-device scene BLE fast networking online method applied to a second electronic device, characterized in that, The method comprises: in response to the received first broadcast, sending a first message; wherein the first message is one of a scan request and an unconnectable non-directional broadcast; in response to the received second broadcast, sending a second message; wherein the second message is a different one of the scan request and the unconnectable non-directional broadcast from the first message; wherein the first broadcast and the second broadcast respectively comprise one of a connectable non-directional broadcast from a first electronic device and an unconnectable non-directional broadcast from the first electronic device; any unconnectable non-directional broadcast comprises information indicating whether to connect to the online network of the connection-free group.
11. The method of claim 10, wherein, Before in response to the received first broadcast, sending a first message, the method further comprises: when the first broadcast is received, waiting for a first time length.
12. The method of claim 11, wherein, The first time length is a time length randomly selected within a set first time length range.
13. The method according to any one of claims 10 to 12, characterized in that, Before in response to the received second broadcast, sending a second message, the method further comprises: when the second broadcast is received, waiting for a second time length.
14. The method of claim 13, wherein, The second time length is a time length randomly selected within a set second time length range.
15. The method according to any one of claims 10 to 14, characterized in that, In response to the received second broadcast, the method further comprises: In response to the received third broadcast, sending a third message; wherein the third broadcast comprises one of a connectable non-directional broadcast from the first electronic device and an unconnectable non-directional broadcast from the first electronic device; the third message is one of a scan request and an unconnectable non-directional broadcast different from the second message; and the information for indicating whether to connect to the group network is included in any unconnectable non-directional broadcast.
16. The method of claim 15, wherein, Before the third message is sent in response to the received third broadcast, the method further comprises: When the third broadcast is received, waiting for a third time duration.
17. The method of claim 16, wherein, The third time duration is randomly selected within a set third time duration range.
18. The method of any one of claims 10 to 17, wherein, The sending of the first message comprises sending the first message for a fourth time duration. The sending of the second message comprises sending the second message for a fifth time duration.
19. The method of claim 18, wherein, The sending of the first message for the fourth time duration comprises sending the first message every sixth time duration until a total time duration reaches the fourth time duration. The sending of the second message for the fifth time duration comprises sending the second message every seventh time duration until a total time duration reaches the fifth time duration.
20. An electronic device, comprising: The electronic device comprises a memory and one or more processors; The memory is configured to store computer program codes, the computer program codes comprising computer instructions; and when the computer instructions are executed by the one or more processors, the electronic device is caused to perform the method of any one of claims 1-9, or perform the method of any one of claims 10-19.
21. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program is executed on the electronic device, the electronic device is caused to perform the method of any one of claims 1-9, or perform the method of any one of claims 10-19.
22. A computer program product, characterised in that, The computer program product comprises computer program or instructions, and when the computer program or instructions are executed on the electronic device, the electronic device is caused to perform the method of any one of claims 1-9, or perform the method of any one of claims 10-19.
Citation Information
Patent Citations
Low power bluetooth device based mobile phone data transmission method and system
CN109151788A
Methods and Arrangements for Communication Between Advertising and Advertisement Responding Wireless Devices
US20180041861A1
Information delivery device
WO2017010442A1
Bluetooth connection method and communication system
WO2024139867A1