A method for implementing a bluetooth handset charging control on a phone

CN122553495APending Publication Date: 2026-08-11上海贝尔企业通信有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-21
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0007]为解决现有技术中充电电源持续输出、无法区分配对手柄以及自动化测试困难的问题,本发明提供一种在话机上实现蓝牙手柄充电控制的方法

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553495A_ABST
    Figure CN122553495A_ABST
Patent Text Reader

Abstract

This invention discloses a method for controlling Bluetooth handset charging on a telephone, comprising: controlling the enable pin of a charging management chip through the GPIO pin of the IP telephone's main control chip to achieve software-controllable on / off switching of the charging power supply; the IP telephone only turns on the charging power supply when a Bluetooth handset paired with the IP telephone is detected placed on the charging dock; the charging power supply remains off for unpaired Bluetooth handsets or when they are not in a present state; simultaneously, GPIO control signals are used to simulate charging voltage changes, causing the Bluetooth handset to automatically send off-hook or hang-up messages, thereby achieving automated testing of the call process. This invention achieves intelligent energy-saving charging of the Bluetooth handset and reduces the complexity of automated testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of voice communication, and in particular to a device and method for implementing Bluetooth handset charging control on a telephone. Background Technology

[0002] With the development of network communication technology, IP phones are widely used in enterprises and homes. Bluetooth handsets, as an extension component of IP phones, are typically used by placing them on the IP phone dock after a call. The metal charging contacts on the dock then connect with the charging contacts at the end of the Bluetooth handset, allowing the IP phone to charge it.

[0003] In existing technology, IP phones continuously provide a fixed charging voltage to the metal contacts (usually via current limiting or protection circuitry), maintaining power output regardless of whether the Bluetooth handset is present or paired with the IP phone. This simple power supply method has the following drawbacks:

[0004] 1. The Bluetooth controller continues to supply power even when it is not in place, causing unnecessary power consumption;

[0005] 2. When a non-paired Bluetooth controller or other metal object touches the charging contacts, the electrical connection will also be triggered, making intelligent charging management impossible;

[0006] 3. During automated testing, it is difficult to simulate the off-hook and on-hook behavior of Bluetooth gamepads through software, resulting in low testing efficiency. Summary of the Invention

[0007] To address the problems of continuous power output, inability to distinguish paired handsets, and difficulties in automated testing in existing technologies, this invention provides a method for controlling Bluetooth handset charging on a handset.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] In one embodiment of the present invention, a method for implementing Bluetooth handset charging control on a telephone is proposed, comprising the following steps:

[0010] The IP phone's main control chip is connected to the enable pin of the charging management chip via GPIO pins to control the power supply's on and off states.

[0011] When the Bluetooth handset is not placed on the IP phone dock, the GPIO output is low, and the charging management chip turns off its output.

[0012] When the Bluetooth handle is placed on the IP phone base, the pull-down resistor inside the Bluetooth handle will pull the level of the in-position detection pin low, and the IP phone will detect that the Bluetooth handle is in position.

[0013] Once the IP phone opens the preset anti-shake detection window and confirms that the Bluetooth handset is in a stable position, the GPIO outputs a high level, and the charging management chip outputs a charging voltage.

[0014] Within the preset hang-up message detection time window after charging is started, if the IP phone receives a hang-up message from the Bluetooth handset, it confirms that the Bluetooth handset is paired with the IP phone and continues charging; if the IP phone does not receive a hang-up message from the Bluetooth handset, the IP phone turns off the charging power.

[0015] Furthermore, the anti-jitter detection includes: the IP phone reads the level of the counted in-situ detection pin multiple times at fixed time intervals, and only when the results of multiple consecutive readings are consistent and different from the previous stable state is it confirmed as a valid state change.

[0016] Furthermore, after charging is started, the presence detection pin is forcibly pulled high by the charging circuit, and the IP phone no longer relies on the presence detection pin to determine the presence status of the Bluetooth handset, so as to prioritize charging stability.

[0017] Furthermore, after charging is started, the power supply voltage of the charging circuit is connected to the presence detection pin through a diode. When charging is started, the diode is turned on, forcibly pulling the presence detection pin high and disabling the presence detection function; when charging is turned off, the diode is turned off, and the presence detection returns to normal.

[0018] Furthermore, in automated testing mode, the IP phone directly sets the GPIO output level via serial port commands:

[0019] When the GPIO is set to a high level, the charging voltage is turned on, and the Bluetooth controller automatically sends a hang-up message after detecting the charging voltage.

