CN114710753A - Terminal Bluetooth switch control method and device - Google Patents

Terminal Bluetooth switch control method and device Download PDF

Info

Publication number
CN114710753A
CN114710753A CN202210289858.9A CN202210289858A CN114710753A CN 114710753 A CN114710753 A CN 114710753A CN 202210289858 A CN202210289858 A CN 202210289858A CN 114710753 A CN114710753 A CN 114710753A
Authority
CN
China
Prior art keywords
bluetooth
switch
terminal
control end
rssi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210289858.9A
Other languages
Chinese (zh)
Inventor
陈双平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202210289858.9A priority Critical patent/CN114710753A/en
Publication of CN114710753A publication Critical patent/CN114710753A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The terminal Bluetooth switch control method comprises the steps that the terminal Bluetooth switch initializes an internal protocol into an HID protocol, broadcast information is sent to a Bluetooth control end through the HID protocol, after a connection signal fed back by the Bluetooth control end is received, a connection parameter change command is sent to the Bluetooth control end during the establishment of each Bluetooth connection event, the RSSI between the Bluetooth control end and the terminal Bluetooth switch is refreshed in real time, the RSSI between the Bluetooth control end and the terminal Bluetooth switch is compared with a preset threshold value, and the switch state is automatically switched according to the comparison result. This application can realize continuing to control terminal bluetooth switch to, change the connection parameter during every bluetooth connection incident is established, real-time terminal bluetooth switch refreshes RSSI with the bluetooth control end, realizes that the distance refreshes in real time and reaches timely control, promotes user experience.

Description

