Bluetooth device control method and apparatus, Bluetooth remote control device, and storage medium

By sending non-directional broadcast packets and matching device identifiers when the Bluetooth remote control is not connected, the problem of inconsistent connection between the Bluetooth remote control and the controlled device is solved, achieving accurate reconnection and reducing the risk of mispairing.

CN123164422APending Publication Date: 2026-11-24SHENZHEN SKYWORTH DISPLAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611239872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The Bluetooth remote control and the controlled device may experience connection inconsistencies due to the loss of pairing information. Existing technologies make it difficult to accurately re-establish the connection, and mispairing or connection preemption can easily lead to erroneous responses.

Method used

When the Bluetooth remote control is not connected, it sends non-directional broadcast packets, receives request information and matches device identifiers, and only responds to requests that are successfully matched. It provides broadcast entry points for reconnection and re-pairing through non-directional broadcast packets, and restricts responses from non-target devices.

Benefits of technology

It improves the accuracy and reliability of re-establishing a connection between the Bluetooth remote control and the target device, and reduces the probability of mispairing and connection preemption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164422A_ABST
    Figure CN123164422A_ABST
Patent Text Reader

Abstract

This invention relates to a Bluetooth device control method, apparatus, Bluetooth remote control device, and storage medium. The method involves: acquiring the target device identifier recorded in the Bluetooth remote control; sending a non-directional broadcast packet when the Bluetooth remote control is in a disconnected state; receiving a request message from the current Bluetooth device in response to the non-directional broadcast packet, and obtaining the current device identifier of the current Bluetooth device from the request message; matching the current device identifier with the target device identifier, and responding to the request message only when a match is successful. Therefore, by sending a non-directional broadcast packet when the Bluetooth remote control is in a disconnected state, the target Bluetooth device can rediscover the Bluetooth remote control, match the current device identifier in the request message with the recorded target device identifier, and respond to the request message only when a match is successful. This reduces the possibility of other Bluetooth devices preempting the connection or mispairing, improving the accuracy and reliability of re-establishing the connection between the Bluetooth remote control and the target Bluetooth device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Bluetooth communication technology, and in particular to a Bluetooth device control method, apparatus, Bluetooth remote control device and storage medium. Background Technology

[0002] With the development of smart terminals such as smart TVs, set-top boxes, and projection devices, Bluetooth remote controls have been widely used due to their low power consumption, long communication distance, and the fact that they do not need to be pointed at the controlled device. After a Bluetooth remote control and a controlled device are paired, both parties typically save pairing information such as device identifiers and authentication information. If the Bluetooth connection is lost, a new Bluetooth communication link is established based on the saved pairing information.

[0003] In actual use, the controlled device may lose its saved remote control pairing information due to factory reset, system upgrade, or user-cleared pairing information operation, while the Bluetooth remote control retains the original pairing information of the controlled device, resulting in inconsistent pairing states between the two. In this case, the conventional reconnection method may not be able to re-establish the connection; if the Bluetooth remote control directly enters a broadcast state that can be discovered and connected to by surrounding devices, other Bluetooth devices may also send scanning or connection requests to the Bluetooth remote control, which can easily cause incorrect responses, connection preemption, or mispairing.

[0004] Therefore, when the pairing information of the controlled device is lost but the Bluetooth remote control still retains the historical device identifier, it is necessary to balance the target device's need to rediscover the Bluetooth remote control with the need to restrict the identity of the requesting device. Thus, the technical problem that existing technologies urgently need to solve is: how to improve the accuracy of re-establishing a connection between the Bluetooth remote control and a target Bluetooth device that has already been paired. Summary of the Invention

[0005] In view of this, in order to solve the above-mentioned technical problems or some of the technical problems, the present invention provides a Bluetooth device control method, apparatus, Bluetooth remote control device and storage medium.

[0006] In a first aspect, embodiments of the present invention provide a Bluetooth device control method, applied to a Bluetooth remote controller, the method comprising: Obtain the target device identifier recorded in the Bluetooth remote control, the target device identifier being used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; When the Bluetooth remote control is in an unconnected state, a non-directional broadcast packet is sent, which is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message; Receive a request message sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request message; The current device identifier is matched with the target device identifier, and the request information is responded to when the match is successful.

[0007] In one possible implementation, obtaining the target device identifier recorded in the Bluetooth remote control includes: Read the pairing record stored in the Bluetooth remote control; The target Bluetooth device that most recently successfully connected to the Bluetooth remote control is determined from the pairing record, and the media access control address of the target Bluetooth device is extracted and identified as the target device identifier. When a preset key operation is detected, the pairing information in the pairing record is cleared except for the media access control address, and the media access control address is retained as the target device identifier.

[0008] In one possible implementation, sending the non-directional broadcast packet includes: If a button operation is detected for the Bluetooth remote control and the Bluetooth remote control has recorded the target device identifier, the broadcast packet to be sent is configured as a connectable and scannable non-directional broadcast packet. The non-directional broadcast packets are sent at preset broadcast intervals, and the sending of non-directional broadcast packets is stopped when the Bluetooth remote control enters the connection process or when the broadcast duration reaches the preset broadcast duration.

[0009] In one possible implementation, obtaining the current device identifier of the current Bluetooth device from the request information includes: The protocol data unit type of the request information is parsed to determine whether the request information is a connection indication request or a scan request; When the request information is the connection indication request, the initiating device address is extracted from the connection indication request; when the request information is the scan request, the scanning device address is extracted from the scan request, and the extracted initiating device address or the scan device address is determined as the current device identifier. The step of matching the current device identifier with the target device identifier includes: The current device identifier is compared with the target device identifier. If the current device identifier and the target device identifier are the same, the match is determined to be successful. If the current device identifier and the target device identifier are not the same, the match is determined to be unsuccessful, and the request information is ignored.

[0010] In one possible implementation, responding to the request information upon successful matching includes: When the request information is a scan request and a match is successful, a scan response packet corresponding to the scan request is generated; The remote control name of the Bluetooth remote control is written into the scan response packet. The remote control name is used to enable the current Bluetooth device to recognize the Bluetooth remote control to be paired. Send the scan response packet to the current Bluetooth device, and maintain a broadcast state after sending the scan response packet to wait for the current Bluetooth device to send a connection indication request.