[0020] When the GPIO is set to low level, the charging voltage is turned off, and the Bluetooth controller automatically sends an off-hook message after detecting the disappearance of the charging voltage.

[0021] This enables an automated testing process for the Bluetooth handset to answer and hang up calls.

[0022] Furthermore, the enable pin of the charging management chip is high-level to turn on the output and low-level to turn off the output.

[0023] Furthermore, the pull-down resistor inside the Bluetooth handle is used for in-situ detection.

[0024] Furthermore, the duration of the hang-up message detection time window is greater than the maximum time required for the Bluetooth controller to power on, initialize the Bluetooth protocol stack, and send the hang-up message.

[0025] In one embodiment of the present invention, a computer device is also proposed, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the above-described method for controlling Bluetooth handset charging on a telephone.

[0026] In one embodiment of the present invention, a computer-readable storage medium is also provided, characterized in that the computer-readable storage medium stores a computer program that executes the above-described method for implementing Bluetooth handset charging control on a telephone.

[0027] Beneficial effects:

[0028] 1. This invention only activates charging when the Bluetooth controller is in place and is a paired controller, thus avoiding ineffective power supply.

[0029] 2. This invention can prevent the charging circuit from malfunctioning due to accidental contact with a non-paired handle or foreign object.

[0030] 3. This invention supports direct control of the charging voltage via software commands, simplifying the automated testing process.

[0031] 4. This invention combines hardware and software stabilization to avoid false triggering caused by mechanical vibration. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the UT902+TPS2553 charging control circuit of the present invention;

[0033] Figure 2 This is a schematic diagram of the IP phone and Bluetooth handset base structure and charging contacts of the present invention;

[0034] Figure 3 This is an overall flowchart of the Bluetooth controller presence detection and charging control of the present invention;

[0035] Figure 4 This is a detailed flowchart of the anti-shake function of the present invention;

[0036] Figure 5 This is a schematic diagram of the computer device structure of the present invention. Detailed Implementation

[0037] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.

[0038] A method for implementing Bluetooth handset charging control on a telephone includes the following steps:

[0039] Step 1: The IP phone main control chip is connected to the enable pin of the charging management chip through GPIO pins to control the power supply to turn on and off;

[0040] Preferably, such as Figure 1 As shown, the core of the IP phone charging control circuit of this invention is the UT902 (TROISSS) integrated charging / power management chip. The specific connection relationship of this circuit is as follows:

[0041] A general purpose input / output (GPIO) pin (marked as GPIO_X) of the IP phone master control chip (DVFD) is connected to pin 3 of the U1302 chip (model TPS2553) via a wire. Pin 3 is the enable pin (EN pin) of the TPS2553.

[0042] The input pin (IN) of the TPS2553 is connected to the 5V power bus inside the IP phone, and its output pin (OUT) is connected to the metal charging spring (positive terminal) on the IP phone base.

[0043] The ground pin (GND) of the TPS2553 is connected to system ground.

[0044] like Figure 2 As shown, the Bluetooth handset has two charging contacts (positive and negative) at its end. When the Bluetooth handset is placed on the IP phone base, these two contacts contact the metal charging spring and grounding spring on the base respectively, forming a charging circuit.

[0045] Inside the Bluetooth controller, the positive charging contact is connected to the controller's charging management circuit, while the negative charging contact is connected to the controller's internal GND via a 2.2kΩ pull-down resistor. This pull-down resistor is a key component for enabling the Bluetooth controller's presence detection.

[0046] One end of the BT_HANDSET_PRESENCE_N signal line is connected to another GPIO pin (GPIO_Y) of the IP phone's main control chip, and the other end is connected to a 5V power supply through a 20kΩ pull-up resistor R1312 (20kΩ), and also connected to the grounding spring on the base (i.e., the corresponding position of the Bluetooth handset's negative contact). This signal is active low, meaning a low level (logic 0) indicates that the Bluetooth handset is in place, and a high level (logic 1) indicates that the Bluetooth handset is not in place.

[0047] In addition, a diode is placed between the charging output line and the presence detection signal line. The anode of the diode is connected to the output terminal (charging voltage) of the TPS2553, and the cathode is connected to the presence detection signal line. The function of this diode is: when charging is started, the charging voltage forces the detection pin high through the diode, shielding the presence detection function and preventing false judgments caused by electrical interference during the charging process.