Terminal Bluetooth switch control method and device
Technical Field
The application belongs to the technical field of Bluetooth wireless communication, and particularly relates to a terminal Bluetooth switch control method and device.
Background
At present, the control method for the terminal state change-over switch based on bluetooth mainly includes two kinds: one is that bluetooth low energy (bluetooth low energy) establishes a connection with an intelligent terminal. The low-power-consumption Bluetooth sends a broadcast, a Bluetooth program in the mobile phone is opened, the low-power-consumption Bluetooth equipment can be viewed, after the connection with the low-power-consumption Bluetooth equipment is established, the automatic switching function can be completed only by sending Received Signal Strength Indication (RSSI) to the low-power-consumption Bluetooth in real time, but due to the requirement of the endurance of the mobile phone, the non-system program process in the mobile phone can be closed in an indefinite time, and therefore when the Bluetooth program is closed, the mobile phone approaches the low-power-consumption Bluetooth equipment again, and the terminal state can not be automatically switched. The other method is to utilize dual-mode Bluetooth, namely, the coexistence of classic Bluetooth and low-power Bluetooth, and because the classic Bluetooth does not need the participation of Bluetooth programs in the mobile phone, the Bluetooth connection can not be closed. However, classic bluetooth only transmits audio streams, and low-power-consumption bluetooth is used for receiving and sending control and setting commands, so that a dual-mode bluetooth chip can only work in one state at the same time, and therefore two modes of classic bluetooth and low-power-consumption bluetooth need to be frequently switched, inconvenience is brought to users.
Disclosure of Invention
In order to overcome the problems that the traditional terminal Bluetooth switch control cannot be timely and automatically controlled at least to a certain extent, and the RSSI refreshing is not timely when the Bluetooth equipment receives data, so that the terminal state cannot be timely and automatically controlled when the distance between the terminal and the Bluetooth equipment is within a control distance range, and the user experience is influenced, the terminal Bluetooth switch control method and the terminal Bluetooth switch control device are provided.
In a first aspect, the present application provides a terminal bluetooth switch control method, including:
the terminal Bluetooth switch initializes the internal protocol to the HID protocol;
sending broadcast information to a Bluetooth control end through an HID protocol;
after receiving a connection signal fed back by a Bluetooth control end, sending a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event so as to refresh the RSSI between the Bluetooth control end and the terminal Bluetooth switch in real time;
and comparing the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value so as to automatically switch the switch state according to the comparison result.
Further, the parameter command includes:
at least one of a connection interval, a timeout time, and a device delay.
Further, the preset threshold includes a proximity value, the RSSI between the bluetooth control end and the terminal bluetooth switch is compared with the preset threshold to automatically switch the on-off state according to the comparison result, including:
and when the RSSI between the Bluetooth control end and the terminal Bluetooth switch is greater than the approximate value, controlling the terminal Bluetooth switch to be started.
Further, the preset threshold includes a leaving value, the RSSI between the bluetooth control end and the terminal bluetooth switch is compared with the preset threshold to automatically switch the switch state according to the comparison result, including:
and when the RSSI between the Bluetooth control end and the terminal Bluetooth switch is smaller than a leaving value, controlling the terminal Bluetooth switch to be closed.
Further, the method also comprises the following steps:
the Bluetooth control end is further provided with a manual switch used for controlling the terminal Bluetooth switch, and the manual switch is used for controlling the state switching of the terminal Bluetooth switch.
Further, the terminal bluetooth switch includes a proximity switch, and when there are a plurality of bluetooth control terminals, the terminal bluetooth switch further includes:
after the proximity switch receives the proximity signal, the terminal Bluetooth switch checks whether an external Bluetooth controller is connected with the equipment;
if yes, after receiving the RSSI fed back by the Bluetooth control end, judging whether the RSSI fed back by the Bluetooth control end is larger than an approach value set by the terminal Bluetooth switch or not;
if yes, controlling the terminal Bluetooth switch to be turned on;
if the RSSI fed back by the Bluetooth control end is not greater than the set approach value of the terminal Bluetooth switch, rescanning and waiting whether other external Bluetooth control ends are connected; if no other external Bluetooth control ends are connected, alarming;
if other external Bluetooth control ends are connected and the received RSSI is greater than the set approach value of the terminal Bluetooth switch, controlling the terminal Bluetooth switch to be turned on;
otherwise, an alarm signal is sent out.
Further, the method also comprises the following steps:
after receiving a pairing signal fed back by a Bluetooth control end, judging whether password pairing between the terminal Bluetooth switch and the Bluetooth control end is successful or not;
if yes, the Bluetooth control end is controlled to establish Bluetooth connection with the terminal Bluetooth switch.
Further, the method also comprises the following steps:
judging whether the password pairing frequency in a preset time range reaches an upper limit alarm threshold value or not;
and if so, canceling the password pairing connection between the terminal Bluetooth switch and the Bluetooth control end.
In a second aspect, the present application provides a terminal bluetooth switch control device, including:
the initialization module is used for initializing the internal protocol into the HID protocol by the terminal Bluetooth switch;
the sending module is used for sending broadcast information to the Bluetooth control end through an HID protocol;
the change module is used for sending a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event after receiving a connection signal fed back by the Bluetooth control end so as to refresh the RSSI between the Bluetooth control end and the terminal Bluetooth switch in real time;
and the comparison module is used for comparing the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value so as to automatically switch the switch state according to the comparison result.
Further, the method also comprises the following steps:
and the receiving module is used for receiving the set parameters sent by the Bluetooth control end and receiving the manual switch signal of the Bluetooth control end so as to control the state switching of the terminal Bluetooth switch.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the terminal Bluetooth switch control method and device provided by the embodiment of the invention comprises that the terminal Bluetooth switch initializes an internal protocol into an HID protocol, sends broadcast information to a Bluetooth control end through the HID protocol, sends a connection parameter changing command to the Bluetooth control end during the establishment of each Bluetooth connection event after receiving a connection signal fed back by the Bluetooth control end, refreshes the RSSI between the Bluetooth control end and the terminal Bluetooth switch in real time, compares the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value, automatically switches the switch state according to the comparison result, and because the HID protocol is adopted, the process corresponding to the HID protocol belongs to a system process, the Bluetooth connection process cannot be ended, the terminal Bluetooth switch can be continuously controlled, and the connection parameter is changed during the establishment of each Bluetooth connection event, real-time terminal bluetooth switch refreshes RSSI with the bluetooth control end, realizes timely control, promotes user experience.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a terminal bluetooth switch control method according to an embodiment of the present application.
Fig. 2 is a flowchart of a terminal bluetooth switch control method according to another embodiment of the present application.
Fig. 3 is a flowchart of another terminal bluetooth switch control method according to an embodiment of the present application.
Fig. 4 is a functional structure diagram of a terminal bluetooth switch control device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a terminal bluetooth switch control method according to an embodiment of the present application, and as shown in fig. 1, the terminal bluetooth switch control method is applicable to a terminal bluetooth switch, and specifically includes:
s11: the terminal Bluetooth switch initializes the internal protocol to the HID protocol;
an HID (Human Interface Device) protocol is, for example, the bluetooth HID mouse protocol.
S12: sending broadcast information to a Bluetooth control end through an HID protocol;
s13: after receiving a connection Signal fed back by a Bluetooth control end, sending a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event so as to refresh the Received Signal Strength Indication (RSSI) between the Bluetooth control end and the terminal Bluetooth switch in real time;
the connection parameter is at least one of a connection interval, a timeout time and a device delay, and the parameter of reducing the connection interval, reducing the timeout time, especially reducing the slave device delay to the minimum, for example setting the device delay to 0, is modified to realize real-time updating of RSSI.
Bluetooth low energy connection events are connections in which a master device sends a packet to a slave device at each connection event. A connection event refers to a process of transmitting a packet between a master device and a slave device to each other. The connection event is always performed at a frequency, and each data packet waits for 150 μ s to be transmitted after the last data packet is transmitted. The connection interval determines the interaction interval between the master device and the slave device; it refers to the time distance at which two consecutive connection events begin, and can be anywhere from 7.5ms to 4s, but must be an integer multiple of 1.25 ms. To determine the actual interaction interval of the slave device with the master device, a slave device latency parameter is needed, representing how many connection events the slave device can ignore before it must listen. Each connection event may continue from the time the master sends a packet until either the master or the slave stops responding. No data packets are sent between the master and slave devices outside of the connection event.
Therefore, when the terminal Bluetooth is controlled by the traditional method, the RSSI can be refreshed untimely due to reasons such as low-power Bluetooth sleeping and the like, so that the on-off control is untimely, and the user experience is influenced.
S14: and comparing the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value so as to automatically switch the switch state according to the comparison result.
Wherein, terminal bluetooth switch includes but not limited to electric motor car alarm, garage parking stall lock, hotel lock, intelligent lock, the hotel gets electric switch, burglar alarm etc..
The traditional control method for the terminal state change-over switch based on the Bluetooth mainly comprises two methods: one is that bluetooth low energy (bluetooth low energy) establishes a connection with an intelligent terminal. The low-power-consumption Bluetooth sends a broadcast, a Bluetooth program in the mobile phone is opened, the low-power-consumption Bluetooth equipment can be viewed, after the connection with the low-power-consumption Bluetooth equipment is established, the automatic switching function can be completed only by sending Received Signal Strength Indication (RSSI) to the low-power-consumption Bluetooth in real time, but due to the requirement of the endurance of the mobile phone, the non-system program process in the mobile phone can be closed in an indefinite time, and therefore when the Bluetooth program is closed, the mobile phone approaches the low-power-consumption Bluetooth equipment again, and the terminal state can not be automatically switched. The other mode is that dual-mode Bluetooth is utilized, namely, classic Bluetooth and low-power Bluetooth coexist, and because the classic Bluetooth headset mode does not need the participation of a Bluetooth APP program in a mobile phone, Bluetooth connection is not closed. However, classic bluetooth only transmits audio streams, and low-power-consumption bluetooth is used for receiving and sending control and setting commands, so that a dual-mode bluetooth chip can only work in one state at the same time, and therefore two modes of classic bluetooth and low-power-consumption bluetooth need to be frequently switched, inconvenience is brought to users.
In this embodiment, the method for controlling the bluetooth switch of the terminal comprises initializing an internal protocol to an HID protocol by the bluetooth switch of the terminal, sending broadcast information to the bluetooth control end through the HID protocol, sending a connection parameter change command to the bluetooth control end during each bluetooth connection event establishment period after receiving a connection signal fed back by the bluetooth control end to refresh the RSSI between the bluetooth control end and the bluetooth switch of the terminal in real time, comparing the RSSI between the bluetooth control end and the bluetooth switch of the terminal with a preset threshold value to automatically switch the switch state according to the comparison result, and since the HID protocol is used, the process corresponding to the HID protocol belongs to the system process, the bluetooth connection process is not ended, thereby continuously controlling the bluetooth switch of the terminal, changing the connection parameters during each bluetooth connection event establishment period, and refreshing the RSSI between the bluetooth switch of the terminal and the bluetooth control end in real time, timely control is realized, and user experience is improved.
An embodiment of the present invention provides another terminal bluetooth switch control method, as shown in a flowchart in fig. 2, where the terminal bluetooth switch control method includes:
s201: initializing the internal protocol of the terminal Bluetooth switch into a Bluetooth HID mouse protocol;
the HID mouse protocol of the Bluetooth with low power consumption, namely the protocol in the Universal Serial Bus-Human Interface Device Bluetooth Human-computer Interface Device, reflects that the protocol is a Bluetooth mouse at a mobile phone end, because the mouse and the like are the most common external input devices of terminal equipment, a driving program is transferred into a mobile phone system, and the protocol has high priority, and can be connected and transmit data without additional APP processing. The problem of ordinary low-power consumption bluetooth need APP and the automatic hand of bimodulus bluetooth be switched etc. not enough is solved, just connect the switch to open when can reaching the cell-phone and being close the low-power consumption bluetooth, the switch is closed when leaving, can carry out manual control on the cell-phone simultaneously.
S202: the terminal Bluetooth switch starts to send broadcast information and waits for the connection or pairing of the Bluetooth control ends;
s203: if the pairing signal is the pairing signal, judging whether the pairing is successful, if so, executing S204, otherwise, executing S205;
s204: after the pairing is successful, the information is saved, and S207 is continuously executed;
s205: judging whether the pairing frequency exceeds a threshold value within a preset time range;
s206: if yes, alarm information is sent, and the terminal Bluetooth switch and the Bluetooth control end are not paired any more within a preset time range.
In order to enhance the security, besides the password pairing and the encrypted data transmission by using the bluetooth protocol, the present embodiment sets the upper limit of the password pairing time within the specified time to alarm or cancel the pairing, thereby avoiding trying to perform the password pairing for many times, and greatly enhancing the use security.
S207: if the signal is a connection signal, updating the RSSI of the Bluetooth control end and the terminal Bluetooth switch at intervals of preset time in real time;
s208: judging whether the RSSI is greater than the approximate value;
s209: if yes, controlling a terminal Bluetooth switch to be turned on;
s210: judging whether the RSSI is less than a leaving value;
s211: if yes, the terminal Bluetooth switch is controlled to be closed.
The terminal Bluetooth switch is a low-power Bluetooth switch, and the RSSI millisecond-level real-time refreshing of the low-power Bluetooth switch is realized after the low-power Bluetooth switch is connected with the mobile phone. Because of the bluetooth low energy design of low power consumption, two bluetooth low energy equipment establish the connection back, and all communication events are gone on through the connection incident to most of time all is in the sleep state, can lead to the bluetooth low energy to read the RSSI of bluetooth control end to terminal bluetooth switch in real time, even set up after the connection and reduce the connection interval and also can not read the RSSI of bluetooth control end to terminal bluetooth switch in real time. The connection event is that the Bluetooth control end initiates connection, and RSSI real-time refreshing cannot be solved even if the low-power Bluetooth switch does not stop sending data. The invention utilizes the low-power consumption Bluetooth switch to send a command for changing the connection parameters to the Bluetooth control end (mobile phone) during the establishment of each connection event, modifies and reduces the connection interval, reduces the overtime time, particularly reduces the parameter of the slave equipment delay to the minimum, such as to 0, and ensures that each terminal Bluetooth switch needs to reply, thereby refreshing the RSSI in real time.
In some embodiments, the bluetooth control end sets the control valid threshold and/or the control invalid threshold in advance according to a use scenario.
The Bluetooth control end is also provided with a manual switch for controlling the terminal Bluetooth switch, and the manual switch is used for controlling the state switching of the terminal Bluetooth switch.
When a plurality of Bluetooth control terminals exist, the method further comprises the following steps:
the terminal bluetooth switch includes proximity switch, when there are a plurality of bluetooth control ends, still includes:
after the proximity switch receives the proximity signal, the terminal Bluetooth switch checks whether an external Bluetooth controller is connected with the equipment;
if not, when the terminal Bluetooth switch is provided with an alarm device, the alarm device is controlled to send an alarm signal;
if yes, after receiving the RSSI fed back by the Bluetooth control end, judging whether the RSSI fed back by the Bluetooth control end is larger than an approach value set by a terminal Bluetooth switch or not;
if yes, controlling a terminal Bluetooth switch to be turned on;
if the RSSI fed back by the Bluetooth control end is not greater than the set approach value of the terminal Bluetooth switch, rescanning and waiting whether other external Bluetooth control ends are connected; if no other external Bluetooth control ends are connected, alarming;
if other external Bluetooth control ends are connected and the received RSSI is greater than the set approach value of the terminal Bluetooth switch, controlling the terminal Bluetooth switch to be turned on;
otherwise, an alarm signal is sent out.
It should be noted that, when there are multiple bluetooth control terminals, only one bluetooth control terminal can be connected to the terminal bluetooth switch at the same time.
According to the working principle of Bluetooth, when the low-power-consumption Bluetooth is connected with one of the two mobile phones, the other mobile phone can not be connected at the same time, and unless the current connected mobile phone is manually disconnected or automatically disconnected after leaving the use distance range, the experience of manually disconnecting the Bluetooth on the mobile phone is poor. In this embodiment, a proximity switch is set in the bluetooth low energy, the proximity switch may be a touch switch, a light-sensitive switch, a vibration switch, or other light-sensitive switches, and when the mobile phone contacts the proximity switch of the bluetooth low energy, the bluetooth low energy will detect whether the mobile phone is an effective mobile phone, that is, whether the RSSI is within the proximity value, if so, the bluetooth low energy is turned on, and if not, the bluetooth low energy starts to re-scan. After rescanning, because the mobile phone which is not connected last time needs subsequent internal operation, the mobile phone which is not connected originally is directly connected to the low-power-consumption Bluetooth, and the time difference is utilized to ensure that the contacted mobile phone which is not connected originally is connected immediately after the low-power-consumption Bluetooth is rescanned, and the mobile phone which is connected originally can be disconnected and cannot compete for the opportunity of reconnection. This mode is suitable for the working environment where the bluetooth low energy proximity switch is in contact with the cell phone or the user. Therefore, the noninductive switching between the two Bluetooth connection devices is realized.
Therefore, the change of the distance between the mobile phone and the low-power-consumption Bluetooth is sensed through the RSSI in real time, the user experience is excellent, the switch can be started within 0.1 second when the distance is close to the preset value, and the switch can be disconnected after the distance is 0.1 second when the distance is away from the preset value. For example, the RSSI setting is-60 BD, and the distance between the mobile phone and the Bluetooth low energy is about 8 meters. The switch state can be accurately switched by calculating the walking speed of the human body and the distance of plus or minus 0.5 meter (namely 7.5-8.5 meters) under the same use condition. In the prior art, because connection parameters are not changed when connection is established every time, the refreshing of the RSSI is not real-time, the RSSI is delayed for at least 3-20 seconds, and even the RSSI broadcasted before the connection can only be refreshed, so that the approach and the leaving distance of a user are not exact, and the error is extremely large. Such as waiting 3-10 seconds or even longer as close as possible or moving away until the signal is broken.
In some embodiments, a method for noninductive unlocking of an electric vehicle based on bluetooth pairing comprises the following steps:
1. the HID mouse protocol is initiated. After the initialization is successful, the Bluetooth is put into a Bluetooth HID mouse protocol, a broadcast data packet is prepared, and the interval broadcast is started. And the like are discovered and connected by the intelligent terminal.
2. And (6) pairing. To connect the mobile phone with the bluetooth low energy switch, the pairing is performed first. In order to prevent illegal connection, the invention uses password pairing, and the pairing can be successfully carried out to enter the connection only if the password is correct. In order to avoid the decryption of multiple password pairing, the upper limit of the password pairing times in the specified time is alarmed and the pairing is cancelled, so that the user can use the password pairing device safely.
3. And (5) real-time RSSI comparison. And after the intelligent terminal is functionally connected with the low-power-consumption Bluetooth switch, opening a Bluetooth connection message window and acquiring the signal strength RSSI at an interval of 0.1 second for measuring and calculating the distance between the Bluetooth switch and the mobile phone. RSSI setting value approach and exit values, DB number approach greater than exit value, as in fig. 3, open switch scenario: when the mobile phone is close to the Bluetooth low energy switch, the mobile phone is in a disconnected state farthest away, the Bluetooth low energy switch is automatically connected after the mobile phone is close to a connection range, the mobile phone can give an alarm if an alarm function is added before the mobile phone is close to a leaving value (including disconnection), and the mobile phone is in a silent state between the leaving value and the approaching value and is not alarmed or switched. The switch is automatically opened after the mobile phone reaches the approach value. Switching off the switching scene: when the alarm is not given, the switch is closed, and the alarm is turned on. If the Bluetooth is detected to be disconnected, the switch is directly closed and an alarm state is started. In an application scenario without an alarm function, only one threshold may be set.
4. And (6) data communication. Data transmission and receiving with the bluetooth low energy switch can be accomplished to cell-phone APP after connecting for the automatic control of controlling part switch and settlement parameter, but do not participate in the switch.
5. The two control ends are used in a non-inductive switching mode. When two mobile phones are detected to be bound with one low-power-consumption Bluetooth switch device through pairing, the low-power-consumption Bluetooth switch starts a non-inductive switching process. As described above, if the light-sensitive switch of the bluetooth low energy device is turned on, it indicates that someone comes to the nearest place of the bluetooth low energy switch, and thus the RSSI is within the proximity value and is legally close, and the switch is turned on according to the normal flow. If the connection of the mobile phone is not detected at the moment, the low-power-consumption Bluetooth switch is illegally accessed, and the alarm is started when the alarm is given. If the RSSI is not within the approximate value, the effective hand is connected with the low-power-consumption Bluetooth switch, but whether the effective hand is the other hand is uncertain, so that the rescanning is started immediately, and if the second mobile phone is within the approximate value, the effective hand is connected with the low-power-consumption Bluetooth switch in a preemptive manner while the originally connected mobile phone has an interval of disconnection operation, and the switch is opened in a normal process. If the second mobile phone is not connected or the RSSI of the original mobile phone is not within the close value, the switch is disconnected and an alarm is given according to the normal flow when the RSSI of the original mobile phone is not within the leaving value.
It should be noted that this application only uses the noninductive lock of electric motor car to add the unblock usage scenario to exemplify, and this application usage scenario includes but not limited to electric motor car alarm, garage parking stall lock, hotel's lock, intelligent lock, hotel get electric switch, burglar alarm etc..
The invention belongs to the field of utilizing a Bluetooth mouse protocol, and can be automatically realized without using a mobile phone APP. The RSSI can be refreshed in real time, the Bluetooth connection can be established quickly in time, and meanwhile, the noninductive switching of two mobile phones connected with the unified low-power Bluetooth device can be realized.
The terminal Bluetooth switch control method provided by the embodiment can refresh RSSI in real time and switch a system level Bluetooth induction technology based on a Bluetooth HID mouse protocol in an inductionless manner, low-power-consumption Bluetooth switch equipment in an HID Bluetooth mouse mode is connected with automatic Bluetooth of a matched mobile phone, automatic on-off of wireless induction of the mobile phone and the switch equipment can be realized, a user only needs to carry the mobile phone and does not need APP in a screen-off state of the mobile phone, the switch can be automatically realized by approaching a set distance according to the RSSI signal intensity, the user does not need to carry a key with him, and the method is very convenient.
Fig. 4 is a functional structure diagram of a terminal bluetooth switch control device according to an embodiment of the present application, and as shown in fig. 4, the terminal bluetooth switch control device includes:
the initialization module 41 is used for initializing the internal protocol into the HID protocol by the terminal Bluetooth switch;
the sending module 42 is configured to send broadcast information to the bluetooth control end through the HID protocol;
a changing module 43, configured to send a connection parameter changing command to the bluetooth control end during each bluetooth connection event establishment period after receiving a connection signal fed back by the bluetooth control end, so as to refresh, in real time, an RSSI between the bluetooth control end and the terminal bluetooth switch;
and the comparison module 44 is configured to compare the RSSI between the bluetooth control end and the terminal bluetooth switch with a preset threshold, so as to automatically switch the switch state according to the comparison result.
In some embodiments, further comprising:
the pairing module 45 is used for judging whether password pairing between the terminal Bluetooth switch and the Bluetooth control end is successful or not after receiving a pairing signal fed back by the Bluetooth control end; if yes, the Bluetooth control end is controlled to establish Bluetooth connection with the terminal Bluetooth switch.
The pairing module 45 is further configured to determine whether the number of password pairings within the preset time range reaches an upper alarm threshold; and if so, canceling the password pairing connection between the terminal Bluetooth switch and the Bluetooth control end.
In some embodiments, further comprising:
and the receiving module 46 is configured to receive the setting parameters sent by the bluetooth control end, and is configured to receive a manual switch signal of the bluetooth control end, so as to control state switching of the terminal bluetooth switch.
The setting parameters sent by the bluetooth control end are, for example, a set approach value and a set departure value sent by the bluetooth control end.
In the embodiment, the internal protocol of the terminal Bluetooth switch is initialized to the HID protocol through the initialization module; the sending module sends broadcast information to the Bluetooth control terminal through an HID protocol; after receiving a connection signal fed back by a Bluetooth control end, a change module sends a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event so as to refresh the RSSI between the Bluetooth control end and a terminal Bluetooth switch in real time; the RSSI of comparison module between bluetooth control end and terminal bluetooth switch contrasts with predetermineeing the threshold value to according to contrast result automatic switch state, owing to adopt the HID agreement, the HID agreement corresponds the process and belongs to the system process, consequently bluetooth connection process can not ended, thereby can realize continuously controlling terminal bluetooth switch, and, change the connection parameter during every bluetooth connection incident is established, real-time terminal bluetooth switch refreshes RSSI with the bluetooth control end, realize timely control, promote user experience.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are exemplary and should not be construed as limiting the present application and that changes, modifications, substitutions and alterations in the above embodiments may be made by those of ordinary skill in the art within the scope of the present application.
It should be noted that the present invention is not limited to the above-mentioned preferred embodiments, and those skilled in the art can obtain other products in various forms without departing from the spirit of the present invention, but any changes in shape or structure can be made within the scope of the present invention with the same or similar technical solutions as those of the present invention.

