WO2021027666A1 - 一种蓝牙回连的方法及相关装置 - Google Patents

一种蓝牙回连的方法及相关装置 Download PDF

Info

Publication number
WO2021027666A1
WO2021027666A1 PCT/CN2020/107295 CN2020107295W WO2021027666A1 WO 2021027666 A1 WO2021027666 A1 WO 2021027666A1 CN 2020107295 W CN2020107295 W CN 2020107295W WO 2021027666 A1 WO2021027666 A1 WO 2021027666A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
page
packet
bluetooth
broadcast signal
Prior art date
Application number
PCT/CN2020/107295
Other languages
English (en)
French (fr)
Inventor
萧维廷
彭斌
王良
许浩维
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US17/634,664 priority Critical patent/US11683850B2/en
Publication of WO2021027666A1 publication Critical patent/WO2021027666A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/69Spread spectrum techniques
    • H04B1/713Spread spectrum techniques using frequency hopping
    • H04B1/7156Arrangements for sequence synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W68/00User notification, e.g. alerting and paging, for incoming communication, change of service or the like
    • H04W68/02Arrangements for increasing efficiency of notification or paging channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B2201/00Indexing scheme relating to details of transmission systems not covered by a single group of H04B3/00 - H04B13/00
    • H04B2201/69Orthogonal indexing scheme relating to spread spectrum techniques in general
    • H04B2201/713Frequency hopping
    • H04B2201/71346Bluetooth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/27Transitions between radio resource control [RRC] states