[0011] In one possible implementation, responding to the request information upon successful matching includes: When the request information is a connection indication request and the match is successful, respond to the connection indication request, stop sending the non-directional broadcast packet and establish a Bluetooth communication link; The pairing authentication is performed on the current Bluetooth device based on the pairing information stored in the Bluetooth remote control, and the pairing authentication result is obtained; The Bluetooth communication link is maintained when the pairing authentication result indicates successful pairing authentication, and disconnected when the pairing authentication result indicates failed pairing authentication, while retaining the target device identifier for retransmitting the non-directional broadcast packet.

[0012] In one possible implementation, after sending the scan response packet to the current Bluetooth device, the method further includes: Record the current device identifier and the sending time of the scan response packet to generate a pairing record. The pairing record is used to identify the Bluetooth device that the Bluetooth remote control has sent the scan response packet and is waiting to initiate a connection. Upon receiving a connection indication request, the identifier of the device to be connected is obtained from the connection indication request, and the time difference between the receiving time and the sending time of the connection indication request is determined. When the identifier of the device to be connected matches the current device identifier in the pairing record and the time difference does not exceed the preset pairing duration, the connection indication request is responded to and the pairing record is deleted; otherwise, the connection indication request is ignored and the broadcast state is maintained.

[0013] In a second aspect, embodiments of the present invention provide a Bluetooth device control apparatus, comprising: The acquisition module is used to acquire the target device identifier recorded in the Bluetooth remote control, wherein the target device identifier is used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; The sending module is configured to send a non-directional broadcast packet when the Bluetooth remote control is in an unconnected state. The non-directional broadcast packet is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message. The receiving module is configured to receive request information sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request information; The processing module is used to match the current device identifier with the target device identifier, and respond to the request information when the match is successful.

[0014] Thirdly, embodiments of the present invention provide a Bluetooth remote control device, including: a processor and a memory, wherein the processor is configured to execute a Bluetooth device control program stored in the memory to implement the Bluetooth device control method described in any one of the first aspects above.

[0015] Fourthly, embodiments of the present invention provide a storage medium storing one or more programs, which can be executed by one or more processors to implement the Bluetooth device control method described in any one of the first aspects.

[0016] The Bluetooth device control method provided in this invention obtains the target device identifier recorded in the Bluetooth remote controller; when the Bluetooth remote controller is in a disconnected state, it sends a non-directional broadcast packet; it receives a request message sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtains the current device identifier of the current Bluetooth device from the request message; it matches the current device identifier with the target device identifier, and responds to the request message when the match is successful. Therefore, by sending a non-directional broadcast packet when the Bluetooth remote controller is in a disconnected state, the target Bluetooth device can rediscover the Bluetooth remote controller and match the current device identifier in the request message with the recorded target device identifier, responding only when the match is successful. This reduces the possibility of other Bluetooth devices preempting the connection or mispairing, improving the accuracy and reliability of re-establishing the connection between the Bluetooth remote controller and the target Bluetooth device. Attached Figure Description

[0017] Figure 1 A flowchart of a Bluetooth device control method provided in an embodiment of this application; Figure 2 A flowchart illustrating another Bluetooth device control method provided in this application embodiment; Figure 3 A structural diagram of a Bluetooth device control device provided in an embodiment of this application; Figure 4 This is a structural diagram of a Bluetooth remote control device provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0020] Figure 1 This is a flowchart illustrating a specific implementation process of a Bluetooth device control method provided in an embodiment of this application. Figure 1 As shown, the specific implementation steps of the Bluetooth device control method are as follows: Step S101: Obtain the target device identifier recorded in the Bluetooth remote control.

[0021] The Bluetooth device control method provided in this application can be applied to scenarios involving reconnection and re-pairing between a Bluetooth remote control and a smart Bluetooth device (e.g., a smart TV), as well as to communication scenarios between a Bluetooth remote control and a set-top box, projection device, display device, or other controlled devices with Bluetooth communication capabilities. The aforementioned application scenarios are merely illustrative, and this application does not limit the specific product form of the Bluetooth remote control and the controlled device.

[0022] The Bluetooth device control method is executed by a Bluetooth remote control. The Bluetooth remote control may include a processor, a memory, a Bluetooth communication module, and a button module. The processor performs processing tasks such as device identifier reading, broadcast control, request parsing, and request response as described in this embodiment. The memory stores pairing records and operating parameters. The Bluetooth communication module sends broadcast packets and receives request information from the Bluetooth device. The Bluetooth communication module supports Bluetooth Low Energy (BLE) communication.

[0023] In a typical application scenario, a Bluetooth remote control has been paired with a first smart TV, and both the remote control and the smart TV have stored each other's pairing information. When the first smart TV clears its stored remote control pairing information due to a factory reset, system upgrade, or user interface operation, the pairing information between the Bluetooth remote control and the smart TV may no longer be consistent. By sending non-directional broadcast packets, the Bluetooth remote control enables the first smart TV to both attempt to reconnect and, if a reconnection fails, to rediscover and pair with the Bluetooth remote control again. Simultaneously, the Bluetooth remote control selectively responds to requests based on its recorded device identifier, reducing the probability of a second smart TV or other Bluetooth device in the same environment preemptively connecting or incorrectly pairing.

[0024] The target Bluetooth device can be a smart TV or other controlled device that has previously been paired with the Bluetooth remote control. The target device identifier can be information used to uniquely or relatively uniquely distinguish the target Bluetooth device. In this embodiment, after the Bluetooth remote control is powered on or detects a trigger event that requires the resumption of Bluetooth communication, it can access the local storage area, read the identifier information associated with historically paired devices, and use the read identifier information as the target device identifier for subsequent identification of the source of the request information.

[0025] A Bluetooth remote control can record only one target device identifier or multiple identifiers of historically paired devices. It can then determine the target device identifier from these identifiers based on the most recent connection status, user selection, or pre-configured priority. For example, if the Bluetooth remote control most recently paired and connected with the first smart TV in the living room, then the identifier corresponding to the first smart TV can be used as the target device identifier, instead of identifying the second smart TV in the same space as the target for this reconnection.

