A bluetooth data transmission method and related apparatus
By adding a scan request data field to Bluetooth communication, the problem that scanning devices cannot directly send data information to broadcasting devices is solved, enabling data interaction without increasing or only slightly increasing power consumption, which is suitable for low-cost Bluetooth devices.
Patent Information
- Application Number
- CN202010906576.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In Bluetooth Low Energy (BLE) communication, scanning devices cannot directly send data information to broadcasting devices, and establishing a BLE connection increases device power consumption. Existing technologies cannot achieve data interaction without increasing or only slightly increasing power consumption.
By adding a scan request data field to the scan request message, the data information of the scanning device is synchronized to the broadcasting device, thus realizing the interaction of data information.
It enables data exchange without increasing or only slightly increasing device power consumption, reducing the increase in device power consumption, and is suitable for low-cost Bluetooth devices.
Smart Images

Figure CN114125793B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a Bluetooth data transmission method and related apparatus. Background Technology
[0002] Bluetooth Low Energy (BLE) is widely used in healthcare, sports and fitness, beacons, security, and home entertainment due to its low power consumption and low cost. Currently, in BLE broadcast communication, data is primarily transmitted via BLE broadcast messages. In BLE connection communication, data is primarily transmitted via BLE connection data messages.
[0003] However, during BLE broadcast communication, the scanning device cannot send data to the broadcasting device. If the scanning device needs to send data, it requires additional BLE broadcast functionality, which increases power consumption. In BLE connection communication, devices must establish a BLE connection before data exchange can occur; establishing and maintaining this connection also increases workload, leading to increased power consumption. Therefore, achieving data exchange without increasing power consumption or with only a slight increase is a pressing issue. Summary of the Invention
[0004] This application provides a Bluetooth data transmission method and related apparatus, which can realize the interaction of data information without increasing device power consumption or with a small increase in device power consumption.
[0005] Firstly, this application provides a Bluetooth data transmission method, comprising: a broadcast device sending a broadcast message to a scanning device; the broadcast device receiving a scan request message sent by the scanning device, the scan request message being sent by the scanning device to the broadcast device based on the broadcast message, the scan request message carrying data information; and the broadcast device processing the data information. In this way, data information exchange can be achieved without increasing device power consumption or with only a slight increase in device power consumption.
[0006] In conjunction with the first aspect, in one possible implementation, the scan request message includes a scan request data field, which contains the data information.
[0007] In conjunction with the first aspect, in one possible implementation, the broadcasting device processes the data information by: parsing the scan request message to determine whether the scan request message carries the data information; if the scan request message carries the data information, then the broadcasting device processes the data information.
[0008] In conjunction with the first aspect, in one possible implementation, if the data information is power information, the power information is used to indicate the power level of the scanning device; the broadcasting device processes the data information, including: the broadcasting device displays a prompt message in the user interface based on the power information, the prompt message being used to remind the user of the power status of the scanning device.
[0009] In conjunction with the first aspect, in one possible implementation, if the data information is device information, the device information is the information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located; the broadcasting device processes the data information, including: the broadcasting device stores the device information in a device information list, the device information list being used to store the information of each device in the Bluetooth network or Wi-Fi network.
[0010] In conjunction with the first aspect, in one possible implementation, the broadcast message includes device data, which includes one or more of the following: the manufacturer identifier of the broadcast device, the user account information logged in on the broadcast device, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request.
[0011] Secondly, embodiments of this application provide yet another Bluetooth data transmission method, the method comprising: a scanning device receiving a broadcast message sent by a broadcast device; the scanning device sending a scan request message to the broadcast device according to the broadcast message, the scan request message carrying data information. In this way, data information exchange can be achieved without increasing device power consumption or with only a slight increase in device power consumption.
[0012] In conjunction with the second aspect, in one possible implementation, the scan request message includes a scan request data field, which contains the data information.
[0013] In conjunction with the second aspect, in one possible implementation, if the data information is power information, the power information is used to indicate the power level of the scanning device.
[0014] In conjunction with the second aspect, in one possible implementation, if the data information is device information, the device information is the information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located.
[0015] In conjunction with the second aspect, in one possible implementation, the broadcast message includes device data, which includes one or more of the following: the manufacturer identifier of the broadcast device, the user account information logged in on the broadcast device, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request; the scanning device sending a scan request message to the broadcast device based on the broadcast message includes: the scanning device sending a scan request message to the broadcast device based on the device data in the broadcast message.
[0016] Thirdly, embodiments of this application provide a broadcasting device, which includes one or more processors and a memory. The memory is coupled to the one or more processors and is used to store program code. The one or more processors call the program code to cause the broadcasting device to perform the following operations: sending a broadcast message to a scanning device; receiving a scan request message sent by the scanning device, wherein the scan request message is sent by the scanning device to the broadcasting device based on the broadcast message and the scan request message carries data information; and processing the data information.
[0017] In conjunction with the third aspect, in one possible implementation, the scan request message includes a scan request data field, and the scan request data field contains the data information.
[0018] In conjunction with the third aspect, in one possible implementation, the one or more processors call the program code to cause the broadcasting device to specifically perform the following operations: parse the scan request message to determine whether the scan request message carries the data information; if the scan request message carries the data information, the broadcasting device processes the data information.
[0019] In conjunction with the third aspect, in one possible implementation, if the data information is power information, the power information is used to indicate the power level of the scanning device; the one or more processors call the program code to cause the broadcasting device to specifically perform the following operations: displaying a prompt message in the user interface based on the power information, the prompt message being used to remind the user of the power status of the scanning device.
[0020] In conjunction with the third aspect, in one possible implementation, if the data information is device information, the device information is the information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located; the one or more processors call the program code to cause the broadcast device to specifically perform the following operations: store the device information in a device information list, the device information list being used to store the information of each device in the Bluetooth network or Wi-Fi network.
[0021] Fourthly, embodiments of this application provide a scanning device, which includes one or more processors and a memory. The memory is coupled to the one or more processors and is used to store program code. The one or more processors call the program code to cause the scanning device to perform the following operations: receiving a broadcast message sent by a broadcast device; and sending a scan request message to the broadcast device according to the broadcast message, wherein the scan request message carries data information.
[0022] In conjunction with the fourth aspect, in one possible implementation, the scan request message includes a scan request data field, and the scan request data field contains the data information.
[0023] In conjunction with the fourth aspect, in one possible implementation, if the data information is power information, the power information is used to indicate the power level of the scanning device.
[0024] In conjunction with the fourth aspect, in one possible implementation, if the data information is device information, the device information is the information of each device in the Bluetooth network or Wi-Fi network where the scanning device is located.
[0025] In conjunction with the fourth aspect, in one possible implementation, the broadcast message includes device data, which includes one or more of the following: the manufacturer identifier of the broadcast device, the user account information logged in on the broadcast device, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request; the one or more processors call the program code to cause the scanning device to specifically perform the following operations: the scanning device sends a scan request message to the broadcast device based on the device data in the broadcast message.
[0026] Fifthly, embodiments of this application provide a computer program product, the computer program product including computer instructions, which, when executed on an electronic device, cause the computer to perform the method in the first aspect or any possible implementation of the first aspect.
[0027] Sixthly, embodiments of this application provide a computer program product, the computer program product including computer instructions, which, when executed on an electronic device, cause the computer to perform the method in the second aspect or any possible implementation of the second aspect described above.
[0028] In a seventh aspect, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect or any possible implementation thereof.
[0029] Eighthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method of the second aspect or any possible implementation thereof.
[0030] In this embodiment, after the scanning device starts scanning and receives a broadcast message from the broadcasting device, it can synchronize data information from the scanning device to the broadcasting device by sending a scan request message. This scan request message contains the data information. In this way, data exchange is achieved without increasing device power consumption or with only a slight increase in power consumption. Attached Figure Description
[0031] Figure 1A This is a schematic diagram of a Bluetooth communication system provided in an embodiment of this application;
[0032] Figure 1B This is a schematic diagram illustrating the communication process of a scannable BLE broadcast message provided in an embodiment of this application;
[0033] Figure 1C This is a schematic diagram illustrating the communication process of BLE connection data packets according to an embodiment of this application;
[0034] Figure 2A This is a schematic diagram of the structure of the electronic device 10 provided in the embodiments of this application;
[0035] Figure 2B This is a schematic diagram of the structure of the Bluetooth communication module provided in the embodiments of this application;
[0036] Figure 2C This is a software structure block diagram of an electronic device 10 provided in an embodiment of this application;
[0037] Figure 2D This is a schematic diagram of the structure of the electronic device 20 provided in the embodiments of this application;
[0038] Figure 2EThis is a software structure block diagram of a Bluetooth communication module provided in an embodiment of this application;
[0039] Figure 3 This is a flowchart illustrating a Bluetooth data transmission method provided in an embodiment of this application;
[0040] Figure 4 This is a schematic diagram of a possible scan request message provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram illustrating an application scenario of a possible Bluetooth data transmission method provided in an embodiment of this application;
[0042] Figure 6 This is a schematic diagram illustrating another possible Bluetooth data transmission method provided in the embodiments of this application;
[0043] Figure 7 This is a flowchart illustrating another Bluetooth data transmission method provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions in the embodiments of this application will now be described clearly and in detail with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0045] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0046] The user interface (UI) in this embodiment is the medium through which an application or operating system interacts and exchanges information with the user. It converts the internal form of information into a form that the user can accept. The application's user interface is source code written in specific computer languages such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the electronic device 300, ultimately presenting user-recognizable content, such as images, text, and buttons. Controls are the basic elements of the user interface; typical controls include buttons, widgets, toolbars, menu bars, text boxes, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、 <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML uses tags or nodes to define the content. 、 、 <video>Used to define the elements and attributes of a webpage.
[0047] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device.
[0048] To better understand the embodiments of this application, the Bluetooth communication system provided in the embodiments of this application will be described. Please refer to... Figure 1A , Figure 1A This is a schematic diagram of a Bluetooth communication system provided in an embodiment of this application. The Bluetooth communication system 10 may include a broadcasting device 100 and a scanning device 200. Wherein:
[0049] Broadcast device 100 is a power-sensitive device that is not constantly charged and has BLE broadcasting capabilities; for example, it can be a smartwatch, smart glasses, or other smart wearable terminal device, or a terminal device with a small battery capacity. There is no limit to the number of broadcast devices 100 in the Bluetooth communication system; there can be multiple devices. Figure 1A Taking a smartwatch as an example, the scanning device 200 can be any electronic device with BLE scanning capabilities, such as a mobile terminal, tablet, laptop, or personal computer. There is no limit to the number of scanning devices 200 in the Bluetooth communication system; multiple devices can be used. Figure 1A Taking a mobile terminal as an example, the broadcasting device 100 and the scanning device 200 can be connected via BLE.
[0050] First, we will introduce the existing methods for transmitting data. (See also...) Figure 1B This diagram illustrates a communication process for a scannable BLE broadcast message provided in an embodiment of this application. Application A in broadcast device 100 initiates a broadcast, and Bluetooth communication module A sends broadcast messages such as the General Broadcast Indication (ADV_IND) to scanning device 200 via BLE. Scanning device 200 initiates a BLE scan. After detecting the broadcast message, it can obtain more information from broadcast device 100 by sending a request message (SCAN_REQ). Upon receiving the SCAN_REQ, broadcast device 100 sends a scan response message (SCAN_RSP) carrying response information to scanning device 200. Scanning device 200 can report this SCAN_RSP to application B. However, in the current Bluetooth standard, SCAN_REQ cannot carry data information. Therefore, scanning device 200 cannot send data information to broadcast device 100, and this broadcast communication process can only transmit unidirectional data information. If the scanning device 200 needs to send data information to the broadcasting device 100, the scanning device 200 needs to add BLE broadcasting function, and the broadcasting device 100 also needs to add BLE scanning function. This will increase the power consumption of the devices.
[0051] See Figure 1C This diagram illustrates a BLE connection data packet communication process according to an embodiment of this application. The broadcast device 100 (Slave) sends connectable broadcast packets such as ADV_IND via BLE. The scanning device 200 (Master) initiates BLE scanning. Upon receiving the broadcast packet, it can establish a connection with the broadcast device 100 by sending a connection request packet (CONNECT_IND). After successful connection establishment, the scanning device 200 can send a data packet (M->SData) to the broadcast device 100. Upon receiving the data packet, the broadcast device 100... IFS The scanning device 200 sends data packets (S->M Data) to the scanning device 200. When the scanning device 200 sends data to the broadcast device 100, or when the broadcast device 100 and the scanning device 200 communicate, a BLE connection needs to be established. However, establishing and maintaining a BLE connection requires additional work and increases power consumption. Secondly, the current number of BLE connections is limited and cannot meet the needs of services requiring more connections. Furthermore, some low-cost Bluetooth beacons (iBeacon) or Bluetooth chips (mesh chips) do not support connectivity.
[0052] Therefore, a Bluetooth data transmission method according to embodiments of this application is provided. In this embodiment, after enabling BLE scanning and receiving a broadcast message sent by the broadcast device 100, the scanning device 200 synchronizes its data information to the broadcast device 100 by adding a scan request data field to the scan request message. In this way, data information interaction can be achieved without increasing device power consumption or with only a slight increase in device power consumption.
[0053] In the embodiments of this application, Figure 1A The Bluetooth communication system 10 shown is a Bluetooth system based on the Bluetooth protocol. That is, both the broadcast device 100 and the scanning device 200 can support BLE broadcast communication functions. Specifically, the broadcast device 100 can broadcast BLE broadcast signals on the BLE broadcast channel, and the scanning device 200 can scan the BLE broadcast channel and receive BLE broadcast signals.
[0054] It is understood that this application embodiment uses Bluetooth communication system 10 as an example based on the Bluetooth protocol for introduction, but this application embodiment is not limited to BLE broadcast communication, but can also be Wi-Fi broadcast communication or other short-range wireless broadcast communication (e.g., near field communication (NFC)). This application embodiment does not limit the broadcast communication method.
[0055] In this embodiment of the application, the scanning device 200 can be an electronic device. The electronic device 10 involved in this embodiment is described below. Please refer to... Figure 2A , Figure 2A This is a schematic diagram of the structure of the electronic device 10 provided in the embodiments of this application.
[0056] Electronic device 10 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0057] It should be understood that, Figure 2A The electronic device 10 shown is merely an example, and the electronic device 10 may have more than Figure 2A The more or fewer components shown can be combined into two or more components, or they can have different component configurations. 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.
[0058] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0059] The controller can serve as the nerve center and command center of the electronic device 10. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0060] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0061] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0062] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 10.
[0063] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of turning the device on or off by voice.
[0064] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to enable or disable the device. Both the I2S interface and the PCM interface can be used for audio communication.
[0065] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth communication module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to implement a voice reminder function.
[0066] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 10 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 10 to display images.
[0067] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0068] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 10, and can also be used for data transfer between electronic device 10 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0069] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0070] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 10. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0071] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0072] The wireless communication function of electronic device 10 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0073] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 10 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0074] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 10. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0075] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the 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. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0076] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 10, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0077] The BLE scanning function in the wireless communication module 160 can be provided by... Figure 2B The Bluetooth communication module shown is implemented as follows. Figure 2B As shown, the Bluetooth communication module may include, but is not limited to, a Bluetooth host 160A and a Bluetooth module 160B. The Bluetooth host 160A can be a Bluetooth chip. This host can receive instructions from an application running on the electronic device 10; or preset higher-layer protocols; or call the host controller interface (HCI). The Bluetooth module 160B may include, but is not limited to, a host controller 1611, a link manager 1612, a baseband and link controller 1613, and a radio frequency (TX / RX) sensor 1614. When the application sends a command to initiate a BLE scan, the Bluetooth host 160A configures the scan request parameters and forms a scan request message. Then, it calls the host controller interface 1603 to send this message to the host controller 1611 in the Bluetooth module 160B. The message is then transmitted to the Bluetooth communication module of the broadcasting device via the link manager 1612, the baseband and link controller 1613, the radio frequency sensor 1614, and the antenna 1615.
[0078] Electronic device 10 scans the BLE broadcast channel and receives broadcast messages, which requires enabling the software modules related to the BLE broadcast signal scanning function on the Bluetooth communication module. In this embodiment, the BLE scanning function can be activated if the application in the scanning device 200 issues a start command.
[0079] In some embodiments, antenna 1 of electronic device 10 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 10 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0080] Electronic device 10 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0081] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may 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 miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 10 may include one or N displays 194, where N is a positive integer greater than 1.
[0082] Electronic device 10 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0083] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0084] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 10 may include one or N cameras 193, where N is a positive integer greater than 1.
[0085] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when the electronic device 10 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0086] Video codecs are used to compress or decompress digital video. Electronic device 10 may support one or more video codecs. Thus, electronic device 10 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0087] An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0088] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0089] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 10 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 10 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0090] Electronic device 10 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0091] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0092] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 10 can listen to music or make hands-free calls through the speaker 170A.
[0093] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 10 receives a telephone call or voice message, the receiver 170B can be brought close to the ear to receive the voice message.
[0094] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 10 may have at least one microphone 170C. In some embodiments, electronic device 10 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 10 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0095] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0096] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 10 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 10 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 10 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0097] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 10. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 10 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 10, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 10 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0098] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 10 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0099] The magnetic sensor 180D includes a Hall sensor. The electronic device 10 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 10 is a flip phone, the electronic device 10 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic unlocking of the flip cover can be set.
[0100] The 180E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of an electronic device 10. When the electronic device 10 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and is applied to applications such as screen orientation switching and pedometers.
[0101] A distance sensor 180F is used to measure distance. Electronic device 10 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 10 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0102] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 10 emits infrared light outward through the LED. The electronic device 10 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 10. When insufficient reflected light is detected, the electronic device 10 can determine that there is no object near it. The electronic device 10 may use the proximity sensor 180G to detect when a user holds the electronic device 10 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0103] The ambient light sensor 180L is used to sense the ambient light intensity. The electronic device 10 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light intensity. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 10 is in a pocket to prevent accidental touches.
[0104] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 10 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0105] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 10 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 10 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 10 heats battery 142 to prevent abnormal shutdown of electronic device 10 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 10 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0106] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 10, in a different position than display screen 194.
[0107] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0108] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The electronic device 10 can receive button input and generate key signal inputs related to user settings and function control of the electronic device 10.
[0109] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0110] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0111] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 10. The electronic device 10 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 10 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 10 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 10 and cannot be separated from the electronic device 10.
[0112] The software system of electronic device 10 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 10.
[0113] Figure 2C This is a software structure block diagram of an electronic device 10 provided in an embodiment of this application.
[0114] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0115] The application layer can include a series of application packages.
[0116] like Figure 2C As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0117] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.
[0118] like Figure 2C As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0119] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0120] Content providers are used to store and retrieve data, and make that data accessible to applications. This data may include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0121] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0122] The phone manager is used to provide communication functions for electronic device 10. For example, it manages call status (including connection, hang-up, etc.).
[0123] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and so on.
[0124] The notification manager allows applications to display notifications in the status bar. These can be used to convey informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the smart device, and flashing indicator lights.
[0125] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0126] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0127] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0128] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0129] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0130] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, G.264, MP3, AAC, AMR, JPG, and PNG.
[0131] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0132] A 2D graphics engine is a graphics engine for 2D drawing.
[0133] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0134] In this embodiment of the application, the broadcasting device 100 can be an electronic device. The electronic device 20 involved in this embodiment is described below. Please refer to... Figure 2D , Figure 2D This is a schematic diagram of the structure of the electronic device 20 provided in the embodiments of this application.
[0135] like Figure 2D As shown, the electronic device 20 may include a processor 301, a memory 302, a wireless communication module 303, and a power supply 304. These components can be connected via a bus.
[0136] The processor 301 can be used to read and execute computer-readable instructions. The processor 301 executes these application code to cause the electronic device 20 to perform the methods described in this application embodiment. Specifically, the processor 301 mainly includes a controller, an arithmetic logic unit (ALU), and registers. The controller is mainly responsible for instruction decoding and issuing control signals for the operations corresponding to the instructions. The ALU is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, and can also perform address operations and conversions. The registers are mainly responsible for storing register operands and intermediate operation results temporarily stored during instruction execution. Specifically, the hardware architecture of the processor 301 can be an Application Specific Integrated Circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.
[0137] In some embodiments, the processor 301 can be used to parse signals received by the wireless communication processing module 303. For example, the received signal may be data information sent by the electronic device 10, such as battery information, physical address information, etc. The processor 301 can be used to perform corresponding processing operations based on the parsing results. For example, after receiving such a signal, the electronic device 20 may remind the user of the battery status of the electronic device 10 through an application.
[0138] In some embodiments, the processor 301 can also be used to generate signals that are transmitted outward by the wireless communication processing module 303, such as BLE broadcast messages sent by the electronic device 20 to the electronic device 10.
[0139] The memory 302 is coupled to the processor 301 and is used to store various software programs and / or multiple sets of instructions. In specific implementations, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 302 may also store communication programs that can be used to communicate with the electronic device 10. The memory 302 may also store a Bluetooth address used to uniquely identify the electronic device 20.
[0140] The wireless communication processing module 303 may include one or more of a Bluetooth communication module 104A and a WLAN communication processing module 104B. The wireless communication module 303 is used to support short-range communication between the electronic device 20 and the electronic device 10. In some embodiments, the Bluetooth communication module 104A has the same structure as the Bluetooth communication module of the electronic device 10, as can be seen from [reference needed]. Figure 2B The corresponding descriptions will not be repeated here. It should be noted that the functions supported by the Bluetooth communication module 104A may be the same as or different from those supported by the Bluetooth communication module of the electronic device 10. For example, the Bluetooth communication module 104A supports BLE broadcast communication. Specifically, the Bluetooth communication module 104A can be used to send broadcast messages. The Bluetooth communication module 104A can also receive scan request messages sent by the Bluetooth communication module of the electronic device 10 through an antenna; then, after passing through link management, baseband and link controller, radio frequency, host control interface, etc., it reports the data information in the scan request message to the application running in the electronic device 20.
[0141] The power source 304 can be used to supply power to the various components included in the electronic device 20. In some embodiments, the power source 304 can be a battery, such as a rechargeable battery.
[0142] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 20. The electronic device 20 may have more than Figure 2C The more or fewer components shown can be combined into two or more components, or they can have different component configurations. Figure 2C The various components shown can be implemented in hardware, software, or a combination of both.
[0143] It should be noted that the software systems of the Bluetooth communication modules of electronic devices 10 and 20 can also be described using a layered architecture. This application embodiment uses a layered architecture as an example to exemplify the software structure of the Bluetooth communication module.
[0144] Figure 2E This is a software structure block diagram of a Bluetooth communication module provided in an embodiment of this application.
[0145] The software structure of the Bluetooth communication module is divided into three layers, from top to bottom: the application layer, the host layer, and the control layer.
[0146] The application layer can correspond to the application layer in the software structure of electronic device 10, which will not be elaborated here.
[0147] The host layer includes, but is not limited to, the BLE protocol stack, higher-layer protocols, and the Host Control Interface (HCI). The BLE protocol stack contains pre-stored code implementing the BLE protocol; the higher-layer protocols define the higher-layer signaling for wireless communication; and the HCI is used for data exchange between the host layer and the control layer.
[0148] The control layer includes, but is not limited to, the host controller, the data link layer, and the physical layer. The host controller connects to the host control interface, enabling data exchange between the host layer and the control layer; the data link layer and the physical layer are primarily used for signal transmission.
[0149] The Bluetooth data transmission method provided in this application will be described in detail below based on the Bluetooth communication system 10, electronic device 10, and electronic device 20 described above, in conjunction with other accompanying drawings. This application proposes a Bluetooth data transmission method that can achieve data information exchange without increasing device power consumption or with only a slight increase in device power consumption. Please refer to... Figure 3 ,like Figure 3 The Bluetooth data transmission method shown includes, but is not limited to, the following steps:
[0150] S301, The broadcasting equipment sends a broadcast message; correspondingly, the scanning equipment receives the broadcast message.
[0151] Specifically, the implementation process of step S301 can be referred to the following steps:
[0152] S3010, Application A starts broadcasting.
[0153] For example, a BLE broadcast is initiated by an application A in the broadcast device sending a start command. Optionally, the start command may be sent to the BLE protocol stack A and link control A, etc.
[0154] S3011, BLE protocol stack A sets broadcast parameters.
[0155] The BLE protocol stack A in the broadcast device sets the broadcast parameters; and sets Scan_Request_Notification_Enable = Enable in the LE SetExtended Advertising Parameters section of the Bluetooth standard protocol. Afterwards, BLE protocol stack A sends the broadcast parameters to link controller A.
[0156] S3012, Link Controller A generates a broadcast message based on the broadcast parameters. Then, it sends the broadcast message to the scanning device via antenna A. Correspondingly, antenna B in the scanning device receives the broadcast message and then reports it to Link Controller B in the scanning device.
[0157] S302, The scanning device sends a scan request message; correspondingly, the broadcasting device receives the scan request message; the scan request message carries data information.
[0158] Specifically, the implementation process of step S302 can be referred to the following steps:
[0159] S3020, Application B starts scanning.
[0160] For example, a BLE scan is initiated by an application B in the scanning device issuing a start command. Optionally, the start command may be issued to the BLE protocol stack B and the link control B, etc.
[0161] S3021. The BLE protocol stack B in the scanning device sets the scan request parameters.
[0162] The scan request parameters include data information, such as battery level information, device information in the Bluetooth or Wi-Fi network where the scanning device is located, and so on.
[0163] S3022. The BLE protocol stack B in the scanning device sends the scan request parameters to the link control B. The link control B generates a scan request message based on the scan request parameters. The link control B in the scanning device, based on the received broadcast message, sends the scan request message to the broadcast device via antenna B. Correspondingly, antenna A of the broadcast device receives the scan request message and reports it to the link control A.
[0164] Specifically, see Figure 4 , Figure 4 This is a schematic diagram of a possible scan request message provided in an embodiment of this application. For example... Figure 4 As shown, this scan request message includes a scan address field, an advaddress field, and a scan request data field. The scan address field contains the public or random address of the scanning device, and the advaddress field contains the public or random address of the broadcasting device. Compared to scan request messages in the prior art, the scan request message payload (SCAN_REQ Payload) adds a scan request data field. This scan request data field contains data information.
[0165] In one possible implementation, the Scan Request Data may include a data length field (Scan_Request_Data_Length) and a data field (Scan_Request_Data). Scan_Request_Data stores the data information, and Scan_Request_Data_Length stores the length of the data information. The length of the scan request data field is not limited; for example, for a 1M physical layer (PHY) scan request data field, the length is 0 to 25 bytes, and for a 2M PHY scan request data field, the length is 0 to 254 bytes. The length of the Scan_Request_Data_Length field is also not limited; for example, it can be 5 bytes. In another possible implementation, the Scan Request Data may only include the data field. In yet another possible implementation, the Scan Request Data may also include other fields.
[0166] It should be noted that the scan request parameter settings (LE Set Extended ScanParameters command) in the Bluetooth standard protocol are shown in Table 1 below. The scan request message also includes parameters such as its own address type (Own_Address_Type), interception policy (Scanning_Filter_Policy), scan window (Scan_Window), and scan interval (Scan_Interval). In Table 1, Command represents the command, OCF represents the opcode command field (OpcodeCommand Field), Command Parameters represents the command parameters, and Return Parameters represents the return parameters.
[0167] Table 1
[0168]
[0169] S303. The broadcasting equipment processes the data information contained in the scan request message.
[0170] Specifically, the implementation process of step S303 can be referred to the following steps:
[0171] S3030 and Link Control A report the scan request message to BLE protocol stack A.
[0172] S3031. The BLE protocol stack A in the broadcasting device parses the scan request message to determine whether the message carries data information. If it does, the data information is reported to application A in the broadcasting device. Application A processes the data information.
[0173] It's important to note that no BLE connection is established between the broadcasting device and the scanning device. Bluetooth communication between the devices is maintained through broadcasting and BLE scanning; this method can be called a virtual connection. Virtual connections solve the problem of limited BLE connection numbers, allowing for services with more connections. In this way, the two parties communicating do not need to establish a BLE connection, reducing power consumption and spectrum resources.
[0174] To better understand the embodiments of this application, based on Figure 3 The Bluetooth data transmission method described herein will be illustrated in the following application scenarios. It should be noted that these application scenarios are merely examples and do not limit the scope of the embodiments described in this application.
[0175] Application Scenario 1: The following describes an embodiment of this application using a scanning device as the mobile terminal, a broadcasting device as a smartwatch, and data information as the mobile terminal's battery level. In one possible implementation, if the data information is battery level information, the battery level information is used to indicate the battery level of the scanning device; the broadcasting device processes the data information, including: the broadcasting device displays a prompt message in the user interface based on the battery level information, the prompt message being used to remind the user of the scanning device's battery status.
[0176] A mobile terminal runs one or more applications. For example, application B can be used to monitor the mobile terminal's battery level. When the mobile terminal's battery is low, application B can issue a start command to initiate BLE scanning. The mobile terminal's BLE protocol stack configures scan request parameters to form a scan request message, which carries battery information. This message is sent to a broadcasting device via an antenna. The smartwatch can be in continuous broadcast mode. After the mobile terminal initiates BLE scanning, it can scan the broadcast message sent by the smartwatch, thus allowing the mobile terminal to send a scan request message to itself.
[0177] Furthermore, one or more applications run on the smartwatch. For example, application A can process the received battery information of the mobile terminal and provide a reminder when the mobile terminal's battery is low. Specifically, the antenna in the smartwatch receives scan request messages sent by the mobile terminal and reports them to the BLE protocol stack. The BLE protocol stack parses the scan request message to obtain the battery information carried in the message and reports this information to application A. Application A can then display this battery information to the user through the user interface; or determine whether to remind the user that the mobile terminal's battery is low based on the battery information. The smartwatch can remind the user through voice, vibration, or displaying a notification message on the user interface. For example, the smartwatch might display or voice a notification that the mobile terminal's battery is below 20%. Figure 5 As shown, mobile terminals can synchronize data information to smartwatches via BLE scan request messages without the need for additional scanning and broadcasting, thus saving power consumption and spectrum resources.
[0178] Application Scenario Two: The following describes an embodiment of this application using a scanning device as the mobile terminal, a broadcasting device as a smartwatch, and data information as device information. In one possible implementation, if the data information is device information, the device information refers to the information of each device in the Bluetooth or Wi-Fi network where the scanning device is located; the broadcasting device processes the data information, including: the broadcasting device stores the device information in a device information list, where the device information list stores the information of each device in the Bluetooth or Wi-Fi network.
[0179] The Bluetooth or Wi-Fi network to which the scanning device resides can contain one or more devices. The scanning device can store device information for each device in the Bluetooth or Wi-Fi network. When sending a scan request message, the scanning device can include this device information in the new scan request data field of the message, thereby synchronizing this device information to the broadcasting device. This device information may include, but is not limited to, MAC address (media access control address), IP address (internet protocol address), BLE scan address, BLE broadcast address, or online / offline status information, volume information, power-on / power-off status information, etc. In this way, the broadcasting device can obtain the device information of each device in the Bluetooth or Wi-Fi network to which the scanning device resides (including the scanning device's device information). Furthermore, the broadcasting device can conveniently communicate with one or more of these devices based on this device information, such as sending on / off control commands. Optionally, the broadcasting device can maintain a device information list to store information about each device in the Bluetooth or Wi-Fi network. Optionally, this device information list can be updated or deleted based on the actual connection status of devices in the BLE network.
[0180] For example, such as Figure 6 As shown, the BLE network includes three devices: a smartphone 600, a tablet 602, and a laptop 601. The scanning device is the smartphone 600, and the broadcasting device is the smartwatch 604. The smartphone 600 can store device information for each device in its BLE network. When the scanning device sends a scan request message, it can include this device information in the new scan request data field of the message, thereby synchronizing this information to the broadcasting device. In this way, the smartwatch 604 can obtain the device information for each device in the BLE network where the smartphone 600 is located.
[0181] In this embodiment, after enabling BLE scanning and receiving a broadcast message from the broadcasting device, the scanning device can synchronize its data information to the broadcasting device by adding a scan request data field to the scan request message. In this way, data exchange is achieved without increasing device power consumption or with only a slight increase in power consumption.
[0182] Please see Figure 7 , Figure 7 This application provides another Bluetooth data transmission method, which includes, but is not limited to, the following steps:
[0183] S701, the broadcasting equipment sends a broadcast message; correspondingly, the scanning equipment receives the broadcast message.
[0184] Specifically, the implementation process of step S701 can be referred to the following steps:
[0185] S7010, multiple applications in the broadcast device initiate BLE broadcasting (such as application A and application B).
[0186] S7011 and BLE protocol stack A set the broadcast parameter A corresponding to application A and the broadcast parameter B corresponding to application B, respectively; for example, in the Bluetooth standard protocol, Scan_Request_Notification_Enable = Enable is set in LE Set Extended Advertising Parameters. Then, BLE protocol stack A sends broadcast parameter A and broadcast parameter B to BLE link control A.
[0187] S7012, Link Controller A generates broadcast message A and broadcast message B based on broadcast parameters A and B. Then, it sends broadcast message A and broadcast message B to the scanning device via antenna A. Correspondingly, antenna B in the scanning device receives broadcast message A and broadcast message B and then reports them to Link Controller B in the scanning device.
[0188] Optionally, the broadcast message includes device data, which includes one or more of the following: the manufacturer identifier of the broadcast device, the user account information logged into the broadcast device, the identifier of the application that initiated the broadcast request, and the user account information of the application that initiated the broadcast request. For example, broadcast message A may include the identifier of application A, and broadcast message B may include the identifier of application B.
[0189] S702, The scanning device sends a scan request message; correspondingly, the broadcasting device receives the scan request message; the scan request message may carry data information.
[0190] Specifically, the implementation process of step S702 can be referred to the following steps:
[0191] S7020, multiple applications on the scanning device launch BLE scanning separately (such as application C and application D).
[0192] For example, applications A and C can be the same application, such as both being WeChat; they can also be different versions of the same application, such as Weibo and Weibo International; or they can be the same type of application, such as both being instant messaging software, such as WeChat and QQ. Similarly, applications B and D also meet the above conditions.
[0193] S7021 and BLE protocol stack B set the scan request parameters C corresponding to application C and D corresponding to application D, respectively. The BLE protocol stack B in the scanning device sends scan request parameters C and D to link controller B. Link controller B generates scan request messages C and D based on scan request parameters C and D. Scan request message C includes newly added fields Scan_Request_Data_Length and Scan_Request_Data (e.g., data indicating whether the device's battery level is below 20%); scan request message D includes newly added fields Scan_Request_Data_Length and Scan_Request_Data (e.g., data indicating a new message from application D).
[0194] The scan request parameters include data information and filtering conditions. The filtering conditions can be whether the broadcast message contains preset device data. This device data can be one or more of the following: the manufacturer's identifier of the broadcast device, the user account information logged into the broadcast device, the identifier of the application initiating the broadcast request, and the user account information of the application initiating the broadcast request. For example, the data information in scan request parameter C could be battery information, and filtering condition A could be whether the broadcast message contains the identifier of application A. The data information in scan request parameter D could be a prompt message, and filtering condition B could be whether the broadcast message contains the identifier of application B. Other filtering conditions may also exist, which will not be elaborated here.
[0195] S7022, Link Control B matches broadcast messages from different applications based on filtering conditions. For example, based on filtering condition A, broadcast message A is matched to scan request message C from application C; based on filtering condition B, broadcast message B is matched to scan request message D from application D. That is, the scanning device sends a scan request message to the broadcasting device based on the device data in the broadcast message. Optionally, data information can be obtained from the broadcast message using a binary mask of the same length as the broadcast message, and the obtained data information can be matched with each filtering condition.
[0196] S7023, Link Controller B sends Scan Request Message C and Scan Request Message D to the broadcast device. Correspondingly, Antenna A in the broadcast device receives Scan Request Message C and Scan Request Message D and reports them to Link Controller A.
[0197] S703. The broadcasting equipment processes the data information contained in the scan request message.
[0198] Specifically, the implementation process of step S703 can be referred to the following steps:
[0199] S7030 and Link Control A report Scan Request Message C and Scan Request Message D to BLE Protocol Stack A.
[0200] The S7031 and BLE protocol stack A parse scan request messages C and D to determine whether the scan request messages carry data information. If they do, the data information is reported to different applications in the application layer.
[0201] For example, data information C is reported to application A, and data information D is reported to application B. Application A and application B respectively process the data information carried in the received scan request message. For example, the smartwatch displays or gives a voice prompt that the scanning device's battery level is below 20%; or the smartwatch displays or gives a voice prompt that application D has received a new message.
[0202] In this embodiment, multiple applications in the broadcasting device initiate broadcasting and send multiple broadcast messages to the scanning device. Multiple applications in the scanning device initiate BLE scanning and, based on the broadcast messages sent by the broadcasting device, match broadcast messages from different applications using different filtering conditions. Then, they send different data information carried in the newly added scan request data field of the scan request message to the corresponding application in the broadcasting device. Different applications in the broadcasting device process the corresponding data information. In this way, data information interaction is achieved without increasing device power consumption or with only a slight increase in power consumption; and it simultaneously supports bidirectional Bluetooth broadcast communication between multiple applications, with different applications carrying different data information in their scan request messages.
[0203] The steps performed by the broadcasting device in the Bluetooth data transmission method provided in the above embodiments of this application can also be performed by a Bluetooth chip included in the broadcasting device. When the Bluetooth chip runs, it calls a computer program stored in its memory to implement the steps performed by the broadcasting device. Similarly, in the above embodiments, the steps performed by the scanning device can also be performed by a Bluetooth chip included in the scanning device. When the Bluetooth chip runs, it calls a computer program stored in its memory to implement the steps performed by the scanning device.
[0204] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.< / video> < / videoview> < / imgview> < / textview>
Claims
1. A method of Bluetooth data transmission, characterized by, The method comprises: The broadcasting device sends a first broadcast packet and a second broadcast packet to the scanning device, the first broadcast packet is generated according to the broadcast parameter corresponding to the first application program in the broadcasting device, the second broadcast packet is generated according to the broadcast parameter corresponding to the second application program in the broadcasting device, the first broadcast packet comprises the identification of the first application program, and the second broadcast packet comprises the identification of the second application program; The broadcasting device receives a first scanning request packet and a second scanning request packet sent by the scanning device, the first scanning request packet is sent by the scanning device to the broadcasting device according to the first broadcast packet, the second scanning request packet is sent by the scanning device to the broadcasting device according to the second broadcast packet, the first scanning request packet carries first data information, and the second scanning request packet carries second data information; The first application program of the broadcasting device processes the first data information, and the second application program of the broadcasting device processes the second data information.
2. The method of claim 1, wherein, The first scanning request packet comprises a first scanning request data field, and the first scanning request data field comprises the first data information; The second scanning request packet comprises a second scanning request data field, and the second scanning request data field comprises the second data information.
3. The method of claim 1, wherein, The method further comprises: The broadcasting device analyzes the first scanning request packet and the second scanning request packet to determine whether the first scanning request packet and the second scanning request packet carry data information; If the first scanning request packet and the second scanning request packet carry data information, the broadcasting device reports the first data information in the first scanning request packet to the first application program and reports the second data information in the second scanning request packet to the second application program.
4. The method according to any one of claims 1 to 3, characterized in that, If the first data information is power information, the power information is used to indicate the power of the scanning device; The first application program of the broadcasting device processes the first data information, comprising: The first application program of the broadcasting device displays a prompt message in a user interface according to the power information, and the prompt message is used to remind the user of the power of the scanning device.
5. The method according to any one of claims 1 to 3, characterized in that, If the second data information is device information, the device information is the information of each device in the Bluetooth network or the Wi-Fi network where the scanning device is located; The second application program of the broadcasting device processes the second data information, comprising: The second application program of the broadcasting device stores the device information in a device information list, and the device information list is used to store the information of each device in the Bluetooth network or the Wi-Fi network.
6. The method according to any one of claims 1 to 3, characterized in that, The first broadcast message and the second broadcast message include device data, and the device data includes one or more of a manufacturer identifier of the broadcast device, user account information logged on the broadcast device, an identifier of an application that initiates a broadcast request, and user account information of the application that initiates the broadcast request.
7. The method of claim 1, wherein, The first scan request message and the second scan request message further include a public or random address of the scan device and a public or random address of the broadcast device.
8. A Bluetooth data transmission method, characterized by, The method comprises: The scan device receives a first broadcast message and a second broadcast message sent by a broadcast device, the first broadcast message including an identifier of a first application, and the second broadcast message including an identifier of a second application; The scan device sends a first scan request message to the broadcast device according to the first broadcast message, and sends a second scan request message to the broadcast device according to the second broadcast message, the first scan request message carrying first data information, and the second scan request message carrying second data information, the first scan request message being generated according to a first scan request parameter corresponding to a third application of the scan device, and the second scan request message being generated according to a second scan request parameter corresponding to a fourth application of the scan device, the first scan request parameter including the first data information, and the second scan request parameter including the second data information.
9. The method of claim 8, wherein, The first scan request message includes a first scan request data field, and the first scan request data field includes the first data information. The second scan request message includes a second scan request data field, and the second scan request data field includes the second data information.
10. The method according to claim 8 or 9, characterized in that, If the first data information is power information, the power information is used to indicate the power of the scan device.
11. The method according to claim 8 or 9, characterized in that, If the second data information is device information, the device information is information of each device in a Bluetooth network or a Wi-Fi network in which the scan device is located.
12. The method of claim 8 or 9, wherein, The first broadcast message and the second broadcast message include device data, and the device data includes one or more of a manufacturer identifier of the broadcast device, user account information logged on the broadcast device, an identifier of an application that initiates a broadcast request, and user account information of the application that initiates the broadcast request. The scan device sends a first scan request message to the broadcast device according to the first broadcast message, and comprises: The scan device sends a first scan request message to the broadcast device according to device data in the first broadcast message. The scan device sends a second scan request message to the broadcast device according to the second broadcast message, and comprises: The scan device sends a second scan request message to the broadcast device according to device data in the second broadcast message.
13. The method of claim 8, wherein, The first scan request message and the second scan request message further include a public or random address of the scan device and a public or random address of the broadcast device.
14. A broadcasting apparatus characterized by comprising: The broadcast device comprises one or more processors, a memory coupled with the one or more processors, the memory being configured to store program code, and the one or more processors being configured to invoke the program code to cause the broadcast device to perform the following operations: sending a first broadcast packet and a second broadcast packet to a scanning device, the first broadcast packet being generated according to broadcast parameters corresponding to a first application in the broadcast device, the second broadcast packet being generated according to broadcast parameters corresponding to a second application in the broadcast device, the first broadcast packet comprising an identifier of the first application, and the second broadcast packet comprising an identifier of the second application; receiving a first scanning request packet and a second scanning request packet sent by the scanning device, the first scanning request packet being sent by the scanning device to the broadcast device according to the first broadcast packet, and the second scanning request packet being sent by the scanning device to the broadcast device according to the second broadcast packet, the first scanning request packet carrying first data information, and the second scanning request packet carrying second data information; processing the first data information by the first application and processing the second data information by the second application.
15. The broadcast device of claim 14, wherein, The first scanning request packet comprises a first scanning request data field, and the first scanning request data field comprises the first data information. The second scanning request packet comprises a second scanning request data field, and the second scanning request data field comprises the second data information.
16. The broadcast device of claim 14, wherein, The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations: analyzing the first scanning request packet and the second scanning request packet to determine whether the first scanning request packet and the second scanning request packet carry data information; if the first scanning request packet and the second scanning request packet carry data information, the broadcast device reports the first data information in the first scanning request packet to the first application and reports the second data information in the second scanning request packet to the second application.
17. The broadcast device of any of claims 14-16, wherein, If the first data information is power information, the power information is used to indicate the power of the scanning device. The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations: displaying a prompt message in a user interface according to the power information, the prompt message being used to remind a user of the power of the scanning device.
18. The broadcast device of any of claims 14-16, wherein, If the second data information is device information, the device information is information of each device in a Bluetooth network or a Wi-Fi network in which the scanning device is located. The one or more processors invoke the program code to cause the broadcast device to specifically perform the following operations: storing the device information in a device information list, the device information list being used to store information of each device in the Bluetooth network or the Wi-Fi network.
19. The broadcast device of claim 14, wherein, The first scan request message and the second scan request message further include a public or random address of the scanning device and a public or random address of the broadcasting device.
20. A scanning device, characterized by The scanning device includes one or more processors, a memory coupled to the one or more processors, and the memory is configured to store program codes, and the one or more processors are configured to invoke the program codes to enable the scanning device to perform the following operations: receiving a first broadcast message and a second broadcast message sent by a broadcasting device, the first broadcast message including an identification of a first application, and the second broadcast message including an identification of a second application; sending a first scan request message to the broadcasting device according to the first broadcast message, and sending a second scan request message to the broadcasting device according to the second broadcast message, the first scan request message carrying first data information, and the second scan request message carrying second data information, the first scan request message being generated according to a first scan request parameter corresponding to a third application of the scanning device, and the second scan request message being generated according to a second scan request parameter corresponding to a fourth application of the scanning device, the first scan request parameter including the first data information, and the second scan request parameter including the second data information.
21. The scanning device of claim 20, wherein, The first scan request message includes a first scan request data field, and the first scan request data field includes the first data information. The second scan request message includes a second scan request data field, and the second scan request data field includes the second data information.
22. The scanning device according to claim 20 or 21, characterized in that, If the first data information is power information, the power information is used to indicate the power of the scanning device.
23. The scanning device of claim 20 or 21, wherein, If the second data information is device information, the device information is information of each device in a Bluetooth network or a Wi-Fi network in which the scanning device is located.
24. The scanning device of claim 20 or 21, wherein, The first broadcast message and the second broadcast message include device data, and the device data includes one or more of a manufacturer identification of the broadcasting device, user account information logged on the broadcasting device, an identification of an application that initiates a broadcast request, and user account information of the application that initiates the broadcast request. The one or more processors are configured to invoke the program codes to enable the scanning device to perform the following operations in particular: The scanning device sends a first scan request message to the broadcasting device according to the device data in the first broadcast message. The scanning device sends a second scan request message to the broadcasting device according to the device data in the second broadcast message.
25. The scanning device of claim 20, wherein, The first scan request message and the second scan request message further include a public or random address of the scanning device and a public or random address of the broadcasting device.
26. A computer program product, characterised in that, The computer program product includes computer instructions, when the computer instructions run on an electronic device, enable the electronic device to perform the method in any one of claims 1-7.
27. A computer program product, characterised in that, The computer program product comprises computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 8-13.
28. A computer-readable storage medium comprising instructions, wherein: The computer program product comprises computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-7.
29. A computer-readable storage medium comprising instructions, wherein: The computer program product comprises computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 8-13.
Citation Information
Patent Citations
Bluetooth-based data communication method, storage medium and electronic equipment
CN110213758A
Bluetooth connection method, Bluetooth connection device, Bluetooth equipment and Bluetooth connection system
CN110891298A