Control method and device of master-slave dual-mode bluetooth remote controller and bluetooth remote controller

CN122929761APending Publication Date: 2026-10-16GUANGDONG SENEASY INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611068976.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本申请提供了一种主从双模式蓝牙遥控器的控制方法、装置及蓝牙遥控器,以解决现有技术中角色时分切换导致角色切换及重连过程耗时增加,造成明显的控制卡顿、用户体验差的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929761A_ABST
    Figure CN122929761A_ABST
Patent Text Reader

Abstract

The application discloses a control method and device of a master-slave dual-mode Bluetooth remote controller and the Bluetooth remote controller. The method comprises the following steps: obtaining a first MAC address and a second MAC address, the first MAC address being a MAC address of the Bluetooth remote controller as a local master device, and the second MAC address being a MAC address of the Bluetooth remote controller as a local slave device; based on the first MAC address and the second MAC address, establishing a first communication link and a second communication link in parallel, the first communication link being a communication link between the Bluetooth remote controller and an external slave device, and the second communication link being a communication link between external master devices of the Bluetooth remote controller; obtaining key trigger information, sending the key trigger information to the external slave device through the first communication link; and / or obtaining state feedback information through the first communication link, and sending the state feedback information to the external master device through the second communication link. The method can realize bidirectional interaction of data in parallel based on the first communication link and the second communication link in parallel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote control technology, and in particular to a control method, device and Bluetooth remote control for a master-slave dual-mode Bluetooth remote control. Background Technology

[0002] With the widespread application of Bluetooth technology in consumer electronics, Bluetooth remote controls have evolved from traditional one-way infrared control to two-way interactive devices. Most existing Bluetooth remote controls employ a single-role working mode, meaning they can only function as either a master or slave device at any given time.

[0003] When a remote control needs to simultaneously control external slave devices downwards and be connected and accessed by external master devices upwards, existing solutions can only achieve this through role time-division switching. That is, the current link is disconnected, the role is switched, and then another link is established. However, role time-division switching increases the time spent on role switching and reconnection, resulting in noticeable control lag and a poor user experience. Summary of the Invention

[0004] This application provides a control method, device, and Bluetooth remote control for a master-slave dual-mode Bluetooth remote control, in order to solve the technical problem in the prior art where time-division switching of roles leads to increased time consumption during role switching and reconnection, resulting in significant control lag and poor user experience.

[0005] To address the aforementioned technical problems, in a first aspect, this application provides a control method for a master-slave dual-mode Bluetooth remote controller, comprising: acquiring a pre-stored first MAC address and a second MAC address, wherein the first MAC address is the MAC address of the Bluetooth remote controller when acting as a local master device, and the second MAC address is the MAC address of the Bluetooth remote controller when acting as a local slave device; establishing a parallel first communication link and a second communication link based on the first MAC address and the second MAC address, wherein the first communication link is a communication link between the Bluetooth remote controller and an external slave device, and the second communication link is a communication link between the Bluetooth remote controller and an external master device; acquiring button trigger information and sending the button trigger information to the external slave device through the first communication link; and / or acquiring status feedback information sent by the external slave device through the first communication link and sending the status feedback information to the external master device through the second communication link.

[0006] Unlike traditional Bluetooth remote controls that only support a single user, the aforementioned master-slave dual-mode Bluetooth remote control method pre-stores dual MAC addresses and establishes two parallel links. This allows the same remote control to both control the TV and act as a data relay station to forward the TV's status to the mobile phone, greatly expanding the remote control's functional boundaries and meeting the needs of multi-device linkage in smart homes. Furthermore, this method eliminates the need for two separate Bluetooth modules or remote controls for TV control and status forwarding. Two-way data interaction can be achieved using only one Bluetooth physical chip and two logical links, reducing hardware redundancy and lowering BOM costs and overall power consumption. Users can obtain precise TV status information, such as volume and current input source, in real time via a mobile app, avoiding the drawbacks of traditional infrared remote controls' one-way control and lack of status feedback. Simultaneously, button commands and status feedback are transmitted in parallel on two independent links, preventing mutual blocking and ensuring the immediacy of button responses and the synchronization of feedback data. External devices such as mobile phones do not need to establish a direct Bluetooth connection with the TV. They only need to establish a slave device link with the remote control to indirectly obtain TV information. This relay mode reduces the difficulty of compatibility between mobile phones and TVs of different brands, making the system easier to expand to a variety of smart home appliances.

[0007] In some implementations, establishing a parallel first communication link and a second communication link based on the first MAC address and the second MAC address includes: invoking a first protocol stack instance, generating a scan request frame with the first MAC address as the source address, and performing an active scan operation on a broadcast channel according to the scan request frame; when an external slave device is scanned, sending a first connection request frame to the external slave device to establish the first communication link; invoking a second protocol stack instance, generating a broadcast frame with the second MAC address as the source address, and performing a broadcast operation on a broadcast channel according to the broadcast frame; and when a second connection request frame sent by an external master device is received, establishing the second communication link according to the second connection request frame.