[0026] Step S102: When the Bluetooth remote control is in an unconnected state, send a non-directional broadcast packet. The non-directional broadcast packet is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message.

[0027] Among them, the disconnected state can be the state in which the Bluetooth remote control has not established a Bluetooth communication link with any Bluetooth device that can be used to transmit control commands; the non-directional broadcast packet can be broadcast data that can be received by surrounding Bluetooth devices without specifying a unique receiving device in advance; the request message can be the information sent by the Bluetooth device that received the non-directional broadcast packet to the Bluetooth remote control in accordance with the Bluetooth communication protocol, in order to request the Bluetooth remote control to perform further processing.

[0028] In this embodiment, after the Bluetooth remote controller confirms that it is currently in a disconnected state, it activates the Bluetooth broadcast function and periodically sends non-directional broadcast packets, enabling Bluetooth devices in scanning state to receive the non-directional broadcast packets and send request information to the Bluetooth remote controller.

[0029] While non-directional broadcast packets can be received by multiple Bluetooth devices within range, the Bluetooth remote control does not automatically grant permission for any of these devices to complete subsequent interactions. Instead, it identifies the sending device of the request after receiving the request. Therefore, non-directional broadcast packets provide a broadcast entry point that can accommodate both reconnection and rediscovery; whether a request is responded to is determined by subsequent device identifier matching.

[0030] Step S103: Receive the request information sent by the current Bluetooth device for the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request information.

[0031] The current Bluetooth device can be any Bluetooth device that receives a non-directional broadcast packet and sends a request message to the Bluetooth remote controller. The current device identifier can be information extracted from the request message or a protocol field obtained when receiving the request message to identify the current Bluetooth device. In this embodiment, after receiving the request message, the Bluetooth communication module can report the request message and the corresponding received metadata to the processor of the Bluetooth remote controller. The processor locates the device identifier field according to the protocol format of the request message and reads the value of the field to obtain the current device identifier.

[0032] For example, both the first smart TV and the second smart TV are within the broadcast range of the Bluetooth remote control, and both smart TVs may receive non-directional broadcast packets sent by the Bluetooth remote control. When the first smart TV sends a request message to the Bluetooth remote control, the Bluetooth remote control obtains the device identifier of the first smart TV from the request message; when the second smart TV sends a request message, the Bluetooth remote control obtains the device identifier of the second smart TV, thus providing a basis for distinguishing different request sources.

[0033] Step S104: Match the current device identifier with the target device identifier, and respond with a request message when the match is successful.

[0034] Among them, matching can be used to determine whether the current device identifier can point to the same Bluetooth device identified by the target device identifier; the response request information can be used by the Bluetooth remote control to perform subsequent processing according to the Bluetooth protocol process corresponding to the request information.

[0035] In this embodiment, the processor inputs the current device identifier and the target device identifier into a preset identifier matching logic. If the matching result indicates that the two devices point to the same Bluetooth device, the processor controls the Bluetooth communication module to respond to the request information. If the two devices do not point to the same Bluetooth device, the processor does not proceed to the subsequent response process for the request information.

[0036] For example, the target device identifier corresponds to a first smart TV. When the current device identifier also corresponds to the first smart TV, the Bluetooth remote control responds to the request information sent by the first smart TV; when the current device identifier corresponds to a second smart TV, the Bluetooth remote control does not proceed with subsequent interaction based on the request information. In this way, while expanding the protocol's applicability by using non-directional broadcast packets, the Bluetooth remote control can still limit the actual response target through device identifier matching.

[0037] As can be seen from the above, this embodiment sends non-directional broadcast packets in the disconnected state and identifies the source of the request based on the target device identifier after receiving the request information. This allows the non-directional broadcast packets to simultaneously have the openness of facilitating the original target device to rediscover the Bluetooth remote control and the selectivity of restricting non-target devices from obtaining a response, thereby reducing the risk of connection snatching or incorrect pairing in a multi-Bluetooth device environment.

[0038] In one possible implementation, a specific process for obtaining the target device identifier recorded in a Bluetooth remote control is described. This specific implementation process can be a refinement of step S101, and the specific implementation steps are as follows: Step S201: Read the pairing record saved in the Bluetooth remote control.

[0039] The pairing record can be a data record written to the local non-volatile storage area by the Bluetooth remote control after it has completed pairing or connection with the Bluetooth device. The pairing record may include at least one of the following: device address, pairing key, encryption parameters, connection status, and most recent connection time.

[0040] In this embodiment, the Bluetooth remote control can access the storage area for storing Bluetooth pairing data when it is powered on for initialization or when a button operation is detected, read one or more pairing records, and check the validity status of the read pairing records.

[0041] Step S202: Determine the target Bluetooth device that most recently successfully connected with the Bluetooth remote control from the pairing record, extract the Media Access Control Address of the target Bluetooth device, and identify the Media Access Control Address as the target device identifier.

[0042] The Media Access Control Address (MAC address) can be the device address used to identify the Bluetooth communication interface; the most recent successful connection can be the most recent valid connection determined by the connection time or connection order in the pairing record.

[0043] In this embodiment, the Bluetooth remote controller can sort the pairing records according to the most recent connection time, select the pairing record corresponding to the most recent successful connection from the sorting results, read the media access control address of the target Bluetooth device from the device address field of the pairing record, and write the media access control address into the target device identifier variable used in this broadcast control process.

[0044] For example, if a Bluetooth remote control has established connections with both a first smart TV and a second smart TV, and the pairing record indicates that the first smart TV's successful connection occurred later than the second smart TV's, then the first smart TV is identified as the target Bluetooth device with the most recent successful connection, and the media access control address of the first smart TV is identified as the target device identifier.

[0045] Step S203: When a preset key operation is detected, clear the pairing information in the pairing record except for the media access control address, and retain the media access control address as the target device identifier.

[0046] The preset button operation can be a long press of a single button or a combination of multiple buttons, used to trigger the clearing of pairing information; pairing information other than the media access control address can include keys, encryption parameters, or connection status information that are no longer applicable to subsequent pairing authentication.