Definitions

  • This application relates to the field of electronic technology, and in particular to a Bluetooth connection method and related devices.
  • Bluetooth is a commonly used data transmission method in people’s lives. It can realize short-distance wireless data transmission between electronic devices (for example, mobile terminals, notebook computers, wireless headsets, palmtop computers, etc.), which is convenient, fast, The advantages of flexibility and safety. Generally, as the distance between electronic devices connected via Bluetooth increases, Bluetooth may be disconnected.
  • peripheral devices for example, wireless earphones, smart speakers, smart watches, etc.
  • the connected central device For example, a mobile terminal, notebook computer, palmtop computer, etc.
  • this method of initiating a connection back is prone to connection failure.
  • the peripheral device may also initiate a page to the peripheral device. The two page requests will collide, causing the Bluetooth connection to fail. .
  • This application provides a method and related device for Bluetooth back-connection, which can improve the success rate of Bluetooth back-connection.
  • this application provides a Bluetooth connection method, which is applied to a Bluetooth connection system, the Bluetooth connection system includes a first device and a second device, and the method includes: when the Bluetooth connection is disconnected, the second device A device sends a first Bluetooth low energy BLE broadcast signal to the second device.
  • the first BLE broadcast signal is used to indicate that the first device will initiate a paging page to the second device; the first device sends a paging page to the second device.
  • the device sends a first page data packet, and the first page data packet contains the device identification of the second device; when the first device receives the first ID packet sent by the second device within a preset duration or a preset number of times , The first device sends a first FHS data packet to the second device, wherein the first ID packet contains the device identification of the second device, and the first ID packet is the second device according to the first page data
  • the packet is sent to the first device, and the first FHS data packet contains the Bluetooth address and clock information of the first device; the second device switches to the connection state according to the received first FHS data packet, and sends
  • the first device sends a second ID packet, and the second ID packet contains the device identification of the second device; the first device switches to the connection state according to the received second ID packet.
  • the method further includes: when the first device does not receive the first ID packet sent by the second device within the preset time period, the first device sends the first ID packet to the second device.
  • the second device sends a second BLE broadcast signal, the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; the second device sends to the first device according to the received second BLE broadcast signal
  • the second page data packet the second page data packet contains the device identification of the first device;
  • the first device sends a third ID packet to the second device according to the received second page data packet, the third
  • the ID packet contains the device identification of the first device;
  • the second device sends a second FHS data packet to the first device according to the received third ID packet, and the second FHS data packet contains the device identification of the second device.
  • the first device switches to the connection state according to the received second FHS data packet, and sends a fourth ID packet to the second device, the fourth ID packet contains the first device’s Device identification; the second device switches to the connection state according to the received fourth ID packet.
  • the method further includes: when the first device receives the first ID packet sent by the second device within a preset time period, the first device reads from the page The state switches to the master page response state of the master unit.
  • the method further includes: when the first device receives the second page data packet sent by the second device, the first device scans the page from the page scan The state switches to the slave page response state; when the second device receives the third ID packet sent by the first device, the second device switches from the page state to the master page response state.
  • the first device when the Bluetooth connection is disconnected, the first device sends the first Bluetooth low energy BLE broadcast signal to the second device, including: the received signal strength of the Bluetooth connection When the RRSI is lower than the preset threshold, or when a connection timeout error code is received, the first device sends the first BLE broadcast signal to the second device.
  • the second device when the Bluetooth connection is disconnected, the second device is in the Bluetooth low energy scan BLE scan state.
  • the device identification of the first device may include the device access code (DAC) or inquiry access code (IAC) of the first device;
  • the device identification of the second device may include the DAC or IAC of the second device.
  • the second device may also display connection back indication information, which is used to indicate that the second device is recovering the Bluetooth connection.
  • the first BLE broadcast signal includes a first AD structure, the first AD structure includes first data, and the first data is used to indicate that the first device will send the Second, the device sends a page request.
  • the second BLE broadcast signal includes a second AD Structure, the second AD Structure includes second data, and the second data is used to instruct the second device to send a page request to the first device.
  • the second device may stop the BLE scan. In this way, the power consumption of the second device can be saved.
  • the second device may stop the BLE scan. In this way, the power consumption of the second device can be saved.
  • the embodiments of the present application provide a Bluetooth connection method, which is applied to a Bluetooth connection system, the Bluetooth connection system includes a first device and a second device, and the method includes: when the Bluetooth connection is disconnected, The first device sends a second BLE broadcast signal to the second device.
  • the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; the second device broadcasts according to the received second BLE The signal sends a second page data packet to the first device, and the second page data packet contains the device identification of the first device; the first device sends the second page data packet to the second device according to the received second page data packet Three ID packet, the third ID packet contains the device identification of the first device; the second device sends a second FHS data packet to the first device according to the received second ID packet, the second FHS data packet Contains the Bluetooth address and clock information of the second device; the first device switches to the connection state according to the received second FHS data packet, and sends a fourth ID packet to the second device; the second device receives The received fourth ID packet is switched to the connection state. In this way, the problem of page request collision caused by both the first device and the second device sending page data packets at the same time can be avoided, and the success rate of Bluetooth connection back can be improved.
  • the method further includes: when the first device receives the second page data packet sent by the second device, the first device switches from the page scan state to slave page response state; when the second device receives the third ID packet sent by the first device, the second device switches from the page state to the master page response state.
  • the first device when the Bluetooth connection is disconnected, the first device sends a second BLE broadcast signal to the second device, including: when the received signal strength RRSI of the Bluetooth connection is lower than the preset When the threshold is set, or when a connection timeout error code is received, the first device sends a second BLE broadcast signal to the second device.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the second device may also display connection back indication information, which is used to indicate that the second device is recovering the Bluetooth connection.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send the first The device sends a page request.
  • the second device may stop the BLE scan. In this way, the power consumption of the second device can be saved.
  • an embodiment of the present application provides a first device, the first device includes a Bluetooth chip, a memory, and one or more processors; the memory is coupled with the one or more processors; wherein: the Bluetooth chip Supports classic Bluetooth BR/EDR function and BLE function; the memory is used to store computer program code, the computer program code includes computer instructions; when the computer instructions are executed by the one or more processors, the first device executes the following Operation: When the Bluetooth connection is disconnected, send a first Bluetooth low energy BLE broadcast signal to the second device, the first BLE broadcast signal is used to indicate that the first device will initiate a paging page to the second device; The second device sends a first page data packet, and the first page data packet contains the device identification of the second device; when the first ID packet sent by the second device is received within the preset time period, the The device sends a first FHS data packet, where the first ID packet contains the device identification of the second device, and the first ID packet is sent by the second device to the first device according to the first
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to perform the following operations: when the computer instruction is not received within the preset time period
  • the second BLE broadcast signal is sent to the second device, the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; receive the second device sent According to the second page data packet of the second device, the second page data packet contains the device identification of the first device, and the second page data packet is sent by the second device to the first device according to the second BLE broadcast signal;
  • the second page data packet sends a third ID packet to the second device, the third ID packet contains the device identification of the first device; receiving the second FHS data packet sent by the second device switches to the connection state, wherein ,
  • the second FHS data packet contains the Bluetooth address and clock information of the second device, the second FHS data packet is sent by the second device to the first device according to the third ID packet; according to the second FHS
  • the second FHS data packet contains the Bluetooth address and clock information of
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to perform the following operations: when the second device is received within a preset time period When the device sends the first ID packet, it switches from the page state to the master page response state.
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to also perform the following operations: when the first device sent by the second device is received In the second page data packet, switch from page scan state to slave page response state.
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to perform the following operations: when the received signal strength RRSI of the Bluetooth connection is lower than the preset When the threshold is set, or when a connection timeout error code is received, the first BLE broadcast signal is sent to the second device.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the first BLE broadcast signal includes a first AD structure
  • the first AD structure includes first data
  • the first data is used to indicate that the first device will send the Second
  • the device sends a page request.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send a page request to the first device.
  • an embodiment of the present application provides a first device, characterized in that the first device includes a Bluetooth chip, a memory, and one or more processors, and the memory is coupled with the one or more processors, wherein :
  • the Bluetooth chip supports BR/EDR function and BLE function;
  • the storage is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the one or more processors, the first device Perform the following operations: when the Bluetooth connection is disconnected, send a second BLE broadcast signal to the second device, the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; receive the second device sent A second page data packet, the second page data packet contains the device identifier of the first device, and the second page data packet is sent by the second device to the first device according to the second BLE broadcast signal;
  • the second page data packet sends a third ID packet to the second device, and the third ID packet contains the device identification of the first device; receives the second FHS data packet sent by the second device
  • the second FHS data packet contains the Bluetooth address and clock information of the second device.
  • the second FHS data packet is sent by the second device to the first device according to the third ID packet; and is sent to the first device according to the second FHS data packet.
  • the second device sends a fourth ID packet, the fourth ID packet contains the device identification of the first device, and the fourth ID packet is used to instruct the second device to switch to the connection state.
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to perform the following operations: when the first device sent by the second device is received In the second page data packet, switch from page scan state to slave page response state.
  • the first device when the computer instruction is executed by the one or more processors, the first device is caused to perform the following operations: when the received signal strength RRSI of the Bluetooth connection is lower than the predetermined When the threshold is set, or when a connection timeout error code is received, the second BLE broadcast signal is sent to the second device.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send the first data to the first The device sends a page request.
  • an embodiment of the present application provides a Bluetooth chip, characterized in that the Bluetooth chip is used to perform the following operations: when the Bluetooth connection is disconnected, send a first Bluetooth low energy BLE broadcast signal to a second device, The first BLE broadcast signal is used to instruct the first device to initiate a paging page to the second device; send a first page data packet to the second device, and the first page data packet contains the device identification of the second device
  • send a first FHS data packet to the second device where the first ID packet contains the device identification of the second device,
  • the first ID packet is sent by the second device to the first device according to the first page data packet, and the first FHS data packet contains the Bluetooth address and clock information of the first device; according to the received first page data packet
  • the second ID packet sent by the second device is switched to the connection state, and the second ID packet is sent by the second device to the first device according to the first FHS data packet.
  • the Bluetooth chip is further configured to perform the following operations: when the first ID packet sent by the second device is not received within the preset time period, the second device The device sends a second BLE broadcast signal, the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; receive a second page data packet sent by the second device, the second page data packet contains The device identifier of the first device, the second page data packet is sent by the second device to the first device according to the second BLE broadcast signal; the third ID is sent to the second device according to the second page data packet Packet, the third ID packet contains the device identification of the first device; receiving the second FHS data packet sent by the second device to switch to the connection state, wherein the second FHS data packet contains the Bluetooth of the second device Address and clock information, the second FHS data packet is sent by the second device to the first device according to the third ID packet; a fourth ID packet is sent to the second device according to the second FHS data packet, the first The
  • the Bluetooth chip is further configured to perform the following operations: when the first ID packet sent by the second device is received within a preset time period, switch from the page state to The master unit paging response master page response status.
  • the Bluetooth chip is further used to perform the following operations: when receiving the second page data packet sent by the second device, switch from the page scan state to the slave page response status.
  • the Bluetooth chip is specifically configured to perform the following operations: when the received signal strength RRSI of the Bluetooth connection is lower than a preset threshold, or when a connection timeout error code is received To send the first BLE broadcast signal to the second device.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the first BLE broadcast signal includes a first AD structure, and the first AD structure includes first data, and the first data is used to indicate that the first device will send the Second, the device sends a page request.
  • the second BLE broadcast signal includes a second AD Structure, the second AD Structure includes second data, and the second data is used to instruct the second device to send a page request to the first device.
  • the embodiments of the present application provide a Bluetooth chip, which is used to perform the following operations: when the Bluetooth connection is disconnected, send a second BLE broadcast signal to a second device, and the second BLE broadcast signal is used for Instruct the second device to initiate a page to the first device; receive a second page data packet sent by the second device, the second page data packet contains the device identifier of the first device, and the second page data packet is the The second device sends to the first device according to the second BLE broadcast signal; sends a third ID packet to the second device according to the second page data packet, and the third ID packet contains the device identification of the first device ; Receive the second FHS data packet sent by the second device to switch to the connection state, the second FHS data packet contains the Bluetooth address and clock information of the second device, the second FHS data packet is the second device according to the first Three ID packets sent to the first device; according to the second FHS data packet to send a fourth ID packet to the second device, the fourth ID packet contains the device identification of the first
  • the Bluetooth chip is also used to perform the following operations: when receiving the second page data packet sent by the second device, switch from the page scan state to the slave page response status.
  • the Bluetooth chip is also used to perform the following operations: when the received signal strength RRSI of the Bluetooth connection is lower than a preset threshold, or when a connection timeout error code is received To send a second BLE broadcast signal to the second device.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send the first The device sends a page request.
  • the embodiments of the present application provide a Bluetooth connection system
  • the Bluetooth system includes a first device and a second device, wherein: the first device is used to: when the Bluetooth connection is disconnected, send a message to the second device Send a first Bluetooth low energy BLE broadcast signal, the first BLE broadcast signal is used to instruct the first device to initiate a paging page to the second device; send a first page data packet to the second device, the first The page data packet contains the device identification of the second device; when the first ID packet sent by the second device is received within the preset time period, the first FHS data packet is sent to the second device, where the first The ID packet contains the device identification of the second device, the first ID packet is sent by the second device to the first device according to the first page data packet, and the first FHS data packet contains the device identification of the first device.
  • Bluetooth address and clock information switch to the connection state according to the second ID packet sent by the second device.
  • the second device is configured to switch to the connection state according to the received first FHS data packet, and send a second ID packet to the first device, and the second ID packet contains the device identification of the second device.
  • the first device is further configured to: when the first ID packet sent by the second device is not received within the preset time period, to the second device Send a second BLE broadcast signal, the second BLE broadcast signal is used to instruct the second device to initiate a page to the first device; according to the received second page data packet sent by the second device to send the second device Three ID packet, the third ID packet contains the device identification of the first device; according to the received second FHS data packet sent by the second device, switch to the connection state, and send the fourth ID to the second device Package, the fourth ID package contains the device identification of the first device.
  • the second device is further configured to: send a second page data packet to the first device according to the received second BLE broadcast signal, and the second page data packet contains the device identification of the first device; Send the second FHS data packet of the third ID packet to the first device, the second FHS data packet contains the Bluetooth address and clock information of the second device; switch to the connection state according to the received fourth ID packet .
  • the first device is further configured to: when the first ID packet sent by the second device is received within a preset time period, switch from the page state to the master The unit paging response master page response status.
  • the first device is further configured to: when receiving the second page data packet sent by the second device, switch from the page scan state to slave page response status.
  • the first device is further configured to: when receiving the third ID packet sent by the first device, switch from the page state to the master unit paging response master page response status.
  • the first device is specifically configured to: when the received signal strength RRSI of the Bluetooth connection is lower than a preset threshold, or when a connection timeout error code is received, Send the first BLE broadcast signal to the second device.
  • the second device when the Bluetooth connection is disconnected, the second device is in the Bluetooth low energy scan BLE scan state.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the first BLE broadcast signal includes a first AD structure
  • the first AD structure includes first data
  • the first data is used to indicate that the first device will send the Second
  • the device sends a page request.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send a page request to the first device.
  • the second device is further configured to: stop the BLE scan after receiving the page data packet sent by the first device. In this way, the power consumption of the second device can be saved.
  • the second device is further configured to: stop the BLE scan after receiving the second BLE broadcast signal. In this way, the power consumption of the second device can be saved.
  • inventions of the present application provide a Bluetooth connection system.
  • the Bluetooth connection system includes a first device and a second device.
  • the first device is configured to: when the Bluetooth connection is disconnected, send a message to the second device.
  • the device sends a second BLE broadcast signal, which is used to instruct the second device to initiate a page to the first device; send to the second device according to the received second page data packet sent by the second device.
  • the third ID packet which contains the device identification of the first device; switches to the connection state according to the received second FHS data packet sent by the second device, and sends the fourth ID to the second device package.
  • the second device is configured to: send a second page data packet to the first device according to the received second BLE broadcast signal sent by the first device, and the second page data packet contains the device identification of the first device ; Send a second FHS data packet to the first device according to the received second ID packet sent by the first device, the second FHS data packet contains the Bluetooth address and clock information of the second device; according to the received The fourth ID packet sent by the first device is switched to the connection state.
  • the first device is further configured to switch from the page scan state to the slave page response state when the second page data packet sent by the second device is received.
  • the second device is further configured to: when receiving the third ID packet sent by the first device, the second device switches from the page state to the master page response status.
  • the first device is specifically configured to: when the received signal strength RRSI of the Bluetooth connection is lower than a preset threshold, or when a connection timeout error code is received, The second device sends a second BLE broadcast signal.
  • the second device when the Bluetooth connection is disconnected, the second device is in the BLE scan state.
  • the device identifier of the first device may include the DAC or IAC of the first device; the device identifier of the second device may include the DAC or IAC of the second device.
  • the second BLE broadcast signal includes a second AD Structure
  • the second AD Structure includes second data
  • the second data is used to instruct the second device to send the The device sends a page request.
  • the second device is further configured to: stop the BLE scan after receiving the page data packet sent by the first device. In this way, the power consumption of the second device can be saved.
  • the second device is further configured to: stop the BLE scan after receiving the second BLE broadcast signal. In this way, the power consumption of the second device can be saved.
  • an embodiment of the present application provides a computer storage medium, including computer instructions, which, when the computer instructions run on an electronic device, cause the electronic device to execute any one of the possible implementations of the first aspect, or the second The Bluetooth connection method in any possible implementation manner of the aspect.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute any of the possible implementations of the first aspect, or any of the possible implementations of the second aspect.
  • Bluetooth connection method in the realization of the method.
  • the first device may be a Bluetooth headset
  • the second device may be a mobile terminal.
  • the Bluetooth headset After the Bluetooth connection between the mobile terminal and the Bluetooth headset is disconnected, the Bluetooth headset sends a BLE broadcast signal to the mobile terminal. If the mobile terminal determines that it has received the first BLE broadcast signal, the mobile terminal does not need a page Bluetooth headset, and waits to receive the page data packet sent by the Bluetooth headset; if the mobile terminal determines that it has received the second BLE broadcast signal, the mobile terminal Active page Bluetooth headset, the Bluetooth headset waits to receive the page data packet sent by the mobile terminal. In this way, the problem of page request collision caused by both the mobile terminal and the Bluetooth headset sending page data packets at the same time can be avoided, and the success rate of Bluetooth connection is improved.
  • FIG. 1A is a schematic diagram of a Bluetooth connection system provided by an embodiment of the present application.
  • FIG. 1B is a schematic diagram of a Bluetooth setting interface displayed on a center device according to an embodiment of the present application
  • FIG. 1C is a schematic diagram of a shortcut operation menu displayed on a center device according to an embodiment of the present application
  • FIG. 1D is a schematic flowchart of a Bluetooth connection back method provided by an embodiment of the present application.
  • FIG. 2A is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • 2B is a software structure block diagram of an electronic device provided by an embodiment of the present application.
  • 2C is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another method for Bluetooth connection back provided by an embodiment of the present application.
  • 4A is a schematic diagram of a user interface for displaying connection back instruction information on a central device according to an embodiment of the present application
  • 4B is a schematic diagram of a data format of a first BLE broadcast signal provided by an embodiment of the present application.
  • 4C is a schematic diagram of a data format of a second BLE broadcast signal provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another method for Bluetooth connection back provided by an embodiment of the present application.
  • Fig. 6 is a schematic flowchart of another method for Bluetooth connection back provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, “multiple” The meaning is two or more.
  • the user interface (UI) in the embodiments of the present application is a medium interface for interaction and information exchange between an application or operating system and a user, and it realizes the conversion between the internal form of information and the form acceptable to the user.
  • the user interface of the application is the source code written in a specific computer language such as java, extensible markup language (XML), etc.
  • the interface source code is parsed and rendered on the electronic device 300, and finally presented to the user can be recognized Content, such as pictures, text, buttons and other controls.
  • Controls are the basic elements of the user interface. Typical controls include buttons, widgets, toolbars, menu bars, text boxes, and scroll bars. scrollbar), pictures and text.
  • the attributes and content of the controls in the interface are defined by tags or nodes.
  • XML specifies the controls contained in the interface through nodes such as ⁇ Textview>, ⁇ ImgView>, and ⁇ VideoView>.
  • a node corresponds to a control or attribute in the interface, and the node is parsed and rendered as user-visible content.
  • applications such as hybrid applications, usually include web pages in their interfaces.
  • a webpage also called a page, can be understood as a special control embedded in the application program interface.
  • the webpage is source code written in a specific computer language, such as hypertext markup language (HTML), cascading style Tables (cascading style sheets, CSS), java scripts (JavaScript, JS), etc.
  • web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions.
  • the specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, HTML defines the elements and attributes of the web page through ⁇ p>, ⁇ img>, ⁇ video>, and ⁇ canvas>.
  • GUI graphical user interface
  • FIG. 1A is a schematic diagram of a Bluetooth connection system provided by an embodiment of the present application.
  • the Bluetooth connection system 10 may include a central device 100 and a peripheral device 200. among them:
  • the central device 100 may be an electronic device with a Bluetooth connection function such as a mobile terminal, a tablet computer, a notebook computer, a personal computer, etc.
  • the mobile terminal is taken as an example in FIG. 1A.
  • the peripheral device 200 may be a wireless (Bluetooth) headset, a smart speaker, a smart watch, a portable media player, a vehicle-mounted media player, and other electronic devices with Bluetooth connection functions.
  • a wireless headset is taken as an example.
  • the central device 100 and the peripheral device 200 can be connected via Bluetooth.
  • the disconnection of Bluetooth connection can be divided into two types.
  • One is that the central device receives the operation of turning off the Bluetooth function of the central device input by the user in the interface of the central device.
  • the Bluetooth of the central device and the peripheral device The connection is disconnected; or the peripheral device receives an operation of turning off the Bluetooth function (or power supply) of the peripheral device input by the user on the interface or button of the peripheral device, and in response to this operation, the Bluetooth connection between the central device and the peripheral device is disconnected.
  • This way of disconnecting the Bluetooth connection can be called “active disconnection”.
  • the user operation to actively disconnect the Bluetooth connection received by the center device may be: the user clicks the operation of the switch control in the Bluetooth setting interface of the center device (see the embodiment corresponding to FIG.
  • the user acts on the switch The user operation of the control 201), the user clicks the operation of the Bluetooth control in the shortcut operation menu of the center device (see the embodiment corresponding to FIG. 1C, the user acts on the user operation of the Bluetooth control 210).
  • the central device actively disconnects the Bluetooth connection, the central device will receive error codes such as "connection terminated by local host", and the peripheral devices will receive error codes such as "remote user terminated connection”.
  • the Bluetooth connection is disconnected due to the long distance of the Bluetooth connection or poor signal quality.
  • This way of disconnecting the Bluetooth connection can be called “passive disconnection".
  • the Bluetooth received signal strength (received signal strength indicator, RRSI) of the central device is lower than the threshold.
  • This threshold can be set, for example, it can be -80dBm, -90dBm, etc. This situation can be regarded as a passive disconnection of the Bluetooth connection.
  • error codes such as "connection timeout” will be received. It is also possible that parameters such as packet loss rate and packet error rate are lower than the threshold.
  • the peripheral device 200 will actively send a page data packet to the paired central device 100 (the last connected central device) to restore the Bluetooth connection.
  • the method shown in Figure 1D at least includes the following steps:
  • the peripheral device when the Bluetooth connection is passively disconnected, the peripheral device enters the page state. After the peripheral device enters the page state, the peripheral device sends a page data packet to the central device. Optionally, the peripheral device selects a new frequency to send the page data packet every preset time. Among them, the page data packet sent by the peripheral device includes the device access code (DAC) of the central device.
  • DAC device access code
  • access codes There are three different access codes (access codes) in the Bluetooth system, and the three access codes are: device access code, channel access code (CAC) and inquiry access code (IAC).
  • the device access code is used in the process of page, page scan, and page response.
  • the device access code is generated based on the Bluetooth address (BD_ADDR) of the electronic device being paged.
  • the channel access code is used in the connection state as the packet header of the data frame exchanged on the physical channel in the Bluetooth network.
  • CAC includes preamble, sync word and trailer bits, and its total length is 72 bits.
  • CAC is generated based on the LAP of the BD_ADDR of the electronic device that initiated the page.
  • the query access code is used in the query state. Once transmitted as self-contained information without header, DAC and IAC do not include the trailer bit, and its length reaches 68 bits.
  • the central device when the Bluetooth connection is passively disconnected, the central device is in the page scan state. When the central device is in the page scan state, it will select a new monitoring frequency every 1.28s to monitor its own device access code according to the paging hopping sequence.
  • the paging hopping sequence used by the central device is a well-defined periodic sequence, and its frequency points are evenly distributed on 79 frequency channels of 2.4G.
  • the duration of scanning by the central device on a paging frequency channel may be called page scan windows, and the size of the page scan window is fixed.
  • the interval between the start times of two consecutive paging scan windows may be called a page scan interval, and the paging scan interval is fixed.
  • the value range of the paging scan interval can be 11.25me-2560ms.
  • the central device monitors the device access code (DAC) of the central device during the time period when a scanning window exists.
  • DAC device access code
  • the central device After receiving the page data packet sent by the peripheral device, the central device sends an ID packet to the peripheral device according to the page data packet.
  • the manner in which the central device sends an ID packet to the peripheral device according to the page data packet may be: the central device determines that the page data packet contains its own DAC, and the central device sends the ID packet to the peripheral device. Among them, the ID packet carries the device access code or inquiry access code (IAC) of the center device. The total length of the ID packet is 68 bits. At this time, the central device switches from the page scan (page scan) state to the slave page response (slave page response) state.
  • IAC inquiry access code
  • the peripheral device After receiving the ID packet sent by the central device, the peripheral device sends an FHS data packet to the central device according to the ID packet.
  • the FHS data packet is a special control data packet indicating the Bluetooth address of the electronic device and the sender clock (CLK).
  • FHS data packets can be used for paging master unit response, query response and frequency hopping synchronization.
  • the FHS data packet sent by the peripheral device to the central device includes the peripheral device's Bluetooth address, real-time clock and other information. It should be noted that after receiving the ID packet sent by the central device, the peripheral device switches from the page state to the master page response (master page response) state.
  • the central device After receiving the FHS data packet sent by the peripheral device, the central device sends an ID packet to the peripheral device according to the FHS data packet.
  • the ID packet carries the device access code or query access code of the center device.
  • the central device switches from the slave page response state to the connection state.
  • the peripheral device switches from the slave page response state to the connection state.
  • the central device and peripheral devices are in a connected state, and the Bluetooth connection is restored.
  • the peripheral device may send a POLL data packet to the central device according to the ID data packet.
  • the POLL data packet is used to check whether the slave device (central device) is started.
  • the central device After the central device receives the POLL data packet, it can send any type of data packet to the peripheral device according to the POLL data packet.
  • the central device will also initiate a page to the peripheral device.
  • the central device is a smart terminal
  • the peripheral device is a Bluetooth headset.
  • the Bluetooth headset When the user uses the Bluetooth headset to play a song in the music player on the smart terminal, if the Bluetooth headset leaves the vicinity of the smart terminal and exceeds the maximum distance supporting Bluetooth connection, the Bluetooth connection is passively disconnected.
  • the music player may send a Bluetooth connection request to the smart terminal, and in response to the request, the smart terminal initiates a page to the peripheral device.
  • third-party applications such as video playback and games may also send a Bluetooth connection request to the smart terminal when the Bluetooth connection is passively disconnected.
  • the smart terminal may receive the user's click operation on the unconnected Bluetooth device option in the Bluetooth device interface.
  • the smart terminal Initiate a page to the Bluetooth headset.
  • this click operation refer to the click operation of the control 204 by the user in the embodiment corresponding to FIG. 1B.
  • the central device when the peripheral device initiates a page to the central device, the central device also initiates a page to the peripheral device, that is, both the central device and the peripheral device are in the page state. Then, the central device cannot receive the page data packet sent by the peripheral device, and the peripheral device cannot receive the page data packet sent by the central device.
  • the page requests of the central device and the peripheral device collide, causing the Bluetooth connection to fail.
  • the peripheral device after the Bluetooth connection is passively disconnected, the peripheral device first sends a BLE broadcast signal to the central device.
  • the BLE broadcast signal is used to indicate whether the central device needs to initiate a page to the peripheral device. If the BLE broadcast signal is the first BLE broadcast signal indicating that the central device does not need to initiate a page to the peripheral device, the central device does not initiate a page to the peripheral device, and waits to receive the page data packet of the peripheral device. If the BLE broadcast signal is the second BLE broadcast signal instructing the central device to initiate a page to the peripheral device, the central device initiates a page to the peripheral device, and the peripheral device waits to receive the page data packet sent by the central device. In this way, it is possible to avoid the collision of page requests between the central device and the peripheral device, and improve the success rate of Bluetooth connection.
  • the Bluetooth connection system 10 shown in FIG. 1A is a Bluetooth system based on the Bluetooth protocol. That is, the central device 100 and the peripheral device 200 may both support the broadcast communication function of Bluetooth low energy (bluetooth low energy, BLE). Specifically, the peripheral device 200 may broadcast the BLE broadcast signal on the BLE broadcast channel, and the central device 100 may scan the BLE broadcast channel and receive the BLE broadcast signal.
  • BLE Bluetooth low energy
  • the embodiment of the present application takes the implementation of the Bluetooth connection system 10 based on the Bluetooth protocol as an example for introduction, but the embodiment of the present application is not limited to BLE broadcast communication, and may also be Wi-Fi broadcast communication or other short-distance wireless broadcast communication. (For example, near field communication (NFC)), the embodiment of the present application does not limit the manner of broadcast communication.
  • FIG. 1B is a schematic diagram of a Bluetooth setting interface displayed on the center device 100 according to an embodiment of the present application.
  • the Bluetooth device interface shown in FIG. 1B includes: a switch control 201, a detail control 201, a control 203, a control 204, a control 205, and a control 206. among them:
  • the switch control 201 can be used to set the on/off state of Bluetooth. Specifically, the switch control 201 has two display states, an "ON (open)” state and an “OFF (closed)” state. When the switch control 201 is displayed in the "ON” state, if a user operation of the switch control 201 is received, in response to the user operation, the electronic device closes the Bluetooth connection and switches the switch control 201 from the display "ON" state to The "OFF” status is displayed. It should be noted that this way of disconnecting the Bluetooth connection is a way of “actively disconnecting" the Bluetooth connection. There may also be other human operations that cause the Bluetooth connection to be disconnected.
  • the user's user operation of the Bluetooth control in the shortcut operation menu can make the Bluetooth switch from the on state to the off state (see the embodiment shown in FIG. 1C), And the voice command input by the user (for example, "turn off/disconnect the Bluetooth connection") makes the Bluetooth switch from the on state to the off state.
  • the switch control 201 is displayed in the "OFF" state, if a user operation of the switch control 201 is received, in response to the user operation, the electronic device turns on the Bluetooth connection and switches the switch control 201 from displaying the "OFF” state to The "ON" status is displayed.
  • the detail control 201 can be used to view the detailed information of the Bluetooth of the center device 100, for example, the name of the Bluetooth.
  • the control 203 can be used to receive a user's operation (for example, a click operation), and in response to the user's operation, the central device 100 displays the information of the file received via Bluetooth.
  • a user's operation for example, a click operation
  • the control 204 may be used to receive a user's operation (for example, a click operation), and in response to the user's operation, the central device 100 sends a page data packet to the peripheral device HUAWEI free buds indicated by the control 204 for Bluetooth connection.
  • the peripheral device HUAWEI free buds indicated by the control 204 are electronic devices that have been successfully paired with the central device 100.
  • the indication information "unconnected state" in the control 204 indicates that the current central device 100 has not established a Bluetooth connection with the peripheral device HUAWEI free buds. If the control 204 displays the indication information as "connected state", it indicates that the current central device 100 has established a Bluetooth connection with the peripheral device HUAWEI free buds.
  • control 204 receives a user's operation after the Bluetooth connection is disconnected due to a non-human operation, in response to the user's operation, the central device 100 sends a page data packet to the peripheral device HUAWEI free buds to recover Bluetooth connection.
  • the control 205 can be used to receive the user's operation.
  • the central device 100 performs Bluetooth pairing with the electronic device HUAWEI Mate 20 indicated by the control 205.
  • the central device 100 and the electronic device HUAWEI Mate 20 make a Bluetooth connection.
  • the central device 100 and the electronic device HUAWEI Mate 20 successfully establish a Bluetooth connection, and data can be transmitted via Bluetooth. It should be noted that after the Bluetooth pairing between the central device 100 and the electronic device HUAWEI Mate 20 is successful, the central device 100 will store the pairing record of the electronic device HUAWEI Mate 20 and display the information of the electronic device HUAWEI Mate 20 in the "paired device" "In the information list.
  • the control 206 can be used to receive the user's operation.
  • the central device 100 performs Bluetooth pairing with the electronic device HUAWEI Mate 10 indicated by the control 206.
  • the central device 100 and the electronic device HUAWEI Mate 10 make a Bluetooth connection.
  • a Bluetooth connection is successfully established between the central device 100 and the electronic device HUAWEI Mate 10, and data can be transmitted via Bluetooth.
  • the central device 100 and the electronic device HUAWEI Mate 10 are successfully paired with Bluetooth, the central device 100 will store the pairing record of the electronic device HUAWEI Mate 10, and display the information of the electronic device HUAWEI Mate 10 in the "Paired Devices" Information list.
  • FIG. 1C is a schematic diagram of a shortcut operation menu displayed on the center device 100 according to an embodiment of the present application.
  • the shortcut operation menu 211 shown in FIG. 1C is a drop-down menu.
  • the shortcut operation menu may also be a pull-up menu, a side pull-down menu, a floating menu, etc., which is not limited in the embodiment of the present application.
  • the display state of the Bluetooth control 210 in the shortcut menu 211 is highlighted, it indicates that the Bluetooth of the center device 100 is currently in the on state.
  • the central device 100 switches the Bluetooth from the on state to the off state, and cancels the highlight display of the Bluetooth control 210.
  • This way of disconnecting the Bluetooth connection is also a way of "actively disconnecting" the Bluetooth connection.
  • the central device 100 may be an electronic device.
  • the electronic device 10 involved in the embodiment of the present application will be introduced below. Please refer to FIG. 2A.
  • FIG. 2A is a schematic structural diagram of an electronic device 10 according to an embodiment of the present application.
  • the electronic device 10 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display 194, And subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the electronic device 10 shown in FIG. 2A is only an example, and the electronic device 10 may have more or fewer components than those shown in FIG. 2A, two or more components may be combined, or Can have different component configurations.
  • the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 10.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 10.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to realize communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 10.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 10.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 10, and can also be used to transfer data between the electronic device 10 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely a schematic description, and does not constitute a structural limitation of the electronic device 10.
  • the electronic device 10 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 10. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect 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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 10 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like 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 by the antenna 1, and perform processing such as filtering and amplifying the received electromagnetic waves, and then 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.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
  • the BT and BLE broadcasting functions in the wireless communication module 160 may be implemented by a Bluetooth chip.
  • the electronic device 10 scans the BLE broadcast channel and receives the link back broadcast signal. It needs to power on the Bluetooth chip and enable the software module related to the scan BLE broadcast signal function on the Bluetooth chip.
  • the Bluetooth chip can be powered on by turning on the scan BLE broadcast signal function.
  • the antenna 1 of the electronic device 10 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 10 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (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 technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 10 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 10 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 10 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats.
  • the electronic device 10 may include 1 or N cameras 193, and N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 10 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 10 may support one or more video codecs. In this way, the electronic device 10 can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent cognition of the electronic device 10, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may 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 memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 10 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application required by at least one function (such as a sound playback function, an image playback function, etc.).
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 10.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • UFS universal flash storage
  • the electronic device 10 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called a “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 10 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 10 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can approach the microphone 170C through the mouth to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 10 may be provided with at least one microphone 170C. In other embodiments, the electronic device 10 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 10 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may be composed of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 10 determines the intensity of the pressure based on the change in capacitance.
  • the electronic device 10 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 10 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 10. In some embodiments, the angular velocity of the electronic device 10 around three axes (ie, x, y, and z axes) can be determined by the gyroscope sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 10, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 10 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 10 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • 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 holster.
  • the electronic device 10 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 10 in various directions (generally three axes). When the electronic device 10 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 10 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 10 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 10 emits infrared light to the outside through the light emitting diode.
  • the electronic device 10 uses a 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 the electronic device 10.
  • the electronic device 10 can use the proximity light sensor 180G to detect that the user holds the electronic device 10 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 10 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • 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 cooperate with the proximity light sensor 180G to detect whether the electronic device 10 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 10 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 10 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 10 performs a reduction in the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 10 when the temperature is lower than another threshold, the electronic device 10 heats the battery 142 to avoid abnormal shutdown of the electronic device 10 due to low temperature.
  • the electronic device 10 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 10, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 10 can receive key input and generate key signal input related to user settings and function control of the electronic device 10.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 10.
  • the electronic device 10 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 may also be compatible with external memory cards.
  • the electronic device 10 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 10 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 10 and cannot be separated from the electronic device 10.
  • the software system of the electronic device 10 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes a layered Android system as an example to illustrate the software structure of the electronic device 10 by way of example.
  • FIG. 2B is a software structure block diagram of an electronic device 10 provided by an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • 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.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides application programming interfaces (application programming interface, API) and programming frameworks for applications at the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and so on.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text and controls that display pictures.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the electronic device 10. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, smart terminals vibrate, and indicator lights flash.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the peripheral device 200 may be an electronic device.
  • the electronic device 20 involved in the embodiment of the present application will be introduced below. Please refer to FIG. 2C.
  • FIG. 2C is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application.
  • 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.
  • the processor 301 may be used to read and execute computer-readable instructions, and the processor 301 executes these application program codes to enable the electronic device 20 to execute the method in the embodiment of the present application.
  • the processor 301 may mainly include a controller, an arithmetic unit, and a register.
  • the controller is mainly responsible for instruction decoding, and sends out control signals for the operation corresponding to the instruction.
  • the arithmetic unit is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations and logical operations, etc., and can also perform address operations and conversions.
  • the register is mainly responsible for storing the register operands and intermediate operation results temporarily stored during the execution of the instruction.
  • the hardware architecture of the processor 301 may be an Application Specific Integrated Circuits (ASIC) architecture, MIPS architecture, ARM architecture, NP architecture, and so on.
  • ASIC Application Specific Integrated Circuits
  • the processor 301 may be used to parse the signal received by the wireless communication processing module 303.
  • the received signal may be instruction information sent by the electronic device 10, and the instruction information is used to instruct the electronic device 10 to receive Human operation causes the Bluetooth connection to be disconnected.
  • the processor 301 may be configured to perform corresponding processing operations according to the analysis result. For example, after receiving such a signal, the electronic device 20 will not perform a Bluetooth connection back, that is, the electronic device 20 will not send a page data packet to the electronic device 10.
  • the processor 301 may also be used to generate a signal sent by the wireless communication processing module 303, such as a BLE broadcast signal sent by the electronic device 20 to the electronic device 10.
  • a signal sent by the wireless communication processing module 303 such as a BLE broadcast signal sent by the electronic device 20 to the electronic device 10.
  • the memory 302 is coupled with the processor 301, and is used to store various software programs and/or multiple sets of instructions.
  • the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the memory 302 can also store a communication program, which can be used to communicate with the electronic device 10.
  • the memory 302 may also store a Bluetooth address for uniquely identifying the electronic device 20.
  • the wireless communication processing module 303 may include one or more of the Bluetooth (BT) communication processing module 104A and the WLAN communication processing module 104B.
  • the wireless communication module 303 is used to support short-distance data interaction between the electronic device 20 and the electronic device 10.
  • the wireless communication module 303 may include a Bluetooth transceiver, which supports the BLE broadcast communication function. Specifically, the Bluetooth transceiver can be used to send BLE loopback broadcast signals.
  • the wireless communication module 304 may also include a Wi-Fi module, and the Wi-Fi module may send back a broadcast signal.
  • the power supply 304 may be used to supply power to various components included in the electronic device 20.
  • the power source 304 may be a battery, such as a rechargeable battery.
  • the electronic device 20 may have more or fewer parts than shown in FIG. 2C, may combine two or more parts, or may have a different part configuration.
  • the various components shown in Figure 2C can be implemented in hardware, software, or a combination of software and hardware.
  • the Bluetooth connection method provided by the embodiment of the present application will be described in detail below in conjunction with other drawings. It should be noted that in the embodiment of the present application, the Bluetooth connection is passively disconnected, and the meaning of passive disconnection can be referred to the description in the foregoing content, and will not be repeated here.
  • the peripheral device may be referred to as the first device, and the central device may be referred to as the second device.
  • FIG. 3 is a schematic flowchart of a Bluetooth back-connection method provided by an embodiment of the present application. The method includes at least the following steps:
  • the central device establishes a Bluetooth connection with the peripheral device.
  • the Bluetooth connection established between the central device and the peripheral device is a BR/EDR (Basic Rate/Enhanced Data Rate) connection, which is also called a classic Bluetooth connection or a traditional Bluetooth connection.
  • BR/EDR Base Rate/Enhanced Data Rate
  • the central device After the central device and the peripheral device establish a Bluetooth connection, the central device enters the BLE scan state. In another possible implementation manner, after the Bluetooth connection is passively disconnected, the central device enters the BLE scan state. For example, the central device can enter the BLE scan state after receiving error codes such as "connection timeout". In this way, the power consumption of the central device can be saved.
  • the central device After the central device enters the BLE scan state, it will start BLE scanning to monitor the BLE broadcast signal in the surrounding environment of the mobile terminal.
  • the process of the central device scanning the BLE broadcast signal may be that the central device sequentially scans the BLE broadcast signal on multiple broadcast channels (for example, BLE broadcast channel 37 (2402MHz), BLE broadcast channel 38 (2426MHz), BLE broadcast channel 39 (2480MHz)).
  • the duration of the central device scanning on a BLE broadcast channel can be called the scan window, and the scan window size is fixed (for example, the scan window can be 10ms to 10.24s), and the interval between the start times of two consecutive scan windows
  • the interval may be referred to as a scan interval, and the scan interval is fixed (for example, the scan interval may be 10ms to 10.24s).
  • the central device may also display connection back indication information on the display screen.
  • the connection back indication information is used to indicate that the central device is recovering the Bluetooth connection.
  • the peripheral device After the Bluetooth connection is passively disconnected, the peripheral device sends a first BLE broadcast signal to the central device, where the first BLE broadcast signal is used to indicate that the central device does not need a page peripheral device.
  • the predetermined condition may be that the RSSI value of the Bluetooth connection is lower than the threshold.
  • This threshold can be set, for example, it can be -80dBm, -90dBm, etc.
  • the peripheral device receives an error code such as "connection timeout", it is determined that the Bluetooth connection is passively disconnected.
  • the first BLE broadcast signal includes a first AD structure, and the first AD structure includes first data.
  • the data format of the first BLE broadcast signal can refer to the schematic diagram shown in FIG. 4B.
  • the first BLE broadcast signal may include a Bluetooth address of the peripheral device and a broadcast data (AdvData, AD) part.
  • the broadcast data part includes a valid data part (significant) and an invalid data part (non-significant).
  • the effective data part is composed of one or more broadcast data units (AD Structure).
  • the valid data part contains a first AD Structure, and the first AD Structure contains first data.
  • the first data indicates that the peripheral device will send a page request to the central device, and the central device does not need a page peripheral device.
  • the following content will give a detailed introduction to the data format of the first BLE broadcast signal shown in FIG. 4B, which is not specifically expanded here.
  • the peripheral device sends the first BLE broadcast signal to the central device specifically as follows: the peripheral device sends the first BLE broadcast signal for a first preset number of times to the central device, where the first preset The number of times can be 1, 2, 3, 4 and so on.
  • the first time interval between two adjacent first BLE connection broadcast signals is a preset time interval such as 100ms, 150ms, 200ms, 300ms. Both the first preset number of times and the first time interval can be set according to needs, and the embodiment of the present application does not limit it.
  • the central device after the central device receives the first BLE broadcast signal, the central device maintains the BLE scan state according to the first BLE broadcast signal.
  • the method for the central device to maintain the BLE scan state according to the first BLE broadcast signal is specifically as follows: first, the central device determines the Bluetooth address of the peripheral device according to the first BLE broadcast signal and a Bluetooth address in the pre-stored historical connection record. The addresses are the same. After that, the central device parses the first BLE connection broadcast signal, and determines that the first broadcast signal contains the first data. Next, the central device determines to maintain the BLE scan state according to the first data. Wherein, the historical connection record of the central device is used to save the Bluetooth addresses of one or more peripheral devices successfully paired with the central device via Bluetooth.
  • the central device after the central device receives the first BLE broadcast signal, if it receives a Bluetooth connection request sent by a third-party application, or receives an unconnected Bluetooth that the user acts on the Bluetooth device interface When the device option is clicked, the central device will not initiate a page to the peripheral device. In this way, it is possible to avoid the problem that when the peripheral device initiates a page to the central device, the central device also initiates a page to the peripheral device, which will not cause collision of page requests, and can improve the success rate of Bluetooth connection.
  • the peripheral device After sending the first BLE broadcast signal to the central device, the peripheral device sends a page data packet to the central device.
  • the peripheral device sends a page data packet to the central device.
  • the page data packet contains the device access code of the center device.
  • the second time interval between two adjacent page data packets sent by the peripheral device to the central device is a preset time interval such as 100 ms, 150 ms, 200 ms, and 300 ms. It should be noted that if the ID packet fed back by the central device according to the page data packet is not received within the preset time period, the peripheral device determines the page timeout, and no longer sends the page data packet to the central device, and returns from the page state Switch to page scan state. Among them, the value range of the preset duration can be 0.625ms-40.9s. If the ID packet fed back by the central device according to the page data packet is received within the preset time period, the peripheral device no longer sends the page data packet to the central device, and switches from the page state to the master page response state.
  • the central device may stop the BLE scan. In this way, the power consumption of the central device can be saved.
  • the central device After receiving the page data packet sent by the peripheral device, the central device sends an ID packet to the peripheral device according to the page data packet.
  • the method for the central device to send an ID packet to the peripheral device according to the page data packet may be: the central device determines according to the page data packet that the page data packet contains the device access code of the central device, and the central device sends the ID to the peripheral device package.
  • the peripheral device After receiving the ID packet sent by the central device, the peripheral device sends an FHS data packet to the central device according to the ID packet.
  • the central device After receiving the FHS data packet sent by the peripheral device, the central device sends an ID packet to the peripheral device according to the FHS data packet.
  • the central device After receiving the FHS data packet sent by the peripheral device, the central device switches from the slave page response state to the connection state. In addition, after receiving the ID packet sent by the central device, the peripheral device switches from the slave page response state to the connection state. At this point, the central device and peripheral devices are in a connected state, and the Bluetooth connection is restored. It should be noted that the specific implementation manners of S304-S306 can refer to the implementation manners of S102-S104, which will not be repeated here.
  • FIG. 4A is a schematic diagram of a user interface for displaying connection back instruction information on a central device according to an embodiment of the present application.
  • FIG. 4A exemplarily shows a schematic diagram of a user interface 41 for displaying music playback.
  • the user interface 41 includes a download control 415, a sharing control 416, more controls 417, playback progress indication information 414, a play/pause control 411, a previous control 413, a next control 412, and a notification window 418. among them:
  • the download control 415 can be used to receive user operations.
  • the central device 100 stores the currently playing song locally in the central device.
  • the sharing control 416 can be used to receive user operations.
  • the central device 100 displays one or more sharing options, for example, WeChat friends, Moments, Weibo, QQ friends, copy links, etc.
  • the user can share the currently playing song to the address corresponding to the sharing option by selecting a certain sharing option.
  • More controls 417 can be used to receive user operations.
  • the center device 100 displays a menu window.
  • the menu window may include one or more operation options, for example, add to playlist, delete, view singer, and view Albums, playing videos, etc.
  • the playing progress indication information 414 may be used to indicate the playing progress of the current song, and may include information such as a progress bar, the current playing time, and the total duration of the song.
  • the play/pause control 411 can be used to switch the play/pause state of a song. Specifically, in the case that the current song is being played through the Bluetooth headset, if the Bluetooth is disconnected, the play/pause control 411 switches from displaying the first state to displaying the second state, where the first state is used to indicate the current song In the playing state, the second state is used to indicate that the current song is in the paused state.
  • the previous control 413 can be used to receive user operations.
  • the center device 100 switches from playing the current song to playing the previous song of the current song.
  • the next control 412 can be used to receive a user operation.
  • the center device 100 switches from playing the current song to playing the next song of the current song.
  • the notification window 418 can be used to display connection back instruction information 410.
  • the connection back instruction information 410 is used to indicate that the center device is recovering the Bluetooth connection.
  • the notification window 418 disappears after displaying a preset time, and the preset time may be 4 seconds, 5 seconds, and so on. Or, when the notification window 418 receives the user's upward sliding operation, in response to the operation, the center device 100 no longer displays the notification window 418 in the user interface 41.
  • the first BLE broadcast signal may include the Bluetooth address of the peripheral device and the broadcast data part.
  • the broadcast data part includes valid data part and invalid data part.
  • the Bluetooth address of the peripheral device occupies 6 bytes, and the broadcast data part occupies 31 bytes.
  • an AD Structure is used to describe the information of the electronic device that sends the BLE back-link broadcast signal.
  • an AD Structure includes a Length field and a Data field, where the Data field includes an AD Type field and an AD Data field.
  • the Length field indicates the length of the AD Type field and the AD Data field
  • the AD Type field indicates the meaning of the AD Data field
  • the AD Data field contains information describing the electronic device that sends the BLE connection broadcast signal.
  • the AD type can be "Flag”
  • "Flag” describes the physical connection function of the electronic device.
  • the physical connection function of the electronic device can be known by parsing the AD Data field.
  • the physical connection function can be a limited discovery mode, a normal discovery mode, and does not support the classic Bluetooth mode.
  • the broadcast data part Since the broadcast data part must occupy 31 bytes, if the valid data part is less than 31 bytes, the broadcast data part except the valid data part will be filled with 0. The data in this part is invalid data. section.
  • the first AD Structure introduced in the above content can be any one of the N AD Structures, and the position of the first data in the AD Data can also be set as needed.
  • the first data may be 1.
  • the central device may not be able to successfully receive the page data packet sent by the peripheral device.
  • the peripheral device determines the page timeout, no longer sends the page data packet to the central device, and sends the second BLE broadcast signal to the central device, where:
  • the second BLE broadcast signal is used to instruct the central device to page the peripheral device.
  • the central device establishes a Bluetooth connection with the peripheral device.
  • the peripheral device After the Bluetooth connection is passively disconnected, the peripheral device sends a first BLE broadcast signal to the central device, where the first BLE broadcast signal is used to indicate that the central device does not need a page peripheral device.
  • steps S501-S503 can refer to the implementation manners of S301-S303 in FIG. 3, which will not be repeated here.
  • the peripheral device If the ID packet sent by the central device is not received within the preset time period, the peripheral device sends a second BLE broadcast signal to the central device, where the second BLE broadcast signal is used to instruct the central device to page the peripheral device.
  • the peripheral device determines the page timeout, no longer sends the page data packet to the central device, and sends the second BLE broadcast signal to the central device.
  • the second BLE connection-back broadcast signal includes a second AD Structure
  • the second AD Structure includes second data.
  • the data format of the second BLE broadcast signal may refer to the schematic diagram of the data format of the second BLE broadcast signal shown in FIG. 4C. It should be noted that the data format of the second BLE broadcast signal is similar to the data format of the first BLE broadcast signal. The difference is that the second BLE broadcast signal includes the second AD Structure, and the second AD Structure includes the second data.
  • the second AD Structure can be any one of the N AD Structures, and the position of the second data in the AD Data can also be set as required. For example, the second data may be 0.
  • the second time interval between two adjacent second BLE connection broadcast signals sent by the peripheral device to the central device is a preset time interval such as 100ms, 150ms, 200ms, 300ms, etc.
  • the peripheral device receives the page data packet fed back by the central device according to the second BLE broadcast signal, it no longer sends the second BLE broadcast signal to the central device.
  • the central device After the central device receives the second BLE broadcast signal, the central device sends a page data packet to the peripheral device according to the second BLE broadcast signal.
  • the method for the central device to send a page data packet to the peripheral device according to the second BLE broadcast signal is specifically as follows: First, the central device determines the Bluetooth address of the peripheral device and the peripheral device according to the second BLE broadcast signal. A Bluetooth address in the pre-stored historical connection records is the same. After that, the central device parses the second BLE connection broadcast signal, and determines that the second broadcast signal contains second data. Next, the central device sends an ID packet to the peripheral device according to the second data. Wherein, the ID packet carries the device access code or query access code of the center device.
  • the page data packet sent by the central device to the peripheral device includes the DAC of the peripheral device.
  • the central device sends multiple page data packets to the peripheral device, and the time interval between two adjacent page data packets sent by the central device to the peripheral device is a preset time interval such as 100ms, 150ms, 200ms, 300ms, etc. . It should be noted that if the ID packet fed back by the peripheral device according to the page data packet is received within the preset time period, the central device no longer sends the page data packet to the peripheral device, and switches from the page state to the master page response state.
  • the central device may stop the BLE scan. In this way, the power consumption of the central device can be saved.
  • S506 After receiving the page data packet sent by the central device, the peripheral device sends an ID packet to the central device according to the page data packet.
  • the peripheral device may send an ID packet to the central device according to the page data packet: the peripheral device determines that the page data packet contains the device access code of the peripheral device according to the page data packet, and the peripheral device sends the ID to the central device package. Among them, the ID packet carries the device access code or query access code of the peripheral device. At this time, the peripheral device switches from the page scan state to the slave page response state.
  • the central device After receiving the ID packet sent by the peripheral device, the central device sends an FHS data packet to the peripheral device according to the ID packet.
  • the FHS data packet sent by the central device to the peripheral device includes information such as the Bluetooth address and real-time clock of the central device. It should be noted that after receiving the ID packet sent by the peripheral device, the central device switches from the page state to the master page response (master page response) state.
  • the peripheral device After receiving the FHS data packet sent by the central device, the peripheral device sends an ID packet to the central device according to the FHS data packet.
  • the ID packet carries the device access code or query access code of the peripheral device.
  • the peripheral device switches from the slave page response state to the connection state.
  • the central device switches from the master unit page response (slave page response) state to the connection state. At this point, the central device and peripheral devices are in a connected state, and the Bluetooth connection is restored.
  • the central device may send a POLL data packet to the peripheral device according to the ID data packet.
  • the POLL packet is used to check whether the slave device (peripheral device) is started.
  • the peripheral device After the peripheral device receives the POLL data packet, it can send any type of data packet to the central device according to the POLL data packet.
  • the peripheral device after the central device and the peripheral device are disconnected, the peripheral device first sends a second BLE broadcast signal to the central device, and the second BLE broadcast signal is used to instruct the central device to page the peripheral device .
  • the central device After the central device receives the second BLE broadcast signal, the central device sends a page data packet to the peripheral device to restore the Bluetooth connection.
  • FIG. 6 For such an embodiment, reference may be made to the schematic flow chart of another method for Bluetooth connection shown in FIG. 6. The method includes at least the following steps:
  • the central device establishes a Bluetooth connection with the peripheral device.
  • step S601 For the specific implementation manner of step S601, reference may be made to the implementation manner of S301 in FIG. 3, which will not be repeated here.
  • the peripheral device After the Bluetooth connection is passively disconnected, the peripheral device sends a second BLE broadcast signal to the central device, where the second BLE broadcast signal is used to instruct the central device to page the peripheral device.
  • the central device After the central device receives the second BLE broadcast signal, the central device sends a page data packet to the peripheral device according to the second BLE broadcast signal.
  • the central device after the central device receives the second broadcast signal, the central device stops the BLE scan. In this way, the power consumption of the central device can be saved.
  • the peripheral device After receiving the page data packet sent by the central device, the peripheral device sends an ID packet to the central device according to the page data packet.
  • the central device After receiving the ID packet sent by the peripheral device, the central device sends an FHS data packet to the peripheral device according to the ID packet.
  • the peripheral device After receiving the FHS data packet sent by the central device, the peripheral device sends an ID packet to the central device according to the FHS data packet. After receiving the FHS data packet sent by the central device, the peripheral device switches from the slave page response state to the connection state. In addition, after receiving the ID packet sent by the peripheral device, the central device switches from the master unit page response (slave page response) state to the connection state. At this point, the central device and peripheral devices are in a connected state, and the Bluetooth connection is restored.
  • the specific implementation manners of steps S602-S606 can be referred to the implementation manners of steps S504-S508 in FIG. 5, and details are not described herein again.
  • the central device within the preset time period when the central device and the peripheral device are passively disconnected from Bluetooth, if the central device does not receive the BLE broadcast signal sent by the peripheral device (including the first BLE broadcast signal and the second BLE broadcast signal), the central device can send page data packets to the peripheral device to restore the Bluetooth connection. It should be noted that the process after the central device sends the page data packet to the peripheral device can refer to the implementation of steps S604-S606, which will not be repeated here.
  • the central device may be a mobile terminal
  • the peripheral device may be a Bluetooth headset.
  • the Bluetooth headset In the process of the user playing songs in the mobile terminal through the Bluetooth headset, if the user wears the Bluetooth headset and leaves the vicinity of the mobile terminal, the distance between the Bluetooth headset and the mobile terminal exceeds the maximum distance that can support Bluetooth connection, and the mobile terminal and the Bluetooth headset The Bluetooth connection will be passively disconnected. After the Bluetooth connection between the mobile terminal and the Bluetooth headset is passively disconnected, the Bluetooth headset sends a BLE broadcast signal to the mobile terminal.
  • the mobile terminal determines that it has received the first BLE broadcast signal, the mobile terminal does not need a page Bluetooth headset, and waits to receive the page data packet sent by the Bluetooth headset; if the mobile terminal determines that it has received the second BLE broadcast signal, the mobile terminal Active page Bluetooth headset, the Bluetooth headset waits to receive the page data packet sent by the mobile terminal. In this way, the problem of page request collision caused by both the mobile terminal and the Bluetooth headset sending page data packets at the same time can be avoided, and the success rate of Bluetooth connection is improved.
  • the steps performed by the first device in the Bluetooth back-connection method provided in the above embodiments of the present application may also be performed by a Bluetooth chip included in the first device.
  • the computer program stored in the memory is called to implement the steps executed by the first device.
  • the steps performed by the second device may also be performed by a Bluetooth chip included in the second device.
  • the Bluetooth chip is running, the computer program stored in the memory is called to implement the steps executed by the second device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种蓝牙回连的方法及相关装置,所述方法应用于蓝牙连接系统,所述蓝牙连接系统包括第一设备和第二设备。该方法包括:在第一设备和第二设备的蓝牙连接断开之后,第一设备向第二设备发送BLE广播信号。若第二设备确定接收到的是第一BLE广播信号,则第二设备无需page第一设备,并等待接收第一设备发送的page数据包;若第二设备确定接收到的是第二BLE广播信号,则第二设备主动page第一设备,第一设备等待接收第二设备发送的page数据包。通过这种方式,可以避免第二设备和第一设备两方同时发起page而造成的page请求碰撞的问题,提升蓝牙回连的成功率。

Description

一种蓝牙回连的方法及相关装置
本申请要求于2019年8月14日提交中国国家知识产权局、申请号为201910750864.8、申请名称为“一种蓝牙回连的方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种蓝牙回连的方法及相关装置。
背景技术
蓝牙(Bluetooth)是人们生活中常用的数据传输方式,它可以实现在电子设备(例如,移动终端、笔记本电脑、无线耳机、掌上电脑,等等)之间短距离无线传输数据,具有方便快捷、灵活安全的优点。通常,随着已蓝牙连接的电子设备之间距离的增大,蓝牙可能会出现断连的情况。
现有技术中,在非人为操作导致的蓝牙连接断开的情况下,为了恢复蓝牙连接,外围设备(例如,无线耳机、智能音箱、智能手表,等等)会对已连接过的中心设备(例如,移动终端、笔记本电脑、掌上电脑,等等)发起回连。但是这种发起回连的方式容易连接失败,比如,在外围设备寻呼(page)中心设备的同时,中心设备也有可能发起对外围设备的page,两个page请求将发生碰撞,造成蓝牙连接失败。
发明内容
本申请提供了一种蓝牙回连的方法及相关装置,可以提升蓝牙回连的成功率。
第一方面,本申请提供了一种蓝牙回连的方法,该方法应用于蓝牙连接系统,该蓝牙连接系统包括第一设备和第二设备,该方法包括:当蓝牙连接断开时,该第一设备向该第二设备发送第一低功耗蓝牙BLE广播信号,该第一BLE广播信号用于指示该第一设备将向该第二设备发起寻呼page;该第一设备向该第二设备发送第一page数据包,该第一page数据包中包含该第二设备的设备标识;当该第一设备在预设时长或者预设次数内接收到该第二设备发送的第一ID包,该第一设备向该第二设备发送第一FHS数据包,其中,该第一ID包中包含该第二设备的设备标识,该第一ID包是该第二设备根据该第一page数据包向该第一设备发送的,该第一FHS数据包中包含该第一设备的蓝牙地址和时钟信息;该第二设备根据接收到的该第一FHS数据包切换至连接connection状态,并向该第一设备发送第二ID包,该第二ID包中包含该第二设备的设备标识;该第一设备根据接收到的该第二ID包切换至connection状态。通过这种方式,可以避免第一设备以及第二设备两方同时发送page数据包而造成的page请求碰撞的问题,提升蓝牙回连的成功率。
结合第一方面,在一种可能的实现方式中,该方法还包括:当该第一设备在该预设时长内未接收到第二设备发送的第一ID包,该第一设备向该第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;该第二设备根据接收到的该第二BLE广播信号向该第一设备发送第二page数据包,该第二page数据包中包 含该第一设备的设备标识;该第一设备根据接收到的该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;该第二设备根据接收到的该第三ID包向该第一设备发送第二FHS数据包,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息;该第一设备根据接收到的该第二FHS数据包,切换至connection状态,并向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识;该第二设备根据接收到的该第四ID包切换至connection状态。
结合第一方面,在一种可能的实现方式中,该方法还包括:当该第一设备在预设时长内接收到该第二设备发送的该第一ID包时,该第一设备从page状态切换至主单元寻呼响应master page response状态。
结合第一方面,在一种可能的实现方式中,该方法还包括:当该第一设备接收到该第二设备发送的该第二page数据包时,该第一设备从寻呼扫描page scan状态切换至slave page response状态;当该第二设备接收到该第一设备发送的该第三ID包时,该第二设备从page状态切换至主单元寻呼响应master page response状态。
结合第一方面,在一种可能的实现方式中,该当蓝牙连接断开时,该第一设备向该第二设备发送第一低功耗蓝牙BLE广播信号,包括:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,该第一设备向该第二设备发送第一BLE广播信号。
结合第一方面,在一种可能的实现方式中,当蓝牙连接断开时,该第二设备处于低功耗蓝牙扫描BLE scan状态。
结合第一方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的设备访问码(device access code,DAC)或者查询访问码(inquiry access code,IAC);该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第一方面,在一种可能的实现方式中,在蓝牙连接断开之后,第二设备还可以显示回连指示信息,该回连指示信息用于指示第二设备正在恢复蓝牙连接。
结合第一方面,在一种可能的实现方式中,该第一BLE广播信号中包含第一AD Structure,该第一AD Structure中包含第一数据,第一数据用于指示第一设备将向第二设备发送page请求。该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
结合第一方面,在一种可能的实现方式中,在第二设备接收到第一设备发送的page数据包之后,第二设备可以停止BLE scan。通过这种方式,可以节省第二设备的功耗。
结合第一方面,在一种可能的实现方式中,在第二设备接收到第二BLE广播信号之后,第二设备可以停止BLE scan。通过这种方式,可以节省第二设备的功耗。
第二方面,本申请实施例提供了一种蓝牙回连的方法,该方法应用于蓝牙连接系统,该蓝牙连接系统包括第一设备和第二设备,该方法包括:当蓝牙连接断开时,该第一设备向该第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;该第二设备根据接收到的该第二BLE广播信号向该第一设备发送第二page数据包,该第二page数据包中包含该第一设备的设备标识;该第一设备根据接收到的该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标 识;该第二设备根据接收到的该第二ID包向该第一设备发送第二FHS数据包,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息;该第一设备根据接收到的该第二FHS数据包切换至connection状态,并向该第二设备发送第四ID包;该第二设备根据接收到的该第四ID包切换至connection状态。通过这种方式,可以避免第一设备以及第二设备两方同时发送page数据包而造成的page请求碰撞的问题,提升蓝牙回连的成功率。
结合第二方面,在一种可能的实现方式中,该方法还包括:当该第一设备接收到该第二设备发送的该第二page数据包时,该第一设备从page scan状态切换至slave page response状态;当该第二设备接收到该第一设备发送的该第三ID包时,该第二设备从page状态切换至master page response状态。
结合第二方面,在一种可能的实现方式中,该当蓝牙连接断开时,该第一设备向该第二设备发送第二BLE广播信号,包括:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,该第一设备向该第二设备发送第二BLE广播信号。
结合第二方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第二方面,在一种可能的实现方式中,在蓝牙连接断开之后,第二设备还可以显示回连指示信息,该回连指示信息用于指示第二设备正在恢复蓝牙连接。
结合第二方面,在一种可能的实现方式中,该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
结合第二方面,在一种可能的实现方式中,在第二设备接收到第二BLE广播信号之后,第二设备可以停止BLE scan。通过这种方式,可以节省第二设备的功耗。
第三方面,本申请实施例提供了一种第一设备,该第一设备包括蓝牙芯片、存储器和一个或多个处理器;该存储器与该一个或多个处理器耦合;其中:该蓝牙芯片支持经典蓝牙BR/EDR功能和BLE功能;该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令;当该计算机指令被该一个或多个处理器执行时,使得该第一设备执行以下操作:当蓝牙连接断开时,向第二设备发送第一低功耗蓝牙BLE广播信号,该第一BLE广播信号用于指示该第一设备将向该第二设备发起寻呼page;向该第二设备发送第一page数据包,该第一page数据包中包含该第二设备的设备标识;当在预设时长内接收到该第二设备发送的第一ID包时,向该第二设备发送第一FHS数据包,其中,该第一ID包中包含该第二设备的设备标识,该第一ID包是该第二设备根据该第一page数据包向该第一设备发送的,该第一FHS数据包中包含该第一设备的蓝牙地址和时钟信息;根据接收到的该第二设备发送的第二ID包切换至connection状态,该第二ID包是该第二设备根据该第一FHS数据包向该第一设备发送的。
结合第三方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备还执行以下操作:当在该预设时长内未接收到该第二设备发送的第一ID包时,向该第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;接收该第二设备发送的第二page数据包,该第二page数据 包中包含该第一设备的设备标识,该第二page数据包是该第二设备根据该第二BLE广播信号向该第一设备发送的;根据该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;接收该第二设备发送的第二FHS数据包切换至connection状态,其中,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息,该第二FHS数据包是该第二设备根据该第三ID包向该第一设备发送的;根据该第二FHS数据包向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识。
结合第三方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备还执行以下操作:当在预设时长内接收到该第二设备发送的该第一ID包时,从page状态切换至主单元寻呼响应master page response状态。
结合第三方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备还执行以下操作:当接收到该第二设备发送的该第二page数据包时,从page scan状态切换至slave page response状态。
结合第三方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备具体执行以下操作:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送该第一BLE广播信号。
结合第三方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第三方面,在一种可能的实现方式中,该第一BLE广播信号中包含第一AD Structure,该第一AD Structure中包含第一数据,第一数据用于指示第一设备将向第二设备发送page请求。该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
第四方面,本申请实施例提供了一种第一设备,其特征在于,该第一设备包括蓝牙芯片、存储器和一个或多个处理器,该存储器与该一个或多个处理器耦合,其中:该蓝牙芯片支持BR/EDR功能和BLE功能;该存储用于存储计算机程序代码,该计算机程序代码包括计算机指令;当该计算机指令被该一个或多个处理器执行时,使得该第一设备执行以下操作:当蓝牙连接断开时,向第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;接收该第二设备发送的第二page数据包,该第二page数据包中包含该第一设备的设备标识,该第二page数据包是该第二设备根据该第二BLE广播信号向该第一设备发送的;根据该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;接收该第二设备发送的第二FHS数据包切换至connection状态,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息,该第二FHS数据包是第二设备根据该第三ID包向该第一设备发送的;根据该第二FHS数据包向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识,该第四ID包用于指示该第二设备切换至connection状态。
结合第四方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备还执行以下操作:当接收到该第二设备发送的该第二page数据包时,从page scan状态切换至slave page response状态。
结合第四方面,在一种可能的实现方式中,当该计算机指令被该一个或多个处理器执行时,使得该第一设备具体执行以下操作:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送第二BLE广播信号。
结合第四方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第四方面,在一种可能的实现方式中,该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
第五方面,本申请实施例提供了一种蓝牙芯片,其特征在于,该蓝牙芯片用于执行以下操作:当蓝牙连接断开时,向第二设备发送第一低功耗蓝牙BLE广播信号,该第一BLE广播信号用于指示第一设备将向该第二设备发起寻呼page;向该第二设备发送第一page数据包,该第一page数据包中包含该第二设备的设备标识;当在预设时长内接收到该第二设备发送的第一ID包时,向该第二设备发送第一FHS数据包,其中,该第一ID包中包含该第二设备的设备标识,该第一ID包是该第二设备根据该第一page数据包向该第一设备发送的,该第一FHS数据包中包含该第一设备的蓝牙地址和时钟信息;根据接收到的该第二设备发送的第二ID包切换至connection状态,该第二ID包是该第二设备根据该第一FHS数据包向该第一设备发送的。
结合第五方面,在一种可能的实现方式中,该蓝牙芯片还用于执行以下操作:当在该预设时长内未接收到该第二设备发送的第一ID包时,向该第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;接收该第二设备发送的第二page数据包,该第二page数据包中包含该第一设备的设备标识,该第二page数据包是该第二设备根据该第二BLE广播信号向该第一设备发送的;根据该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;接收该第二设备发送的第二FHS数据包切换至connection状态,其中,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息,该第二FHS数据包是该第二设备根据该第三ID包向该第一设备发送的;根据该第二FHS数据包向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识。
结合第五方面,在一种可能的实现方式中,该蓝牙芯片还用于执行以下操作:当在预设时长内接收到该第二设备发送的该第一ID包时,从page状态切换至主单元寻呼响应master page response状态。
结合第五方面,在一种可能的实现方式中,该蓝牙芯片还用于执行以下操作:当接收到该第二设备发送的该第二page数据包时,从page scan状态切换至slave page response状态。
结合第五方面,在一种可能的实现方式中,该蓝牙芯片具体用于执行以下操作:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送该第一BLE广播信号。
结合第五方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设 备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第五方面,在一种可能的实现方式中,该第一BLE广播信号中包含第一AD Structure,该第一AD Structure中包含第一数据,第一数据用于指示第一设备将向第二设备发送page请求。该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
第六方面,本申请实施例提供了一种蓝牙芯片,该蓝牙芯片用于执行以下操作:当蓝牙连接断开时,向第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;接收该第二设备发送的第二page数据包,该第二page数据包中包含该第一设备的设备标识,该第二page数据包是该第二设备根据该第二BLE广播信号向该第一设备发送的;根据该第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;接收该第二设备发送的第二FHS数据包切换至connection状态,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息,该第二FHS数据包是第二设备根据该第三ID包向该第一设备发送的;根据该第二FHS数据包向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识,该第四ID包用于指示该第二设备切换至connection状态。
结合第六方面,在一种可能的实现方式中,该蓝牙芯片还用于执行以下操作:当接收到该第二设备发送的该第二page数据包时,从page scan状态切换至slave page response状态。
结合第六方面,在一种可能的实现方式中,该蓝牙芯片还用于执行以下操作:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送第二BLE广播信号。
结合第六方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第六方面,在一种可能的实现方式中,该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
第七方面,本申请实施例提供了一种蓝牙连接系统,该蓝牙系统包括第一设备和第二设备,其中:该第一设备,用于:当蓝牙连接断开时,向该第二设备发送第一低功耗蓝牙BLE广播信号,该第一BLE广播信号用于指示该第一设备将向该第二设备发起寻呼page;向该第二设备发送第一page数据包,该第一page数据包中包含该第二设备的设备标识;当在预设时长内接收到该第二设备发送的第一ID包时,向该第二设备发送第一FHS数据包,其中,该第一ID包中包含该第二设备的设备标识,该第一ID包是该第二设备根据该第一page数据包向该第一设备发送的,该第一FHS数据包中包含该第一设备的蓝牙地址和时钟信息;根据接收到第二设备发送的第二ID包切换至connection状态。该第二设备,用于根据接收到的该第一FHS数据包切换至连接connection状态,并向该第一设备发送第二ID包,该第二ID包中包含该第二设备的设备标识。
结合第七方面,在一种可能的实现方式中,该第一设备,还用于:当在该预设时长内未接收到该第二设备发送的第一ID包时,向该第二设备发送第二BLE广播信号,该第二 BLE广播信号用于指示该第二设备向该第一设备发起page;根据接收到的该第二设备发送的第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;根据接收到的该第二设备发送的第二FHS数据包,切换至connection状态,并向该第二设备发送第四ID包,该第四ID包中包含该第一设备的设备标识。该第二设备,还用于:根据接收到的该第二BLE广播信号向该第一设备发送第二page数据包,该第二page数据包中包含该第一设备的设备标识;根据接收到的该第三ID包向该第一设备发送第二FHS数据包,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息;根据接收到的该第四ID包切换至connection状态。
结合第七方面,在一种可能的实现方式中,该第一设备,还用于:当在预设时长内接收到该第二设备发送的该第一ID包时,从page状态切换至主单元寻呼响应master page response状态。
结合第七方面,在一种可能的实现方式中,该第一设备,还用于:当接收到该第二设备发送的该第二page数据包时,从寻呼扫描page scan状态切换至slave page response状态。
结合第七方面,在一种可能的实现方式中,该第一设备,还用于:当接收到该第一设备发送的该第三ID包时,从page状态切换至主单元寻呼响应master page response状态。
结合第七方面,在一种可能的实现方式中,该第一设备,具体用于:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送第一BLE广播信号。
结合第七方面,在一种可能的实现方式中,当蓝牙连接断开时,该第二设备处于低功耗蓝牙扫描BLE scan状态。
结合第七方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第七方面,在一种可能的实现方式中,该第一BLE广播信号中包含第一AD Structure,该第一AD Structure中包含第一数据,第一数据用于指示第一设备将向第二设备发送page请求。该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
结合第七方面,在一种可能的实现方式中,第二设备还用于:在接收到第一设备发送的page数据包之后,停止BLE scan。通过这种方式,可以节省第二设备的功耗。
结合第七方面,在一种可能的实现方式中,第二设备还用于:在接收到第二BLE广播信号之后,停止BLE scan。通过这种方式,可以节省第二设备的功耗。
第八方面,本申请实施例提供了一种蓝牙连接系统,该蓝牙连接系统包括第一设备和第二设备,其中:该第一设备,用于:当蓝牙连接断开时,向该第二设备发送第二BLE广播信号,该第二BLE广播信号用于指示该第二设备向该第一设备发起page;根据接收到的该第二设备发送的第二page数据包向该第二设备发送第三ID包,该第三ID包中包含该第一设备的设备标识;根据接收到的该第二设备发送的第二FHS数据包切换至connection状态,并向该第二设备发送第四ID包。该第二设备,用于:根据接收到的该第一设备发送的第二BLE广播信号向该第一设备发送第二page数据包,该第二page数据包中包含该第一设备的设备标识;根据接收到的该第一设备发送的第二ID包向该第一设备发送第二FHS 数据包,该第二FHS数据包中包含该第二设备的蓝牙地址和时钟信息;根据接收到的该第一设备发送的第四ID包切换至connection状态。
结合第八方面,在一种可能的实现方式中,该第一设备还用于:当接收到该第二设备发送的该第二page数据包时,从page scan状态切换至slave page response状态。
结合第八方面,在一种可能的实现方式中,该第二设备还用于:当接收到该第一设备发送的该第三ID包时,该第二设备从page状态切换至master page response状态。
结合第八方面,在一种可能的实现方式中,该第一设备具体用于:当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向该第二设备发送第二BLE广播信号。
结合第八方面,在一种可能的实现方式中,当蓝牙连接断开时,该第二设备处于BLE scan状态。
结合第八方面,在一种可能的实现方式中,该第一设备的设备标识可以包括该第一设备的DAC或者IAC;该第二设备的设备标识可以包括该第二设备的DAC或者IAC。
结合第八方面,在一种可能的实现方式中,该第二BLE广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据,第二数据用于指示第二设备向第一设备发送page请求。
结合第八方面,在一种可能的实现方式中,第二设备还用于:在接收到第一设备发送的page数据包之后,停止BLE scan。通过这种方式,可以节省第二设备的功耗。
结合第八方面,在一种可能的实现方式中,第二设备还用于:在接收到第二BLE广播信号之后,停止BLE scan。通过这种方式,可以节省第二设备的功耗。
第九方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面任一项可能的实现方式,或者上述第二方面任一可能的实现方式中的蓝牙回连方法。
第十方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行执行上述第一方面任一项可能的实现方式,或者上述第二方面任一可能的实现方式中的蓝牙回连方法。
在本申请实施例中,第一设备可以为蓝牙耳机,第二设备可以为移动终端,在移动终端和蓝牙耳机的蓝牙连接断开之后,蓝牙耳机向移动终端发送BLE广播信号。若移动终端确定接收到的是第一BLE广播信号,则移动终端无需page蓝牙耳机,并等待接收蓝牙耳机发送的page数据包;若移动终端确定接收到的是第二BLE广播信号,则移动终端主动page蓝牙耳机,蓝牙耳机等待接收移动终端发送的page数据包。通过这种方式,可以避免移动终端以及蓝牙耳机两方同时发送page数据包而造成的page请求碰撞的问题,提升蓝牙回连的成功率。
附图说明
图1A是本申请实施例提供的一种蓝牙连接系统的示意图;
图1B是本申请实施例提供的一种中心设备上显示的蓝牙设置界面的示意图;
图1C是本申请实施例提供的一种中心设备上显示的快捷操作菜单的示意图;
图1D是本申请实施例提供的一种蓝牙回连方法的流程示意图;
图2A是本申请实施例提供的一种电子设备的结构示意图;
图2B是本申请实施例提供的一种电子设备的软件结构框图;
图2C是本申请实施例提供的又一种电子设备的结构示意图;
图3是本申请实施例提供的又一种蓝牙回连的方法的流程示意图;
图4A是本申请实施例提供的一种在中心设备上显示回连指示信息的用户界面的示意图;
图4B是本申请实施例提供的一种第一BLE广播信号的数据格式的示意图;
图4C是本申请实施例提供的一种第二BLE广播信号的数据格式的示意图;
图5是本申请实施例提供的又一种蓝牙回连的方法的流程示意图;
图6是本申请实施例提供的又一种蓝牙回连的方法的流程示意图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清除、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请实施例中的用户界面(user interface,UI),是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备300设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control),是用户界面的基本元素,典型的控件有按钮(button)、小工具(widget)、工具栏(toolbar)、菜单栏(menu bar)、文本框(text box)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言编写的源代码,例如超文本标记语言(hyper text markup language,HTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如HTML通过<p>、<img>、<video>、<canvas>来定义网页的元素和属性。
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素。
接下来,对本申请实施例提供的蓝牙连接系统进行介绍。请参见图1A,图1A是本申请实施例提供的一种蓝牙连接系统的示意图。蓝牙连接系统10可以包括中心设备100以及外围设备200。其中:
中心设备100,可以为移动终端、平板电脑、笔记本电脑、个人电脑等具备蓝牙连接功能的电子设备,图1A中以移动终端为例。外围设备200可以是无线(蓝牙)耳机、智能音箱、智能手表、便携式媒体播放设备、车载媒体播放设备等具备蓝牙连接功能的电子设备,图1A中以无线耳机为例。中心设备100和外围设备200可以通过蓝牙进行连接。
目前,蓝牙连接的断开可以分为两种,一种是中心设备接收到用户在中心设备的界面中输入的关闭中心设备的蓝牙功能的操作,响应于该操作,中心设备与外围设备的蓝牙连接断开;或者,外围设备接收到用户在外围设备的界面、按钮输入的关闭外围设备的蓝牙功能(或者电源)的操作,响应于该操作,中心设备与外围设备的蓝牙连接断开。这种断开蓝牙连接的方式可以称为“主动断开”。举例来说,中心设备接收到的主动断开蓝牙连接的用户操作可以为:用户点击中心设备的蓝牙设置界面中的开关控件的操作(可参见图1B所对应的实施例中,用户作用于开关控件201的用户操作),用户点击中心设备的快捷操作菜单中的蓝牙控件的操作(可参见图1C所对应的实施例中,用户作用于蓝牙控件210的用户操作)。另外,在中心设备主动断开蓝牙连接的情况下,中心设备将接收到“connection terminated by local host”等错误码(error code),外围设备将接收到“remote user terminated connection”等错误码。
另一种是由于蓝牙连接的距离拉远或者信号质量较差导致等原因的蓝牙连接断开。这种断开蓝牙连接的方式可以称为“被动断开”。举例来说,中心设备的蓝牙接收信号强度(received signal strength indicator,RRSI)低于阈值。这个阈值可以进行设定,例如,可以为-80dBm、-90dBm等。这种情况可以视为蓝牙连接被动断开。另外,在中心设备或者外围设备蓝牙连接被动断开的情况下,将接收到“connection timeout”等错误码。还可以丢包率、误包率等参数低于阈值。通常来讲,外围设备200在蓝牙连接被动断开之后,会主动向已配对的中心设备100(最近一次连接的中心设备)发送page数据包,以恢复蓝牙连接。这种蓝牙回连的方法可以参照图1D所示的方法流程图。图1D所示的方法至少包括以下步骤:
S101、当蓝牙连接被动断开时,外围设备向中心设备发送page数据包。
具体的,当蓝牙连接被动断开时,外围设备进入page状态。在外围设备进入page状态之后,外围设备向中心设备发送page数据包。可选的,外围设备每隔预设时间选择一个新的频率来发送page数据包。其中,外围设备发送的page数据包中包括中心设备的设备访问码(device access code,DAC)。
蓝牙系统中存在三种不同的访问码(access code),这三种访问码为:设备访问码、通道访问码(channel access code,CAC)和查询访问码(inquiry access code,IAC)。设备访 问码用于page、page scan以及page response的流程中,设备访问码根据被page的电子设备的蓝牙地址(BD_ADDR)生成。通道访问码在连接(connection)状态时使用,作为蓝牙网络中物理信道上交换的数据帧的包头(packet header)。CAC包括preamble、sync word和trailer位,其总长为72位。CAC根据发起page的电子设备的BD_ADDR的LAP生成。查询访问码在查询(inquiry)状态时使用,一旦作为不带包头的自包含信息传输时,DAC和IAC就不包括trailer位,其长度达到68位。
需要说明的是,当蓝牙连接被动断开时,中心设备处于page scan状态。在中心设备处于page scan状态的情况下,会根据寻呼跳变序列(paging hopping sequence)每隔1.28s选择一个新的监听频率监听自己的设备访问码。中心设备使用的寻呼跳变序列是一个定义明确的周期序列,它的各个频点均匀分布在2.4G的79个频率信道上。其中,中心设备在一个寻呼频率信道上扫描的持续时间可以被称为寻呼扫描窗口(page scan windows),且寻呼扫描窗口大小固定。连续两个寻呼扫描窗口的开始时间之间的间隔可以被称为寻呼扫描间隔(page scan interval),且寻呼扫描间隔固定。寻呼扫描间隔的取值范围可以为11.25me-2560ms。中心设备在一个扫描窗口存在的时间段中,监听中心设备的设备访问码(device access code,DAC)。
S102、在接收到外围设备发送的page数据包之后,中心设备根据该page数据包向外围设备发送ID包。
具体的,中心设备根据该page数据包向外围设备发送ID包的方式可以为:中心设备确定page数据包中包含自己的DAC,中心设备向外围设备发送ID包。其中,该ID包中携带中心设备的设备访问码或者查询访问码(inquiry access code,IAC)。ID包的总长度为68位。此时,中心设备从寻呼扫描(page scan)状态切换为从单元寻呼响应(slave page response)状态。
S103、在接收到中心设备发送的ID包之后,外围设备根据该ID包向中心设备发送FHS数据包。
其中,FHS数据包是表明电子设备的蓝牙地址和发送方时钟(CLK)的特殊控制数据包。FHS数据包可以用于寻呼主单元响应、查询响应和跳频同步。具体的,外围设备向中心设备发送的FHS数据包中包括外围设备的蓝牙地址、实时时钟等信息。需要说明的是,在接收到中心设备发送的ID包之后,外围设备从page状态切换为主单元寻呼响应(master page response)状态。
S104、在接收到外围设备发送的FHS数据包之后,中心设备根据该FHS数据包向外围设备发送ID包。
其中,ID包中携带中心设备的设备访问码或者查询访问码。在接收到外围设备发送的FHS数据包之后,中心设备从slave page response状态切换为连接(connection)状态。另外,在接收到中心设备发送的ID包之后,外围设备从主单元寻呼响应(slave page response)状态切换为连接(connection)状态。此时,中心设备以及外围设备均处于连接状态,蓝牙连接恢复。
可选的,在接收到中心设备发送的ID包之后,外围设备可以根据该ID数据包向中心设备发送POLL数据包。其中,POLL数据包用于检查从设备(中心设备)是否启动。在 中心设备接收到POLL数据包之后,可以根据该POLL数据包向外围设备发送任何类型的数据包。
需要说明的是,在一些场景中,在蓝牙连接被动断开之后,中心设备也会向外围设备发起page。例如,中心设备为智能终端,外围设备为蓝牙耳机。在用户使用蓝牙耳机播放智能终端上的音乐播放器中的歌曲的过程中,若蓝牙耳机离开了智能终端的附近区域,超出了支持蓝牙连接的最大距离,蓝牙连接被动断开。音乐播放器可能向智能终端发送蓝牙连接的请求,响应于该请求,智能终端向外围设备发起page。相似的,视频播放类、游戏类等第三方应用程序,也可能在蓝牙连接被动断开时,向智能终端发送蓝牙连接的请求。在又一种可能的场景中,在蓝牙连接被动断开之后,智能终端可能会接收到用户作用于蓝牙设备界面中的未连接的蓝牙设备选项的点击操作,响应于用户的点击操作,智能终端向蓝牙耳机发起page。这种点击操作可以参照图1B所对应的实施例中,用户作用于控件204的点击操作。
在上述场景中,外围设备向中心设备发起page的同时,中心设备也发起对外围设备的page,即,中心设备以及外围设备均处于page状态。那么,中心设备无法接收到外围设备发送的page数据包,外围设备也无法接收到中心设备发送的page数据包。中心设备和外围设备两方的page请求发生碰撞,导致蓝牙连接失败。
在本申请实施例中,在蓝牙连接被动断开之后,外围设备首先向中心设备发送BLE广播信号,该BLE广播信号用于指示中心设备是否需要向外围设备发起page。若BLE广播信号为指示中心设备无需向外围设备发起page的第一BLE广播信号,则中心设备不向外围设备发起page,并等待接收外围设备的page数据包。若BLE广播信号为指示中心设备向外围设备发起page的第二BLE广播信号,则中心设备向外围设备发起page,外围设备等待接收中心设备发送的page数据包。通过这种方式,可以避免中心设备和外围设备两方的page请求发生碰撞的问题,提升蓝牙回连的成功率。
在本申请实施例中,图1A所示的蓝牙连接系统10是基于蓝牙协议的蓝牙系统。即,中心设备100、外围设备200可以均支持蓝牙低功耗(bluetooth low energy,BLE)的广播通信功能。具体的,外围设备200可以在BLE广播信道上广播BLE广播信号,中心设备100可以扫描BLE广播信道并接收BLE广播信号。
可以理解的,本申请实施例以蓝牙连接系统10是基于蓝牙协议实现为例进行介绍,但是本申请实施例不限于BLE广播通信,也可以是Wi-Fi广播通信或者其他短距离的无线广播通信(例如,近场通信(near field communication,NFC)),本申请实施例对广播通信的方式不做限制。
参见图1B,是本申请实施例提供的一种中心设备100上显示的蓝牙设置界面的示意图。具体的,图1B所示的蓝牙设备界面中包括:开关控件201、详情控件201、控件203、控件204、控件205以及控件206。其中:
开关控件201,可以用于设置蓝牙的开启/关闭状态。具体的,开关控件201有两个显示状态,“ON(开启)”状态和“OFF(关闭)”状态。在开关控件201显示为“ON”状态时,若接收到用户对开关控件201的用户操作,则响应于该用户操作,电子设备关闭 蓝牙连接,并将开关控件201从显示“ON”状态切换为显示“OFF”状态。需要说明的,这种断开蓝牙连接的方式为“主动断开”蓝牙连接的方式。还可以存在其他的人为操作使得蓝牙连接断开,例如,用户对快捷操作菜单中的蓝牙控件的用户操作,可以使得蓝牙从开启状态切换为关闭状态(可参见图1C所示的实施例),以及用户输入的语音指令(例如,“关闭/断开蓝牙连接”)使得蓝牙从开启状态切换为关闭状态。在开关控件201显示为“OFF”状态时,若接收到用户对开关控件201的用户操作,则响应于该用户操作,电子设备开启蓝牙连接,并将开关控件201从显示“OFF”状态切换为显示“ON”状态。
详情控件201,可以用于查看中心设备100的蓝牙的详情信息,例如,蓝牙的名称。
控件203,可以用于接收用户的操作(例如,点击操作),响应于该用户的操作,中心设备100显示通过蓝牙接收到的文件的信息。
控件204,可以用于接收用户的操作(例如,点击操作),响应于该用户的操作,中心设备100向控件204指示的外围设备HUAWEI free buds发送page数据包,以进行蓝牙连接。具体的,控件204指示的外围设备HUAWEI free buds为已与本中心设备100配对成功的电子设备。其中,控件204中的指示信息“未连接状态”表明当前中心设备100未与外围设备HUAWEI free buds建立蓝牙连接。若控件204显示指示信息为“已连接状态”,则表明当前中心设备100已经与外围设备HUAWEI free buds建立了蓝牙连接。需要说明的是,若在非人为操作导致的蓝牙连接断开之后,控件204接收到了用户的操作,则响应于该用户的操作,中心设备100向外围设备HUAWEI free buds发送page数据包,以恢复蓝牙连接。
控件205,可以用于接收用户的操作,响应于该用户的操作,中心设备100与控件205指示的电子设备HUAWEI Mate 20进行蓝牙配对,在蓝牙配对成功之后,中心设备100与电子设备HUAWEI Mate 20进行蓝牙连接。在蓝牙连接成功之后,中心设备100与电子设备HUAWEI Mate 20之间成功建立蓝牙连接,可以通过蓝牙进行数据传输。需要说明的是,在中心设备100与电子设备HUAWEI Mate 20蓝牙配对成功之后,中心设备100将存储电子设备HUAWEI Mate 20的配对记录,并将电子设备HUAWEI Mate 20的信息显示在“已配对的设备”的信息列表中。
控件206,可以用于接收用户的操作,响应于该用户的操作,中心设备100与控件206指示的电子设备HUAWEI Mate 10进行蓝牙配对,在蓝牙配对成功之后,中心设备100与电子设备HUAWEI Mate 10进行蓝牙连接。在蓝牙连接成功之后,中心设备100与电子设备HUAWEI Mate 10之间成功建立蓝牙连接,可以通过蓝牙进行数据传输。相似的,在中心设备100与电子设备HUAWEI Mate 10蓝牙配对成功之后,中心设备100将存储电子设备HUAWEI Mate 10的配对记录,并将电子设备HUAWEI Mate 10的信息显示在“已配对的设备”的信息列表中。
参见图1C,是本申请实施例提供的一种中心设备100上显示的快捷操作菜单的示意图。需要说明的是,图1C所示意的快捷操作菜单211为下拉菜单,可选的,该快捷操作菜单还可以为上拉菜单,侧拉菜单,悬浮菜单等,本申请实施例不做限制。具体的,若快捷菜单211中蓝牙控件210的显示状态为高亮,则表明当前中心设备100的蓝牙处于开启状态。在这种情况下,若检测到用户作用于蓝牙控件210的用户操作,响应于该用户操作,中心设 备100将蓝牙从开启状态切换为关闭状态,并取消蓝牙控件210的高亮显示。这种断开蓝牙连接的方式也为“主动断开”蓝牙连接的方式。
本申请实施例中,中心设备100可以为一种电子设备,下面对本申请实施例涉及的电子设备10进行介绍。请参阅图2A,图2A是本申请实施例提供的电子设备10的结构示意图。
电子设备10可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
应该理解的是,图2A所示电子设备10仅是一个范例,并且电子设备10可以具有比图2A中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备10的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备10的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备10的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备10的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备10充电,也可以用于电子设备10与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备10的结构限定。在本申请另一些实施例中,电子设备10也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备10的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备10的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备10中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备10上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备10上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
其中,无线通信模块160中的BT和BLE广播功能可以是由蓝牙芯片实现。电子设备10扫描BLE广播信道并接收回连广播信号,需要将蓝牙芯片上电,且启用蓝牙芯片上的扫描BLE广播信号功能相关的软件模块。本申请实施例中,若中心设备100判定与外围设备200的蓝牙连接断开是非人为操作导致的,则可以通过打开扫描BLE广播信号功能使得蓝 牙芯片上电。
在一些实施例中,电子设备10的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备10可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备10通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备10可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备10可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备10可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备10在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备10可以支持一种或多种视频编 解码器。这样,电子设备10可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备10的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备10的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备10的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备10使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备10可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备10可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备10接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备10可以设置至少一个麦克风170C。在另一些实施例中,电子设备10可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备10还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少 两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备10根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备10根据压力传感器180A检测所述触摸操作强度。电子设备10也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备10的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备10围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备10抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备10的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备10通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备10可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备10是翻盖机时,电子设备10可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备10在各个方向上(一般为三轴)加速度的大小。当电子设备10静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备10可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备10可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备10通过发光二极管向外发射红外光。电子设备10使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备10附近有物体。当检测到不充分的反射光时,电子设备10可以确定电子设备10附近没有物体。电子设备10可以利用接近光传感器180G检测用户手持电子设备10贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备10可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备10是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备10可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备10利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备10执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在 另一些实施例中,当温度低于另一阈值时,电子设备10对电池142加热,以避免低温导致电子设备10异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备10对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备10的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备10可以接收按键输入,产生与电子设备10的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备10的接触和分离。电子设备10可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备10通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备10采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备10中,不能和电子设备10分离。
电子设备10的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备10的软件结构。
图2B是本申请实施例提供的一种电子设备10的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用层,应用框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用层可以包括一系列应用包。
如图2B所示,应用包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用。
应用框架层为应用层的应用提供应用编程接口(application programming interface,API)和编程框架。应用框架层包括一些预先定义的函数。
如图2B所示,应用框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备10的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,智能终端振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用层和应用框架层运行在虚拟机中。虚拟机将应用层和应用框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,G.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
本申请实施例中,外围设备200可以为一种电子设备,下面对本申请实施例涉及的电子设备20进行介绍。请参阅图2C,图2C是本申请实施例提供的电子设备20的结构示意图。
如图2C所示,电子设备20可以包括:处理器301、存储器302、无线通信模块303、以及电源304。这些部件可以通过总线连接。
其中,处理器301可用于读取和执行计算机可读指令,处理器301执行这些应用程序代码以使得电子设备20执行本申请实施例中的方法。具体实现中,处理器301可主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责执行定点或浮点算数运算操作、移位操作以及逻辑操作等,也可以执行地址运算和转换。寄存器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器301的硬件架构可以是专用集成电路(Application Specific Integrated Circuits,ASIC)架构、MIPS架构、ARM架构或者NP架构等等。
在一些实施例中,处理器301可以用于解析无线通信处理模块303接收到的信号,例如,该接收到的信号可以是电子设备10发送的指示信息,该指示信息用于指示电子设备10接收到人为操作使得蓝牙连接断开。处理器301可以用于根据解析结果进行相应的处理操作,例如,在接收到这样的信号之后,电子设备20不会进行蓝牙回连,即电子设备20不会向电子设备10发送page数据包。
在一些实施例中,处理器301还可以用于生成无线通信处理模块303向外发送的信号,例如电子设备20向电子设备10发送的BLE广播信号。
存储器302与处理器301耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器302可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器302还可以存储通信程序,该通信程序可用于与电子设备10进行通信。存储器302中还可以存储用于唯一标识该电子设备20的蓝牙地址。
无线通信处理模块303可以包括蓝牙(BT)通信处理模块104A、WLAN通信处理模块104B中的一项或多项。无线通信模块303,用于支持电子设备20与电子设备10之间的短距离数据交互。在一些实施例中,该无线通信模块303可以包含蓝牙收发器,该蓝牙收发器支持BLE的广播通信功能。具体的,该蓝牙收发器可以用于发送BLE回连广播信号。该无线通信模块304还可以包含Wi-Fi模块,该Wi-Fi模块可发送回连广播信号。
电源304,可以用于向电子设备20包含的各个部件供电。在一些实施例中,该电源304可以是电池,如可充电电池。
可以理解的是,本申请实施例示意的结构并不构成对电子设备20的具体限定。电子设备20可以具有比图2C中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图2C中所示出的各种部件可以以硬件、软件、或软件和硬 件的组合实现。
下面基于上述内容中介绍的蓝牙连接系统10、电子设备10、电子设备20,结合其他附图对本申请实施例提供的蓝牙回连的方法进行详细说明。需要说明的是,在本申请实施例中,蓝牙连接是被动断开的,其中,被动断开的含义可参照上述内容中的描述,此处不再赘述。在本申请提供的以下实施例中,外围设备可以被称为第一设备,中心设备可以被称为第二设备。参见图3,是本申请实施例提供的一种蓝牙回连的方法的流程示意图。该方法至少包括以下步骤:
S301、中心设备与外围设备建立蓝牙连接。
其中,中心设备与外围设备建立的蓝牙连接为BR/EDR(Basic Rate/Enhanced Data Rate)连接,也称为经典蓝牙连接或者传统蓝牙连接。
在一种可能的实现方式中,在中心设备和外围设备建立了蓝牙连接之后,中心设备进入BLE scan状态。在又一种可能的实现方式中,在蓝牙连接被动断开之后,中心设备进入BLE scan状态。举例而言,中心设备可以在接收到“connection timeout”等错误码之后,进入BLE scan状态。通过这种方式,可以节省中心设备的功耗。
在中心设备进入BLE scan状态之后,将开启BLE扫描,以监听该移动终端周围环境中的BLE广播信号。中心设备扫描BLE广播信号的过程可以是中心设备依次在多个广播通道(例如BLE广播通道37(2402MHz)、BLE广播通道38(2426MHz)、BLE广播通道39(2480MHz))上扫描BLE广播信号。其中,中心设备在一个BLE广播通道上扫描的持续时间可以被称为扫描窗口,且扫描窗口大小固定(例如,扫描窗口可以取10ms至10.24s),连续两个扫描窗口的开始时间之间的间隔可以被称为扫描间隔,且扫描间隔固定(例如,扫描间隔可以取10ms至10.24s)。
在一种可能的实现方式中,在蓝牙连接被动断开之后,中心设备还可以在显示屏上显示回连指示信息,该回连指示信息用于指示中心设备正在恢复蓝牙连接。显示该回连指示信息的用户界面的示意图可参照图4A所示,后续内容将对图4A做详细的描述,此处不具体展开。
S302、在蓝牙连接被动断开之后,外围设备向中心设备发送第一BLE广播信号,该第一BLE广播信号用于指示中心设备无需page外围设备。
可选的,在外围设备的蓝牙连接满足预定条件时,确定蓝牙连接被动断开。其中,该预定条件可以是蓝牙连接的RSSI值低于阈值。这个阈值可以进行设定,例如,可以为-80dBm、-90dBm等。可选的,若外围设备接收到“connection timeout”等错误码,则确定蓝牙连接被动断开。
在一种可能的实现方式中,该第一BLE广播信号中包含第一AD Structure,该第一AD Structure中包含第一数据。具体的,该第一BLE广播信号的数据格式可参照图4B所示的示意图。其中,该第一BLE广播信号可以包括外围设备的蓝牙地址和广播数据(AdvData,AD)部分,广播数据部分包括,有效数据部分(significant)以及无效数据部分(non-significant)。具体的,有效数据部分由一个或多个广播数据单元(AD Structure)组成。在有效数据部分中,包含一个第一AD Structure,第一AD Structure中包含第一数据, 第一数据表示外围设备将向中心设备发送page请求,中心设备无需page外围设备。后续内容中将对图4B所示的第一BLE广播信号的数据格式进行详细的介绍,此处不具体展开。
在又一种可能的实现方式中,外围设备向中心设备发送第一BLE广播信号的方式具体为:外围设备向中心设备发送第一预设次数的第一BLE广播信号,其中,该第一预设次数可以为1次、2次、3次、4次等次数。两次相邻的第一BLE回连广播信号之间的第一时间间隔为100ms、150ms、200ms、300ms等预设的时间间隔。该第一预设次数以及该第一时间间隔均可以根据需要进行设定,本申请实施例不做限制。
在又一种可能的实现方式中,在中心设备接收该第一BLE广播信号之后,该中心设备根据该第一BLE广播信号保持BLE scan状态。可选的,中心设备根据该第一BLE广播信号保持BLE scan状态的方法具体为:首先,中心设备根据该第一BLE广播信号确定该外围设备的蓝牙地址与预存的历史连接记录中的一个蓝牙地址一致。之后,中心设备解析该第一BLE回连广播信号,确定该第一广播信号中包含第一数据。接下来,中心设备根据该第一数据确定保持BLE scan状态。其中,中心设备的历史连接记录用于保存和该中心设备蓝牙配对成功的一个或多个外围设备的蓝牙地址。
在又一种可能的实现方式中,在中心设备接收该第一BLE广播信号之后,若接收到了第三方应用发送的蓝牙连接的请求,或者接收到了用户作用于蓝牙设备界面中的未连接的蓝牙设备选项的点击操作,中心设备也不会向外围设备发起page。通过这种方式,可以避免在外围设备向中心设备发起page的同时,中心设备也向外围设备发起page的问题,不会造成page请求的碰撞,能够提升蓝牙回连的成功率。
S303、在向中心设备发送了第一BLE广播信号之后,外围设备向中心设备发送page数据包。
在一种可能的实现方式中,在向中心设备发送了第一BLE广播信号的预定时间内,外围设备向中心设备发送page数据包。其中,该page数据包中包含该中心设备的设备访问码。外围设备向中心设备发送page数据包时,处于page状态。
另外,外围设备向中心设备发送的两次相邻的page数据包之间的第二时间间隔为100ms、150ms、200ms、300ms等预设的时间间隔。需要说明的是,若在预设时长内未接收到中心设备根据page数据包反馈的ID包,外围设备确定寻呼超时(page timeout),不再向中心设备发送page数据包,并从page状态切换为page scan状态。其中,预设时长的取值范围可以为0.625ms-40.9s。若在预设时长内接收到了中心设备根据page数据包反馈的ID包,外围设备不再向中心设备发送page数据包,并从page状态切换为master page response状态。
在又一种可能的实现方式中,在中心设备接收到外围设备发送的page数据包之后,中心设备可以停止BLE scan。通过这种方式,可以节省中心设备的功耗。
S304、在接收到外围设备发送的page数据包之后,中心设备根据该page数据包向外围设备发送ID包。
可选的,中心设备根据该page数据包向外围设备发送ID包的方式可以为:中心设备根据该page数据包确定该page数据包中包含中心设备的设备访问码,中心设备向外围设备发送ID包。
S305、在接收到中心设备发送的ID包之后,外围设备根据该ID包向中心设备发送FHS数据包。
S306、在接收到外围设备发送的FHS数据包之后,中心设备根据该FHS数据包向外围设备发送ID包。
在接收到外围设备发送的FHS数据包之后,中心设备从slave page response状态切换为连接(connection)状态。另外,在接收到中心设备发送的ID包之后,外围设备从主单元寻呼响应(slave page response)状态切换为连接(connection)状态。此时,中心设备以及外围设备均处于连接状态,蓝牙连接恢复。需要说明的是,S304-S306的具体实施方式可以参照S102-S104的实施方式,此处不再赘述。
参见图4A,是本申请实施例提供的一种在中心设备上显示回连指示信息的用户界面的示意图。
图4A示例性示出了用于显示音乐播放的用户界面41的示意图。其中,用户界面41中包括下载控件415、分享控件416、更多控件417、播放进度指示信息414、播放/暂停控件411、上一首控件413、下一首控件412和通知窗口418。其中:
下载控件415,可用于接收用户操作,响应于该用户操作,中心设备100将当前播放的歌曲存储到中心设备本地。
分享控件416,可用于接收用户操作,响应于该用户操作,中心设备100显示一个或多个分享选项,例如,微信好友、朋友圈、微博、QQ好友、复制链接等。用户可以通过选择某个分享选项,将当前播放的歌曲分享到该分享选项对应的地址中。
更多控件417,可用于接收用户操作,响应于该用户的操作,中心设备100显示菜单窗口,该菜单窗口可以包括一个或多个操作选项,例如,添加到歌单、删除、查看歌手、查看专辑、播放视频等。
播放进度指示信息414,可用于指示当前歌曲的播放进度,可以包括进度条、当前播放时刻以及歌曲总时长等信息。
播放/暂停控件411,可用于切换歌曲的播放/暂停状态。具体的,在当前歌曲正在通过蓝牙耳机进行播放的情况下,若蓝牙断开连接,则播放/暂停控件411从显示第一状态切换为显示第二状态,其中,第一状态用于指示当前歌曲处于播放状态,第二状态用于指示当前歌曲处于暂停状态。
上一首控件413,可用于接收用户操作,响应于该用户操作,中心设备100从播放当前歌曲切换为播放当前歌曲的上一首歌曲。
下一首控件412,可用于接收用户操作,响应于该用户操作,中心设备100从播放当前歌曲切换为播放当前歌曲的下一首歌曲。
通知窗口418,可用于显示回连指示信息410。回连指示信息410用于指示中心设备正在恢复蓝牙连接。在一种可能的实现方式中,通知窗口418在显示预设时间后消失,该预设时间可以为4秒,5秒等时间值。或者,当通知窗口418接收到用户的向上滑动的操作时,响应于该操作,中心设备100不再在用户界面41中显示通知窗口418。
参见图4B,是本申请实施例提供的一种第一BLE广播信号的数据格式的示意图。其中,该第一BLE广播信号可以包括外围设备的蓝牙地址以及广播数据部分。其中,广播数据部分包括,有效数据部分以及无效数据部分。外围设备的蓝牙地址占据6字节(byte),广播数据部分占据31字节。
如图4B所示,有效数据部分由N个AD Structure组成。一个AD Structure用于描述发送该BLE回连广播信号的电子设备的信息。具体的,一个AD Structure中包括Length字段以及Data字段,其中,Data字段包括AD Type字段和AD Data字段。
Length字段指示了AD Type字段和AD Data字段的长度,AD Type字段指示了AD Data字段的含义,AD Data字段中包含了描述发送该BLE回连广播信号的电子设备的信息。举例而言,AD type可以为“Flag”,“Flag”说明了电子设备的物理连接功能。通过解析AD Data字段可以知晓电子设备的物理连接功能,例如,该物理连接功能可以为有限发现模式,普通发现模式,不支持经典蓝牙模式等。
由于广播数据部分必须占据是31个字节,如果有效数据部分少于31个字节,则除有效数据部分剩下的广播数据部分就用0补全,这部分的为0的数据就是无效数据部分。
需要说明的是,上述内容中介绍的第一AD Structure可以为N个AD Structure中的任意一个,第一数据在AD Data中的位置也可以根据需要进行设定。举例而言,该第一数据可以为1。
在又一种可能的实施方式中,在外围设备向中心设备发送page数据包之后,中心设备可能无法成功接收到外围设备发送的page数据包。在这种情况下,在预设时长内未接收到中心设备发送的ID包,外围设备确定page timeout,不再向中心设备发送page数据包,并向中心设备发送第二BLE广播信号,其中,该第二BLE广播信号用于指示中心设备page外围设备。这种实施例可参照图5所示的又一种蓝牙回连的方法的流程示意图。该方法至少包括以下步骤:
S501、中心设备与外围设备建立蓝牙连接。
S502、在蓝牙连接被动断开之后,外围设备向中心设备发送第一BLE广播信号,该第一BLE广播信号用于指示中心设备无需page外围设备。
S503、在向中心设备发送了第一BLE广播信号之后,外围设备向中心设备发送page数据包。
其中,步骤S501-S503的具体实施方式均可以参照图3中S301-S303的实施方式,此处不再赘述。
S504、若在预设时长内未接收到中心设备发送的ID包,外围设备向中心设备发送第二BLE广播信号,该第二BLE广播信号用于指示中心设备page外围设备。
具体的,若在预设时长内未接收到中心设备发送的ID包,外围设备确定page timeout,不再向中心设备发送page数据包,并向中心设备发送第二BLE广播信号。
在一种可能的实现方式中,该第二BLE回连广播信号中包含第二AD Structure,该第二AD Structure中包含第二数据。具体的,第二BLE广播信号的数据格式可以参照图4C所示的第二BLE广播信号的数据格式的示意图。需要说明的是,第二BLE广播信号的数 据格式与第一BLE广播信号的数据格式相似,不同的是,第二BLE广播信号中包括第二AD Structure,第二AD Structure中包含第二数据。第二AD Structure可以为N个AD Structure中的任意一个,第二数据在AD Data中的位置也可以根据需要进行设定。举例而言,该第二数据可以为0。
在一种可能的实现方式中,外围设备向中心设备发送的两次相邻的第二BLE回连广播信号之间的第二时间间隔为100ms、150ms、200ms、300ms等预设的时间间隔。可选的,当外围设备接收到中心设备根据第二BLE广播信号反馈的page数据包时,不再向中心设备发送第二BLE广播信号。
S505、在该中心设备接收该第二BLE广播信号之后,该中心设备根据该第二BLE广播信号向该外围设备发送page数据包。
在一种可能的实现方式中,中心设备根据该第二BLE广播信号向该外围设备发送page数据包的方法具体为:首先,中心设备根据该第二BLE广播信号确定该外围设备的蓝牙地址与预存的历史连接记录中的一个蓝牙地址一致。之后,中心设备解析该第二BLE回连广播信号,确定该第二广播信号中包含第二数据。接下来,中心设备根据该第二数据向外围设备发送ID包。其中,该ID包中携带中心设备的设备访问码或者查询访问码。
具体的,中心设备向外围设备发送的page数据包中包括外围设备的DAC。可选的,中心设备向外围设备发送多次page数据包,中心设备向外围设备发送的两次相邻的page数据包之间的时间间隔为100ms、150ms、200ms、300ms等预设的时间间隔。需要说明的是,若在预设时长内接收到了外围设备根据page数据包反馈的ID包,中心设备不再向外围设备发送page数据包,并从page状态切换为master page response状态。
在又一种可能的实现方式中,在中心设备接收到第二BLE广播信号之后,中心设备可以停止BLE scan。通过这种方式,可以节省中心设备的功耗。
S506、在接收到中心设备发送的page数据包之后,外围设备根据该page数据包向中心设备发送ID包。
可选的,外围设备根据该page数据包向中心设备发送ID包的方式可以为:外围设备根据该page数据包确定该page数据包中包含外围设备的设备访问码,外围设备向中心设备发送ID包。其中,该ID包中携带外围设备的设备访问码或者查询访问码。此时,外围设备从寻呼扫描(page scan)状态切换为从单元寻呼响应(slave page response)状态。
S507、在接收到外围设备发送的ID包之后,中心设备根据该ID包向外围设备发送FHS数据包。
其中,中心设备向外围设备发送的FHS数据包中包括中心设备的蓝牙地址、实时时钟等信息。需要说明的是,在接收到外围设备发送的ID包之后,中心设备从page状态切换为主单元寻呼响应(master page response)状态。
S508、在接收到中心设备发送的FHS数据包之后,外围设备根据该FHS数据包向中心设备发送ID包。
其中,ID包中携带外围设备的设备访问码或者查询访问码。在接收到中心设备发送的FHS数据包之后,外围设备从slave page response状态切换为连接(connection)状态。另外,在接收到外围设备发送的ID包之后,中心设备从主单元寻呼响应(slave page response) 状态切换为连接(connection)状态。此时,中心设备以及外围设备均处于连接状态,蓝牙连接恢复。
可选的,在接收到中心设备发送的ID包之后,中心设备可以根据该ID数据包向外围设备发送POLL数据包。其中,POLL数据包用于检查从设备(外围设备)是否启动。在外围设备接收到POLL数据包之后,可以根据该POLL数据包向中心设备发送任何类型的数据包。
在本申请又一种可能的实施例中,在中心设备和外围设备断开连接之后,外围设备首先向中心设备发送第二BLE广播信号,该第二BLE广播信号用于指示中心设备page外围设备。在中心设备接收到第二BLE广播信号之后,中心设备向外围设备发送page数据包,以恢复蓝牙连接。这种实施例可参照图6所示的又一种蓝牙回连的方法的流程示意图。该方法至少包括以下步骤:
S601、中心设备与外围设备建立蓝牙连接。
其中,步骤S601的具体实施方式均可以参照图3中S301的实施方式,此处不再赘述。
S602、在蓝牙连接被动断开之后,外围设备向中心设备发送第二BLE广播信号,该第二BLE广播信号用于指示中心设备page外围设备。
其中,第二BLE广播信号可以参照上述内容中的描述,此处不再赘述。
S603、在该中心设备接收该第二BLE广播信号之后,该中心设备根据该第二BLE广播信号向该外围设备发送page数据包。
在一种可能的实现方式中,在中心设备接收到该第二广播信号之后,中心设备停止BLE scan。通过这种方式,可以节省中心设备的功耗。
S604、在接收到中心设备发送的page数据包之后,外围设备根据该page数据包向中心设备发送ID包。
S605、在接收到外围设备发送的ID包之后,中心设备根据该ID包向外围设备发送FHS数据包。
S606、在接收到中心设备发送的FHS数据包之后,外围设备根据该FHS数据包向中心设备发送ID包。在接收到中心设备发送的FHS数据包之后,外围设备从slave page response状态切换为连接(connection)状态。另外,在接收到外围设备发送的ID包之后,中心设备从主单元寻呼响应(slave page response)状态切换为连接(connection)状态。此时,中心设备以及外围设备均处于连接状态,蓝牙连接恢复。其中,步骤S602-S606的具体实施方式均可以参照图5中步骤S504-S508的实施方式,此处不再赘述。
在以上任一实施例中,在中心设备和外围设备蓝牙被动断开的预设时间段之内,若中心设备并未接收到外围设备发送的BLE广播信号(包括第一BLE广播信号和第二BLE广播信号),则中心设备可以向外围设备发送page数据包,以恢复蓝牙连接。需要说明的是,中心设备向外围设备发送page数据包之后的流程可以参照步骤S604-S606的实施方式,此处不再赘述。
在具体场景中,该中心设备可以为移动终端,该外围设备可以为蓝牙耳机。在用户通 过蓝牙耳机播放移动终端中的歌曲的过程中,若用户佩戴蓝牙耳机离开了移动终端的附近区域,蓝牙耳机和移动终端的距离超过了可支持蓝牙连接的最大距离,移动终端与蓝牙耳机的蓝牙连接将被动断开。在移动终端和蓝牙耳机的蓝牙连接被动断开之后,蓝牙耳机向移动终端发送BLE广播信号。若移动终端确定接收到的是第一BLE广播信号,则移动终端无需page蓝牙耳机,并等待接收蓝牙耳机发送的page数据包;若移动终端确定接收到的是第二BLE广播信号,则移动终端主动page蓝牙耳机,蓝牙耳机等待接收移动终端发送的page数据包。通过这种方式,可以避免移动终端以及蓝牙耳机两方同时发送page数据包而造成的page请求碰撞的问题,提升蓝牙回连的成功率。
上述本申请实施例提供的一种蓝牙回连方法中第一设备所执行的步骤,也可以由第一设备中包括的一种蓝牙芯片来执行。该蓝牙芯片运行时调用存储器中存储的计算机程序,实现上述第一设备执行的步骤。类似的,上述实施例中,第二设备执行的步骤也可以由第二设备包括的一种蓝牙芯片来执行。该蓝牙芯片运行时调用存储器中存储的计算机程序,实现上述第二设备执行的步骤。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (18)

  1. 一种蓝牙回连的方法,其特征在于,所述方法应用于蓝牙连接系统,所述蓝牙连接系统包括第一设备和第二设备,所述方法包括:
    当蓝牙连接断开时,所述第一设备向所述第二设备发送第一低功耗蓝牙BLE广播信号,所述第一BLE广播信号用于指示所述第一设备将向所述第二设备发起寻呼page;
    所述第一设备向所述第二设备发送第一page数据包,所述第一page数据包中包含所述第二设备的设备标识;
    当所述第一设备在预设时长内接收到所述第二设备发送的第一ID包时,所述第一设备向所述第二设备发送第一FHS数据包,其中,所述第一ID包中包含所述第二设备的设备标识,所述第一ID包是所述第二设备根据所述第一page数据包向所述第一设备发送的,所述第一FHS数据包中包含所述第一设备的蓝牙地址和时钟信息;
    所述第二设备根据接收到的所述第一FHS数据包切换至连接connection状态,并向所述第一设备发送第二ID包,所述第二ID包中包含所述第二设备的设备标识;
    所述第一设备根据接收到的所述第二ID包切换至connection状态。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    当所述第一设备在所述预设时长内未接收到所述第二设备发送的第一ID包时,所述第一设备向所述第二设备发送第二BLE广播信号,所述第二BLE广播信号用于指示所述第二设备向所述第一设备发起page;
    所述第二设备根据接收到的所述第二BLE广播信号向所述第一设备发送第二page数据包,所述第二page数据包中包含所述第一设备的设备标识;
    所述第一设备根据接收到的所述第二page数据包向所述第二设备发送第三ID包,所述第三ID包中包含所述第一设备的设备标识;
    所述第二设备根据接收到的所述第三ID包向所述第一设备发送第二FHS数据包,所述第二FHS数据包中包含所述第二设备的蓝牙地址和时钟信息;
    所述第一设备根据接收到的所述第二FHS数据包,切换至connection状态,并向所述第二设备发送第四ID包,所述第四ID包中包含所述第一设备的设备标识;
    所述第二设备根据接收到的所述第四ID包切换至connection状态。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    当所述第一设备在预设时长内接收到所述第二设备发送的所述第一ID包时,所述第一设备从page状态切换至主单元寻呼响应master page response状态。
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    当所述第一设备接收到所述第二设备发送的所述第二page数据包时,所述第一设备从寻呼扫描page scan状态切换至slave page response状态;
    当所述第二设备接收到所述第一设备发送的所述第三ID包时,所述第二设备从page 状态切换至主单元寻呼响应master page response状态。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述当蓝牙连接断开时,所述第一设备向所述第二设备发送第一低功耗蓝牙BLE广播信号,包括:
    当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,所述第一设备向所述第二设备发送第一BLE广播信号。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,当蓝牙连接断开时,所述第二设备处于低功耗蓝牙扫描BLE scan状态。
  7. 一种蓝牙回连的方法,其特征在于,所述方法应用于蓝牙连接系统,所述蓝牙连接系统包括第一设备和第二设备,所述方法包括:
    当蓝牙连接断开时,所述第一设备向所述第二设备发送第二BLE广播信号,所述第二BLE广播信号用于指示所述第二设备向所述第一设备发起page;
    所述第二设备根据接收到的所述第二BLE广播信号向所述第一设备发送第二page数据包,所述第二page数据包中包含所述第一设备的设备标识;
    所述第一设备根据接收到的所述第二page数据包向所述第二设备发送第三ID包,所述第三ID包中包含所述第一设备的设备标识;
    所述第二设备根据接收到的所述第二ID包向所述第一设备发送第二FHS数据包,所述第二FHS数据包中包含所述第二设备的蓝牙地址和时钟信息;
    所述第一设备根据接收到的所述第二FHS数据包切换至connection状态,并向所述第二设备发送第四ID包;
    所述第二设备根据接收到的所述第四ID包切换至connection状态。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    当所述第一设备接收到所述第二设备发送的所述第二page数据包时,所述第一设备从page scan状态切换至slave page response状态;
    当所述第二设备接收到所述第一设备发送的所述第三ID包时,所述第二设备从page状态切换至master page response状态。
  9. 根据权利要求7或8所述的方法,其特征在于,所述当蓝牙连接断开时,所述第一设备向所述第二设备发送第二BLE广播信号,包括:
    当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,所述第一设备向所述第二设备发送第二BLE广播信号。
  10. 根据权利要求7-9任一项所述的方法,其特征在于,当蓝牙连接断开时,所述第二设备处于BLE scan状态。
  11. 一种第一设备,其特征在于,所述第一设备包括蓝牙芯片、存储器和一个或多个处理器;所述存储器与所述一个或多个处理器耦合;其中:
    所述蓝牙芯片支持经典蓝牙BR/EDR功能和BLE功能;
    所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备执行以下操作:
    当蓝牙连接断开时,向第二设备发送第一低功耗蓝牙BLE广播信号,所述第一BLE广播信号用于指示所述第一设备将向所述第二设备发起寻呼page;
    向所述第二设备发送第一page数据包,所述第一page数据包中包含所述第二设备的设备标识;
    当在预设时长内接收到所述第二设备发送的第一ID包时,向所述第二设备发送第一FHS数据包,其中,所述第一ID包中包含所述第二设备的设备标识,所述第一ID包是所述第二设备根据所述第一page数据包向所述第一设备发送的,所述第一FHS数据包中包含所述第一设备的蓝牙地址和时钟信息;
    根据接收到的所述第二设备发送的第二ID包切换至connection状态,所述第二ID包是所述第二设备根据所述第一FHS数据包向所述第一设备发送的。
  12. 根据权利要求11所述的第一设备,其特征在于,当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备还执行以下操作:
    当在所述预设时长内未接收到所述第二设备发送的第一ID包时,向所述第二设备发送第二BLE广播信号,所述第二BLE广播信号用于指示所述第二设备向所述第一设备发起page;
    接收所述第二设备发送的第二page数据包,所述第二page数据包中包含所述第一设备的设备标识,所述第二page数据包是所述第二设备根据所述第二BLE广播信号向所述第一设备发送的;
    根据所述第二page数据包向所述第二设备发送第三ID包,所述第三ID包中包含所述第一设备的设备标识;
    接收所述第二设备发送的第二FHS数据包切换至connection状态,其中,所述第二FHS数据包中包含所述第二设备的蓝牙地址和时钟信息,所述第二FHS数据包是所述第二设备根据所述第三ID包向所述第一设备发送的;
    根据所述第二FHS数据包向所述第二设备发送第四ID包,所述第四ID包中包含所述第一设备的设备标识。
  13. 根据权利要求11所述的第一设备,其特征在于,当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备还执行以下操作:
    当在预设时长内接收到所述第二设备发送的所述第一ID包时,从page状态切换至主单元寻呼响应master page response状态。
  14. 根据权利要求12所述的第一设备,其特征在于,当所述计算机指令被所述一个或 多个处理器执行时,使得所述第一设备还执行以下操作:
    当接收到所述第二设备发送的所述第二page数据包时,从page scan状态切换至slave page response状态。
  15. 根据权利要求11-14任一项所述的第一设备,其特征在于,当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备具体执行以下操作:
    当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向所述第二设备发送所述第一BLE广播信号。
  16. 一种第一设备,其特征在于,所述第一设备包括蓝牙芯片、存储器和一个或多个处理器,所述存储器与所述一个或多个处理器耦合,其中:
    所述蓝牙芯片支持BR/EDR功能和BLE功能;
    所述存储用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备执行以下操作:
    当蓝牙连接断开时,向第二设备发送第二BLE广播信号,所述第二BLE广播信号用于指示所述第二设备向所述第一设备发起page;
    接收所述第二设备发送的第二page数据包,所述第二page数据包中包含所述第一设备的设备标识,所述第二page数据包是所述第二设备根据所述第二BLE广播信号向所述第一设备发送的;
    根据所述第二page数据包向所述第二设备发送第三ID包,所述第三ID包中包含所述第一设备的设备标识;
    接收所述第二设备发送的第二FHS数据包切换至connection状态,所述第二FHS数据包中包含所述第二设备的蓝牙地址和时钟信息,所述第二FHS数据包是第二设备根据所述第三ID包向所述第一设备发送的;
    根据所述第二FHS数据包向所述第二设备发送第四ID包,所述第四ID包中包含所述第一设备的设备标识,所述第四ID包用于指示所述第二设备切换至connection状态。
  17. 根据权利要求16所述的第一设备,其特征在于,当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备还执行以下操作:
    当接收到所述第二设备发送的所述第二page数据包时,从page scan状态切换至slave page response状态。
  18. 根据权利要求16或17所述的第一设备,其特征在于,当所述计算机指令被所述一个或多个处理器执行时,使得所述第一设备具体执行以下操作:
    当蓝牙连接的接收信号强度RRSI低于预设阈值时,或者接收到连接超时connection timeout的错误码时,向所述第二设备发送第二BLE广播信号。
PCT/CN2020/107295 2019-08-14 2020-08-06 一种蓝牙回连的方法及相关装置 WO2021027666A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/634,664 US11683850B2 (en) 2019-08-14 2020-08-06 Bluetooth reconnection method and related apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910750864.8A CN112399390B (zh) 2019-08-14 2019-08-14 一种蓝牙回连的方法及相关装置
CN201910750864.8 2019-08-14

Publications (1)

Publication Number Publication Date
WO2021027666A1 true WO2021027666A1 (zh) 2021-02-18

Family

ID=74569238

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/107295 WO2021027666A1 (zh) 2019-08-14 2020-08-06 一种蓝牙回连的方法及相关装置

Country Status (3)

Country Link
US (1) US11683850B2 (zh)
CN (1) CN112399390B (zh)
WO (1) WO2021027666A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453381A (zh) * 2021-07-08 2021-09-28 Oppo广东移动通信有限公司 设备配对方法及相关产品
CN113766482A (zh) * 2021-09-15 2021-12-07 荣耀终端有限公司 查找蓝牙设备的方法、电子设备及存储介质
CN116056051A (zh) * 2022-06-06 2023-05-02 荣耀终端有限公司 蓝牙连接控制方法、系统和设备

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112839303B (zh) * 2021-04-12 2021-08-31 荣耀终端有限公司 设备回连的方法及相关装置
CN115396856A (zh) * 2021-05-24 2022-11-25 Oppo广东移动通信有限公司 建立蓝牙链路的方法、装置、设备及存储介质
CN114125805B (zh) * 2022-01-28 2022-07-15 荣耀终端有限公司 蓝牙回连方法及终端设备
CN116033597B (zh) * 2022-08-08 2023-12-12 荣耀终端有限公司 蓝牙连接方法、装置、电子设备及存储介质
CN115119336B (zh) * 2022-08-23 2023-01-13 荣耀终端有限公司 耳机连接系统、方法、耳机、电子设备及可读存储介质
CN116074986B (zh) * 2023-01-28 2023-08-29 荣耀终端有限公司 一种蓝牙连接方法、设备及系统
CN117479344B (zh) * 2023-12-15 2024-05-24 荣耀终端有限公司 一种蓝牙连接方法、电子设备及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967971A (zh) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 一种实现Android系统下蓝牙自动回连的方法
CN106464308A (zh) * 2015-03-03 2017-02-22 华为技术有限公司 一种获取设备方位的方法及设备
CN108419226A (zh) * 2012-09-27 2018-08-17 华为终端(东莞)有限公司 一种蓝牙设备之间连接的方法及蓝牙设备
US20190014549A1 (en) * 2013-12-20 2019-01-10 Dennis Ching Chung Kwan Topology for a Wireless Modular Network

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7260357B2 (en) * 2002-04-17 2007-08-21 Broadcom Corporation Bluetooth fast connection mode for wireless peripheral device
US8730935B2 (en) * 2008-08-19 2014-05-20 Broadcom Corporation Method and system for bluetooth connection setup in a multi-standard multi-radio communication system
US8588688B2 (en) * 2011-01-24 2013-11-19 Nokia Corporation Non-networked messaging
US9288774B2 (en) * 2011-10-13 2016-03-15 Mediatek Inc. Communications apparatuses and method for multi-level transmission power control thereof
US10652844B1 (en) * 2014-01-07 2020-05-12 Marvell Asia Pte. Ltd. Paging auto-acknowledgement
US20150289124A1 (en) * 2014-04-08 2015-10-08 Nokia Corporation Method, apparatus, and computer program product for seamless switching of communication connection
US10681591B2 (en) * 2014-07-31 2020-06-09 Lg Electronics Inc. Method and apparatus for controlling electronic device in wireless communication system supporting Bluetooth communication
CN105392212A (zh) 2015-10-30 2016-03-09 上海卓易科技股份有限公司 一种蓝牙自动回连方法、系统及智能终端
US10070247B2 (en) * 2016-04-14 2018-09-04 Qualcomm Incorporated Systems and methods for connection creation
CN109417758B (zh) * 2016-06-27 2021-01-15 华为技术有限公司 一种蓝牙连接的方法及终端
CN107454555B (zh) * 2017-06-30 2021-02-09 建荣半导体(深圳)有限公司 锁相环参数调整方法、蓝牙模组、蓝牙从设备以及蓝牙系统
US10149340B1 (en) * 2017-07-18 2018-12-04 Thales Avionics, Inc. Slave bluetooth device switching between active bluetooth connections with different master bluetooth devices
US11013062B2 (en) * 2019-01-31 2021-05-18 Qualcomm Incorporated Fast role switch between bluetooth true wireless stereo (TWS) earbuds
KR20210115796A (ko) * 2020-03-16 2021-09-27 삼성전자주식회사 원격 인터렉션 제어 방법 및 전자 장치

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108419226A (zh) * 2012-09-27 2018-08-17 华为终端(东莞)有限公司 一种蓝牙设备之间连接的方法及蓝牙设备
US20190014549A1 (en) * 2013-12-20 2019-01-10 Dennis Ching Chung Kwan Topology for a Wireless Modular Network
CN106464308A (zh) * 2015-03-03 2017-02-22 华为技术有限公司 一种获取设备方位的方法及设备
CN104967971A (zh) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 一种实现Android系统下蓝牙自动回连的方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453381A (zh) * 2021-07-08 2021-09-28 Oppo广东移动通信有限公司 设备配对方法及相关产品
CN113453381B (zh) * 2021-07-08 2023-01-10 Oppo广东移动通信有限公司 设备配对方法及相关产品
CN113766482A (zh) * 2021-09-15 2021-12-07 荣耀终端有限公司 查找蓝牙设备的方法、电子设备及存储介质
CN116056051A (zh) * 2022-06-06 2023-05-02 荣耀终端有限公司 蓝牙连接控制方法、系统和设备
CN116056051B (zh) * 2022-06-06 2023-10-27 荣耀终端有限公司 蓝牙连接控制方法、系统和设备

Also Published As

Publication number Publication date
CN112399390B (zh) 2021-10-15
CN112399390A (zh) 2021-02-23
US11683850B2 (en) 2023-06-20
US20220304094A1 (en) 2022-09-22

Similar Documents

Publication Publication Date Title
WO2021027666A1 (zh) 一种蓝牙回连的方法及相关装置
WO2021213120A1 (zh) 投屏方法、装置和电子设备
CN113885759B (zh) 通知消息处理方法、设备、系统及计算机可读存储介质
WO2021000807A1 (zh) 一种应用程序中等待场景的处理方法和装置
WO2022257977A1 (zh) 电子设备的投屏方法和电子设备
WO2020244623A1 (zh) 一种空鼠模式实现方法及相关设备
WO2021185141A1 (zh) Wi-Fi Aware的建链方法、系统、电子设备和存储介质
WO2021185244A1 (zh) 一种设备交互的方法和电子设备
EP4084486A1 (en) Cross-device content projection method, and electronic device
WO2021190344A1 (zh) 多屏幕显示电子设备和电子设备的多屏幕显示方法
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
WO2022033320A1 (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
WO2021036898A1 (zh) 折叠屏设备中应用打开方法及相关装置
WO2022042637A1 (zh) 一种蓝牙数据传输方法及相关装置
WO2021031865A1 (zh) 通话方法及装置
WO2022170856A1 (zh) 建立连接的方法与电子设备
WO2023179123A1 (zh) 蓝牙音频播放方法、电子设备及存储介质
WO2022170854A1 (zh) 视频通话的方法与相关设备
WO2022135195A1 (zh) 显示虚拟现实界面的方法、装置、设备和可读存储介质
WO2021129453A1 (zh) 一种截屏方法及相关设备
CN115022982A (zh) 多屏协同无感接入方法、电子设备及存储介质
WO2020140186A1 (zh) 无线音频系统、音频通讯方法及设备
CN113271577B (zh) 媒体数据播放系统、方法及相关装置
CN114125805B (zh) 蓝牙回连方法及终端设备
WO2022267917A1 (zh) 蓝牙通信方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20852359

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20852359

Country of ref document: EP

Kind code of ref document: A1