[0008] In this implementation, dual protocol stack instances are bound to different MAC addresses, and active scanning for connections and passive broadcast responses are executed separately to achieve parallel establishment of master and slave roles. This method completely isolates master-slave logic processing at the underlying software level, avoiding address conflicts and protocol stack interference, ensuring independent and stable operation of the two links, while also being compatible with standard Bluetooth specifications and possessing good versatility.

[0009] In some implementations, after establishing a parallel first communication link and a second communication link based on the first MAC address and the second MAC address, the method further includes: obtaining a first anchor time corresponding to the first communication link and a second anchor time corresponding to the second communication link; calculating a first time difference and a second time difference based on the first anchor time and the second anchor time, wherein the first time difference is equal to the difference between the first anchor time and the current time, and the second time difference is equal to the difference between the second anchor time and the current time; if the first time difference is less than a first preset threshold and the first time difference is less than the second time difference, allocating the current radio frequency time slot to the first communication link; if the second time difference is less than the first preset threshold and the second time difference is less than the first time difference, allocating the current radio frequency time slot to the second communication link.

[0010] In this implementation, a dynamic time slot allocation mechanism based on the anchor point time effectively avoids connection event conflicts between two links on a single radio frequency hardware. By prioritizing the service of the link about to arrive at the anchor point, connection interval jitter is reduced, packet loss and retransmissions are minimized, thereby ensuring the real-time transmission reliability of key commands and status feedback data.

[0011] In some implementations, obtaining key trigger information and sending the key trigger information to the external slave device via the first communication link includes: obtaining a GPIO interrupt signal, parsing the GPIO interrupt signal to obtain a key code value; obtaining key trigger information based on the key code value and a preset key mapping table, the key trigger information including an instruction type and instruction parameters; encapsulating the instruction type and the instruction parameters into a first protocol data unit, and sending the first protocol data unit to the external slave device via the first communication link.

[0012] In this implementation, GPIO interrupts are used to trigger button detection, resulting in rapid response and low CPU utilization. A button mapping table enables flexible conversion between physical buttons and logical instructions, facilitating adaptation to different TV platforms without requiring modification to the core firmware logic. Standard protocol encapsulation ensures that the receiving device can recognize and execute the instructions without additional drivers.

[0013] In some implementations, obtaining the status feedback information sent by the external slave device through the first communication link and sending the status feedback information to the external master device through the second communication link includes: receiving a second protocol data unit sent by the external slave device through the first communication link; parsing the status feedback information from the second protocol data unit; encapsulating the status feedback information into a third protocol data unit, wherein the third protocol data unit adopts a notification format; and sending the third protocol data unit to the external master device through the second communication link.

[0014] In this embodiment, the remote control acts as a data relay, transparently forwarding slave device status information to the external master device. An active push mechanism is employed, eliminating the need for polling by the master device, reducing power consumption for both parties while achieving real-time status synchronization. Protocol format conversion allows for independent evolution of the TV and mobile protocols, enhancing the system's scalability and compatibility.

[0015] In some implementations, after establishing a parallel first communication link and a second communication link based on the first MAC address and the second MAC address, the method further includes: acquiring the amount of data to be transmitted, the current retransmission rate, the service priority, and the link quality of the first communication link and the second communication link, respectively; calculating the first time slot requirement value corresponding to the first communication link and the second time slot requirement value corresponding to the second communication link based on the amount of data to be transmitted, the current retransmission rate, the service priority, and the link quality, respectively; calculating the first time slot ratio and the second time slot ratio based on the first time slot requirement value and the second time slot requirement value, respectively, wherein the first time slot ratio is equal to the ratio of the first time slot requirement value to the total requirement value, the second time slot ratio is equal to the ratio of the second time slot requirement value to the total requirement value, and the total requirement value is equal to the sum of the first time slot requirement value and the second time slot requirement value; and calculating the first radio frequency time slot length corresponding to the first communication link and the second radio frequency time slot length corresponding to the second communication link, respectively, based on the first time slot ratio and the second time slot ratio.

[0016] In this implementation, the required radio frequency slot length for each link is dynamically calculated by considering multiple factors such as the amount of data to be transmitted, retransmission rate, service priority, and link quality. Compared to a fixed average allocation scheme, this method can improve the effective data throughput, ensure the success rate of high-priority services (such as key commands), and adapt to changes in complex wireless environments.

[0017] In some implementations, the step of allocating the current radio frequency time slot to the second communication link if the second time difference is less than the first preset threshold includes: if the second time difference is less than the first preset threshold, obtaining the start and end times of the current anchor protection window of the second communication link; determining whether there is an intersection between the anchor protection window and the current radio frequency time slot based on the start and end times; if there is an intersection, allocating the time interval corresponding to the intersection in the current radio frequency time slot to the second communication link, and allocating the time interval outside the intersection in the current radio frequency time slot to the first communication link.