[0047] In this embodiment, after the Bluetooth remote control detects a preset button operation, it first backs up the media access control address from the most recently successfully connected pairing record, then deletes or invalidates other pairing information in the pairing record, and finally saves the backed-up media access control address in a separate target device identifier field.

[0048] For example, the preset button operation could be a combination of pressing the home button and the menu button. After the user executes this combination, the Bluetooth remote control clears historical pairing keys that may be inconsistent with the target Bluetooth device, but retains the media access control address of the most recently connected device. When sending non-directional broadcast packets subsequently, the Bluetooth remote control can still identify the original target Bluetooth device based on this media access control address, without opening up a response to other Bluetooth devices.

[0049] As can be seen from the above, this embodiment extracts the media access control address of the most recently successfully connected device from the pairing record and retains this address when clearing the pairing information, so that the basis for identifying the original target Bluetooth device can be maintained after the invalid pairing data is cleared.

[0050] In one possible implementation, a specific process for sending non-directional broadcast packets is described. This specific implementation process can be a refinement of step S102, and the specific implementation steps are as follows: Step S301: When a button operation is detected for the Bluetooth remote control and the Bluetooth remote control has recorded the target device identifier, configure the broadcast packet to be sent as a connectable and scannable non-directional broadcast packet.

[0051] Among them, button operation can be the pressing operation performed by the user on the power button, directional keys, confirmation button or other remote control buttons, and the recording status of the target device identifier can be used to indicate whether there is a historical device identifier available for filtering request sources on the Bluetooth remote control.

[0052] Connectable and scannable non-directional broadcast packets can be broadcast packets that both allow Bluetooth devices to request to establish a connection based on the broadcast packet and allow Bluetooth devices to request to obtain supplemental scan information based on the broadcast packet.

[0053] In this embodiment, the Bluetooth remote control can read the button status of the button module according to a preset polling cycle. After detecting a button press, it queries the Bluetooth connection status and the storage status of the target device identifier. When the Bluetooth remote control is in an unconnected state and the target device identifier is recorded, the broadcast packet configuration process is triggered. The broadcast packet to be sent can be configured as a Connectable and Scannable Undirected Advertising Indication (ADV_IND) in the Bluetooth Low Energy protocol, and the broadcast address, broadcast data length, and broadcast event parameters can be set so that the broadcast packet can provide an entry point for both the reconnection process and the scanning process before re-pairing.

[0054] Step S302: Send non-directional broadcast packets according to the preset broadcast interval, and stop sending non-directional broadcast packets when the Bluetooth remote control enters the connection process or when the broadcast duration reaches the preset broadcast duration.

[0055] The preset broadcast interval can be the time interval between two adjacent broadcast events, and the preset broadcast duration can be the maximum allowed duration of this broadcast process.

[0056] In this embodiment, the Bluetooth remote controller starts a broadcast timer and repeatedly sends non-directional broadcast packets at a preset broadcast interval; when the Bluetooth remote controller receives a valid request and enters the connection process, it turns off the broadcast and releases the broadcast resources; when it never enters the connection process and the broadcast timer reaches the preset broadcast duration, it also stops broadcasting to reduce the power consumption caused by continuous broadcasting.

[0057] For example, the preset broadcast duration can be set to thirty seconds. After receiving a scan request and sending a scan response packet within this time, the Bluetooth remote control continues to broadcast, waiting for the target Bluetooth device to send a further connection indication request; it only stops sending non-directional broadcast packets when the connection process begins or when the thirty-second broadcast duration expires. Therefore, the scan response itself does not cause the broadcast to end prematurely.

[0058] As can be seen from the above, this embodiment can take into account reconnection, re-pairing, and remote control power consumption by triggering broadcasts by buttons, configuring broadcast packets as non-directional types compatible with connection and scanning, and setting explicit broadcast stop conditions.

[0059] In one possible implementation, a specific process for obtaining the current device identifier and performing identifier matching is described. This specific implementation process can be a refinement of steps S103 and S104, and the specific implementation steps are as follows: Step S401: Parse the protocol data unit type of the request information to determine whether the request information is a connection indication request or a scan request.

[0060] Among them, the Protocol Data Unit (PDU) can be a data unit transmitted in the Bluetooth protocol according to the specified format, and the Protocol Data Unit type is used to indicate the functional category of the request information; the Connection Indication Request (CONNECT_IND) can be a Protocol Data Unit initiated by the Bluetooth device based on a non-directional broadcast packet to request the establishment of a Bluetooth communication link; the Scan Request (SCAN_REQ) can be a Protocol Data Unit initiated by the Bluetooth device during active scanning to request the Bluetooth remote controller to return supplementary broadcast data.

[0061] In this embodiment, the Bluetooth remote control reads the type field in the request information, classifies the request information into a connection indication request or a scan request based on the value of the type field, and calls the address resolution logic corresponding to the type.

[0062] Step S402: When the request information is a connection indication request, extract the initiating device address from the connection indication request; when the request information is a scan request, extract the scanning device address from the scan request, and determine the extracted initiating device address or scan device address as the current device identifier.

[0063] The initiating device address can be the device address recorded in the InitiatorAddress (InitA) field of the connection indication request; the scanning device address can be the device address recorded in the Scanner Address (ScanA) field of the scan request.

[0064] In this embodiment, when the request information is a connection indication request, the Bluetooth remote controller reads the initiating device address according to the field position of the connection indication request; when the request information is a scan request, the scanning device address is read according to the field position of the scan request, and a format check is performed on the read address. Then, the address that passes the format check is used as the current device identifier.

[0065] Step S403: Compare the current device identifier with the target device identifier. If the current device identifier and the target device identifier are the same, the match is successful. If the current device identifier and the target device identifier are not the same, the match is unsuccessful, and the request information is ignored.

[0066] The comparison can involve verifying the consistency of the address types and address values ​​of the two device identifiers. In this embodiment, the Bluetooth remote controller first converts the current device identifier and the target device identifier into the same data format, and then compares their address values ​​field by field or byte by byte. A successful match is determined when both the address types and address values ​​are consistent; a match fails if either is inconsistent. Upon successful matching, the Bluetooth remote controller enters the response process corresponding to the request type; upon failed matching, the Bluetooth remote controller ignores the request information and does not provide further interaction to the Bluetooth device that sent the request.