Claims (10)

1. A terminal Bluetooth switch control method is characterized by comprising the following steps:
the terminal Bluetooth switch initializes the internal protocol to the HID protocol;
sending broadcast information to a Bluetooth control end through an HID protocol;
after receiving a connection signal fed back by a Bluetooth control end, sending a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event so as to refresh the RSSI between the Bluetooth control end and the terminal Bluetooth switch in real time;
and comparing the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value so as to automatically switch the switch state according to the comparison result.
2. A terminal bluetooth switch control method according to claim 1, characterized in that the parameter command comprises:
at least one of a connection interval, a timeout time, and a device delay.
3. The method as claimed in claim 1, wherein the preset threshold comprises a proximity value, and the comparing the RSSI between the bluetooth control end and the bluetooth switch terminal with the preset threshold to automatically switch the switch state according to the comparison result comprises:
and when the RSSI between the Bluetooth control end and the terminal Bluetooth switch is greater than the approximate value, controlling the terminal Bluetooth switch to be started.
4. The method as claimed in claim 3, wherein the predetermined threshold comprises a leaving value, and the comparing the RSSI between the Bluetooth control terminal and the terminal Bluetooth switch with the predetermined threshold to automatically switch the switch state according to the comparison result comprises:
and when the RSSI between the Bluetooth control end and the terminal Bluetooth switch is smaller than a leaving value, controlling the terminal Bluetooth switch to be closed.
5. The method for controlling the bluetooth switch of the terminal according to claim 1, further comprising:
the Bluetooth control end is further provided with a manual switch used for controlling the terminal Bluetooth switch, and the manual switch is used for controlling state switching of the terminal Bluetooth switch.
6. The method as claimed in claim 1, wherein the terminal bluetooth switch includes a proximity switch, and when there are a plurality of bluetooth control terminals, the method further comprises:
after the proximity switch receives the proximity signal, the terminal Bluetooth switch checks whether an external Bluetooth controller is connected with the equipment;
if yes, after receiving the RSSI fed back by the Bluetooth control end, judging whether the RSSI fed back by the Bluetooth control end is larger than an approach value set by the terminal Bluetooth switch or not;
if yes, controlling the terminal Bluetooth switch to be turned on;
if the RSSI fed back by the Bluetooth control end is not greater than the set approach value of the terminal Bluetooth switch, rescanning and waiting whether other external Bluetooth control ends are connected; if no other external Bluetooth control ends are connected, alarming;
if other external Bluetooth control ends are connected and the received RSSI is greater than the set approach value of the terminal Bluetooth switch, controlling the terminal Bluetooth switch to be turned on;
otherwise, an alarm signal is sent out.
7. The method for controlling the bluetooth switch of the terminal according to claim 1, further comprising:
after receiving a pairing signal fed back by a Bluetooth control end, judging whether password pairing between the terminal Bluetooth switch and the Bluetooth control end is successful or not;
if yes, the Bluetooth control end is controlled to establish Bluetooth connection with the terminal Bluetooth switch.
8. The method for controlling a bluetooth switch of a terminal according to claim 7, further comprising:
judging whether the password pairing frequency in a preset time range reaches an upper limit alarm threshold value or not;
and if so, canceling the password pairing connection between the terminal Bluetooth switch and the Bluetooth control end.
9. A terminal Bluetooth switch control device, comprising:
the initialization module is used for initializing the internal protocol into the HID protocol by the terminal Bluetooth switch;
the sending module is used for sending broadcast information to the Bluetooth control end through an HID protocol;
the change module is used for sending a connection parameter change command to the Bluetooth control end during the establishment of each Bluetooth connection event after receiving a connection signal fed back by the Bluetooth control end so as to refresh the RSSI between the Bluetooth control end and the terminal Bluetooth switch in real time;
and the comparison module is used for comparing the RSSI between the Bluetooth control end and the terminal Bluetooth switch with a preset threshold value so as to automatically switch the switch state according to the comparison result.
10. A terminal bluetooth switch control device according to claim 9, characterized by further comprising:
and the receiving module is used for receiving the set parameters sent by the Bluetooth control end and receiving the manual switch signal of the Bluetooth control end so as to control the state switching of the terminal Bluetooth switch.
CN202210289858.9A 2022-03-23 2022-03-23 Terminal Bluetooth switch control method and device Pending CN114710753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210289858.9A CN114710753A (en) 2022-03-23 2022-03-23 Terminal Bluetooth switch control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210289858.9A CN114710753A (en) 2022-03-23 2022-03-23 Terminal Bluetooth switch control method and device