[0018] In this implementation, the intersection of the slave device's anchor point protection window and the current time slot is finely divided to ensure that the slave device does not miss the master device's critical synchronization data packets, thus preventing the second communication link from timed out and disconnected due to scheduling conflicts. At the same time, fragmented time outside the window is still allocated to the master link, achieving optimal resource utilization in conflict scenarios.

[0019] In some implementations, after establishing a parallel first communication link and a second communication link based on the first MAC address and the second MAC address, the method further includes: obtaining a first idle timer value corresponding to the first communication link and a second idle timer value corresponding to the second communication link; if both the first idle timer value and the second idle timer value are not less than a second preset threshold value, generating an RF module shutdown command, sending the RF module shutdown command to the RF front end, causing the RF front end to shut down the high-power RF transmitter module according to the RF module shutdown command; and sending link protection heartbeat packets to the external slave device and the external master device respectively through the first communication link and the second communication link at preset time intervals.

[0020] In this implementation, when both links are idle for an extended period, the high-power RF transmitter module is actively shut down to significantly reduce standby power consumption and extend battery life. Simultaneously, lightweight heartbeat packets are periodically sent to maintain link connectivity, ensuring immediate resumption of communication upon wake-up, thus achieving a balance between low power consumption and rapid response.

[0021] Secondly, this application provides a control device for a master-slave dual-mode Bluetooth remote controller, comprising: an acquisition module, configured to acquire a pre-stored first MAC address and a second MAC address, wherein the first MAC address and the second MAC address are respectively the MAC addresses of the Bluetooth remote controller when it acts as a local master device and a local slave device; an establishment module, configured to establish a parallel first communication link and a second communication link based on the first MAC address and the second MAC address, wherein the first communication link and the second communication link are respectively the communication links between the Bluetooth remote controller and an external slave device and an external master device; a transmission module, configured to acquire button trigger information and transmit the button trigger information to the external slave device through the first communication link; and / or, acquire status feedback information sent by the external slave device through the first communication link and transmit the status feedback information to the external master device through the second communication link.

[0022] Thirdly, this application provides a Bluetooth remote control, characterized in that it includes a processor and a memory, wherein the memory is used to store a computer program, and the computer program, when executed by the processor, implements the above-described master-slave dual-mode Bluetooth remote control control method. Attached Figure Description

[0023] Figure 1 This is a schematic flowchart illustrating the control method of a master-slave dual-mode Bluetooth remote control according to an embodiment of this application; Figure 2 This is a schematic diagram of the control device for a master-slave dual-mode Bluetooth remote controller, as shown in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of a Bluetooth remote control as shown in an embodiment of this application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0025] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a control method for a master-slave dual-mode Bluetooth remote control provided in an embodiment of this application. Figure 1 As shown, the control method of the master-slave dual-mode Bluetooth remote controller in this embodiment includes steps S11 to S13, which are described in detail below: Step S11: Obtain the pre-stored first MAC address and second MAC address, wherein the first MAC address is the MAC address when the Bluetooth remote control is a local master device, and the second MAC address is the MAC address when the Bluetooth remote control is a local slave device.

[0026] In this step, two MAC addresses are pre-programmed and stored in the non-volatile memory of the Bluetooth remote control, such as Flash. The first MAC address is the MAC address used when the remote control acts as a local master device, i.e., when the remote control actively connects to an external slave device, such as a smart TV or set-top box. The second MAC address is the MAC address used when the remote control acts as a local slave device, i.e., when the remote control is connected to an external master device, such as a smartphone or smart gateway. After the remote control is powered on and initialized, the Bluetooth control chip reads these two MAC addresses from the Flash and loads them into the corresponding protocol stack instances.

[0027] Step S12: Based on the first MAC address and the second MAC address, establish a parallel first communication link and a second communication link, wherein the first communication link is the communication link between the Bluetooth remote controller and the external slave device, and the second communication link is the communication link between the Bluetooth remote controller and the external master device.

[0028] In this step, the first communication link involves the remote control using the first MAC address as the source address to initiate a connection to an external slave device, such as a TV, establishing a standard GATT (General Attribute Protocol) connection for the remote control to send button commands to the TV. The second communication link involves the remote control using the second MAC address as the slave device, enabling broadcasting, and waiting for an external master device, such as a mobile phone, to initiate a connection. After the connection is established, a second parallel GATT connection is formed, used by the remote control to forward the TV's status feedback information to the mobile phone. The two links share the same Bluetooth RF hardware in terms of time division multiplexing, but logically they operate completely independently and in parallel without interference.

[0029] In some embodiments, when executing step S12, a first protocol stack instance is invoked to generate a scan request frame with the first MAC address as the source address, and an active scan operation is performed on the broadcast channel according to the scan request frame; when an external slave device is scanned, a first connection request frame is sent to the external slave device to establish a first communication link; simultaneously, a second protocol stack instance is invoked to generate a broadcast frame with the second MAC address as the source address, and a broadcast operation is performed on the broadcast channel according to the broadcast frame; when a second connection request frame sent by an external master device is obtained, a second communication link is established according to the second connection request frame.

