Method for Bluetooth interaction, master-slave system and electronic equipment
By using handshake and interrupt mechanisms to address the uncertainties and high power consumption issues in the Bluetooth chip wake-up process, stability and low power consumption of Bluetooth communication are achieved.
Patent Information
- Application Number
- CN202411150322.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
- 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, and 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 to enter a sleep state in response to a sleep event. The Bluetooth chip enters a sleep state when it does not receive a handshake signal. When the system is woken up, the main control chip is woken up by an interrupt signal and a Bluetooth message is sent.
This avoids Bluetooth chip disconnection/reboot issues, while reducing system power consumption and ensuring normal Bluetooth communication.
Smart Images

Figure CN119052902A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Bluetooth device connection, and in particular to a method, a master-slave system and an electronic device for Bluetooth interaction. Background Art
[0002] The Bluetooth chip and AP (application processor) main control chip form a master-slave system and support Bluetooth sleep and wake-up functions. The process of AP main control chip waking up and restoring the scene contains many uncertainties. It is easy for the AP main control chip to fail to receive Bluetooth messages normally due to timing problems, so the Bluetooth chip cannot complete the wake-up process, which in turn causes the Bluetooth chip disconnection / restart problem.
[0003] In addition, during the sleep process, it may be necessary to keep the RTS (request to send) of the AP main control chip HCI (host control interface protocol) serial port high. Then, during the wake-up process, pull down RTS so that the AP main control chip can receive the HCI Bluetooth message and communicate normally. However, the hardware is required to keep RTS at a high level during sleep, but this is not conducive to reducing power consumption, because maintaining the high level of RTS may require the main control specific power domain to remain open, thereby increasing power consumption. Moreover, the HCI Bluetooth serial port is required to enable the flow control mechanism, which cannot reduce power consumption. Summary of the invention
[0004] The present invention provides a method for Bluetooth interaction, a master-slave system and an electronic device, which can avoid the problem of Bluetooth chip disconnection / restart and reduce system power consumption.
[0005] In one aspect of the present invention, a method for Bluetooth interaction is provided. The method comprises: during a working state, a main control chip continuously sends a handshake signal to a Bluetooth chip; in response to a sleep event, the Bluetooth chip notifies the main control chip of a sleep command; in response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state; and in response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state.
[0006] In another aspect of the present invention, a method for Bluetooth interaction is provided. The method comprises: in response to a wake-up event, a Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to a main control chip; in response to the first interrupt signal, the main control chip is awakened, and the main control chip continuously sends a handshake signal to the Bluetooth chip, and the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; and in response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
[0007] In another aspect of the present invention, a master-slave system is provided. The system includes a Bluetooth chip and a main control chip, wherein: the Bluetooth chip is configured to be awakened in response to a wake-up event and send a first interrupt signal to the main control chip; the main control chip is configured to be awakened 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 main control chip in response to the handshake signal and the second interrupt signal; the Bluetooth chip is further configured to notify the main control chip of a sleep command in response to a sleep event; the main control 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 main control chip.
[0008] In another aspect of the present invention, an electronic device is provided, which includes a memory configured to store an executable program and one or more processors configured to execute the program to perform the above-mentioned method for Bluetooth interaction.
[0009] According to the present invention, during the working state, the main control chip continuously sends handshake signals to the Bluetooth chip, in response to a sleep event, the Bluetooth chip notifies the main control chip of a sleep command, in response to the sleep command, the main control chip stops sending handshake signals to the Bluetooth chip, and the main control chip enters a sleep state, and in response to the Bluetooth chip not receiving a handshake signal from the main control chip, the Bluetooth chip enters a sleep state, thereby utilizing the handshake and interrupt mechanisms to put the Bluetooth chip and the main control chip into sleep and wake up, without the need for the specific power domain of the main control chip to remain open, and can also avoid the situation where the main control chip cannot receive Bluetooth information, thereby avoiding the Bluetooth chip disconnection / restart problem while reducing system power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a flowchart of a method for Bluetooth interaction according to an embodiment of the present invention;
[0011] Figure 2 is a flowchart of a method for Bluetooth interaction according to an embodiment of the present disclosure;
[0012] Figure 3 A schematic diagram of a flow chart of a method for Bluetooth interaction according to an embodiment of the present invention;
[0013] Figure 4 A schematic diagram of a master-slave system according to an embodiment of the present invention;
[0014] Figure 5 FIG. 4 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0016] The Bluetooth chip and the AP main control chip constitute the master-slave system, and have built-in support for Bluetooth sleep and wake-up functions. The sleep process of the master-slave system includes: the AP main control chip processes the system sleep process; triggers the Bluetooth chip to sleep; after all peripherals have completed sleep, the AP main control chip saves the scene and enters the sleep state. In addition, the wake-up process of the master-slave system includes: the AP main control chip processes the system wake-up process; the AP main control chip restores the scene; triggers the Bluetooth chip to wake up; after all peripherals have completed wake-up, the AP main control chip enters the wake-up state.
[0017] The above solution has the problem of Bluetooth disconnection / restart. When the AP main control chip is in sleep mode, the Bluetooth chip wakes up and sends a BT-WAKE-HOST interrupt signal, and sends an HCI Bluetooth message. The AP main control chip is awakened and restored to the scene, but the AP main control chip may not receive the Bluetooth message, causing the Bluetooth disconnection / restart problem. The AP main control chip and the Bluetooth chip require handshake signals and level control to complete the wake-up process normally. The process of the AP main control chip waking up and restoring the scene contains more uncertainties. Because of timing problems, the Bluetooth information cannot be received normally, so the Bluetooth chip cannot complete the wake-up process, which in turn causes the Bluetooth chip disconnection / restart problem.
[0018] In addition, the above solution has the problem of high Bluetooth power consumption. When the AP main control chip is in sleep mode, pull up the HCI serial port RTS of the AP main control chip. The Bluetooth chip wakes up and sends a BT-WAKE-HOST interrupt signal, and sends an HCI Bluetooth message. The AP main control chip wakes up and resumes the scene, then pulls down RTS, so that the AP main control chip can receive the HCI Bluetooth message and communicate normally. The advantage of this method is that Bluetooth will not be disconnected, but it has the following disadvantages: the hardware needs to keep RTS at a high level when in sleep mode, but this is not conducive to sleep power consumption, because maintaining a high level of RTS may require the specific power domain of the main control to remain always open, thereby increasing power consumption; the HCI Bluetooth serial port needs to enable the flow control mechanism.
[0019] In order to solve at least the above-mentioned technical problems, the present disclosure provides a method for Bluetooth interaction, which utilizes interrupt and handshake mechanisms to improve the sleep process and wake-up process of the master-slave system. According to the present disclosure, during the working state, the master control chip continuously sends a handshake signal to the Bluetooth chip, and in response to a sleep event, the Bluetooth chip notifies the master control chip of a sleep command, and in response to the sleep command, the master control chip stops sending a handshake signal to the Bluetooth chip, and the master control chip enters a sleep state, and in response to the Bluetooth chip not receiving a handshake signal from the master control chip, the Bluetooth chip enters a sleep state. In this way, the handshake and interrupt mechanisms are utilized to perform sleep and wake-up of the Bluetooth chip and the master control chip, and there is no need for the specific power domain of the master control chip to remain always on, and the situation where the master control 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 1 is a flow chart showing a method 100 for Bluetooth interaction according to an embodiment of the present disclosure. Figure 1 The method 100 includes the following steps 102 to 108.
[0022] In step 102, the main control chip continuously sends a handshake signal to the Bluetooth chip during the working state.
[0023] In step 104, in response to the sleep event, the Bluetooth chip notifies the main control chip of a sleep command.
[0024] In some embodiments, in response to the sleep event triggered by an external Bluetooth interactive device, the Bluetooth chip sends sleep information to the main control chip.
[0025] In step 106 , in response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state.
[0026] In some embodiments, the main control chip saves the working state according to the sleep information, stops sending the handshake signal to the Bluetooth chip, and the operating system of the main control chip enters a low-power sleep state.
[0027] In some embodiments, the main control chip saves memory data to a dormant image file and saves a checkpoint. The main control chip shuts down or suspends hardware devices and saves key system states. In addition, the main control chip controls the operating system to enter a dormant mode. In this way, when the main control chip enters a dormant state, the scene is saved to ensure that it can continue to work after being awakened later.
[0028] In step 108 , in response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state.
[0029] In some embodiments, the Bluetooth chip repeatedly monitors or queries the handshake signal. If the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters a semi-dormant state and continues to monitor an external wake-up signal.
[0030] In this way, the main control chip and the Bluetooth chip enter a sleep / semi-sleep state by stopping sending handshake signals, thereby reducing 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 sending function is turned off and an external wake-up signal is received. In this way, in the semi-sleep state, the Bluetooth chip turns off the sending function to reduce system power consumption, and monitors the external wake-up signal to ensure that the wake-up state can be entered in time.
[0032] The above describes an embodiment of a sleep scenario. In addition, the method 100 according to an embodiment of the present disclosure may also involve a wake-up scenario. In some embodiments, the method 100 may also include the following steps 110 to 114.
[0033] In step 110 , the Bluetooth chip is awakened in response to a wake-up event, and the Bluetooth chip sends a first interrupt signal to the main control chip.
[0034] In some embodiments, in response to the wake-up event triggered by an external Bluetooth interactive device, the Bluetooth chip enters a wake-up state, so that the Bluetooth chip sends the first interrupt signal associated with the slave-to-host wake-up command to the main control chip.
[0035] In some embodiments, in response to the wake-up event triggered by an external Bluetooth interactive device, the Bluetooth chip starts a sending function to send the first interrupt signal associated with the slave-to-host wake-up command to the main control chip.
[0036] In step 112, in response to the first interrupt signal, the main control chip is awakened, the main control chip continues to send the handshake signal to the Bluetooth chip, and the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip.
[0037] In some embodiments, in response to the first interrupt signal, the host of the master control chip enters a wake-up state, so that the master control chip continues to send the handshake signal to the Bluetooth chip. In some embodiments, the master control chip sends the second interrupt signal associated with the host-to-slave wake-up command to the Bluetooth chip, and the master control chip sends a control message to the Bluetooth chip.
[0038] In step 114, in response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
[0039] In some embodiments, after the Bluetooth chip receives the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message corresponding to the control message to the main control chip.
[0040] In some embodiments, the method 100 may further include: after the main control chip sends the second interrupt signal to the Bluetooth chip, the main control chip and the Bluetooth chip complete wake-up.
[0041] In this way, the main control chip and the Bluetooth chip are effectively awakened through interrupt signals and handshake signals, and the situation where the main control chip cannot receive Bluetooth messages normally will not occur. Bluetooth messages are data messages. Data message communication can only be carried out after the control message negotiation is completed, ensuring that the Bluetooth chip and the main control chip have been awakened successfully.
[0042] In some embodiments, the method 100 may further include: the main control chip wakes up the operating system according to the Bluetooth message to resume the working state.
[0043] In some embodiments, the operating system of the main control chip reads the saved dormant image file and restores the memory data in the dormant image file to the physical memory. In addition, the operating system of the main control chip restores the saved key system state, reinitializes the hardware device, and restores the execution environment.
[0044] In this way, the scene before hibernation is restored, which is helpful for users to continue their previous work.
[0045] According to another aspect of the present invention, Figure 2 2 is a flow chart showing a method 200 for Bluetooth interaction according to an embodiment of the present disclosure. Figure 2 As shown, another method 200 for Bluetooth interaction according to an embodiment of the present disclosure includes the following steps S202 to S206.
[0046] In step S202 , in response to the wake-up event, the Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to the main control chip.
[0047] In step S204, in response to the first interrupt signal, the main control chip is awakened, the main control chip continues to send handshake signals to the Bluetooth chip, and the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip.
[0048] In step S206, in response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
[0049] The above describes an embodiment of a wake-up scenario. In addition, the method 200 according to an embodiment of the present disclosure may also involve a sleep scenario. In some embodiments, the method 200 may also include the following steps S208 to S212.
[0050] In step S208, in response to the sleep event, the Bluetooth chip notifies the main control chip of a sleep command.
[0051] In step S210 , in response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state.
[0052] In step S212, in response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state.
[0053] In this way, the handshake and interrupt mechanisms are used to put the Bluetooth chip and the main control chip into sleep and wake up. There is no need to keep the specific power domain of the main control chip always on, and the situation where the main control chip cannot receive Bluetooth information can be avoided, thereby avoiding the Bluetooth chip disconnection / restart problem and reducing system power consumption.
[0054] Hereinafter, application scenarios of the method and device for Bluetooth interaction according to the embodiments of the present invention will be described by way of examples.
[0055] Figure 3 is a flow chart showing a method for Bluetooth interaction according to an embodiment of the present invention. Figure 2 The method includes the following steps 301 to 309.
[0056] In step 301, the main control chip continuously sends a handshake signal to the Bluetooth chip during the working state.
[0057] A handshake signal is a short data packet sent periodically (including handle, delay, interval, type and load, etc.) and is used to detect the connection status. The handshake signal is periodically sent from the main control chip to the Bluetooth chip through the HCI command. The Bluetooth chip receives the handshake signal and confirms the receipt through the HCI command. The handshake signal can be used to detect the connection status, wake up the Bluetooth device and control the interaction.
[0058] In step 302, in response to a sleep event triggered by an external Bluetooth interactive device, the Bluetooth chip sends a sleep command to the main control chip.
[0059] In step 303, the main control chip saves the working state according to the sleep command, stops sending the handshake signal to the Bluetooth chip, and the main control chip enters the sleep state.
[0060] Specifically, the main control chip saves memory data to a sleep image file and saves checkpoints; the main control chip shuts down or suspends hardware devices and saves critical system states; the main control chip controls the operating system to enter sleep mode and stops sending the handshake signal to the Bluetooth chip to enter a sleep state.
[0061] In some embodiments, the critical system status includes the contents of CPU registers and an interrupt vector table, etc.
[0062] In step 304, if the Bluetooth chip does not receive the handshake signal from the main control chip, the Bluetooth chip enters a semi-dormant state in which a sending function is turned off and an external wake-up signal is received.
[0063] Specifically, the Bluetooth chip monitors (POLL) whether the main control chip sends the handshake signal; if the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters a semi-dormant state in which the sending function is turned off and an external wake-up signal is received.
[0064] In step 305, the Bluetooth chip is awakened in response to a wake-up event triggered by an external Bluetooth interactive device, and the Bluetooth chip sends a first interrupt signal to the main control chip.
[0065] Specifically, in response to the wake-up event triggered by the external Bluetooth interactive device, the Bluetooth chip enters the wake-up state, so that the Bluetooth chip sends the first interrupt signal associated with the slave-to-host wake-up command to the main control chip.
[0066] In some embodiments, in response to the wake-up event triggered by an external Bluetooth interactive device, the Bluetooth chip starts a sending function to send the first interrupt signal associated with the slave-to-host wake-up command to the main control chip.
[0067] In step 306 , the main control chip is awakened in response to the first interrupt signal, and the main control chip continues to send the handshake signal to the Bluetooth chip.
[0068] Specifically, in response to the first interrupt signal, the host of the main control chip enters a wake-up state, so that the main control chip continues to send the handshake signal to the Bluetooth chip.
[0069] In step 307, the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip.
[0070] Specifically, the main control chip sends the second interrupt signal associated with the host-to-slave wake-up command to the Bluetooth chip, and the main control chip sends an HCI control message to the Bluetooth chip.
[0071] HCI is the protocol layer of Bluetooth, which defines the communication interface between the Bluetooth host and the Bluetooth controller. The HCI control interface carries HCI control messages and is used for control interaction between the main control chip and the Bluetooth chip.
[0072] In step 308, in response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
[0073] Specifically, after the Bluetooth chip receives the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message corresponding to the HCI control message to the main control chip.
[0074] In step 309, the main control chip wakes up the operating system according to the Bluetooth message to resume the working state.
[0075] Specifically, the saved hibernation image file is read through the operating system of the main control chip, and the memory data in the hibernation image file is restored to the physical memory; the saved key system state is restored through the operating system of the main control chip, and the hardware device is reinitialized to restore the execution environment.
[0076] According to yet another aspect of the present invention, a master-slave system is provided. Figure 4 Schematic diagram of a master-slave system according to an embodiment of the present invention. Figure 4 As shown, the master-slave system includes a Bluetooth chip 402 and a main control chip 404 .
[0077] The Bluetooth chip 402 is configured to be awakened in response to a wake-up event and send a first interrupt signal to the main control chip.
[0078] The main control chip 404 is configured to be awakened 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 main control chip 404 in response to the handshake signal and the second interrupt signal.
[0080] The Bluetooth chip 402 is further configured to notify the main control chip 404 of a sleep command in response to a sleep event.
[0081] The main control chip 404 is further configured to stop sending the handshake signal to the Bluetooth chip 402 in response to the sleep command and enter a sleep state.
[0082] The Bluetooth chip 402 is further configured to enter a sleep state in response to not receiving the handshake signal from the main control chip 404 .
[0083] like Figure 4 As shown, in some embodiments, the Bluetooth chip 402 is an HCI Bluetooth chip with a built-in HCI interface. In addition, the main control chip 404 is an AP main control chip with a Bluetooth Host (representing the implementation of the Bluetooth protocol stack on the host side) function.
[0084] Figure 4 In the figure, BT_WAKE_HOST means Bluetooth wake-up host; BT_WAKE means Bluetooth wake-up; NC_BT_ANT means empty pin; UART_RTSn means request to send (RTS) signal pin in UART communication; UART_CTSn means clear to send (CTS) signal pin in UART communication; UART_RX means receive pin, used to receive serial data; UART_TX means transmit pin, used to send serial data; HOST_WAKE_BT means host wake-up Bluetooth; GPIO means general input / output port.
[0085] It should be understood that the Bluetooth chip and the main control chip can be further configured to execute the corresponding steps or actions in the method 100 or 200 described above, which will not be described in detail here.
[0086] According to yet another aspect of the present invention, Figure 5 Schematic diagram of an electronic device 500 according to an embodiment of the present invention. Figure 5The electronic device 500 includes a memory 502 and one or more processors 504. An executable program is stored in the memory 502 and can be run on the processor 504. When the processor 504 executes the executable program, the method for Bluetooth interaction as described above is implemented.
[0087] In summary, the method, master-slave system and electronic device for Bluetooth interaction provided by the present invention, during the working state, the master control chip continuously sends a handshake signal to the Bluetooth chip, in response to a sleep event, the Bluetooth chip notifies the master control chip of a sleep command, in response to the sleep command, the master control chip stops sending handshake signals to the Bluetooth chip, and the master control chip enters a sleep state, in response to the Bluetooth chip not receiving a handshake signal from the main control chip, the Bluetooth chip enters a sleep state, thereby utilizing the handshake and interrupt mechanisms to put the Bluetooth chip and the main control chip into sleep and wake up, without the need for the specific power domain of the main control chip to remain open, and can also avoid the situation where the main control chip cannot receive Bluetooth information, thereby avoiding the problem of Bluetooth chip disconnection / restart and reducing system power consumption; in addition, in the semi-sleeping state, the Bluetooth chip turns off non-essential (sending) functions to reduce system power consumption, and monitors external wake-up signals to ensure that it can enter the wake-up state in time.
[0088] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for Bluetooth interaction, characterized in that: include: During the working state, the main control chip continuously sends handshake signals to the Bluetooth chip; In response to a sleep event, the Bluetooth chip notifies the main control chip of a sleep command; In response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state; as well as In response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state.
2. The method according to claim 1, characterized in that The Bluetooth chip entering the sleep state includes: the Bluetooth chip entering a semi-sleep state in which a sending function is turned off and an external wake-up signal is received.
3. The method according to claim 1, characterized in that Also includes: In response to a wake-up event, the Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to the main control chip; In response to the first interrupt signal, the main control chip is awakened, the main control chip continues to send the handshake signal to the Bluetooth chip, and the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; as well as In response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
4. The method according to claim 3, characterized in that Also includes: After the main control chip sends the second interrupt signal to the Bluetooth chip, the main control chip and the Bluetooth chip complete the wake-up.
5. The method according to claim 1, characterized in that In response to the sleep event, the Bluetooth chip notifies the main control chip of a sleep command, including: in response to the sleep event triggered by an external Bluetooth interactive device, the Bluetooth chip sends sleep information to the main control chip; In response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state, including: the main control chip saves the working state according to the sleep information, stops sending the handshake signal to the Bluetooth chip, and the operating system of the main control chip enters a low-power sleep state; In response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state, including: the Bluetooth chip repeatedly monitors or queries the handshake signal; if the Bluetooth chip does not receive the handshake signal, the Bluetooth chip enters a semi-sleep state and continues to monitor an external wake-up signal.
6. The method according to claim 3, characterized in that In response to the wake-up event, the Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to the main control chip, including: in response to the wake-up event triggered by an external Bluetooth interactive device, the Bluetooth chip enters a wake-up state, so that the Bluetooth chip sends the first interrupt signal associated with the slave-to-host wake-up command to the main control chip; In response to the first interrupt signal, the main control chip is awakened, and the main control chip continuously sends the handshake signal to the Bluetooth chip, including: in response to the first interrupt signal, the host of the main control chip enters an awake state, so that the main control chip continuously sends the handshake signal to the Bluetooth chip; The main control chip sending the second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip includes: the main control chip sending the second interrupt signal associated with the host-to-slave wake-up command to the Bluetooth chip, and the main control chip sending a control message to the Bluetooth chip; In response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip, including: after the Bluetooth chip receives the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message corresponding to the control message to the main control chip.
7. The method according to claim 5, characterized in that The main control chip saving the working state according to the sleep information includes: The main control chip saves the memory data to the dormant image file and saves the checkpoint; The main control chip shuts down or suspends the hardware device and saves the key system status; and The main control chip controls the operating system to enter the sleep mode.
8. The method according to claim 3, characterized in that Also includes: The main control chip wakes up the operating system according to the Bluetooth message to resume the working state.
9. The method according to claim 8, characterized in that The main control chip awakens the operating system according to the Bluetooth message and resumes the working state, including: Reading the saved dormancy image file through the operating system of the main control chip, and restoring the memory data in the dormancy image file to the physical memory; and The saved key system state is restored through the operating system of the main control chip, and the hardware device is reinitialized to restore the execution environment.
10. The method according to claim 3, characterized in that In response to the wake-up event, the Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to the main control chip, comprising: In response to the wake-up event triggered by the external Bluetooth interactive device, the Bluetooth chip starts a sending function to send the first interrupt signal associated with the slave-to-host wake-up command to the main control chip.
11. A method for Bluetooth interaction, characterized in that: include: In response to the wake-up event, the Bluetooth chip is awakened, and the Bluetooth chip sends a first interrupt signal to the main control chip; In response to the first interrupt signal, the main control chip is awakened, the main control chip continuously sends a handshake signal to the Bluetooth chip, and the main control chip sends a second interrupt signal corresponding to the first interrupt signal to the Bluetooth chip; as well as In response to the handshake signal and the second interrupt signal, the Bluetooth chip sends a Bluetooth message to the main control chip.
12. The method according to claim 11, characterized in that Also includes: In response to a sleep event, the Bluetooth chip notifies the main control chip of a sleep command; In response to the sleep command, the main control chip stops sending the handshake signal to the Bluetooth chip, and the main control chip enters a sleep state; as well as In response to the Bluetooth chip not receiving the handshake signal from the main control chip, the Bluetooth chip enters a sleep state.
13. A master-slave system, characterized in that: Including Bluetooth chip and main control chip, including: The Bluetooth chip is configured to be awakened in response to a wake-up event and send a first interrupt signal to the main control chip; The main control chip is configured to be awakened 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 main control chip in response to the handshake signal and the second interrupt signal; The Bluetooth chip is further configured to notify the main control chip of a sleep command in response to a sleep event; The main control 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 main control chip.
14. An electronic device, characterized in that: include: a memory configured to store an executable program; as well as One or more processors are configured to execute the program so 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
Internet of Things Bluetooth gateway equipment
CN107466003A
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
Bluetooth pairing system and control method thereof
CN118301621A
Device waking-up method and apparatus, and electronic device
US20230091286A1
Cited By
Low-delay data transmission method and system of Bluetooth chip
CN121262560A
Low latency data transmission method and system for a bluetooth chip
CN121262560B
