CN110831114A - Connection method with wireless device, terminal and readable storage medium - Google Patents
Connection method with wireless device, terminal and readable storage medium Download PDFInfo
- Publication number
- CN110831114A CN110831114A CN201911117766.7A CN201911117766A CN110831114A CN 110831114 A CN110831114 A CN 110831114A CN 201911117766 A CN201911117766 A CN 201911117766A CN 110831114 A CN110831114 A CN 110831114A
- Authority
- CN
- China
- Prior art keywords
- distance
- terminal
- preset
- wireless
- wireless device
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000008859 change Effects 0.000 claims abstract description 88
- 238000004590 computer program Methods 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 230000004044 response Effects 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a connection method with wireless equipment, a terminal and a readable storage medium, wherein the method comprises the following steps: detecting a distance change condition, wherein the distance is the distance between the terminal and at least one wireless device; judging whether the distance change condition meets a preset rule or not; if so, a connection request is sent to connect the terminal and the wireless device. Therefore, when the terminal detects that the distance change condition of the wireless equipment meets the preset rule, the connection relation between the terminal and the wireless equipment is established, the terminal can judge the user intention through the distance change condition of the wireless equipment, the wireless equipment which does not meet the preset rule can be eliminated, the wireless equipment which cannot represent the user intention can be eliminated, the probability that the terminal is connected by mistake can be reduced, the interference of other wireless equipment to the terminal is reduced, the connection is opened without additional manual setting, the connection pairing time is shortened, the operation is simple and fast, the automatic pairing connection between the current terminal and the wireless equipment is realized, and the user experience is further improved.
Description
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a method for connecting a wireless device, a terminal, and a readable storage medium.
Background
Short-range wireless technology is a radio technology that supports short-range communication of devices, and enables short-range data exchange between fixed devices, mobile devices, and the like.
At present, when a wireless device establishes bluetooth connection with a terminal, the wireless devices around the terminal send pairing connection requests to the terminal, the terminal simultaneously receives one or more wireless devices popping up a pairing connection message frame, and then a user completes pairing by clicking one wireless device for pairing connection, that is, both sides establish bluetooth connection successfully. However, in the process of connecting the wireless device and the terminal, the user needs to manually click to complete pairing between the wireless device and the terminal, the process is complicated, the automation degree is low, the wireless device is easily interfered by other wireless devices, and the probability of misconnection of the terminal is increased.
Disclosure of Invention
The invention mainly aims to provide a connection method with a wireless device, a terminal and a readable storage medium, and aims to solve the technical problems that the connection automation degree of the terminal and the wireless device is low and the probability of terminal misconnection is increased in the prior art.
To achieve the above object, the present invention provides a method for connecting to a wireless device, the method comprising:
s10, detecting the change situation of the distance, wherein the distance is the distance between the terminal and at least one wireless device;
s20, judging whether the distance change condition meets a preset rule or not;
and S30, if yes, sending a connection request to connect the terminal and the wireless device.
Further, the distance variation condition includes at least one of: distance variation, distance variation rule and distance variation speed;
the step S10 includes:
acquiring distance information between the terminal and the wireless equipment according to a preset time interval;
acquiring distance variation according to the distance information; and/or the presence of a gas in the gas,
obtaining a distance change rule according to the distance information and/or preset duration; and/or the presence of a gas in the gas,
and acquiring the distance change speed according to the distance information and/or the preset time length.
Further, the preset rule includes at least one of:
whether the distance variation meets a first preset condition or not;
whether the distance change rule meets a second preset condition or not;
whether the distance change speed reaches a preset speed threshold value.
Further, whether the distance variation satisfies a first preset condition includes:
if the distance variation is larger than or equal to a preset variation value, judging that the distance variation condition meets the first preset condition; and/or the presence of a gas in the gas,
and if the distance variation is smaller than a preset variation value, judging that the distance variation condition does not meet the first preset condition.
Further, whether the distance change rule meets a second preset condition or not includes:
if the distance change rule is that the distance is reduced, judging that the distance change condition meets the second preset condition; and/or the presence of a gas in the gas,
and if the distance change rule is that the distance is increased and is within the preset distance range, judging that the distance change condition meets the second preset condition.
Further, after the step S30, the method includes:
acquiring connection state information of the terminal and the wireless equipment;
if the connection state information is successful, outputting a connection success prompt; and/or the presence of a gas in the gas,
and if the connection state information is unsuccessful, outputting a connection unsuccessful prompt and/or retransmitting a connection request.
Further, the method further comprises:
when the number of the wireless devices meeting the preset rule is at least two, determining a target wireless device connected with the terminal according to a selection instruction;
and sending a connection request to enable the terminal to be connected with the target wireless equipment.
Further, the method further comprises:
the terminal acquires equipment information of the wireless equipment;
and if the equipment information is matched with the equipment information stored in the terminal, sending a connection request to connect with the wireless equipment.
The present invention also provides a terminal, including: a memory, a processor and a program stored on the memory and executable on the processor, the connection program with the wireless device implementing the steps of the method for connecting with a wireless device as described above when executed by the processor.
The invention also provides a readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, realizes the steps of the method of connecting to a wireless device as described above.
The method for connecting the wireless device provided by the embodiment of the invention detects the change condition of the distance, wherein the distance is the distance between the terminal and at least one wireless device; judging whether the distance change condition meets a preset rule or not; if so, a connection request is sent to connect the terminal and the wireless device. Therefore, if the terminal detects that the distance change condition of the wireless equipment meets the preset rule, the connection relation between the terminal and the wireless equipment is established, so that the terminal can judge the user intention through the distance change condition of the wireless equipment, the wireless equipment which does not meet the preset rule can be eliminated, the wireless equipment which cannot represent the user intention can be eliminated, the probability that the terminal is connected by mistake can be reduced, the interference of other wireless equipment to the terminal can be reduced, and the accuracy of pairing connection can be further improved. And the terminal detects that the distance change condition of the wireless equipment meets the preset rule and then is automatically connected, the connection is in place in one step, the connection is opened without manual setting, the pairing connection time is shortened, the pairing connection process is simplified, the operation is simple and rapid, the automatic pairing connection between the current terminal and the wireless equipment is realized, and the user experience is further improved.
Drawings
Fig. 1 is a schematic structural diagram of a terminal in which hardware according to an embodiment of the present invention operates;
fig. 2 is a flowchart illustrating a first embodiment of a method for connecting to a wireless device according to the present invention;
fig. 3 is an application scenario of the present invention with multiple wireless devices in the vicinity of the terminal.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 3) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts brightness of the display screen according to brightness of ambient light, and a proximity sensor that turns off the display screen and/or backlight when the terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the terminal is stationary, and can be used for applications of recognizing terminal gestures (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; of course, the terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a connection program with a wireless device.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a connectivity program stored in the memory 1005 with the wireless device and perform the following operations:
s10, detecting the change situation of the distance, wherein the distance is the distance between the terminal and at least one wireless device;
s20, judging whether the distance change condition meets a preset rule or not;
and S30, if yes, sending a connection request to connect the terminal and the wireless device.
Further, the distance variation condition includes at least one of: distance variation, distance variation rule and distance variation speed;
the step S10 includes:
acquiring distance information between the terminal and the wireless equipment according to a preset time interval;
acquiring distance variation according to the distance information; and/or the presence of a gas in the gas,
obtaining a distance change rule according to the distance information and/or preset duration; and/or the presence of a gas in the gas,
and acquiring the distance change speed according to the distance information and/or the preset time length.
Further, whether the distance variation satisfies a first preset condition or not;
whether the distance change rule meets a second preset condition or not;
whether the distance change speed reaches a preset speed threshold value.
Further, if the distance variation is greater than or equal to a preset variation value, determining that the distance variation condition meets the first preset condition; and/or the presence of a gas in the gas,
and if the distance variation is smaller than a preset variation value, judging that the distance variation condition does not meet the first preset condition.
Further, if the distance change rule is that the distance is reduced, it is determined that the distance change condition meets the second preset condition; and/or the presence of a gas in the gas,
and if the distance change rule is that the distance is increased and is within the preset distance range, judging that the distance change condition meets the second preset condition.
Further, the processor 1001 may invoke a connectivity program stored in the memory 1005 with the wireless device to perform the following operations:
acquiring connection state information of the terminal and the wireless equipment;
if the connection state information is successful, outputting a connection success prompt; and/or the presence of a gas in the gas,
and if the connection state information is unsuccessful, outputting a connection unsuccessful prompt and/or retransmitting a connection request.
Further, when the number of the wireless devices meeting the preset rule is at least two, determining a target wireless device connected with the terminal according to a selection instruction;
and sending a connection request to enable the terminal to be connected with the target wireless equipment.
Further, the terminal acquires the device information of the wireless device;
and if the equipment information is matched with the equipment information stored in the terminal, sending a connection request to connect with the wireless equipment.
Referring to fig. 2, the present invention provides various embodiments of the method of the present invention based on the above-mentioned terminal hardware structure.
The invention provides a method for connecting with a wireless device, which is applied to a terminal, and in a first embodiment of the method for connecting with the wireless device, referring to fig. 2, the method comprises the following steps:
step S10, detecting the distance change condition, wherein the distance is the distance between the terminal and at least one wireless device;
the terminal detects a change in distance, wherein the distance is a distance between the terminal and at least one wireless device. For example, the terminal may be a PC, or may be a smartphone, a tablet computer, or the like. The wireless device may be a headset, a watch, a bracelet, or the like.
The distance variation here includes at least one of: distance variation, distance variation rule and distance variation speed. In this embodiment, the terminal may send the wireless detection signal in real time or at regular time through the wireless communication module, search for the wireless device, and detect data information fed back by one or more wireless devices, where the data information includes, but is not limited to, an identifier of the wireless device, an RSSI signal strength value, and the like, and obtain a change in distance between the terminal and the one or more wireless devices according to the data information. For example, the terminal sends the wireless detection signal at regular time, and when the device such as the wireless earphone, the wireless watch, and the wireless bracelet is found, the distance change condition between the terminal and the wireless earphone, the wireless watch, and the wireless bracelet is obtained based on the data information fed back by the wireless earphone, the wireless watch, and the bracelet.
Step S20, judging whether the distance change condition meets the preset rule;
the preset rule may be set by an internal program of the terminal or a preset rule set by a user according to a requirement of the user, and only the wireless device meeting the preset rule may trigger a response of the connection terminal. Further, the preset rule includes at least one of the following cases: whether the distance variation meets a first preset condition, whether the distance variation rule meets a second preset condition, whether the distance variation speed reaches a preset speed threshold, and whether the distance variation speed reaches the preset speed threshold includes, but is not limited to, the following conditions: the speed may be equal to or less than a preset speed threshold, or greater than the preset speed threshold, or within a certain preset speed range. If the terminal detects that the distance variation condition of the wireless device satisfies the distance variation condition of the at least one preset rule, if the preset rule indicates that the distance variation satisfies the first preset condition, the terminal detects that the distance variation of the wireless device should satisfy the first preset condition, and then the terminal can be triggered to respond to the connection with the wireless device.
In addition, if the preset rule may also be that the distance change rule satisfies the second preset condition and the distance change speed reaches the preset speed threshold, the response connection between the terminal and the wireless device may be triggered.
The distance change condition of the wireless device is detected by the terminal to limit, so that when the distance change condition of the wireless device meets the preset rule, the connection relationship between the terminal and the wireless device is established, the terminal can judge the user intention through the distance change condition of the wireless device, the wireless device which is not full of the preset rule can be excluded, the wireless device which cannot represent the user intention can be excluded, the probability of mistakenly connecting the terminal can be reduced, and the interference of other wireless devices on the terminal can be reduced.
If so, step S30 is to transmit a connection request to connect the terminal to the wireless device.
And after the detected distance change condition of the wireless equipment is determined to meet a preset rule, sending a connection request to enable the terminal to be connected with the wireless equipment. And if the detected distance change condition of the wireless equipment is determined not to meet the preset rule, the wireless equipment is not sent with a connection request, and the detection signal is continuously sent.
After the distance change condition of the wireless equipment meets the preset rule, the user of the wireless equipment can be determined to be paired with the current terminal to be connected to a large extent, so that the wireless equipment can directly enter into the connection, interference of other wireless equipment can be eliminated by limiting the distance change condition, influence of other wireless equipment is reduced, the distance change condition judgment mode is simple, the terminal is easy to recognize user intention, and user experience is promoted.
For example, if the terminal searches for a wireless earphone, a wireless watch and a wireless bracelet, the terminal detects the distance change situation of the wireless earphone, the wireless watch and the wireless bracelet, judges whether the distance change situation of the wireless earphone, the wireless watch and the wireless bracelet meets a preset rule, and sends a connection request to connect the terminal with the wireless earphone if the terminal detects that the wireless earphone meets the preset rule.
To assist in understanding the technical solution of the present embodiment, reference may be made to fig. 3, where fig. 3 is an application scenario in which a plurality of wireless devices are located near a terminal.
In this embodiment, a distance change condition is detected, where the distance is a distance between the terminal and at least one wireless device; judging whether the distance change condition meets a preset rule or not; if so, a connection request is sent to connect the terminal and the wireless device. Therefore, if the terminal detects that the distance change condition of the wireless equipment meets the preset rule, the connection relation between the terminal and the wireless equipment is established, so that the terminal can judge the user intention through the distance change condition of the wireless equipment, the wireless equipment which does not meet the preset rule can be eliminated, the wireless equipment which cannot represent the user intention can be eliminated, the probability that the terminal is connected by mistake can be reduced, the interference of other wireless equipment to the terminal can be reduced, and the accuracy of pairing connection can be further improved. And the terminal detects that the distance change condition of the wireless equipment meets the preset rule and then is automatically connected, the connection is in place in one step, the connection is opened without manual setting, the pairing connection time is shortened, the pairing connection process is simplified, the operation is simple and rapid, the automatic pairing connection between the current terminal and the wireless equipment is realized, and the user experience is further improved.
Further, the step S10 of the first embodiment may specifically include the following steps:
step S11, obtaining the distance information between the terminal and the wireless device according to the preset time interval;
step S12, obtaining distance variation according to the distance information; and/or the presence of a gas in the gas,
step S13, obtaining a distance change rule according to the distance information and/or the preset duration; and/or the presence of a gas in the gas,
and step S14, acquiring the distance change speed according to the distance information and/or the preset duration.
The distance variation conditions include the following: 1. distance variation, 2, distance change law, 3, distance change speed, 4, distance variation and distance change law, 5, distance variation and distance change speed, 6, distance change law and distance change speed.
In this embodiment, distance information between the terminal and the wireless device is obtained according to a preset time interval, and a distance variation is obtained according to the distance information; and/or acquiring the distance change condition according to the distance information and/or the preset duration; and/or acquiring the distance change speed according to the distance information and/or the preset duration. Specifically, the terminal receives an RSSI signal strength value in data information sent by the wireless device, and according to data filtering processing, the distance between the terminal and the wireless device is calculated by using the processed RSSI signal strength value and the signal attenuation model, so that the terminal can obtain a distance variation according to distance information of a preset time interval, and obtain a distance variation rule and a distance variation speed in a preset time.
In other embodiments, the obtained iBeacon, which has the RSSI value (received signal strength), may be used to calculate the distance between the current terminal and the wireless device, i.e., the formula d ═ 10^ ((abs (RSSI) -a)/(10 ×). d is the resulting distance, RSSI is the received signal strength, A is the signal strength at 1 meter separation between the transmitting and receiving ends, and n is the ambient attenuation factor.
Further, in another embodiment of the method for connecting a wireless device to a wireless device of the present invention, the step of determining whether the distance variation satisfies a first preset condition includes:
step A, if the distance variation is larger than or equal to a preset variation value, judging that the distance variation condition meets a first preset condition; and/or the presence of a gas in the gas,
and B, if the distance variation is smaller than a preset variation value, judging that the distance variation condition does not meet a first preset condition.
In this embodiment, whether the distance variation satisfies a first preset condition is determined, specifically, if the distance variation is greater than or equal to a preset variation value, it is determined that the distance variation satisfies the first preset condition, and if the distance variation is smaller than the preset variation value, it is determined that the distance variation does not satisfy the first preset condition. In this embodiment, the preset variation value should be large, for example, 10cm or 15cm, and may be factory-set for the device, or may be self-set for the user according to habits, and the large distance variation may reduce the possibility of entering the connection situation due to the terminal being triggered by mistake, because the probability of misconnection is easily increased if a short distance variation is set. For example, in the presence of the wireless device A, B, the terminal may be paired with a when the distance between the terminal and B is detected to be shortened from 20cm to 18cm and the distance between the terminal and a is detected to be from 20cm to 10cm within a preset time interval.
Further, in another embodiment of the connection method of the present invention and a wireless device, whether the distance variation law satisfies a second preset condition includes:
step C, if the distance change rule is that the distance is reduced, judging that the distance change condition meets a second preset condition;
and D, if the distance change rule is that the distance is increased and is within the preset distance range, judging that the distance change condition meets a second preset condition.
If the terminal detects that the distance of the wireless equipment in the preset time length is smaller, the distance change condition is judged to meet a second preset condition, and if the terminal detects that the distance of the wireless equipment in the preset time length is increased and is in the distance range, the distance change condition is judged to meet the second preset condition. That is, the second preset condition is met when the wireless device is detected to be continuously close to the terminal, and the second preset condition is met when the wireless device is detected to be continuously far away from the terminal and within the preset distance range. Wherein the preset distance range may be 50 cm.
For example, if it is detected that the distance between the terminal and the wireless device is 10cm, the distance between the terminal and the wireless device is 20cm within the preset time length, and it is known that the distance between the wireless device and the terminal is increasing and within the preset distance range, that is, the second preset condition is satisfied.
Further, after the step of S30, the method includes:
step S31, acquiring the connection state information of the terminal and the wireless device;
step S32, if the connection state information is connection success, outputting a connection success prompt; and/or the presence of a gas in the gas,
and step S33, if the connection state information is unsuccessful, outputting a connection unsuccessful prompt and/or resending the connection request.
The terminal acquires the connection state information of the terminal and the wireless equipment, and if the connection state information is successful, a connection success prompt is output; and/or outputting a connection unsuccessful prompt and/or retransmitting the connection request if the connection state information is unsuccessful.
In this embodiment, if the terminal and the wireless device satisfy the preset pairing connection condition, the terminal is triggered to send a pairing connection request to the wireless device, and when the wireless device receives the pairing connection request, a response connection success message is fed back to the terminal, the pairing connection success is displayed on a window according to the response connection signal, and if the pairing connection is successful, the window is closed after the pairing connection is successfully displayed on the window. Therefore, when the wireless equipment and the terminal meet the matching condition, the window is immediately popped up, the automatic connection state information of the terminal and the wireless equipment is displayed, the page automatically disappears after the matching is successful, and the user does not need to do other actions, so that the operation is simple. And if the connection state information is unsuccessful in pairing connection, delaying the preset waiting time and then performing pairing connection again according to the response connection signal. When the terminal and the wireless equipment are unsuccessfully paired for the first time, the mobile phone can automatically pair the wireless equipment again, the prompt page which can be popped up at the moment can not be closed, the window of pairing connection is automatically closed after 3-5 seconds of delay after final failure of pairing, and when the page prompts that the user can click a shortcut key to open the Bluetooth for setting before the page is automatically closed.
Further, in another embodiment of the connection method of the present invention and a wireless device, the method further includes:
step 40, when the number of the wireless devices meeting the preset rule is at least two, determining a target wireless device connected with the terminal according to the selection instruction;
step 50, sending a connection request to connect the terminal with the target wireless device.
In this embodiment, when the terminal detects that the number of the wireless devices satisfies the preset rule, the terminal determines a target wireless device to which the terminal is connected according to the selection instruction, and sends a connection request to connect the terminal and the target wireless device. The selection instruction may be voice control, or may be selected through an interface.
For example, when the terminal detects A, B that both wireless devices satisfy the preset rule, a voice control instruction "please connect to device a" may be input to the terminal, and the terminal may further click to connect to device a by opening an application interface of the terminal and send a connection request to device a, so that the terminal connects to device a.
Further, in another embodiment of the connection method of the present invention and a wireless device, the method further includes:
step 60, the terminal acquires the equipment information of the wireless equipment;
and step 61, if the equipment information is matched with the equipment information stored in the terminal, sending a connection request to connect the wireless equipment.
In this embodiment, the terminal acquires the device information of the wireless device, and sends a connection request to connect to the wireless device if the device information matches the device information stored in the terminal. Wherein the device information may be an identification of the wireless device. For example, the terminal acquires the device identifier of the wireless headset, and if the terminal recognizes that the device identifier of the wireless headset matches the stored wireless device identifier, the terminal directly sends a connection request to connect the terminal with the wireless device.
In some embodiments, according to the identifier sent by the wireless device, when the pairing connection between the terminal and the wireless device is successful, the identifier of the wireless device is stored, and if the terminal is turned on again or the pairing connection between the terminal and the wireless device is performed again within a preset distance range, the terminal detects that the stored identifier of the wireless device matches the identifier of the wireless device, and sends a pairing connection request to the wireless device.
Furthermore, an embodiment of the present invention further provides a readable storage medium (i.e., a computer readable memory) having a connection program stored thereon, where the connection program is executed by a processor to implement the following operations:
s10, detecting the change situation of the distance, wherein the distance is the distance between the terminal and at least one wireless device;
s20, judging whether the distance change condition meets a preset rule or not;
and S30, if yes, sending a connection request to connect the terminal and the wireless device.
Further, the distance variation condition includes at least one of: distance variation, distance variation rule and distance variation speed;
the step S10 includes:
acquiring distance information between the terminal and the wireless equipment according to a preset time interval;
acquiring distance variation according to the distance information; and/or the presence of a gas in the gas,
obtaining a distance change rule according to the distance information and/or preset duration; and/or the presence of a gas in the gas,
and acquiring the distance change speed according to the distance information and/or the preset time length.
Further, whether the distance variation satisfies a first preset condition or not;
whether the distance change rule meets a second preset condition or not;
whether the distance change speed reaches a preset speed threshold value.
Further, if the distance variation is greater than or equal to a preset variation value, determining that the distance variation condition meets the first preset condition; and/or the presence of a gas in the gas,
and if the distance variation is smaller than a preset variation value, judging that the distance variation condition does not meet the first preset condition.
Further, if the distance change rule is that the distance is reduced, it is determined that the distance change condition meets the second preset condition; and/or the presence of a gas in the gas,
and if the distance change rule is that the distance is increased and is within the preset distance range, judging that the distance change condition meets the second preset condition.
Further, the connection program with the wireless device when executed by the processor further performs the following operations:
acquiring connection state information of the terminal and the wireless equipment;
if the connection state information is successful, outputting a connection success prompt; and/or the presence of a gas in the gas,
and if the connection state information is unsuccessful, outputting a connection unsuccessful prompt and/or retransmitting a connection request.
Further, when the number of the wireless devices meeting the preset rule is at least two, determining a target wireless device connected with the terminal according to a selection instruction;
and sending a connection request to enable the terminal to be connected with the target wireless equipment.
Further, the terminal acquires the device information of the wireless device;
and if the equipment information is matched with the equipment information stored in the terminal, sending a connection request to connect with the wireless equipment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method of connecting with a wireless device, the method comprising:
s10, detecting the change situation of the distance, wherein the distance is the distance between the terminal and at least one wireless device;
s20, judging whether the distance change condition meets a preset rule or not;
and S30, if yes, sending a connection request to connect the terminal and the wireless device.
2. The method of claim 1,
the distance variation includes at least one of: distance variation, distance variation rule and distance variation speed;
the step S10 includes:
acquiring distance information between the terminal and the wireless equipment according to a preset time interval;
acquiring distance variation according to the distance information; and/or the presence of a gas in the gas,
obtaining a distance change rule according to the distance information and/or preset duration; and/or the presence of a gas in the gas,
and acquiring the distance change speed according to the distance information and/or the preset time length.
3. The method of claim 2, wherein the preset rules include at least one of:
whether the distance variation meets a first preset condition or not;
whether the distance change rule meets a second preset condition or not;
whether the distance change speed reaches a preset speed threshold value.
4. The method according to claim 3, wherein whether the distance variation satisfies a first preset condition comprises:
if the distance variation is larger than or equal to a preset variation value, judging that the distance variation condition meets the first preset condition; and/or the presence of a gas in the gas,
and if the distance variation is smaller than a preset variation value, judging that the distance variation condition does not meet the first preset condition.
5. The method of claim 3, wherein whether the distance variation law satisfies a second preset condition comprises:
if the distance change rule is that the distance is reduced, judging that the distance change condition meets the second preset condition; and/or the presence of a gas in the gas,
and if the distance change rule is that the distance is increased and is within the preset distance range, judging that the distance change condition meets the second preset condition.
6. The method according to any one of claims 1 to 5, wherein after the step S30, comprising:
acquiring connection state information of the terminal and the wireless equipment;
if the connection state information is successful, outputting a connection success prompt; and/or the presence of a gas in the gas,
and if the connection state information is unsuccessful, outputting a connection unsuccessful prompt and/or retransmitting a connection request.
7. The method of any of claims 1 to 5, further comprising:
when the number of the wireless devices meeting the preset rule is at least two, determining a target wireless device connected with the terminal according to a selection instruction;
and sending a connection request to enable the terminal to be connected with the target wireless equipment.
8. The method of any of claims 1 to 5, further comprising:
the terminal acquires equipment information of the wireless equipment;
and if the equipment information is matched with the equipment information stored in the terminal, sending a connection request to connect with the wireless equipment.
9. A terminal, characterized in that the terminal comprises: memory, processor and program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the method of connecting to a wireless device according to any of claims 1 to 8.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of connection with a wireless device according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911117766.7A CN110831114A (en) | 2019-11-14 | 2019-11-14 | Connection method with wireless device, terminal and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911117766.7A CN110831114A (en) | 2019-11-14 | 2019-11-14 | Connection method with wireless device, terminal and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110831114A true CN110831114A (en) | 2020-02-21 |
Family
ID=69555544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911117766.7A Pending CN110831114A (en) | 2019-11-14 | 2019-11-14 | Connection method with wireless device, terminal and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110831114A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113207087A (en) * | 2021-04-27 | 2021-08-03 | 上海闻泰信息技术有限公司 | Wireless communication device connection method, system, wireless communication device and storage medium |
CN114356121A (en) * | 2021-12-06 | 2022-04-15 | 深圳市千分一智能技术有限公司 | Method and device for judging use of active pen, active pen and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130152168A1 (en) * | 2011-12-09 | 2013-06-13 | Verizon Patent And Licensing, Inc. | Wireless connection method and device |
CN105228261A (en) * | 2014-06-13 | 2016-01-06 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
WO2016192350A1 (en) * | 2015-06-02 | 2016-12-08 | 深圳市文鼎创数据科技有限公司 | Pairing connection method and system for terminal devices |
JP2017041716A (en) * | 2015-08-19 | 2017-02-23 | 日本電気株式会社 | Communication device, communication system, communication method, and communication program |
EP3313149A2 (en) * | 2016-10-19 | 2018-04-25 | Hiasset GmbH | Communication method |
-
2019
- 2019-11-14 CN CN201911117766.7A patent/CN110831114A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130152168A1 (en) * | 2011-12-09 | 2013-06-13 | Verizon Patent And Licensing, Inc. | Wireless connection method and device |
CN105228261A (en) * | 2014-06-13 | 2016-01-06 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
WO2016192350A1 (en) * | 2015-06-02 | 2016-12-08 | 深圳市文鼎创数据科技有限公司 | Pairing connection method and system for terminal devices |
JP2017041716A (en) * | 2015-08-19 | 2017-02-23 | 日本電気株式会社 | Communication device, communication system, communication method, and communication program |
EP3313149A2 (en) * | 2016-10-19 | 2018-04-25 | Hiasset GmbH | Communication method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113207087A (en) * | 2021-04-27 | 2021-08-03 | 上海闻泰信息技术有限公司 | Wireless communication device connection method, system, wireless communication device and storage medium |
CN114356121A (en) * | 2021-12-06 | 2022-04-15 | 深圳市千分一智能技术有限公司 | Method and device for judging use of active pen, active pen and computer storage medium |
CN114356121B (en) * | 2021-12-06 | 2023-07-14 | 深圳市千分一智能技术有限公司 | Active pen use discriminating method and apparatus, active pen and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111107667B (en) | Bluetooth headset pairing method and device and readable storage medium | |
CN109284144B (en) | Fast application processing method and mobile terminal | |
CN108196922B (en) | Method for opening application, terminal and computer readable storage medium | |
CN108958593B (en) | Method for determining communication object and mobile terminal | |
CN108287655A (en) | A kind of interface display method, interface display apparatus and mobile terminal | |
CN107741814B (en) | Display control method and mobile terminal | |
CN109215640B (en) | Speech recognition method, intelligent terminal and computer readable storage medium | |
CN110096203B (en) | Screenshot method and mobile terminal | |
CN110795002A (en) | Screenshot method and terminal equipment | |
CN111818499B (en) | Quick pairing method, device, equipment and computer readable storage medium | |
CN108762613B (en) | State icon display method and mobile terminal | |
CN107800869B (en) | Split screen display method, mobile terminal and storage medium | |
CN108009031B (en) | Application program control method and mobile terminal | |
CN108008892B (en) | Function starting method and terminal | |
CN109857673B (en) | Control identification method and device | |
CN110831114A (en) | Connection method with wireless device, terminal and readable storage medium | |
CN109639738B (en) | Voice data transmission method and terminal equipment | |
CN110944056A (en) | Interaction method, mobile terminal and readable storage medium | |
CN113314120B (en) | Processing method, processing apparatus, and storage medium | |
CN109067975B (en) | Contact person information management method and terminal equipment | |
CN111190515A (en) | Shortcut panel operation method, device and readable storage medium | |
CN110366182A (en) | A kind of data transmission method and terminal device | |
CN109164951B (en) | Mobile terminal operation method and mobile terminal | |
CN111352667A (en) | Information pushing method and electronic equipment | |
CN107835310B (en) | Mobile terminal setting method and mobile terminal |
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 |