[0030] Furthermore, based on the first MAC address and the second MAC address, a first and a second communication link are established in parallel, employing a step-by-step parallel operation. When establishing the first communication link, the Bluetooth remote control acts as the master device. The Bluetooth controller calls the first protocol stack instance, which generates a scan request frame using the first MAC address as the source address. It performs an active scan operation on the Bluetooth broadcast channel, listening for broadcast packets from surrounding external slave devices, such as televisions. Upon detecting the broadcast information of a target external slave device, it sends a first connection request frame to it, establishing an asynchronous connection-less (ACL) logical link, hereinafter referred to as the ACL link, i.e., the first communication link. When establishing the second communication link, the Bluetooth remote control acts as the slave device. The Bluetooth controller calls the second protocol stack instance, generating a broadcast frame using the second MAC address as the source address. It periodically performs a broadcast operation on the broadcast channel, announcing that it can be connected. When an external master device, such as a mobile phone, scans the broadcast and initiates a connection request, the remote control receives and responds to the second connection request frame, establishing the second ACL link, i.e., the second communication link. The establishment process of the two links can be executed alternately in time. Through time-division scheduling, the two links can ultimately maintain a connection state simultaneously.

[0031] In this step, by calling independent protocol stack instances and binding them to different MAC addresses, the logical processing of the master and slave devices is completely isolated from the underlying software, avoiding address conflicts and protocol confusion, clearly distinguishing the dual-role protocol stacks, and improving system stability. Active scanning is used to quickly establish a control link for the TV, while passive broadcasting is used to wait for connection from the mobile phone. This is compatible with requests initiated by the mobile phone at any time. The two methods complement each other, ensuring that the remote control can respond quickly no matter when the external device initiates interaction. Both connection request frames and broadcast frames conform to the Bluetooth core specification, requiring no modification to the peer device's protocol, and exhibiting good universality and interoperability.

[0032] In some embodiments, after executing step S12, the method further includes: obtaining the first anchor point time corresponding to the first communication link and the second anchor point time corresponding to the second communication link; calculating the first time difference and the second time difference based on the first anchor point time and the second anchor point time, wherein the first time difference is equal to the difference between the first anchor point time and the current time, and the second time difference is equal to the difference between the second anchor point time and the current time; if the first time difference is less than a first preset threshold and the first time difference is less than the second time difference, allocating the current radio frequency time slot to the first communication link; if the second time difference is less than the first preset threshold and the second time difference is less than the first time difference, allocating the current radio frequency time slot to the second communication link.

[0033] Furthermore, after establishing parallel links, a dynamic radio frequency time slot allocation mechanism based on anchor point time is introduced, specifically: obtaining the first anchor point time corresponding to the first communication link. The second anchor point time corresponding to the second communication link The first anchor point is the reference synchronization point within the television connection interval, and the second anchor point is the reference synchronization point within the mobile phone connection interval. Before the start of each radio frequency time slot, the following calculations are performed: ; in, For the current moment, The first time difference, This is the second time difference.

[0034] Set the first preset threshold value For example, 2ms. If and If so, the current radio frequency time slot will be allocated to the first communication link, prioritizing the upcoming television connection event. If and If the current radio frequency time slot is allocated to the second communication link, priority will be given to satisfying upcoming mobile phone connection events. If both are not less than the first preset threshold, allocation will be based on the default polling or priority strategy.

[0035] In this embodiment, the next communication event for each link is predicted at the anchor point, and arbitration is performed before a conflict occurs. This ensures that critical connection events on each link, such as connection updates and heartbeat packets, can obtain radio frequency resources, avoiding packet errors or disconnections caused by single-radio frequency hardware. Prioritizing the allocation of links that are about to reach the anchor point minimizes the impact of jitter on Bluetooth connection intervals, ensuring that the transmission latency of button commands and status feedback meets user experience requirements. The first preset threshold value can be dynamically adjusted according to the current link quality, exhibiting strong robustness.

[0036] In some embodiments, allocating the current radio frequency time slot to the second communication link if the second time difference is less than the first preset threshold specifically involves: if the second time difference is less than the first preset threshold, obtaining the start and end times of the current anchor point protection window of the second communication link; determining whether there is an intersection between the anchor point protection window and the current radio frequency time slot based on the start and end times; if there is an intersection, allocating the time interval corresponding to the intersection in the current radio frequency time slot to the second communication link, and allocating the time interval outside the intersection in the current radio frequency time slot to the first communication link.

[0037] Furthermore, the processing of the intersection between the anchor point protection window of the second communication link and the current radio frequency time slot is specifically as follows: when it is determined That is, when the second link is about to reach the anchor point, obtain the start and end times of the current anchor point protection window of the second communication link. This window is the early wake-up interval set by the Bluetooth protocol to ensure that the slave device listens to the master device's data packets on time.

[0038] Determine the relationship between the protection window and the current radio frequency time slot. Does an intersection exist? If an intersection exists, let the intersection interval be: ; intersecting intervals It is assigned to the second communication link to ensure that it does not miss data packets from the master device.

[0039] The remaining non-intersecting intervals in the current radio frequency time slot, i.e. and All data is allocated to the first communication link for sending or receiving key data.

[0040] It can be seen that the Bluetooth slave device must enable radio frequency reception within the protection window; otherwise, it will lose data packets from the master device, leading to link timeout and disconnection. This method completely avoids the risk of slave link disconnection caused by scheduling conflicts by forcibly allocating intersection time slots. Under the premise of satisfying the protection window, fragmented time outside the window is allocated to the master link without wasting any radio frequency capacity, achieving the optimal compromise under conflict. When the connection intervals of the two links are very short, this method can ensure that critical synchronization events take priority while maintaining basic communication on the other link.

[0041] In some embodiments, after executing step S12, the method further includes: acquiring the amount of data to be transmitted, the current retransmission rate, the service priority, and the link quality of the first communication link and the second communication link, respectively; calculating the first time slot requirement value corresponding to the first communication link and the second time slot requirement value corresponding to the second communication link based on the amount of data to be transmitted, the current retransmission rate, the service priority, and the link quality, respectively; calculating the first time slot ratio and the second time slot ratio based on the first time slot requirement value and the second time slot requirement value, respectively, wherein the first time slot ratio is equal to the ratio of the first time slot requirement value to the total requirement value, the second time slot ratio is equal to the ratio of the second time slot requirement value to the total requirement value, and the total requirement value is equal to the sum of the first time slot requirement value and the second time slot requirement value; and calculating the first radio frequency time slot length corresponding to the first communication link and the second radio frequency time slot length corresponding to the second communication link, respectively, based on the first time slot ratio and the second time slot ratio.

[0042] Furthermore, after establishing parallel links, a dynamic allocation mechanism for radio frequency time slot length based on multiple factors is introduced, specifically: obtaining the amount of data to be transmitted for the first communication link respectively. Current retransmission rate Business Priority and link quality Obtain the amount of data to be sent on the first communication link. Current retransmission rate Business Priority and link quality The amount of data to be sent is in bytes; the current retransmission rate is between 0 and 1, with higher service priority values ​​indicating higher priority (e.g., key press commands have higher priority than status forwarding); link quality is a normalized value based on RSSI or bit error rate. Then, the time slot requirement for each link is calculated. : Then, calculate the total demand: ; and These represent the demand values ​​for the first and second time slots, respectively. The ratio of the first time slot to the second time slot is calculated using the following formula: , Assume the fixed total radio frequency time slot length is The actual time slot lengths allocated to the first and second links are as follows: ; .

[0043] As can be seen, this embodiment no longer uses a fixed time slot allocation, but dynamically adjusts it according to real-time service needs. When button presses are frequent, the first link time slot is automatically increased to ensure smooth control; when the status feedback is large, the second link time slot is increased to avoid data backlog. By introducing retransmission rate and link quality factor, links with poor signal or high bit error rate receive more time slots for retransmission. Simultaneously, high-priority services such as power-off commands receive greater weight, improving the delivery success rate of critical commands. Compared to fixed, evenly distributed time slots, this dynamic time slot allocation method effectively improves RF resource utilization, increases effective data throughput, and avoids RF resource waste.

[0044] In some embodiments, after step S12, the method further includes: acquiring a first idle timer value corresponding to the first communication link and a second idle timer value corresponding to the second communication link; if both the first idle timer value and the second idle timer value are not less than a second preset threshold value, generating a radio frequency module shutdown command, sending the radio frequency module shutdown command to the radio frequency front end, so that the radio frequency front end shuts down the high-power radio frequency transmission module according to the radio frequency module shutdown command; and sending link protection heartbeat packets to the external slave device and the external master device through the first communication link and the second communication link respectively at preset time intervals.

[0045] Furthermore, this embodiment introduces a link idle timing and RF high-power module intelligent shutdown mechanism, specifically: maintaining the first idle timing value corresponding to the first communication link respectively. The second idle time value corresponding to the second communication link This timer value is reset to zero whenever data is transmitted or received on the corresponding link; otherwise, it increments over time. and , If a second preset threshold value, such as 30 seconds, is set, both links are considered to be in a long-term idle state. Then, an RF module shutdown command is generated and sent to the RF front-end, such as the PA / LNA chip, to shut down the high-power RF transmitter module, such as the power amplifier, but retains the low-power receiver or sleep / wake-up circuit. Simultaneously, to maintain the connection between the two links without timeout, link protection heartbeat packets, such as blank LLID packets or Echo Requests, are sent to the external slave device and external master device respectively through the first and second communication links at preset time intervals, such as every 5 seconds, to refresh the link timeout timer. When either link subsequently needs to transmit data or press a key, the high-power RF module is immediately woken up to resume normal transmission.

[0046] It should be noted that the Bluetooth RF high-power transmitter module consumes several milliamps when idle, which can be reduced to microamps when turned off. For battery-powered remote controls, this low-power management method can effectively extend standby time. By periodically sending heartbeat packets, it ensures that both the external master and slave devices believe the link is still alive, eliminating the need for re-pairing or reconnection, thus achieving an ideal balance between low power consumption and instant wake-up. The system requires both links to be idle simultaneously before shutting down, avoiding accidental shutdown of an active link due to occasional idleness of a single link, making the design more rigorous and reliable. The preset time interval can be dynamically adjusted according to the timeout threshold of the external device, ensuring compatibility with the requirements of devices from different manufacturers.

[0047] Step S13: Obtain key trigger information and send the key trigger information to the external slave device through the first communication link; and / or, obtain status feedback information sent by the external slave device through the first communication link and send the status feedback information to the external master device through the second communication link.

[0048] In this step, when the user presses a button on the remote control, such as the volume up or home button, the remote control MCU detects a GPIO interrupt and parses the button code value. The button code value is then encapsulated into a message conforming to the Bluetooth HID (Human Interface Device) protocol and sent to the TV in real time via GATT notification or write channel on the first communication link, enabling user control.

[0049] In some embodiments, when acquiring key trigger information and sending the key trigger information to an external slave device through a first communication link, the process first involves acquiring a GPIO interrupt signal, parsing the GPIO interrupt signal to obtain a key code value, obtaining key trigger information based on the key code value and a preset key mapping table, the key trigger information including instruction type and instruction parameters, encapsulating the instruction type and instruction parameters into a first protocol data unit, and sending the first protocol data unit to the external slave device through the first communication link.

[0050] Furthermore, the remote control keypad matrix is ​​connected to the GPIO port. When a key is pressed, a GPIO interrupt signal is generated. The interrupt service routine reads the row and column scan values ​​and parses them using a lookup table to obtain the corresponding key code value, such as 0x40 representing volume +. Based on this key code value and a preset key mapping table, the physical keys are mapped to logical instructions to obtain key trigger information. This information includes: instruction type, such as media control, system control, or digital input; and instruction parameters, such as volume increase value and channel number. The instruction type and instruction parameters are encapsulated into a first protocol data unit according to the Bluetooth HID protocol format, for example, encapsulated as a HID Report, and then sent to the external slave device via the first communication link using a GATT attribute write request or GATT attribute notification.

[0051] GATT Attribute Write Request refers to the remote control, acting as a GATT client, proactively initiating an attribute write operation to an external slave device, which acts as a GATT server. This operation requires a confirmation response from the TV and is suitable for button commands with high reliability requirements, such as power off and confirm. GATT Attribute Notification refers to the remote control proactively pushing data to the slave device without waiting for a request from the external slave device, and without requiring a confirmation response from the slave device. This is suitable for data with high real-time requirements but tolerating a small amount of packet loss, such as continuous volume increase / decrease and channel switching, and can reduce transmission latency.

[0052] As can be seen, by adopting the GPIO interrupt method, processing is triggered immediately upon button press, eliminating the need for polling and scanning, thus reducing CPU utilization and response latency. The button mapping table supports different protocol codes for different TV brands without requiring modification to the core firmware logic, facilitating product adaptation to multiple platforms. The use of standard HID protocol data units ensures that the TV can recognize and execute commands without additional drivers, demonstrating excellent compatibility.

[0053] In some embodiments, when obtaining status feedback information sent by an external slave device through a first communication link and sending the status feedback information to an external master device through a second communication link, the system first receives a second protocol data unit sent by the external slave device through the first communication link, and parses the status feedback information from the second protocol data unit; encapsulates the status feedback information into a third protocol data unit, the third protocol data unit adopting a notification format; and sends the third protocol data unit to the external master device through the second communication link.

[0054] Furthermore, the remote control receives a second protocol data unit sent by an external slave device via the first communication link. This second protocol data unit conforms to the GATT specification and contains current TV status fields, such as volume value, mute status, and current HDMI port. Status feedback information, such as volume=15 and mute=0, is then parsed from the second protocol data unit. This status feedback information is re-encapsulated into a third protocol data unit, which uses a notification format, meaning the remote control can actively push it without requiring an external master device to request it. The third protocol data unit is then sent to the external master device via the GATT notification channel of the second communication link.

[0055] As can be seen, the remote control, acting as a data conduit, does not need to understand the specific meaning of the status information, reducing processing complexity and ensuring forwarding efficiency. By adopting a notification format instead of a request-response model, the mobile phone receives updates immediately when the TV status changes, eliminating the need for polling and saving power for both the phone and the remote control. The second and third protocol data units can have different formats; the remote control only performs format conversion, allowing the TV and mobile phone protocols to evolve independently without affecting each other.