Publications (1)

Publication Number Publication Date
CN114710753A true CN114710753A (en) 2022-07-05

Family

ID=82168538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210289858.9A Pending CN114710753A (en) 2022-03-23 2022-03-23 Terminal Bluetooth switch control method and device

Country Status (1)

Country Link
CN (1) CN114710753A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115281063A (en) * 2022-08-26 2022-11-04 吉林省佰强科技有限责任公司 Intelligent irrigation control system and operation method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108260117A (en) * 2018-02-28 2018-07-06 惠州Tcl移动通信有限公司 A kind of Bluetooth transmission control method, control system and storage medium
US20180370758A1 (en) * 2017-06-22 2018-12-27 Otis Elevator Company Communication system and method for elevator system
CN109154642A (en) * 2016-04-15 2019-01-04 株式会社电装 For establishing the system and method positioned in real time
CN111417100A (en) * 2020-04-10 2020-07-14 北京百瑞互联技术有限公司 Automatic connection and control method for Bluetooth low-power-consumption equipment
CN112367647A (en) * 2020-09-27 2021-02-12 浙江三维万易联科技有限公司 Bluetooth connection parameter updating method and device, Bluetooth system and storage medium
CN112466015A (en) * 2020-12-21 2021-03-09 上海哈敦智能科技有限公司 BLE bluetooth keyless induction system
CN113225690A (en) * 2020-01-21 2021-08-06 华为技术有限公司 Bluetooth connection method, system and electronic equipment
CN113611019A (en) * 2021-08-11 2021-11-05 深圳市泰比特科技有限公司 Electric vehicle non-inductive locking and unlocking method, device and medium based on Bluetooth pairing

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109154642A (en) * 2016-04-15 2019-01-04 株式会社电装 For establishing the system and method positioned in real time
US20180370758A1 (en) * 2017-06-22 2018-12-27 Otis Elevator Company Communication system and method for elevator system
CN108260117A (en) * 2018-02-28 2018-07-06 惠州Tcl移动通信有限公司 A kind of Bluetooth transmission control method, control system and storage medium
CN113225690A (en) * 2020-01-21 2021-08-06 华为技术有限公司 Bluetooth connection method, system and electronic equipment
CN111417100A (en) * 2020-04-10 2020-07-14 北京百瑞互联技术有限公司 Automatic connection and control method for Bluetooth low-power-consumption equipment
CN112367647A (en) * 2020-09-27 2021-02-12 浙江三维万易联科技有限公司 Bluetooth connection parameter updating method and device, Bluetooth system and storage medium
CN112466015A (en) * 2020-12-21 2021-03-09 上海哈敦智能科技有限公司 BLE bluetooth keyless induction system
CN113611019A (en) * 2021-08-11 2021-11-05 深圳市泰比特科技有限公司 Electric vehicle non-inductive locking and unlocking method, device and medium based on Bluetooth pairing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115281063A (en) * 2022-08-26 2022-11-04 吉林省佰强科技有限责任公司 Intelligent irrigation control system and operation method
CN115281063B (en) * 2022-08-26 2023-11-24 吉林省佰强科技有限责任公司 Intelligent irrigation control system and operation method