[0048] Step 2: When the Bluetooth handset is not placed on the IP phone dock, the GPIO outputs a low level, and the charging management chip shuts off its output;

[0049] Preferably, during system power-on startup, the IP phone's main control chip executes the bootloader. During this stage, the main control chip's GPIO pins are in a high-impedance state or a default low-level state. Therefore, the EN terminal voltage of the TPS2553 is below 0.66V, the chip remains off, and it does not output charging voltage.

[0050] After the system software has fully started, the main control chip decides whether to pull the GPIO_X pin high based on subsequent detection results. The advantage of this design is that it avoids the charging circuit from being accidentally turned on due to uncertain states during system startup, ensuring that charging control is completely software-controllable.

[0051] Step 3: When the Bluetooth handset is placed on the IP phone base, the pull-down resistor inside the Bluetooth handset will pull the level of the in-position detection pin low, and the IP phone will detect that the Bluetooth handset is in position;

[0052] Preferably, such as Figure 3 As shown, when the user places the Bluetooth handset into the IP phone dock, the 2.2kΩ pull-down resistor inside the Bluetooth handset connects the dock's grounding spring to the Bluetooth handset's negative contact, thereby pulling the BT_HANDSET_PRESENCE_N signal line low. This low-level signal is transmitted to the GPIO_Y pin of the main control chip, triggering a hardware interrupt.

[0053] After the main control chip responds to the interrupt, it enters the anti-jitter detection process. For example... Figure 3 As shown in the "Shake Detection" branch of the flowchart, and Figure 4 The detailed flowchart of the anti-shake function is as follows, and the specific anti-shake logic is as follows:

[0054] 1. Read the GPIO level every 40ms;

[0055] 2. Read 5 times consecutively (total 200ms);

[0056] 3. A valid state change is only confirmed when the level is consistent for 5 consecutive times and is different from the previous stable state.

[0057] Preferably, Figure 4 The detailed internal flow of the debouncing function get_bthandset_state is further shown, including the added logic of comparing it with the previous stable state:

[0058] If the valid status confirmed this time is the same as the status recorded last time, no event will be triggered;

[0059] If the valid status confirmed this time is different from the status recorded last time, then determine the value of the new status:

[0060] If the new state is 0 (low level, controller in position), the BTHANDSET_PRESENCE system event is triggered, notifying the upper-layer software to start the pairing / charging process;

[0061] If the new state is 1 (high level, controller is not in position), then the controller off-hook event is triggered (if it was in position before).

[0062] After the state change is confirmed, the main control chip updates the state file (such as / var / run / handset_state) stored in non-volatile memory, recording the current Bluetooth controller state and timestamp to ensure the correct baseline state for the next interruption. The introduction of this state file allows the system to quickly recover its awareness of the Bluetooth controller state after an unexpected restart.

[0063] Step 4: The IP phone opens the preset anti-shake detection window. After confirming that the Bluetooth handset is in a stable position, the GPIO outputs a high level, and the charging management chip outputs the charging voltage.

[0064] Preferably, after the anti-shake detection confirms that the Bluetooth controller is in place, the main control chip outputs a high level (≥1.1V) from the GPIO_X pin to the EN terminal of the TPS2553, and the TPS2553 turns on the output to provide a 5V charging voltage to the charging contacts on the base.

[0065] After the charging voltage is output, such as Figure 1 The diode shown enters the conducting state: a 5V voltage is applied to the BT_HANDSET_PRESENCE_N signal line through this diode. Due to the small forward voltage drop of the diode (approximately 0.3V-0.7V), the detection pin is forced high to approximately 4.3V-4.7V, and the main control chip reads a high level (logic 1).

[0066] The core purpose of this mechanism is as follows: After charging is initiated, the internal circuitry of the Bluetooth controller begins to operate, and its current consumption and electrical characteristics may change. If the detection pin is still relied upon to determine whether the Bluetooth controller is in place at this time, misjudgments may occur due to signal jitter or interference (e.g., mistakenly believing that the controller has been removed and thus turning off charging). By forcibly pulling the detection pin high with a diode, the corresponding interrupt will not be responded to during charging. Only after charging is turned off and the diode is cut off will the detection pin resume its normal detection function, determined by the pull-up resistor R1312 and the pull-down resistor inside the Bluetooth controller.

[0067] When the Bluetooth handset is picked up (removed from the base by the user), the IP phone's main control chip first outputs a low level on GPIO_X to turn off the charging voltage. After the diode is turned off, the detection pin returns to the 5V high level provided by the pull-up resistor R1312 (the Bluetooth handset has been removed, and the pull-down resistor is no longer connected). The main control chip can then detect the Bluetooth handset's absence, preparing for the next placement of the Bluetooth handset.

[0068] Step 5: Within the preset hang-up message detection time window after charging is started, if the IP phone receives a hang-up message from the Bluetooth handset, it confirms that the Bluetooth handset is paired with the IP phone and continues charging; if the IP phone does not receive a hang-up message from the Bluetooth handset, the IP phone turns off the charging power.

[0069] Preferably, the present invention adds a "pairing controller recognition" step after charging is started, the specific process of which is as follows:

[0070] 1. The user places the Bluetooth handset into the IP phone dock;

[0071] 2. The IP phone confirms the Bluetooth handset is in place through the aforementioned anti-shake detection;

[0072] 3. The IP phone turns on its charging power (GPIO_X outputs a high level).

[0073] 4. The IP phone should simultaneously start a timer with a set hang-up message detection time window (e.g., 500 milliseconds). This time window should be long enough for the phone to power on, initialize the Bluetooth protocol stack, and send a hang-up message.

[0074] 5. After the Bluetooth controller detects the charging voltage, its internal Bluetooth module automatically sends a hang-up message (ATD HOOK or equivalent command) to the IP phone via the Bluetooth link.

[0075] 6. The IP phone listens for messages from this Bluetooth address within the time window:

[0076] If a hang-up message is received in the window, it confirms that the Bluetooth handset is a legitimate handset paired with this IP phone, and keeps the charging power on until the Bluetooth handset is removed.

[0077] If no hang-up message is received within the window timeout period, the Bluetooth handset is determined to be a handset not paired with this IP phone (or other devices that do not support this protocol). The IP phone will immediately output a low level on GPIO_X and turn off the charging power.

[0078] The core principle of this identification mechanism is as follows: During the initial pairing, the Bluetooth handset paired with this IP phone exchanges pairing keys and protocol parameters with the IP phone. Its Bluetooth module can recognize the charging voltage signal provided by the IP phone and send a specific hang-up message accordingly. Unpaired handsets (or Bluetooth handsets from other manufacturers) cannot recognize or will not send this message, thus being refused charging.

[0079] Preferably, when the user places a Bluetooth handset paired with a phone not belonging to this IP address into the dock:

[0080] 1. When the Bluetooth controller is placed in the circuit, the presence detection circuit pulls the detection pin low;

[0081] 2. Perform anti-shake detection on the IP phone to confirm that the Bluetooth handset is in place;

[0082] 3. Turn on the charging power of the IP phone (because at this time the IP phone does not yet know whether it is a paired handset).

[0083] 4. IP phone start-up and hang-up message detection time window;

[0084] 5. Since the Bluetooth handset is not paired with this IP phone, its Bluetooth module will not send any messages to the phone;

[0085] 6. The time window expires (e.g., after 500ms), and the IP phone still has not received any hang-up message;

[0086] 7. Turn off the charging power of the IP phone;

[0087] 8. The IP phone can optionally record a system log entry with the message "Unpaired handset detected, charging refused", to facilitate troubleshooting by maintenance personnel.

[0088] This process ensures that even if someone accidentally places another Bluetooth controller or metal object into the base, the charging circuit will only turn on for a very short time (milliseconds) and then automatically turn off, thus avoiding energy waste and preventing the risk of short circuits or overheating caused by foreign objects.

[0089] Preferably, in automated testing scenarios, the Bluetooth handset is always placed on the IP phone dock. The testing system sends commands to the IP phone's main control chip via a serial port (such as UART or USB virtual serial port) to directly control the output level of the GPIO_X pin, bypassing the normal in-situ detection and pairing identification process.

[0090] The specific implementation method is as follows:

[0091] Simulated hang-up operation: The test script sends a command via serial port to set BT_CHRG_ON = 1 (e.g., set GPIO122 1). Upon receiving this command, the IP phone's main control chip outputs a high level on the GPIO_X pin, enabling the TPS2553 and providing a 5V charging voltage to the Bluetooth handset. After detecting the charging voltage, the Bluetooth handset's Bluetooth module sends a hang-up message to the IP phone via the Bluetooth link. Upon receiving the hang-up message, the IP phone enters the hang-up state. At this point, the test script can simulate an incoming call to test the phone's call answering function.

[0092] Simulating off-hook operation: The test script sends a command via serial port to set BT_CHRG_ON = 0 (e.g., set GPIO122 0). The IP phone's main control chip outputs a low level on the GPIO_X pin, the TPS2553 is turned off, and the charging voltage disappears. After the Bluetooth handset detects the voltage disappearance, its Bluetooth module sends an off-hook message to the IP phone. Upon receiving the off-hook message, the IP phone enters the off-hook state. At this time, the test script can simulate dialing operations to test the phone's dialing and calling functions.

[0093] Loop testing: Test scripts can be written to loop and alternately send the gpio set 122 1 and gpio set 122 0 commands, and insert an appropriate delay (e.g., 1 second) after each command to simulate the user's repeated off-hook and on-hook behavior, which can be used for stress testing or long-term stability testing.

[0094] like Figure 5 As shown, a computer device 100 includes a memory 110, a processor 120, and a computer program 130 stored in the memory 110 and executable on the processor 120. When the processor 120 executes the computer program 130, it implements the aforementioned method for controlling Bluetooth handset charging on a telephone.

[0095] A computer-readable storage medium storing a computer program that performs the aforementioned method for implementing Bluetooth handset charging control on a telephone.

[0096] Compared with existing technologies that require manual picking up and putting down the handle to complete the off-hook / on-hook test, the method of this invention is completely controlled by software, with fast testing speed, good repeatability, no human error, and significantly improves the efficiency and reliability of automated testing.

[0097] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

[0098] Regarding the limitation of the scope of protection of this invention, those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solution of this invention are still within the scope of protection of this invention.

Claims

1. A method for implementing Bluetooth handset charging control on a telephone, characterized in that, Includes the following steps: The IP phone's main control chip is connected to the enable pin of the charging management chip via GPIO pins to control the power supply's on and off states. When the Bluetooth handset is not placed on the IP phone dock, the GPIO output is low, and the charging management chip turns off its output. When the Bluetooth handle is placed on the IP phone base, the pull-down resistor inside the Bluetooth handle will pull the level of the in-position detection pin low, and the IP phone will detect that the Bluetooth handle is in position. Once the IP phone opens the preset anti-shake detection window and confirms that the Bluetooth handset is in a stable position, the GPIO outputs a high level, and the charging management chip outputs a charging voltage. Within the preset hang-up message detection time window after charging is started, if the IP phone receives a hang-up message from the Bluetooth handset, it confirms that the Bluetooth handset is paired with the IP phone and continues charging; if the IP phone does not receive a hang-up message from the Bluetooth handset, the IP phone turns off the charging power.

2. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, The anti-jitter detection includes: the IP phone reads the level of the in-position detection pin multiple times at fixed time intervals, and only when the results of multiple consecutive readings are consistent and different from the previous stable state is it confirmed as a valid state change.

3. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, Once charging is initiated, the presence detection pin is forcibly pulled high by the charging circuit. The IP phone no longer relies on the presence detection pin to determine the presence status of the Bluetooth handset, thus prioritizing charging stability.

4. The method for implementing Bluetooth handset charging control on a telephone according to claim 3, characterized in that, After charging is started, the power supply voltage of the charging circuit is connected to the presence detection pin through a diode. When charging is started, the diode is turned on, forcibly pulling the presence detection pin high and disabling the presence detection function; when charging is turned off, the diode is turned off, and the presence detection returns to normal.

5. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, In automated testing mode, the IP phone directly sets the GPIO output level via serial port commands: When the GPIO is set to a high level, the charging voltage is turned on, and the Bluetooth controller automatically sends a hang-up message after detecting the charging voltage. When the GPIO is set to low level, the charging voltage is turned off, and the Bluetooth controller automatically sends an off-hook message after detecting the disappearance of the charging voltage. This enables an automated testing process for the Bluetooth handset to answer and hang up calls.

6. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, The enable pin of the charging management chip is high-level to turn on the output and low-level to turn off the output.

7. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, The pull-down resistor inside the Bluetooth handle is used for in-situ detection.

8. The method for implementing Bluetooth handset charging control on a telephone according to claim 1, characterized in that, The duration of the hang-up message detection time window is greater than the maximum time required for the Bluetooth controller to power on, initialize the Bluetooth protocol stack, and send the hang-up message.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for controlling Bluetooth handset charging on a telephone as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the method for implementing Bluetooth handset charging control on a telephone as described in any one of claims 1-8.