[0056] In a specific embodiment, the connection interval of the first communication link is, for example, 15ms, the connection interval of the second communication link is, for example, 30ms; the first preset threshold value is, for example, 2ms; the second preset threshold value is, for example, 30s; the preset heartbeat interval is, for example, 5s; and the fixed total radio frequency time slot length is, for example, 1.25ms.

[0057] Unlike traditional Bluetooth remote controls that only support a single user, the aforementioned master-slave dual-mode Bluetooth remote control method pre-stores dual MAC addresses and establishes two parallel links. This allows the same remote control to both control the TV and act as a data relay station to forward the TV's status to the mobile phone, greatly expanding the remote control's functional boundaries and meeting the needs of multi-device linkage in smart homes. Furthermore, this method eliminates the need for two separate Bluetooth modules or remote controls for TV control and status forwarding. Two-way data interaction can be achieved using only one Bluetooth physical chip and two logical links, reducing hardware redundancy and lowering BOM costs and overall power consumption. Users can obtain precise TV status information, such as volume and current input source, in real time via a mobile app, avoiding the drawbacks of traditional infrared remote controls' one-way control and lack of status feedback. Simultaneously, button commands and status feedback are transmitted in parallel on two independent links, preventing mutual blocking and ensuring the immediacy of button responses and the synchronization of feedback data. External devices such as mobile phones do not need to establish a direct Bluetooth connection with the TV. They only need to establish a slave device link with the remote control to indirectly obtain TV information. This relay mode reduces the difficulty of compatibility between mobile phones and TVs of different brands, making the system easier to expand to a variety of smart home appliances.

[0058] To execute the master-slave dual-mode Bluetooth remote control control method corresponding to the above method embodiments, so as to achieve the corresponding functions and technical effects. See also Figure 2 , Figure 2 This diagram illustrates a structural block diagram of a master-slave dual-mode Bluetooth remote control device according to an embodiment of this application. For ease of explanation, only the parts relevant to this embodiment are shown. The master-slave dual-mode Bluetooth remote control device provided in this embodiment includes: The acquisition module is used to acquire a pre-stored first MAC address and a second MAC address, wherein the first MAC address and the second MAC address are the MAC addresses of the Bluetooth remote control when it is a local master device and a local slave device, respectively. The module is configured to establish a first communication link and a second communication link in parallel based on the first MAC address and the second MAC address, wherein the first communication link and the second communication link are respectively the communication links between the Bluetooth remote controller and the external slave device and the external master device; The sending module is used to acquire key trigger information and send the key trigger information to the external slave device through the first communication link; and / or, acquire status feedback information sent by the external slave device through the first communication link and send the status feedback information to the external master device through the second communication link.

[0059] The control device of the aforementioned master-slave dual-mode Bluetooth remote controller can implement the master-slave dual-mode Bluetooth remote controller control method of the above method embodiments. The options in the above method embodiments are also applicable to this embodiment, and will not be detailed here. The remaining content of this application embodiment can be referred to the content of the above method embodiments, and will not be repeated in this embodiment.

[0060] Figure 3 This is a schematic diagram of the structure of a Bluetooth remote control provided in one embodiment of this application. Figure 3 As shown, the Bluetooth remote control 30 of this embodiment includes: at least one processor 31 ( Figure 3 (Only one is shown in the diagram), memory 32, and computer program 33 stored in the memory 32 and executable on the at least one processor 31, wherein the processor 31 executes the computer program 33 to implement the steps in any of the above method embodiments.

[0061] The Bluetooth remote control may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will understand that... Figure 3 This is merely an example of the Bluetooth remote control 30 and does not constitute a limitation on the Bluetooth remote control 30. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0062] The processor 31 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0063] In some embodiments, the memory 32 may be an internal storage unit of the Bluetooth remote controller 30, such as the hard drive or memory of the Bluetooth remote controller 30. The memory 32 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 32 can also be used to temporarily store data that has been output or will be output.

[0064] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above method embodiments.

[0065] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.

[0066] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.

[0067] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0068] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.

Claims

1. A control method for a master-slave dual-mode Bluetooth remote control, characterized in that, include: Obtain a pre-stored first MAC address and a second MAC address, wherein the first MAC address is the MAC address when the Bluetooth remote control is a local master device, and the second MAC address is the MAC address when the Bluetooth remote control is a local slave device; Based on the first MAC address and the second MAC address, a first communication link and a second communication link are established in parallel, wherein the first communication link is the communication link between the Bluetooth remote controller and the external slave device, and the second communication link is the communication link between the Bluetooth remote controller and the external master device. Obtain key trigger information and send the key trigger information to the external slave device via the first communication link; and / or, The status feedback information sent by the external slave device is obtained through the first communication link, and the status feedback information is sent to the external master device through the second communication link.

2. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 1, characterized in that, The establishment of a parallel first communication link and a second communication link based on the first MAC address and the second MAC address includes: The first protocol stack instance is invoked to generate a scan request frame with the first MAC address as the source address, and an active scan operation is performed on the broadcast channel based on the scan request frame. Once an external slave device is detected, a first connection request frame is sent to the external slave device to establish the first communication link; The second protocol stack instance is invoked to generate a broadcast frame using the second MAC address as the source address, and a broadcast operation is performed on the broadcast channel based on the broadcast frame. Upon receiving the second connection request frame sent by the external master device, the second communication link is established based on the second connection request frame.

3. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 1, characterized in that, After establishing the first and second parallel communication links based on the first MAC address and the second MAC address, the method further includes: The first anchor point time corresponding to the first communication link and the second anchor point time corresponding to the second communication link are obtained respectively; Based on the first anchor point time and the second anchor point time, calculate the first time difference and the second time difference respectively, wherein the first time difference is equal to the difference between the first anchor point time and the current time, and the second time difference is equal to the difference between the second anchor point time and the current time; If the first time difference is less than the first preset threshold and the first time difference is less than the second time difference, the current radio frequency time slot is allocated to the first communication link. If the second time difference is less than the first preset threshold and the second time difference is less than the first time difference, the current radio frequency time slot is allocated to the second communication link.

4. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 1, characterized in that, The step of acquiring key trigger information and sending the key trigger information to the external slave device through the first communication link includes: Obtain the GPIO interrupt signal and parse the GPIO interrupt signal to obtain the key code value; Based on the key code value and the preset key mapping table, key trigger information is obtained, which includes instruction type and instruction parameters; The instruction type and the instruction parameters are encapsulated into a first protocol data unit, and the first protocol data unit is sent to the external slave device through the first communication link.

5. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 4, characterized in that, The step of obtaining the status feedback information sent by the external slave device through the first communication link and sending the status feedback information to the external master device through the second communication link includes: The system receives a second protocol data unit sent by the external slave device through the first communication link, and parses the status feedback information from the second protocol data unit. The status feedback information is encapsulated into a third protocol data unit, and the third protocol data unit adopts a notification format; The third protocol data unit is sent to the external host device via the second communication link.

6. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 1, characterized in that, After establishing the first and second parallel communication links based on the first MAC address and the second MAC address, the method further includes: The amount of data to be sent, the current retransmission rate, the service priority, and the link quality of the first communication link and the second communication link are obtained respectively. Based on the amount of data to be sent, the current retransmission rate, the service priority, and the link quality, calculate the first time slot requirement value corresponding to the first communication link and the second time slot requirement value corresponding to the second communication link, respectively. Based on the first time slot demand value and the second time slot demand value, calculate the first time slot ratio and the second time slot ratio respectively, wherein the first time slot ratio is equal to the ratio of the first time slot demand value to the total demand value, the second time slot ratio is equal to the ratio of the second time slot demand value to the total demand value, and the total demand value is equal to the sum of the first time slot demand value and the second time slot demand value; Based on the first time slot ratio and the second time slot ratio, the length of the first radio frequency time slot corresponding to the first communication link and the length of the second radio frequency time slot corresponding to the second communication link are calculated respectively.

7. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 3, characterized in that, If the second time difference is less than the first preset threshold, allocating the current radio frequency time slot to the second communication link includes: If the second time difference is less than the first preset threshold, obtain the start and end time of the current anchor point protection window of the second communication link; Based on the start and end times, determine whether there is an intersection between the anchor point protection window and the current radio frequency time slot; If an intersection exists, the time interval corresponding to the intersection in the current radio frequency time slot is assigned to the second communication link, and the time interval outside the intersection in the current radio frequency time slot is assigned to the first communication link.

8. The control method of the master-slave dual-mode Bluetooth remote control as described in claim 1, characterized in that, After establishing the first and second parallel communication links based on the first MAC address and the second MAC address, the method further includes: The first idle time value corresponding to the first communication link and the second idle time value corresponding to the second communication link are obtained respectively; If both the first idle timer value and the second idle timer value are not less than the second preset threshold value, then an RF module shutdown command is generated and sent to the RF front end, so that the RF front end shuts down the RF high-power transmission module according to the RF module shutdown command. According to a preset time interval, link protection heartbeat packets are sent to the external slave device and the external master device through the first communication link and the second communication link, respectively.

9. A control device for a master-slave dual-mode Bluetooth remote control, characterized in that, include: The acquisition module is used to acquire a pre-stored first MAC address and a second MAC address, wherein the first MAC address and the second MAC address are the MAC addresses of the Bluetooth remote control when it is a local master device and a local slave device, respectively. The module is configured to establish a first communication link and a second communication link in parallel based on the first MAC address and the second MAC address, wherein the first communication link and the second communication link are respectively the communication links between the Bluetooth remote controller and the external slave device and the external master device; The sending module is used to acquire key trigger information and send the key trigger information to the external slave device through the first communication link; and / or, acquire status feedback information sent by the external slave device through the first communication link and send the status feedback information to the external master device through the second communication link.

10. A Bluetooth remote control, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, which, when executed by the processor, implements the control method of the master-slave dual-mode Bluetooth remote controller as described in any one of claims 1 to 8.