[0067] For example, the target device identifier is the media access control address of the first smart TV. When the first smart TV sends a request, its initiating device address or scanning device address matches the target device identifier, and the Bluetooth remote control confirms a successful match. When the second smart TV or mobile phone sends a request, the extracted address does not match the target device identifier, and the Bluetooth remote control ignores the corresponding request.

[0068] As can be seen from the above, this embodiment extracts the requesting device address for both connection indication request and scanning request, and then uses a unified target device identifier for filtering, which can simultaneously implement device identity restrictions on both the return connection entry and the scanning entry.

[0069] In one possible implementation, a specific process for responding to a scan request is described. This specific implementation process can be seen as a refinement of step S104 in a scanning scenario, and the specific implementation steps are as follows: Step S501: When the request information is a scan request and the match is successful, generate a scan response packet corresponding to the scan request.

[0070] The Scan Response (SCAN_RSP) packet can be a protocol data unit returned by the Bluetooth remote controller after receiving a scan request, used to provide supplementary broadcast data to the scanning device.

[0071] In this embodiment, the Bluetooth remote controller creates a scan response packet only when the scanning device address matches the target device identifier, and sets the message header, data length, and response data area of ​​the scan response packet according to the Bluetooth Low Energy protocol; for scan requests that fail to match, no corresponding scan response packet is generated or sent.

[0072] Step S502: Write the remote control name of the Bluetooth remote control into the scan response packet.

[0073] The remote control name can be the name information used by the upper-layer application of the target Bluetooth device to identify the Bluetooth remote control to be paired. The upper-layer application (Application, APP) can be the software module in the target Bluetooth device responsible for device scanning, device display and pairing initiation.

[0074] In this embodiment, the Bluetooth remote control writes the pre-configured or product model-generated remote control name into the response data area of ​​the scan response packet, so that the target Bluetooth device can identify the Bluetooth remote control based on the remote control name after obtaining the complete scan results.

[0075] For example, "Smart Remote - Pairing" can be written as the remote control name in the scan response packet. The upper-layer application of the target Bluetooth device is configured to display the device to be paired or automatically initiate the pairing process when the name is recognized in the scan results. Since the scan request of a non-target Bluetooth device cannot be matched by the device identifier, the non-target Bluetooth device cannot obtain the scan response packet through normal interaction.

[0076] Step S503: Send a scan response packet to the current Bluetooth device, and maintain the broadcast state after sending the scan response packet to wait for the current Bluetooth device to send a connection indication request.

[0077] Maintaining broadcast status means that the Bluetooth remote control can continue the current non-directional broadcast process after completing a scan response, without immediately shutting down the broadcast due to sending a scan response packet.

[0078] In this embodiment, the Bluetooth remote controller sends a scan response packet to the current Bluetooth device within the protocol response time limit corresponding to the scan request. After sending the packet, it continues to send non-directional broadcast packets at preset broadcast intervals. After receiving the scan response packet, the current Bluetooth device can report the complete scan results to its upper-layer application. The upper-layer application then identifies the remote controller name and controls the current Bluetooth device to send a connection indication request.

[0079] It's important to note that the scan request and scan response are only used to complete device discovery and acquire supplementary data; they do not equate to the establishment of a Bluetooth communication link. Therefore, by maintaining a broadcast state after sending the scan response packet, the Bluetooth remote control can ensure that the current Bluetooth device can still send connection indication requests based on subsequent broadcast events, avoiding interruption of the re-pairing process due to premature termination of the broadcast.

[0080] As can be seen from the above, this embodiment only returns a scan response packet carrying the remote control name to the matching scanning device, and continues to wait for connection after the response. This allows the original target Bluetooth device to rediscover and pair with the Bluetooth remote control, while reducing the possibility of other devices scanning and discovering the remote control and pairing with it first.

[0081] In one possible implementation, a specific process for responding to a connection indication request and processing the pairing authentication result is described. This specific implementation process can be seen as a refinement of step S104 in a connection scenario, and the specific implementation steps are as follows: Step S601: When the request information is a connection indication request and the match is successful, respond to the connection indication request, stop sending non-directional broadcast packets and establish a Bluetooth communication link.

[0082] The response to the connection indication request can be that the Bluetooth communication module of the Bluetooth remote control accepts the connection parameters given in the connection indication request and switches from the broadcast state to the connection state, without being limited to sending a separate response message; the Bluetooth communication link can be a wireless link between the Bluetooth remote control and the current Bluetooth device used to exchange authentication data and control data.

[0083] In this embodiment, after the Bluetooth remote controller confirms that the current device identifier corresponding to the connection indication request matches the target device identifier, it stops the current broadcast event, configures the link according to the communication parameters carried in the connection indication request, and enters the connection state.

[0084] Step S602: Perform pairing authentication on the current Bluetooth device based on the pairing information saved by the Bluetooth remote control, and obtain the pairing authentication result.

[0085] The pairing information can be information saved by the Bluetooth remote control during the historical pairing process to confirm the identity of the peer device and establish a protected connection; the pairing authentication result can be the result that characterizes whether the pairing information saved by the Bluetooth remote control and the current Bluetooth device can complete the authentication.

[0086] In this embodiment, after the Bluetooth communication link is established, the Bluetooth remote control calls the locally stored pairing information to participate in authentication according to the Bluetooth protocol, and determines whether the pairing authentication is successful or failed based on the authentication data returned by the current Bluetooth device or the authentication status reported by the link layer.

[0087] For example, if both the Bluetooth remote control and the first smart TV have the same pairing information, they can complete the pairing authentication. However, if the first smart TV has cleared its saved remote control pairing information after being restored to factory settings, while the Bluetooth remote control still retains its historical pairing information, they may not be able to complete the authentication based on the original pairing information, resulting in a pairing authentication failure.

[0088] Step S603: Maintain the Bluetooth communication link when the pairing authentication result indicates successful pairing authentication, disconnect the Bluetooth communication link when the pairing authentication result indicates failed pairing authentication, and retain the target device identifier for retransmitting non-directional broadcast packets.