Similar Documents

Publication Publication Date Title
CN108769856B (en) Method and device for establishing single-wire connection, wireless earphone and charging box
EP2135400B1 (en) Pairing of wireless devices using physical presence
WO2018000156A1 (en) Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device
CN110839271B (en) Equipment connection method, system, platform and corresponding equipment
US20080076389A1 (en) Automatic pairing method for bluetooth®-enabled mobile terminal
CN111315035B (en) WiFi network connection method and device
CN114710753A (en) Terminal Bluetooth switch control method and device
CN113099342A (en) Wireless earphone uncovering and reconnection method and related equipment
CN110519672B (en) Communication system and method based on Bluetooth headset and base
CN111417100A (en) Automatic connection and control method for Bluetooth low-power-consumption equipment
CN110769343A (en) Method for communication between wireless headset and charging box, TWS headset and system
CN111615143A (en) Information reporting method, information receiving method, terminal and network control entity
CN114158018A (en) Data transmission method and device, Bluetooth slave device and Bluetooth master device
CN113473291A (en) Communication method, earphone cabin and WIFI earphone
CN113518331A (en) Communication method and device
CN114041296A (en) Wireless communication device, method for wireless communication device, and computer program
US20230379676A1 (en) Transportation means control method and electronic device
CN114339618A (en) Broadcast control method, Bluetooth audio system and Bluetooth audio equipment
WO2016198002A1 (en) Terminal control method and device, and terminal
JP2002033824A (en) Mobile communication apparatus
KR100433897B1 (en) Remote controlling method of wireless communication terminal
TW200909780A (en) Remote control system
CN109103705B (en) Method for remotely controlling socket and socket system with remote control function
CN116074935A (en) Electronic equipment with automatic reconnection starting mechanism and Bluetooth communication method thereof
CN109687553B (en) OBD wireless charging device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination