Method for bluetooth interaction, master-slave system and electronic device
The Bluetooth interaction method using handshake and interrupt mechanisms solves the problems of uncertainty and high power consumption in Bluetooth chip wake-up, achieving stability and low power consumption in Bluetooth communication.
Patent Information
- Application Number
- CN202411150322.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The wake-up process of the Bluetooth chip and the AP main control chip is uncertain, which leads to Bluetooth chip disconnection/restart issues. At the same time, maintaining the RTS high level during sleep increases power consumption.
The system employs a handshake and interrupt mechanism. The main control chip continuously sends handshake signals while in operation and enters sleep mode in response to sleep events. The Bluetooth chip also enters sleep mode when it does not receive a handshake signal. When the main control chip is woken up, an interrupt signal is used to wake it up and send Bluetooth messages.
This avoids Bluetooth chip disconnection/reboot issues and reduces system power consumption, ensuring stable and low-power Bluetooth communication.
Smart Images

Figure CN119052902B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of Bluetooth device connection technology, and in particular to a method for Bluetooth interaction, a master-slave system and an electronic device. BACKGROUND
[0002] The Bluetooth chip and the AP (application processor) master chip constitute a master-slave system, and support Bluetooth sleep and wake-up functions. The process of the AP master chip waking up and resuming the field contains a lot of uncertainties, and is prone to cause the AP master chip to fail to normally receive Bluetooth messages due to timing problems and the like, so that the Bluetooth chip fails to complete the wake-up process, and further causes the Bluetooth chip to disconnect / restart.
[0003] In addition, the AP master chip HCI (host control interface protocol) serial port RTS (request to send) needs to be kept at a high level during the sleep process. Then, the RTS is pulled low during the wake-up process, so that the AP master chip can receive HCI Bluetooth messages and normally communicate. However, the hardware needs to keep the RTS at a high level during sleep, which is not conducive to reducing power consumption, because maintaining the RTS at a high level may require the master to keep a specific power domain open, thereby increasing power consumption. Moreover, the HCI Bluetooth serial port needs to open a flow control mechanism, which also cannot reduce power consumption. SUMMARY
[0004] The present application provides a method for Bluetooth interaction, a master-slave system and an electronic device, which can avoid the Bluetooth chip disconnection / restart problem while reducing system power consumption.
[0005] In one aspect of the present application, a method for Bluetooth interaction is provided. The method comprises: continuously sending a handshake signal from a master chip to a Bluetooth chip during a working state; notifying a sleep command from the Bluetooth chip to the master chip in response to a sleep event; stopping sending the handshake signal from the master chip to the Bluetooth chip in response to the sleep command, and the master chip entering a sleep state; and entering a sleep state by the Bluetooth chip in response to the Bluetooth chip not receiving the handshake signal from the master chip.
[0006] In another aspect of the present application, a method for Bluetooth interaction is provided. The method comprises: waking up the Bluetooth chip in response to a wake-up event, sending a first interrupt signal from the Bluetooth chip to a master chip; waking up the master chip in response to the first interrupt signal, continuously sending a handshake signal from the master chip to the Bluetooth chip, and sending a second interrupt signal corresponding to the first interrupt signal from the master chip to the Bluetooth chip by the master chip; and sending a Bluetooth message from the Bluetooth chip to the master chip in response to the handshake signal and the second interrupt signal.
[0007] In still another aspect of the present application, a master-slave system is provided. The system comprises a Bluetooth chip and a master chip, wherein: the Bluetooth chip is configured to be woken up in response to a wake-up event, and send a first interrupt signal to the master chip; the master chip is configured to be woken up in response to the first interrupt signal, continuously send a handshake signal to the Bluetooth chip, and send a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; the Bluetooth chip is further configured to send a Bluetooth message to the master chip in response to the handshake signal and the second interrupt signal; the Bluetooth chip is further configured to notify a sleep command to the master chip in response to a sleep event; the master chip is further configured to stop sending the handshake signal to the Bluetooth chip in response to the sleep command, and enter a sleep state; and the Bluetooth chip is further configured to enter a sleep state in response to not receiving the handshake signal from the master chip.
[0008] In still another aspect of the present application, an electronic device is provided. The electronic device comprises a memory configured to store an executable program; and one or more processors configured to execute the program to perform the method for Bluetooth interaction described above.
[0009] According to the present application, the handshake signal is continuously sent by the master chip to the Bluetooth chip during the working state, the sleep command is notified by the Bluetooth chip to the master chip in response to the sleep event, the handshake signal is stopped by the master chip from being sent to the Bluetooth chip in response to the sleep command, and the master chip enters a sleep state, the Bluetooth chip enters a sleep state in response to not receiving the handshake signal from the master chip, so that the sleep and wake-up of the Bluetooth chip and the master chip are performed by using the handshake and interrupt mechanism, without the specific power domain of the master chip being kept open, and the situation that the master chip cannot receive the Bluetooth information can be avoided, thereby avoiding the Bluetooth chip disconnection / restart problem while reducing the system power consumption. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 a flowchart of the method for Bluetooth interaction according to an embodiment of the present application;
[0011] Figure 2 a flowchart of the method for Bluetooth interaction according to an embodiment of the present application;
[0012] Figure 3 a flowchart of the method for Bluetooth interaction according to an embodiment of the present application;
[0013] Figure 4 a schematic diagram of the master-slave system according to an embodiment of the present application;
[0014] Figure 5 a structural schematic diagram of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0015] To make the technical contents of the present application, the purposes achieved and the effects more clear, the following will be described in detail in connection with the embodiments and in conjunction with the drawings.
[0016] The Bluetooth chip and the AP master chip constitute a master-slave system, and support Bluetooth sleep and wake-up functions. The sleep process of the master-slave system includes: the AP master chip processes the system sleep flow; the Bluetooth chip is triggered to sleep; after all peripherals complete sleep, the AP master chip saves the site and enters the sleep state. In addition, the wake-up process of the master-slave system includes: the AP master chip processes the system wake-up flow; the AP master chip restores the site; the Bluetooth chip is triggered to wake up; after all peripherals complete wake-up, the AP master chip enters the wake-up state.
[0017] The above scheme has the problem of Bluetooth disconnection / restart. When the AP master chip sleeps, the Bluetooth chip wakes up and sends a BT-WAKE-HOST interrupt signal, and sends an HCI Bluetooth message. The AP master chip is woken up and restores the site, but the AP master chip may not receive the Bluetooth message, causing the Bluetooth disconnection / restart problem. The AP master chip and the Bluetooth chip need handshake signals and level control to normally complete the wake-up process, and the process of the AP master chip waking up and restoring the site contains more uncertainties, because the timing problem causes the Bluetooth information to be unable to be normally received, so the Bluetooth chip cannot complete the wake-up process, thereby causing the Bluetooth chip disconnection / restart problem.
[0018] In addition, the above scheme has the problem of high power consumption of Bluetooth. When the AP master chip sleeps, the HCI serial port RTS of the AP master chip is pulled high. The Bluetooth chip wakes up and sends a BT-WAKE-HOST interrupt signal, and sends an HCI Bluetooth message. The AP master chip wakes up and restores the site, and then pulls down the RTS, so that the AP master chip can receive the HCI Bluetooth message and normally communicate. The advantage of this method is that it will not disconnect the Bluetooth, but has the following disadvantages: the hardware needs to keep the RTS high during sleep, but this is not conducive to sleep power consumption, because maintaining the RTS high may require the master to keep the specific power domain always on, thereby increasing the power consumption; the HCI Bluetooth serial port needs to open the flow control mechanism.
[0019] To solve at least the above technical problems, the present disclosure provides a method for Bluetooth interaction, which utilizes an interrupt and handshake mechanism to improve the sleep process and wake-up process of a master-slave system. According to the present disclosure, a handshake signal is continuously sent by a master chip to a Bluetooth chip during an operating state, a sleep command is notified by the Bluetooth chip to the master chip in response to a sleep event, the master chip stops sending the handshake signal to the Bluetooth chip in response to the sleep command, and the master chip enters a sleep state, and the Bluetooth chip enters a sleep state in response to the Bluetooth chip not receiving the handshake signal from the master chip. In this way, the sleep and wake-up of the Bluetooth chip and the master chip are performed by utilizing the handshake and interrupt mechanism, without the need for a specific power domain of the master chip to be always on, and the situation that the master chip cannot receive Bluetooth information can also be avoided, thereby avoiding the Bluetooth chip disconnection / restart problem while reducing system power consumption.
[0020] Hereinafter, the technical solution according to the present disclosure will be described with reference to specific embodiments and in conjunction with the accompanying drawings.
[0021] Figure 1 is a flowchart showing a method 100 for Bluetooth interaction according to an embodiment of the present disclosure. Referring to Figure 1 , the method 100 includes the following steps 102 to 108.
[0022] At step 102, a handshake signal is continuously sent by a master chip to a Bluetooth chip during an operating state.
[0023] At step 104, a sleep command is notified by the Bluetooth chip to the master chip in response to a sleep event.
[0024] In some embodiments, in response to the sleep event triggered by an external Bluetooth interaction device, sleep information is sent by the Bluetooth chip to the master chip.
[0025] At step 106, the master chip stops sending the handshake signal to the Bluetooth chip in response to the sleep command, and the master chip enters a sleep state.
[0026] In some embodiments, the operating state is saved by the master chip according to the sleep information, the master chip stops sending the handshake signal to the Bluetooth chip, and the operating system of the master chip enters a low-power sleep state.
[0027] In some embodiments, memory data is saved by the master chip to a sleep image file, and a checkpoint is saved. Hardware devices are closed or suspended by the master chip, and critical system states are saved. In addition, the operating system is controlled by the master chip to enter a sleep mode. In this way, the scene is saved when the master chip enters the sleep state, ensuring that the work can continue after subsequent wake-up.
[0028] At step 108, in response to the Bluetooth chip not receiving the handshake signal from the master chip, the Bluetooth chip enters a sleep state.
[0029] In some embodiments, the Bluetooth chip repeatedly listens for or queries for the handshake signal, and if the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters a semi-sleep state and continues to listen for an external wake-up signal.
[0030] In this way, the master chip and the Bluetooth chip enter the sleep / semi-sleep state by stopping sending the handshake signal, which reduces the system power consumption.
[0031] In some embodiments, the Bluetooth chip entering the sleep state includes the Bluetooth chip entering a semi-sleep state in which the Bluetooth chip turns off the sending function and receives an external wake-up signal. In this way, in the semi-sleep state, the Bluetooth chip turns off the sending function to reduce the system power consumption, and listening for the external wake-up signal ensures that the Bluetooth chip can enter the wake-up state in time.
[0032] The embodiments related to the sleep scenario are described above. In addition, the method 100 according to the embodiments of the present disclosure can also involve a wake-up scenario. In some embodiments, the method 100 can further include steps 110 to 114.
[0033] At step 110, in response to a wake-up event, the Bluetooth chip is woken up, and a first interrupt signal associated with a slave-to-master wake-up command is sent by the Bluetooth chip to the master chip.
[0034] In some embodiments, in response to the wake-up event triggered by an external Bluetooth interaction device, the Bluetooth chip enters a wake-up state, so that the first interrupt signal associated with the slave-to-master wake-up command is sent by the Bluetooth chip to the master chip.
[0035] In some embodiments, in response to the wake-up event triggered by an external Bluetooth interaction device, the Bluetooth chip turns on the sending function to send the first interrupt signal associated with the slave-to-master wake-up command to the master chip.
[0036] At step 112, in response to the first interrupt signal, the master chip is woken up, the handshake signal is continuously sent by the master chip to the Bluetooth chip, and a second interrupt signal corresponding to the first interrupt signal is sent by the master chip to the Bluetooth chip.
[0037] In some embodiments, in response to the first interrupt signal, the host of the master chip enters a wake-up state, so that the master chip continuously sends the handshake signal to the Bluetooth chip. In some embodiments, the second interrupt signal associated with the host-to-slave wake-up command is sent by the master chip to the Bluetooth chip, and a control message is sent by the master chip to the Bluetooth chip.
[0038] In step 114, in response to the handshake signal and the second interrupt signal, a Bluetooth message is sent by the Bluetooth chip to the master chip.
[0039] In some embodiments, after the handshake signal and the second interrupt signal are received by the Bluetooth chip, a Bluetooth message corresponding to the control message is sent by the Bluetooth chip to the master chip.
[0040] In some embodiments, the method 100 can further include, after the second interrupt signal is sent by the master chip to the Bluetooth chip, the master chip and the Bluetooth chip complete wake-up.
[0041] In this way, the master chip and the Bluetooth chip are effectively woken up by the interrupt signal and the handshake signal, and the master chip cannot normally receive the Bluetooth message. The Bluetooth message is a data class message, and data class message communication can only be carried out after control message negotiation is completed, ensuring that the Bluetooth chip and the master chip have been successfully woken up.
[0042] In some embodiments, the method 100 can further include, by the master chip, waking up the operating system to resume the working state according to the Bluetooth message.
[0043] In some embodiments, the saved hibernation image file is read by the operating system of the master chip, the memory data in the hibernation image file is restored to the physical memory. In addition, the saved key system state is restored by the operating system of the master chip, and the hardware device is reinitialized to restore the execution environment.
[0044] In this way, the state before hibernation is restored, which is conducive to the user to continue the previous work.
[0045] According to another aspect of the present application, Figure 2 is a flow chart showing a method 200 for Bluetooth interaction according to an embodiment of the present disclosure. As Figure 2 shown, another method 200 for Bluetooth interaction of an embodiment of the present disclosure includes the following steps S202 to S206.
[0046] In step S202, in response to a wake-up event, the Bluetooth chip is woken up, and a first interrupt signal is sent by the Bluetooth chip to the master chip.
[0047] In step S204, in response to the first interrupt signal, the master chip is woken up, the handshake signal is continuously sent by the master chip to the Bluetooth chip, and a second interrupt signal corresponding to the first interrupt signal is sent by the master chip to the Bluetooth chip.
[0048] In step S206, in response to the handshake signal and the second interrupt signal, a Bluetooth message is sent by the Bluetooth chip to the master chip.
[0049] The above describes the embodiment related to the wake-up scenario. In addition, the method 200 according to the embodiment of the present disclosure can also involve the sleep scenario. In some embodiments, the method 200 can further include steps S208 to S212.
[0050] In step S208, in response to a sleep event, a sleep command is informed by the Bluetooth chip to the master chip.
[0051] In step S210, in response to the sleep command, the handshake signal is stopped by the master chip from being sent to the Bluetooth chip, and the master chip enters a sleep state.
[0052] In step S212, in response to the Bluetooth chip not receiving the handshake signal from the master chip, the Bluetooth chip enters a sleep state.
[0053] In this way, the sleep and wake-up of the Bluetooth chip and the master chip are performed by using the handshake and interrupt mechanism, without the need for the specific power domain of the master chip to be always on, and the situation that the master chip cannot receive Bluetooth information can be avoided, thereby avoiding the Bluetooth chip disconnection / restart problem while reducing system power consumption.
[0054] Hereinafter, the application scenario of the method and device for Bluetooth interaction according to the embodiment of the present application will be described by examples.
[0055] Figure 3 is a flow chart showing the method for Bluetooth interaction according to the embodiment of the present application. Referring to Figure 2 , the method includes steps 301 to 309.
[0056] In step 301, during the working state, the handshake signal is continuously sent by the master chip to the Bluetooth chip.
[0057] The handshake signal is a short data packet (containing handle, time delay, interval, type and load, etc.) periodically sent for detecting connection status. The handshake signal is periodically sent from the master chip to the Bluetooth chip through the HCI command. The Bluetooth chip receives the handshake signal and then confirms the reception through the HCI command. The handshake signal can be used for detecting connection status, waking up the Bluetooth device and controlling interaction.
[0058] In step 302, in response to the sleep event triggered by the external Bluetooth interaction device, the Bluetooth chip sends a sleep command to the master chip.
[0059] In step 303, the master chip saves the working state according to the sleep command, stops sending the handshake signal to the Bluetooth chip, and enters the sleep state.
[0060] Specifically, the master chip saves the memory data into a sleep image file and saves the checkpoint. The master chip closes or suspends the hardware device and saves the critical system state. The master chip controls the operating system to enter the sleep mode and stops sending the handshake signal to the Bluetooth chip to enter the sleep state.
[0061] In some embodiments, the critical system state includes the content of the CPU register and the interrupt vector table, etc.
[0062] In step 304, if the Bluetooth chip does not receive the handshake signal from the master chip, the Bluetooth chip enters the semi-sleep state of closing the sending function and receiving the external wake-up signal.
[0063] Specifically, the Bluetooth chip listens (POLL) whether the master chip sends the handshake signal. If the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters the semi-sleep state of closing the sending function and receiving the external wake-up signal.
[0064] In step 305, in response to the wake-up event triggered by the external Bluetooth interaction device, the Bluetooth chip is woken up, and the Bluetooth chip sends a first interrupt signal to the master chip.
[0065] Specifically, in response to the wake-up event triggered by the external Bluetooth interaction device, the Bluetooth chip enters the wake-up state, so that the Bluetooth chip sends the first interrupt signal associated with the slave-to-master wake-up command to the master chip.
[0066] In some embodiments, in response to the wake-up event triggered by the external Bluetooth interaction device, the Bluetooth chip starts the sending function to send the first interrupt signal associated with the slave-to-master wake-up command to the master chip.
[0067] In step 306, the master chip is woken up in response to the first interrupt signal, and the handshake signal is continuously sent by the master chip to the Bluetooth chip.
[0068] In particular, the master of the master chip enters a wake-up state in response to the first interrupt signal, so that the handshake signal is continuously sent by the master chip to the Bluetooth chip.
[0069] In step 307, the second interrupt signal corresponding to the first interrupt signal is sent by the master chip to the Bluetooth chip.
[0070] In particular, the second interrupt signal associated with the master-to-slave wake-up command is sent by the master chip to the Bluetooth chip, and the HCI control message is sent by the master chip to the Bluetooth chip.
[0071] HCI is a protocol layer of Bluetooth, which defines the communication interface between the Bluetooth host and the Bluetooth controller, and the HCI control interface carries the HCI control message for control interaction between the master chip and the Bluetooth chip.
[0072] In step 308, the Bluetooth message is sent by the Bluetooth chip to the master chip in response to the handshake signal and the second interrupt signal.
[0073] In particular, after the handshake signal and the second interrupt signal are received by the Bluetooth chip, the Bluetooth message corresponding to the HCI control message is sent by the Bluetooth chip to the master chip.
[0074] In step 309, the operating system is woken up to resume the working state according to the Bluetooth message by the master chip.
[0075] In particular, the saved hibernation image file is read by the operating system of the master chip, the memory data in the hibernation image file is restored to the physical memory, the saved key system state is restored by the operating system of the master chip, and the hardware device is reinitialized to restore the execution environment.
[0076] According to another aspect of the present application, a master-slave system is provided. Figure 4 A schematic diagram of the master-slave system according to an embodiment of the present application is shown in FIG. 4. Figure 4 As shown, the master-slave system includes a Bluetooth chip 402 and a master chip 404.
[0077] The Bluetooth chip 402 is configured to be woken up in response to a wake-up event, and send a first interrupt signal to the master chip.
[0078] The master chip 404 is configured to be woken up in response to the first interrupt signal, continuously send a handshake signal to the Bluetooth chip 402, and send a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip 402.
[0079] The Bluetooth chip 402 is further configured to send a Bluetooth message to the master chip 404 in response to the handshake signal and the second interrupt signal.
[0080] The Bluetooth chip 402 is further configured to notify the master chip 404 of a sleep command in response to a sleep event.
[0081] The master chip 404 is further configured to stop sending the handshake signal to the Bluetooth chip 402 and enter a sleep state in response to the sleep command.
[0082] The Bluetooth chip 402 is further configured to enter a sleep state in response to not receiving the handshake signal from the master chip 404.
[0083] As Figure 4 shown in some embodiments, the Bluetooth chip 402 is an HCI Bluetooth chip with an embedded HCI interface. In addition, the master chip 404 is an AP master chip with a Bluetooth Host function.
[0084] Figure 4 In some embodiments, BT_WAKE_HOST represents Bluetooth wake host; BT_WAKE represents Bluetooth wake; NC_BT_ANT represents null BT antenna; UART_RTSn represents a request to send (RTS) signal pin in UART communication; UART_CTSn represents a clear to send (CTS) signal pin in UART communication; UART_RX represents a receiving pin for receiving serial data; UART_TX represents a sending pin for sending serial data; HOST_WAKE_BT represents host wake Bluetooth; and GPIO represents a general input / output port.
[0085] It should be understood that the Bluetooth chip and the master chip can be further configured to perform the respective corresponding steps or actions in the above-described methods 100 or 200, which will not be repeated here.
[0086] According to yet another aspect of the present application, Figure 5 is a schematic diagram showing an electronic device 500 according to an embodiment of the present application. Referring to Figure 5The electronic device 500 comprises a memory 502, one or more processors 504. An executable program is stored on the memory 502 and can be run on the processor 504. The processor 504 implements the method for Bluetooth interaction as described above when executing the executable program.
[0087] In summary, the method for Bluetooth interaction, master-slave system and electronic device provided by the present application, during the working state, the master chip continuously sends the handshake signal to the Bluetooth chip, in response to the sleep event, the Bluetooth chip notifies the master chip of the sleep command, in response to the sleep command, the master chip stops sending the handshake signal to the Bluetooth chip, and the master chip enters the sleep state, in response to the Bluetooth chip not receiving the handshake signal from the master chip, the Bluetooth chip enters the sleep state, in this way, the handshake and interruption mechanism is used to put the Bluetooth chip and the master chip to sleep and wake up, without the specific power domain of the master chip keeping open, and the situation that the master chip cannot receive the Bluetooth information can be avoided, thereby avoiding the Bluetooth chip disconnection / restart problem, reducing the system power consumption; in addition, in the semi-sleep state, the Bluetooth chip closes the unnecessary (sending) function to reduce the system power consumption, and listens to the external wake-up signal to ensure that the wake-up state can be entered in time.
[0088] The above description is only an embodiment of the present application, and does not limit the patent scope of the present application, any equivalent transformation or direct or indirect application in the related technical field based on the content of the present application specification and drawings is also included in the patent protection scope of the present application.
Claims
1. A method for Bluetooth interaction, characterized in that, The method comprises: continuously sending a handshake signal from a master chip to a Bluetooth chip during a working state; notifying a sleep command from the Bluetooth chip to the master chip in response to a sleep event; stopping sending the handshake signal from the master chip to the Bluetooth chip in response to the sleep command, and the master chip entering a sleep state; and the Bluetooth chip entering a sleep state in response to the Bluetooth chip not receiving the handshake signal from the master chip.
2. The method of claim 1, wherein, The Bluetooth chip entering a sleep state comprises the Bluetooth chip entering a semi-sleep state of closing a sending function and receiving an external wake-up signal.
3. The method of claim 1, wherein, The method further comprises: sending a first interrupt signal from the Bluetooth chip to the master chip in response to a wake-up event; continuously sending the handshake signal from the master chip to the Bluetooth chip in response to the first interrupt signal, and sending a second interrupt signal corresponding to the first interrupt signal from the master chip to the Bluetooth chip; and sending a Bluetooth message from the Bluetooth chip to the master chip in response to the handshake signal and the second interrupt signal.
4. The method of claim 3, wherein, The method further comprises: the master chip and the Bluetooth chip completing wake-up after sending the second interrupt signal from the master chip to the Bluetooth chip.
5. The method of claim 1, wherein, The Bluetooth chip notifying a sleep command from the master chip in response to a sleep event comprises sending sleep information from the Bluetooth chip to the master chip in response to the sleep event triggered by an external Bluetooth interaction device; The master chip stopping sending the handshake signal to the Bluetooth chip in response to the sleep command, and the master chip entering a sleep state comprises the master chip saving a working state according to the sleep information, stopping sending the handshake signal to the Bluetooth chip, and the operating system of the master chip entering a low-power sleep state; The Bluetooth chip entering a sleep state in response to the Bluetooth chip not receiving the handshake signal from the master chip comprises the Bluetooth chip repeatedly listening or querying the handshake signal, and if the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters a semi-sleep state and continues to listen to an external wake-up signal.
6. The method of claim 3, wherein, The Bluetooth chip sending a first interrupt signal to the master chip in response to a wake-up event comprises the Bluetooth chip entering a wake-up state in response to the wake-up event triggered by an external Bluetooth interaction device, so that the Bluetooth chip sends the first interrupt signal associated with a slave-to-master wake-up command to the master chip; The master chip continuously sending the handshake signal to the Bluetooth chip in response to the first interrupt signal comprises the master entering a wake-up state in response to the first interrupt signal, so that the master chip continuously sends the handshake signal to the Bluetooth chip; sending, by the master chip, a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip includes sending, by the master chip, the second interrupt signal associated with a master-to-slave wake-up command to the Bluetooth chip, and sending, by the master chip, a control message to the Bluetooth chip; sending, by the Bluetooth chip, a Bluetooth message to the master chip in response to the handshake signal and the second interrupt signal includes sending, by the Bluetooth chip, a Bluetooth message corresponding to the control message to the master chip after receiving the handshake signal and the second interrupt signal by the Bluetooth chip.
7. The method of claim 5, wherein, saving, by the master chip, a working state according to the hibernation information includes: saving, by the master chip, memory data to a hibernation image file, and saving a checkpoint; turning off or suspending hardware devices, and saving critical system states by the master chip; and controlling, by the master chip, the operating system to enter a hibernation mode.
8. The method of claim 3, wherein, Further comprising: waking up, by the master chip, the operating system to restore a working state according to the Bluetooth message.
9. The method of claim 8, wherein, waking up, by the master chip, the operating system to restore a working state according to the Bluetooth message includes: reading, by the operating system of the master chip, the saved hibernation image file, and restoring memory data in the hibernation image file to physical memory; and restoring, by the operating system of the master chip, the saved critical system states, and reinitializing hardware devices to restore an execution environment.
10. The method of claim 3, wherein, waking up, by the Bluetooth chip, in response to a wake-up event, and sending, by the Bluetooth chip, a first interrupt signal to the master chip includes: in response to the wake-up event triggered by an external Bluetooth interaction device, the Bluetooth chip starts to send the first interrupt signal associated with a slave-to-master wake-up command to the master chip.
11. A method for Bluetooth interaction, characterized in that, Further comprising: waking up, by the Bluetooth chip, in response to a wake-up event, and sending, by the Bluetooth chip, a first interrupt signal to the master chip; waking up, by the master chip, in response to the first interrupt signal, and continuously sending, by the master chip, a handshake signal to the Bluetooth chip, and sending, by the master chip, a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; and waking up, by the Bluetooth chip, in response to a wake-up event, and sending, by the Bluetooth chip, a first interrupt signal to the master chip. Further comprising:
12. The method of claim 11, wherein, notifying, by the Bluetooth chip, a hibernate command to the master chip in response to a hibernate event; stopping, by the master chip, sending the handshake signal to the Bluetooth chip in response to the hibernate command, and entering, by the master chip, a hibernate state; and entering, by the Bluetooth chip, a hibernate state in response to the Bluetooth chip not receiving the handshake signal from the master chip. Comprising a Bluetooth chip and a master chip, wherein: the Bluetooth chip is configured to be woken up in response to a wake-up event, and send a first interrupt signal to the master chip; 13. A master-slave system, characterized by comprising: the master chip is configured to be woken up in response to the first interrupt signal, continuously send a handshake signal to the Bluetooth chip, and send a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; The Bluetooth chip is further configured to send a Bluetooth message to the host chip in response to the handshake signal and the second interrupt signal; The Bluetooth chip is further configured to notify a sleep command to the host chip in response to a sleep event; The host chip is further configured to stop sending the handshake signal to the Bluetooth chip and enter a sleep state in response to the sleep command; and The Bluetooth chip is further configured to enter a sleep state in response to not receiving the handshake signal from the host chip.
14. An electronic device, comprising: Comprising: a memory configured to store an executable program; and one or more processors configured to execute the program such that the electronic device implements the method according to any one of claims 1 to 10, or the method according to claim 11 or 12.
Citation Information
Patent Citations
Wireless data interaction terminal working state switching method and device
CN112449327A
Bluetooth device low-power-consumption connection method, Bluetooth system, device and storage medium
CN118102492A