[0089] Maintaining the Bluetooth communication link can mean preserving the current connection and allowing the Bluetooth remote control to continue sending remote control commands to the current Bluetooth device; preserving the target device identifier can mean not deleting the device identifier used to identify the original target Bluetooth device when the link is disconnected.

[0090] In this embodiment, when pairing authentication is successful, the Bluetooth remote control maintains the Bluetooth communication link and enters the normal remote control state; when pairing authentication fails, the Bluetooth remote control disconnects the Bluetooth communication link, but retains the target device identifier and restarts non-directional broadcasting, so that the original target Bluetooth device can scan the Bluetooth remote control again and enter the re-pairing process.

[0091] As can be seen from the above, this embodiment connects the pairing authentication failure with the rebroadcast after retaining the target device identifier, so that the target Bluetooth device can still rediscover the Bluetooth remote control after clearing the pairing information, and the request response object can still be restricted according to the target device identifier during the rebroadcast.

[0092] In one possible implementation, a specific process for associating a scan response with a subsequent connection indication request is described. This specific implementation process can be considered as a refinement of the process following the sending of the scan response packet, and the specific implementation steps are as follows: Step S701: Record the current device identifier and the time when the scan response packet is sent, and generate a pairing record.

[0093] The sending time can be the local system time read when the Bluetooth remote control completes the scan response packet transmission; the pairing record can be a data record used to identify Bluetooth devices to which the Bluetooth remote control has sent a scan response packet and which are waiting for the Bluetooth remote control to initiate a connection. The pairing record includes at least the current device identifier and the sending time. In this embodiment, after successfully sending the scan response packet, the Bluetooth remote control associates and saves the current device identifier with the sending time, and sets the record to a waiting connection state.

[0094] For example, if the Bluetooth remote control sends a scan response packet to the first smart TV at the first moment, the current device identifier of the first smart TV and the first moment's information are written into the same pairing record. This pairing record is not used to replace the target device identifier, but rather to further confirm whether the device that subsequently initiates a connection is the same device that just received the scan response opportunity.

[0095] Step S702: Upon receiving a connection indication request, obtain the identifier of the device to be connected from the connection indication request, and determine the time difference between the time of receiving the connection indication request and the time of sending the request.

[0096] The device identifier to be connected can be the device address extracted from the currently received connection indication request and used to identify the device initiating the connection; the time difference can be the duration obtained by subtracting the time of sending the scan response packet in the pairing record from the time the connection indication request was received.

[0097] In this embodiment, after receiving a connection indication request while maintaining broadcast state, the Bluetooth remote controller extracts the initiating device address in the connection indication request as the identifier of the device to be connected, queries the pairing record, reads the corresponding transmission time, and then uses the local clock to calculate the time difference between the receiving time and the transmission time.

[0098] Step S703: When the identifier of the device to be connected is consistent with the current device identifier in the pairing record and the time difference does not exceed the preset pairing time, respond to the connection indication request and delete the pairing record; otherwise, ignore the connection indication request and maintain the broadcast state.

[0099] The preset pairing duration can be the maximum waiting time allowed for the corresponding Bluetooth device to initiate a connection after the scan response packet is sent.

[0100] In this embodiment, the Bluetooth remote controller compares the identifier of the device to be connected with the current device identifier in the pairing record, and compares the calculated time difference with a preset pairing duration. Only when the two device identifiers match and the time difference does not exceed the preset pairing duration will the connection indication request be responded to and the pairing record be deleted. If the device identifiers do not match or the time difference has exceeded the preset pairing duration, the connection indication request is ignored and the broadcast state is maintained to continue waiting for a matching connection indication request.

[0101] For example, the preset pairing time is ten seconds. After the Bluetooth remote control sends a scan response packet to the first smart TV, the first smart TV sends a connection indication request two seconds later. If the identifier of the device to be connected matches the current device identifier in the pairing record, the Bluetooth remote control accepts the connection indication request. If the second smart TV sends a connection indication request during this period, or if the first smart TV sends a connection indication request after more than ten seconds, the Bluetooth remote control ignores the request and remains in broadcast mode. The above values ​​are for illustrative purposes only and do not constitute a limitation on the preset pairing time.

[0102] As can be seen from the above, this embodiment, based on the target device identifier matching, further associates the device that obtains the scanning response opportunity with the device that subsequently initiates the connection by identifier and time association. This can reduce the situation where other devices take advantage of the time window after the scanning response to preemptively initiate the connection, thereby improving the accuracy and security of the re-pairing process.

[0103] In summary, the Bluetooth remote controller provides a common broadcast entry point for reconnection and re-pairing by sending non-directional broadcast packets, restricts the response objects of scan requests and connection indication requests by identifying the target device, and associates the rebroadcast after pairing authentication failure with the timing of scan responses and subsequent connections. This enables the original target Bluetooth device to complete rediscovery and pairing even when pairing information is cleared or inconsistent, while reducing the probability of other Bluetooth devices in the environment preemptively connecting, mispairing, or occupying the connection process.

[0104] Figure 2 A flowchart illustrating the specific implementation process of another Bluetooth device control method provided in this application embodiment. For example... Figure 2 The diagram illustrates an example of a Bluetooth remote control reconnecting to or re-pairing with a TV. The Media Access Control Address (MAC address) identifies the TV; the Connectable and Scannable Undirected Advertising Indication (ADV_IND) is the undirected broadcast packet sent by the Bluetooth remote control; the Connection Indication (CONNECT_IND), Scan Request (SCAN_REQ), and Scan Response (SCAN_RSP) are used to request connection establishment, request supplementary broadcast information, and return supplementary broadcast information, respectively. Processes A, B, and C in the diagram represent the reconnection process, the re-pairing process, and the broadcast timeout process, respectively.

[0105] After the Bluetooth remote control is powered on, it polls the buttons and determines the key value when a button is pressed. When a combination of the "Home" and "Menu" buttons is detected, the pairing information saved on the Bluetooth remote control is cleared, but the MAC address of the most recently connected device is retained and used as the target device identifier. When other buttons are detected, the Bluetooth remote control is in an unconnected state, and the target device identifier is recorded, an ADV_IND broadcast packet is sent. This broadcast packet is non-directional, so it can be used to reconnect to a TV that still has pairing information saved, and it can also be used to rediscover the Bluetooth remote control when the pairing information is inconsistent.

[0106] In process A, after receiving a CONNECT_IND request from the TV, the Bluetooth remote control extracts the initiating device address from the request and matches it with the target device identifier. If they match, the remote control responds to the CONNECT_IND request, stops broadcasting, and enters the connection process; otherwise, it ignores the request. In process B, after receiving a SCAN_REQ request, the Bluetooth remote control extracts the scanning device address from the request. When the scanning device address matches the target device identifier, the remote control sends a SCAN_RSP packet carrying the remote control's name to the TV and maintains broadcasting. The TV receives the SCAN_RSP packet, recognizes the remote control name, and sends a CONNECT_IND request. The Bluetooth remote control responds to the request if the requesting device matches the device that sent the SCAN_RSP packet and the preset pairing time has not exceeded, thus entering the re-pairing or connection process; otherwise, it ignores the request.

[0107] In process C, if the Bluetooth remote control does not enter the connection process within the preset broadcast duration, the broadcast will stop; for example, the preset broadcast duration can be set to 30 seconds. Therefore, regardless of whether the TV still retains the original pairing information, it can establish a connection with the Bluetooth remote control through the reconnection or re-pairing process, while reducing the possibility of other Bluetooth devices vying for the connection or mis-pairing.

[0108] Figure 3 This is a structural diagram of a Bluetooth device control device provided in an embodiment of this application. Figure 3 As shown, the device includes: The acquisition module 31 is used to acquire the target device identifier recorded in the Bluetooth remote control, wherein the target device identifier is used to identify the target Bluetooth device that has been paired with the Bluetooth remote control; The sending module 32 is used to send a non-directional broadcast packet when the Bluetooth remote control is in an unconnected state. The non-directional broadcast packet is used to cause the Bluetooth device that receives the non-directional broadcast packet to send request information. The receiving module 33 is used to receive the request information sent by the current Bluetooth device in response to the non-directional broadcast packet, and to obtain the current device identifier of the current Bluetooth device from the request information; The processing module 34 is used to match the current device identifier with the target device identifier, and respond to the request information when the match is successful.

[0109] In one possible implementation, the acquisition module is specifically used to read the pairing record stored in the Bluetooth remote control; The target Bluetooth device that most recently successfully connected to the Bluetooth remote control is determined from the pairing record, and the media access control address of the target Bluetooth device is extracted and identified as the target device identifier. When a preset key operation is detected, the pairing information in the pairing record is cleared except for the media access control address, and the media access control address is retained as the target device identifier.

[0110] In one possible implementation, the transmitting module is specifically configured to configure the broadcast packet to be transmitted as a connectable and scannable non-directional broadcast packet when a key operation for the Bluetooth remote control is detected and the Bluetooth remote control records the target device identifier. The non-directional broadcast packets are sent at preset broadcast intervals, and the sending of non-directional broadcast packets is stopped when the Bluetooth remote control enters the connection process or when the broadcast duration reaches the preset broadcast duration.

[0111] In one possible implementation, the acquisition module is further configured to parse the protocol data unit type of the request information and determine whether the request information is a connection indication request or a scan request; When the request information is the connection indication request, the initiating device address is extracted from the connection indication request; when the request information is the scan request, the scanning device address is extracted from the scan request, and the extracted initiating device address or the scan device address is determined as the current device identifier. The step of matching the current device identifier with the target device identifier includes: The current device identifier is compared with the target device identifier. If the current device identifier and the target device identifier are the same, the match is determined to be successful. If the current device identifier and the target device identifier are not the same, the match is determined to be unsuccessful, and the request information is ignored.

[0112] In one possible implementation, the processing module is specifically used to generate a scan response packet corresponding to the scan request when the request information is a scan request and a match is successful; The remote control name of the Bluetooth remote control is written into the scan response packet. The remote control name is used to enable the current Bluetooth device to recognize the Bluetooth remote control to be paired. Send the scan response packet to the current Bluetooth device, and maintain a broadcast state after sending the scan response packet to wait for the current Bluetooth device to send a connection indication request.

[0113] In one possible implementation, the processing module is specifically configured to, when the request information is a connection indication request and a match is successful, respond to the connection indication request, stop sending the non-directional broadcast packet, and establish a Bluetooth communication link; The pairing authentication is performed on the current Bluetooth device based on the pairing information stored in the Bluetooth remote control, and the pairing authentication result is obtained; The Bluetooth communication link is maintained when the pairing authentication result indicates successful pairing authentication, and disconnected when the pairing authentication result indicates failed pairing authentication, while retaining the target device identifier for retransmitting the non-directional broadcast packet.

[0114] In one possible implementation, the processing module is further configured to record the current device identifier and the sending time of the scan response packet, and generate a pairing record, wherein the pairing record is used to identify the Bluetooth device that the Bluetooth remote control has sent the scan response packet and is waiting to initiate a connection; Upon receiving a connection indication request, the identifier of the device to be connected is obtained from the connection indication request, and the time difference between the receiving time and the sending time of the connection indication request is determined. When the identifier of the device to be connected matches the current device identifier in the pairing record and the time difference does not exceed the preset pairing duration, the connection indication request is responded to and the pairing record is deleted; otherwise, the connection indication request is ignored and the broadcast state is maintained.

[0115] The device provided in this embodiment may be as follows: Figure 3 The apparatus shown can perform, as Figure 1-2 All steps of the Bluetooth device control method are implemented to achieve Figure 1-2 For details on the technical effects of the Bluetooth device control method shown, please refer to [link / reference]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0116] Figure 4 This is a schematic diagram of the structure of a Bluetooth remote control device provided in an embodiment of the present invention. Figure 4The Bluetooth remote control device 400 shown includes at least one processor 401, a memory 402, at least one network interface 404, and other user interfaces 403. The various components in the Bluetooth remote control device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to implement communication between these components. In addition to a data bus, the bus system 405 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 4 The general designated all buses as Bus System 405.

[0117] The user interface 403 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0118] It is understood that the memory 402 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0119] In some implementations, memory 402 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 4021 and application program 4022.

[0120] The operating system 4021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 4022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 4022.

[0121] In this embodiment of the invention, by calling the program or instructions stored in the memory 402, specifically the program or instructions stored in the application program 4022, the processor 401 executes the method steps provided in each method embodiment, including, for example: Obtain the target device identifier recorded in the Bluetooth remote control, the target device identifier being used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; When the Bluetooth remote control is in an unconnected state, a non-directional broadcast packet is sent, which is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message; Receive a request message sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request message; The current device identifier is matched with the target device identifier, and the request information is responded to when the match is successful.

[0122] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 402. Processor 401 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the above method.

[0123] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0124] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0125] The Bluetooth remote control device provided in this embodiment can be, for example, as follows: Figure 4 The device shown can perform, for example Figure 1-2 All steps of the Bluetooth device control method are implemented to achieve Figure 1-2 For details on the technical effects of the Bluetooth device control method shown, please refer to [link / reference]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0126] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.

[0127] When one or more programs in the storage medium can be executed by one or more processors to implement the Bluetooth device control method executed on the device side as described above.

[0128] The processor is used to execute a Bluetooth device control program stored in the memory to implement the following steps of a Bluetooth device control method executed on the device side: Obtain the target device identifier recorded in the Bluetooth remote control, the target device identifier being used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; When the Bluetooth remote control is in an unconnected state, a non-directional broadcast packet is sent, which is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message; Receive a request message sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request message; The current device identifier is matched with the target device identifier, and the request information is responded to when the match is successful.

[0129] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0130] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0131] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A Bluetooth device control method, characterized in that, Applied to a Bluetooth remote control, the method includes: Obtain the target device identifier recorded in the Bluetooth remote control, the target device identifier being used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; When the Bluetooth remote control is in an unconnected state, a non-directional broadcast packet is sent, which is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message; Receive a request message sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request message; The current device identifier is matched with the target device identifier, and the request information is responded to when the match is successful.

2. The method according to claim 1, characterized in that, The step of obtaining the target device identifier recorded in the Bluetooth remote control includes: Read the pairing record stored in the Bluetooth remote control; The target Bluetooth device that most recently successfully connected to the Bluetooth remote control is determined from the pairing record, and the media access control address of the target Bluetooth device is extracted and identified as the target device identifier. When a preset key operation is detected, the pairing information in the pairing record is cleared except for the media access control address, and the media access control address is retained as the target device identifier.

3. The method according to claim 1, characterized in that, The sending of non-directional broadcast packets includes: If a button operation is detected for the Bluetooth remote control and the Bluetooth remote control has recorded the target device identifier, the broadcast packet to be sent is configured as a connectable and scannable non-directional broadcast packet. The non-directional broadcast packets are sent at preset broadcast intervals, and the sending of non-directional broadcast packets is stopped when the Bluetooth remote control enters the connection process or when the broadcast duration reaches the preset broadcast duration.

4. The method according to claim 1, characterized in that, Obtaining the current device identifier of the current Bluetooth device from the request information includes: The protocol data unit type of the request information is parsed to determine whether the request information is a connection indication request or a scan request; When the request information is the connection indication request, the initiating device address is extracted from the connection indication request; when the request information is the scan request, the scanning device address is extracted from the scan request, and the extracted initiating device address or the scan device address is determined as the current device identifier. The step of matching the current device identifier with the target device identifier includes: The current device identifier is compared with the target device identifier. If the current device identifier and the target device identifier are the same, the match is determined to be successful. If the current device identifier and the target device identifier are not the same, the match is determined to be unsuccessful, and the request information is ignored.

5. The method according to claim 3, characterized in that, The step of responding to the request information upon successful matching includes: When the request information is a scan request and a match is successful, a scan response packet corresponding to the scan request is generated; The remote control name of the Bluetooth remote control is written into the scan response packet. The remote control name is used to enable the current Bluetooth device to recognize the Bluetooth remote control to be paired. Send the scan response packet to the current Bluetooth device, and maintain a broadcast state after sending the scan response packet to wait for the current Bluetooth device to send a connection indication request.

6. The method according to claim 4, characterized in that, The step of responding to the request information upon successful matching includes: When the request information is a connection indication request and the match is successful, respond to the connection indication request, stop sending the non-directional broadcast packet and establish a Bluetooth communication link; The pairing authentication is performed on the current Bluetooth device based on the pairing information stored in the Bluetooth remote control, and the pairing authentication result is obtained; The Bluetooth communication link is maintained when the pairing authentication result indicates successful pairing authentication, and disconnected when the pairing authentication result indicates failed pairing authentication, while retaining the target device identifier for retransmitting the non-directional broadcast packet.

7. The method according to claim 5, characterized in that, After sending the scan response packet to the current Bluetooth device, the method further includes: Record the current device identifier and the sending time of the scan response packet to generate a pairing record. The pairing record is used to identify the Bluetooth device that the Bluetooth remote control has sent the scan response packet and is waiting to initiate a connection. Upon receiving a connection indication request, the identifier of the device to be connected is obtained from the connection indication request, and the time difference between the receiving time and the sending time of the connection indication request is determined. When the identifier of the device to be connected matches the current device identifier in the pairing record and the time difference does not exceed the preset pairing duration, the connection indication request is responded to and the pairing record is deleted; otherwise, the connection indication request is ignored and the broadcast state is maintained.

8. A Bluetooth device control device, characterized in that, include: The acquisition module is used to acquire the target device identifier recorded in the Bluetooth remote control, wherein the target device identifier is used to identify a target Bluetooth device that has been paired with the Bluetooth remote control; The sending module is configured to send a non-directional broadcast packet when the Bluetooth remote control is in an unconnected state. The non-directional broadcast packet is used to cause the Bluetooth device that receives the non-directional broadcast packet to send a request message. The receiving module is configured to receive request information sent by the current Bluetooth device in response to the non-directional broadcast packet, and obtain the current device identifier of the current Bluetooth device from the request information; The processing module is used to match the current device identifier with the target device identifier, and respond to the request information when the match is successful.

9. A Bluetooth remote control device, characterized in that, include: A processor and a memory, the processor being configured to execute a Bluetooth device control program stored in the memory to implement the Bluetooth device control method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the Bluetooth device control method according to any one of claims 1 to 7.