CN110430562A - Bluetooth communication method and relevant apparatus - Google Patents

Bluetooth communication method and relevant apparatus Download PDF

Info

Publication number
CN110430562A
CN110430562A CN201910813726.XA CN201910813726A CN110430562A CN 110430562 A CN110430562 A CN 110430562A CN 201910813726 A CN201910813726 A CN 201910813726A CN 110430562 A CN110430562 A CN 110430562A
Authority
CN
China
Prior art keywords
bluetooth
equipment
distance
electronic equipment
bluetooth equipment
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.)
Granted
Application number
CN201910813726.XA
Other languages
Chinese (zh)
Other versions
CN110430562B (en
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.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications Co Ltd
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 Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to CN201910813726.XA priority Critical patent/CN110430562B/en
Publication of CN110430562A publication Critical patent/CN110430562A/en
Application granted granted Critical
Publication of CN110430562B publication Critical patent/CN110430562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present application discloses a kind of Bluetooth communication method and relevant apparatus, is applied to electronic equipment, comprising: determine the first distance of the electronic equipment and bluetooth equipment;Wherein, the first distance is less than the effective distance that Bluetooth communication connection is kept between the electronic equipment and the bluetooth equipment;Obtain the electronic equipment and the current second distance of the bluetooth equipment;Connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment is controlled according to the first distance and the second distance.The embodiment of the present application is conducive to the disconnection and connection that Bluetooth communication connects between flexible controlling electronic devices and bluetooth equipment.

Description

Bluetooth communication method and relevant apparatus
Technical field
This application involves technical field of electronic equipment, and in particular to a kind of Bluetooth communication method and relevant apparatus.
Background technique
With the fast development of the electronic equipments such as smart phone, the function of electronic equipment is more and more abundant and diversified, In, for bluetooth also at the standard configuration of electronic equipment at this stage, the type of Bluetooth electronic devices is more and more, such as Baffle Box of Bluetooth, indigo plant Tooth keyboard, bluetooth mouse, wearable device etc., smart phone can establish bluetooth connection with a variety of Bluetooth electronic devices, from And the function of abundant smart phone.
Currently, most of smart phone has reached 4.0 or more version of bluetooth, bluetooth 4.0 is the upgrading of 3.0 versions Version, compared with the more power saving of 3.0 versions, cost is lower, and 3 milliseconds of low latencies, overlength effectively connects distance, is generally used for bluetooth headset, indigo plant In the equipment such as tooth speaker, because improving modulation index, Bluetooth communication distance is also elongated, and maximum communication range can be more than 100 Rice.
Summary of the invention
The embodiment of the present application provides a kind of Bluetooth communication method and relevant apparatus, is conducive to help user flexibility control blue The disconnection and connection of tooth equipment.
In a first aspect, the embodiment of the present application provides a kind of Bluetooth communication method, it is applied to electronic equipment, the method packet It includes:
Determine the first distance of the electronic equipment and bluetooth equipment;Wherein, the first distance is less than the electronics and sets The effective distance of Bluetooth communication connection is kept between the standby and described bluetooth equipment;
Obtain the electronic equipment and the current second distance of the bluetooth equipment;
Bluetooth between the electronic equipment and the bluetooth equipment is controlled according to the first distance and the second distance Communication connects or disconnects.
Second aspect, the embodiment of the present application provide a kind of Bluetooth communication device, are applied to electronic equipment, the Bluetooth communication Device includes processing unit and communication unit, wherein
The processing unit, for determining the first distance of the electronic equipment and bluetooth equipment;Wherein, described first away from From the effective distance for being less than holding Bluetooth communication connection between the electronic equipment and the bluetooth equipment;And for passing through It states communication unit and obtains the electronic equipment and the current second distance of the bluetooth equipment;And for according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including controller, memory, communication interface and One or more programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned control Device processed executes, and above procedure is included the steps that for executing the instruction in the embodiment of the present application first aspect either method.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein above-mentioned computer-readable Storage medium storage is used for the computer program of electronic data interchange, wherein above-mentioned computer program executes computer such as Step some or all of described in the embodiment of the present application first aspect either method.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein above-mentioned computer program product Non-transient computer readable storage medium including storing computer program, above-mentioned computer program are operable to make to calculate Machine executes the step some or all of as described in the embodiment of the present application first aspect either method.The computer program product It can be a software installation packet.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Fig. 2A is a kind of flow diagram of Bluetooth communication method provided by the embodiments of the present application;
Fig. 2 B is a kind of reference view of bluetooth equipment information provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another Bluetooth communication method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of another Bluetooth communication method provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Fig. 6 is a kind of functional unit composition block diagram of Bluetooth communication device provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Electronic equipment may include the various handheld devices with wireless communication function, mobile unit, wearable device (example Such as smartwatch, Intelligent bracelet, pedometer), calculate equipment or be connected to other processing equipments of radio modem, with And various forms of user equipmenies (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) etc..For convenience of description, apparatus mentioned above is referred to as electronic equipment.
It describes in detail below to the embodiment of the present application.
Referring to Fig. 1, Fig. 1 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application, the electronic equipment Including processor, memory, signal processor, transceiver, touching display screen, bluetooth module, loudspeaker, microphone, at random deposit Access to memory (Random Access Memory, RAM) and camera etc..
Wherein, memory, signal processor, bluetooth module, touch screen, loudspeaker, microphone, RAM and camera and place Device connection is managed, transceiver is connect with signal processor.
Wherein, touching display screen can be liquid crystal display (Liquid Crystal Display, LCD), organic or nothing Machine light emitting diode (Organic Light-Emitting Diode, OLED), active matrix organic light emitting diode panel (Active Matrix/Organic Light Emitting Diode, AMOLED) etc..
Wherein, which can be common camera, be also possible to infrared photography, can be front camera or postposition Camera is not limited thereto.
Wherein, sensor comprises at least one of the following: photosensitive sensors, gyroscope, infrared proximity transducer, fingerprint sensing Device, pressure sensor etc..Wherein, photosensitive sensors, also referred to as ambient light sensor, for detecting environmental light brightness.Light Sensor may include light-sensitive element and analog-digital converter.Wherein, light-sensitive element is used to the optical signal of acquisition being converted to telecommunications Number, analog-digital converter is used to above electrical signal being converted to digital signal.Optionally, light sensor can also be put including signal Big device, signal amplifier export after can amplifying the electric signal that light-sensitive element is converted to analog-digital converter.It is above-mentioned photosensitive Element may include at least one of photodiode, phototriode, photo resistance, silicon photocell.
Wherein, processor is the control centre of electronic equipment, utilizes various interfaces and the entire electronic equipment of connection Various pieces by running or execute the software program and/or module that are stored in memory, and are called and are stored in memory Interior data execute the various functions and processing data of electronic equipment, to carry out integral monitoring to electronic equipment.
Wherein, processor can integrate application processor and modem processor, wherein application processor mainly handles behaviour Make system, user interface and application program etc., modem processor mainly handles wireless communication.It is understood that above-mentioned Modem processor can not also be integrated into the processor.
Wherein, memory is stored in the software of memory by operation for storing software program and/or module, processor Program and/or module, thereby executing the various function application and data processing of electronic equipment.Memory can mainly include storage Program area and storage data area, wherein storing program area can software program needed for storage program area, at least one function Deng;Storage data area, which can be stored, uses created data etc. according to electronic equipment.In addition, memory may include high speed with Machine access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or its His volatile solid-state part.
Wherein, the bluetooth equipment connection radio network informations such as data and first distance are stored in memory.
Fig. 2A is please referred to, Fig. 2A is that the embodiment of the present application provides a kind of flow diagram of Bluetooth communication method, application In electronic equipment.As shown, this Bluetooth communication method includes:
S201, the electronic equipment determine the first distance of the electronic equipment and bluetooth equipment;Wherein, described first away from From the effective distance for being less than holding Bluetooth communication connection between the electronic equipment and the bluetooth equipment.
Wherein, bluetooth equipment can be that bluetooth keyboard, bluetooth mouse, Baffle Box of Bluetooth, Bluetooth watch, bracelet etc. are wearable to be set Any one in standby.When Bluetooth pairing between the electronic equipment and bluetooth equipment detected is requested, first determine that electronics is set Standby and bluetooth equipment first distance, first distance, which is less than between television equipment and bluetooth equipment, keeps having for Bluetooth communication connection Distance is imitated, thus using first distance as the finger established between controlling electronic devices and bluetooth equipment and disconnection Bluetooth communication connects Mark.
Wherein, first distance can be input by user, i.e., user can be according to different usage scenarios, in electronic equipment Different first distances is inputted when carrying out Bluetooth pairing with bluetooth equipment, or is carried out in electronic equipment and different bluetooth equipments Different first distances is inputted when Bluetooth pairing.Meanwhile first distance is also possible to what cell phone manufacturer determined, for example, mobile phone vendor Quotient to the use habit of different bluetooth equipments, configures different first distances according to user for different Bluetooth devices, and the One distance is less than the effective distance that bluetooth equipment keeps Bluetooth communication to connect with electronic equipment, in this way, user flexibility control can be helped The disconnection and connection that Bluetooth communication connects between electronic equipment and bluetooth equipment processed.
Wherein, in the case where user inputs first distance, it can be electronic equipment in detection first time and bluetooth equipment In the case where carrying out Bluetooth pairing, the notification message for prompting user to input first distance is exported, user is seeing that notice disappears It can choose and ignore after breath, also can choose and be manually entered first distance.First distance is that user wants electronic equipment and bluetooth The effective distance that Bluetooth communication is kept between equipment, for example, the Bluetooth communication effective distance of mobile phone and bluetooth keyboard script is 10 Rice, when distance between the two is greater than 10 meters, Bluetooth communication connection between the two can disconnect automatically, when distance is less than 10 meters Bluetooth communication connection between the two can restore automatically again, but user can be in mobile phone and bluetooth keyboard first time Bluetooth pairing When input first distance be 5 meters, then may be implemented detect between the two distance be greater than 5 meters when disconnect automatically Bluetooth communication connect It connects, just restores Bluetooth communication connection when distance is less than 5 meters, realize and user is helped to control indigo plant between mobile phone and bluetooth keyboard in advance The disconnection of tooth communication connection, while delaying the connection of Bluetooth communication connection between control mobile phone and bluetooth keyboard.
Wherein, the Bluetooth pairing request between electronic equipment and bluetooth equipment, can be electronic equipment and sends out to bluetooth equipment It rises, is also possible to what bluetooth equipment was initiated to electronic equipment.Detecting that the bluetooth between electronic equipment and bluetooth equipment matches When to request, Bluetooth pairing request can refer to that pairing when first time Bluetooth pairing between electronic equipment and bluetooth equipment is asked It asks, is also possible to the pairing request that Bluetooth pairing is between each electronic equipment and bluetooth equipment, detecting the Bluetooth pairing The first distance of electronic equipment and bluetooth equipment can be determined after request, and goes replacement electronic equipment and bluetooth to set with first distance The effective distance of Bluetooth communication connection is kept between standby.
S202, the electronic equipment obtain the electronic equipment and the current second distance of the bluetooth equipment.
Wherein, it then can determine that electronic equipment and bluetooth are set after Bluetooth pairing success between electronic equipment and bluetooth equipment Standby current second distance, and then judge the relationship between second distance and first distance, pass through real-time detection and obtain electronics The disconnected of the Bluetooth communication of flexible controlling electronic devices and bluetooth equipment may be implemented in second distance between equipment and bluetooth equipment It opens and connects.
S203, the electronic equipment control the electronic equipment and described according to the first distance and the second distance Bluetooth communication connects or disconnects between bluetooth equipment.
Wherein, it by the way that the current second distance of electronic equipment and bluetooth equipment and first distance to be compared, can control What Bluetooth communication connected between electronic equipment and bluetooth equipment processed is connected and disconnected from, and original electronic equipment is substituted in first distance Between bluetooth equipment keep Bluetooth communication connection effective distance, and first distance be it is variable, can carry out at any time more Change, therefore ensure that the first distance of different Bluetooth devices can be different, same equipment under different scenes first away from From can be different, therefore be conducive to help Bluetooth communication connection between user flexibility controlling electronic devices and bluetooth equipment It disconnects and connects.As shown in Figure 2 B, user can check bluetooth equipment information, can see from bluetooth equipment information, and electricity Sub- equipment was established in multiple bluetooth equipments of Bluetooth communication connection, and the first distance of different Bluetooth devices can be different, Such as shown in Fig. 2 B, the first distance of bracelet, Baffle Box of Bluetooth and bluetooth headset is 10 meters, the of bluetooth keyboard and bluetooth mouse One distance is 5 meters.In addition, user can also be directed to same bluetooth equipment, it is arranged different the under different usage scenarios for it One distance, for example, be directed to bluetooth headset, user use at home bluetooth headset when can for its be arranged first distance be 10 meters, use It can be 15 meters for its setting first distance that family, which is used outside bluetooth headset to be, be set according to different usage scenarios for bluetooth equipment Different first distances is set, is conducive to improve flexibility and diversity that bluetooth equipment uses.
For example, electronic equipment is mobile phone, and bluetooth equipment is bluetooth keyboard, when mobile phone and bluetooth in a kind of scene After keyboard establishes bluetooth connection, information is inputted in order to facilitate user and increases mobile phone interface editing area display area, mobile phone is defeated The dummy keyboard for entering method can stash, so that mobile phone interface has bigger area to show input information, but may deposit It temporarily picks up mobile phone in user and leaves and be placed with the desk of bluetooth keyboard, while not walking out the bluetooth of bluetooth keyboard and mobile phone again Join domain, such as join domain are in 10 meters, and user wants to input some editor's information on mobile phone at this time, needs user hand Dynamic circuit breaker opens the bluetooth connection of mobile phone and bluetooth keyboard or the Bluetooth function of closing hand phone, and the dummy keyboard of mobile phone just can be used It shows to carry out information input, by Bluetooth communication method provided by the embodiments of the present application, user is in mobile phone and bluetooth When keyboard carries out Bluetooth pairing, the first distance between mobile phone and bluetooth keyboard, such as 2 meters, general mobile phone and bluetooth are first determined 2 meters of keyboard distance may indicate that user at this time when remote and will not think the input keyboard for using bluetooth keyboard as mobile phone again, at this point, mobile phone The effective distance for keeping Bluetooth communication to connect with bluetooth keyboard has become 2 meters of first distance via 10 meters most started, therefore, When detecting that the distance between mobile phone and bluetooth keyboard is more than 2 meters, the Bluetooth communication between mobile phone and bluetooth keyboard connects meeting It is automatic to disconnect, by disconnecting Bluetooth communication connection in advance, be conducive to that user is helped to use cell phone keyboard in advance.
Again for example, in another scene, electronic equipment is mobile phone, and bluetooth equipment is Baffle Box of Bluetooth, Baffle Box of Bluetooth It is placed on parlor, when user holds mobile phone at parlor, the Baffle Box of Bluetooth in parlor can be connected by mobile phone, pass through Baffle Box of Bluetooth Play the music on mobile phone, listen to wechat speech message etc., but after user returns to bedroom, and between bedroom and parlor away from From without departing from the effective distance for keeping Bluetooth communication connection between mobile phone and Baffle Box of Bluetooth, such as 15 meters, user is returned at this time Behind bedroom, the Baffle Box of Bluetooth in parlor is still playing the music on mobile phone, and user hand dynamic circuit breaker is needed to open mobile phone and Baffle Box of Bluetooth The Bluetooth function of bluetooth connection or closing hand phone could be mentioned in bedroom by mobile phone to play music by the embodiment of the present application The Bluetooth communication method of confession, in the case that the distance between bedroom and parlor has been more than 10 meters but has been less than 15 meters, Yong Huke To input first distance, such as 10 meters when mobile phone and Baffle Box of Bluetooth carry out Bluetooth pairing, thus, user returns to bedroom from parlor Afterwards, it will automatically switch to by mobile phone to play music, Baffle Box of Bluetooth stops the broadcasting of music in time.
Wherein, after carrying out pairing setting to multiple bluetooth equipments, as shown in Figure 2 B, user can be by checking that bluetooth is set Standby information, determines effective distance, the first distance information that multiple bluetooth equipments that Bluetooth communication connects were established with electronic equipment, From Fig. 2 B it can be seen that, the effective distance and first distance of bracelet be it is identical, show during pairing user not into Row distance modification, it can be seen that user modifies effective Bluetooth communication distance range of Baffle Box of Bluetooth for 10 meters by 15 meters, will Effective Bluetooth communication distance range of bluetooth keyboard is modified by 10 meters for 5 meters, by effective Bluetooth communication distance of bluetooth mouse By 10 meters of modifications for 5 meters, by effective Bluetooth communication distance range of bluetooth headset by 20 meters of modifications for 10 meters, in addition, with Family can also cancel first distance by choosing whether to reset, make electronic equipment and bluetooth equipment according to most start it is effective away from It is connected from Bluetooth communication is established.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
In a possible example, the first distance of the determination electronic equipment and bluetooth equipment, comprising: examining When measuring the Bluetooth pairing request between the bluetooth equipment and the electronic equipment, the electronic equipment and the bluetooth are determined Use state between equipment, the use state include separate state of the electronic equipment far from the bluetooth equipment, with And the electronic equipment is close to the close state of the bluetooth equipment;The first distance is determined according to the use state.
Wherein, the use state between electronic equipment and bluetooth equipment includes that can pass through close to state and far from state Notes of Key Data user carries notification message of the electronic equipment far from the bluetooth equipment, or prompt user carries the electricity Sub- equipment obtains close to the notification message of the bluetooth equipment and determines whether electronic equipment and bluetooth equipment are in far from state With close to state, so that it is determined that first distance input by user.
As it can be seen that determine that the mode of first distance can be determined first makes between electronic equipment and bluetooth equipment in this example With state, prompt user can first be exported by determining when use state carries electronic equipment far from bluetooth equipment, or carries electronics Equipment is manually entered a distance value compared to by user, user is defeated in this way close to the notification message of bluetooth equipment The first distance entered allows user to estimate the practical length of first distance, more reliability.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment disconnects The minimum range of Bluetooth communication connection;Use state between the determination electronic equipment and the bluetooth equipment, comprising: Output is for prompting user to carry notification message of the electronic equipment far from the bluetooth equipment;Detecting that the electronics sets When the distance between standby and described bluetooth equipment increases, determine that the electronic equipment and the bluetooth equipment are in far from state; It is described that the first distance is determined according to the use state, comprising: to detect the electronic equipment and the bluetooth equipment The distance between when not changing, determine the electronic equipment and the current distance of the bluetooth equipment be described first away from From.
It wherein, is to need user defeated in first distance when determining the first distance between electronic equipment and bluetooth equipment In the case where entering, electronic equipment can be exported when detecting Bluetooth pairing request for prompting user to input first distance Prompting message, the form that user inputs first distance can be prompt user and directly input a digital distance, be also possible to mention Show that user carries electronic equipment far from bluetooth equipment, or carry bluetooth equipment far from electronic equipment, user is seeing the notice After message, it can choose carrying electronic equipment and suitably stop after far from bluetooth equipment to one, and the time stopped is big It in preset duration, is greater than 3 seconds, is detecting that the distance between electronic equipment and bluetooth equipment is to change and do not occur When the duration of variation is greater than 3 seconds, it may be determined that electronic equipment and the current distance of bluetooth equipment are first distance.
For example, electronic equipment is mobile phone, bluetooth equipment is Baffle Box of Bluetooth, when user is broadcast in parlor using Baffle Box of Bluetooth After music on putting the cell phone, mobile phone can disconnect the company of the bluetooth between Baffle Box of Bluetooth automatically when user wants to return to bedroom It connects, but the actual range between bedroom and parlor can not be determined clearly in user, if being manually entered a distance by user Value may result in and generate certain error, and therefore, user can choose during mobile phone and Baffle Box of Bluetooth pairing, take Band mobile phone returns to bedroom from parlor and stops 3 seconds or more, be equivalent to using the current distance of mobile phone and Baffle Box of Bluetooth as first away from From and inform mobile phone, after each user's carrying mobile phone goes to bedroom from parlor later, mobile phone can all disconnect Bluetooth communication automatically Connection discharges Baffle Box of Bluetooth.
As it can be seen that determining that the mode of first distance can be to prompt user to carry electronic equipment far from bluetooth in this example Equipment, or notification message of the bluetooth equipment far from electronic equipment is carried, it is manually entered a distance value compared to by user, The first distance that user inputs in this way allows user to estimate the practical length of first distance, more reliability.
It is described that the electronic equipment is controlled according to the first distance and the second distance in a possible example The connection and disconnection that Bluetooth communication connects between the bluetooth equipment, comprising: detecting that the second distance is greater than described the One apart from when, control the electronic equipment and disconnect Bluetooth communication connection between the bluetooth equipment.
Wherein, first distance, which can be, is used to indicate the most narrow spacing that electronic equipment is connected with bluetooth equipment disconnection Bluetooth communication From for example, electronic equipment is mobile phone, bluetooth equipment is Baffle Box of Bluetooth, keeps the effective distance of Bluetooth communication connection between the two It is 15 meters, if first distance is 10 meters, when detecting that the distance between mobile phone and Baffle Box of Bluetooth is greater than 10 meters, can disconnects Bluetooth communication connection between mobile phone and Baffle Box of Bluetooth.At this point, bluetooth equipment and electronic equipment establish that Bluetooth communication connects away from From can be 10 meters.
As it can be seen that first distance is to disconnect the distance of Bluetooth communication connection between electronic equipment and bluetooth equipment in this example, The effective distance that electronic equipment is connected with the separated Bluetooth communication of bluetooth equipment is replaced at this time for first distance, therefore, right The distance for disconnecting Bluetooth communication connection, which is modified, will affect the distance for establishing Bluetooth communication connection, have since first distance is less than Distance is imitated, is conducive to that electronic equipment is helped to disconnect the communication connection between bluetooth equipment in advance.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment is established The maximum distance of Bluetooth communication connection;Use state between the determination electronic equipment and the bluetooth equipment, comprising: Output is for prompting user to carry the electronic equipment close to the notification message of the bluetooth equipment;Detecting that the electronics sets When the distance between standby and described bluetooth equipment reduces, determine that the electronic equipment and the bluetooth equipment are in close to state; It is described that the first distance is determined according to the use state, comprising: to detect the electronic equipment and the bluetooth equipment The distance between when not changing, determine the electronic equipment and the current distance of the bluetooth equipment be described first away from From.
Wherein, first distance is used to indicate between electronic equipment and bluetooth equipment, establish Bluetooth communication connection it is maximum away from From just can be achieved to establish Bluetooth communication connection, example after that is, the distance between electronic equipment and bluetooth equipment are less than first distance Such as, electronic equipment is mobile phone, and bluetooth equipment is Baffle Box of Bluetooth, and keeping the effective distance of Bluetooth communication connection between the two is 15 Rice, first distance are 8 meters, then when detecting the distance between mobile phone and Baffle Box of Bluetooth less than 8 meters, could establish mobile phone and indigo plant Bluetooth communication connection between tooth speaker, but the distance that bluetooth equipment is connected with electronic equipment disconnection Bluetooth communication can be still It is 15 meters, it is seen then that established after the distance that Bluetooth communication connects is modified to electronic equipment and bluetooth equipment, will not influence electronics The distance of the separated Bluetooth communication of equipment and bluetooth equipment.
As it can be seen that first distance is to establish the distance that Bluetooth communication connects between electronic equipment and bluetooth equipment in this example, The effective distance that Bluetooth communication connection is established between electronic equipment and bluetooth equipment is replaced at this time for first distance, due to building The distance of vertical Bluetooth communication connection, which is modified, will not influence the distance for disconnecting Bluetooth communication connection, and first distance is less than and has Distance is imitated, therefore is conducive to that electronic equipment is helped to disconnect the communication connection between bluetooth equipment in advance.
It is described that the electronic equipment is controlled according to the first distance and the second distance in a possible example The connection and disconnection that Bluetooth communication connects between the bluetooth equipment, comprising: detecting the second distance less than or equal to institute When stating first distance, the Bluetooth communication connection that the electronic equipment is established between the bluetooth equipment is controlled.
As it can be seen that in this example, by being modified to the distance for establishing Bluetooth communication between electronic equipment and bluetooth equipment, So that bluetooth equipment needs are connected with electronic equipment apart from the closer Bluetooth communication that could establish, therefore it is possible to prevente effectively from misconnection The case where, improve the reliability of Bluetooth communication connection.
It is described to obtain the electronic equipment and the current second distance of the bluetooth equipment in a possible example, It include: to determine that the electronic equipment and the bluetooth are set after the electronic equipment and bluetooth equipment Bluetooth pairing success Received signal strength indicator RSSI between standby;Determine that the electronic equipment and the bluetooth equipment are current according to the RSSI Second distance.
Wherein, received signal strength indicator (ReceivedSignalStrengthIndicator, RSSI), its realization It is to be carried out after backward channel Baseband Receiver filter, since RSSI is then anti-by carrying out power integral in numeric field Shift what antenna opening obtained onto, the inconsistent precision that will affect RSSI of backward channel signal transmission feature, the unit of RSSI is Dbm can be directly interpreted as in bluetooth, receive the intensity of Bluetooth signal, and RSSI=10*logP, P represent the signal received Power, bluetooth can send broadcast, and distance is different to will affect the signal power received.RSSI value is being obtained by power calculation Afterwards, following formula can be passed through:
D=10(|RSSI|-A)/10*n
The distance of Bluetooth communication is calculated.Wherein, d is represented according to RSSI value calculated distance, A representation signal hair Penetrate end and signal strength when receiving end is separated by 1 meter, n be the environmental attenuation factor this, value is generally between 3.24-4.5.Citing Illustrate, is established between electronic equipment and bluetooth equipment after Bluetooth communication connection, the bluetooth first received according to electronic equipment RSSI value is calculated in signal power P, and the distance d of electronic equipment and bluetooth equipment at this time is calculated further according to RSSI value.
As it can be seen that in this example, when determining electronic equipment and the current second distance of bluetooth equipment, electronics can be first determined Received signal strength indicator RSSI between equipment and bluetooth equipment, is calculated electronic equipment and bluetooth equipment further according to RSSI Current second distance is conducive to more accurately determine second distance.
In a possible example, the first distance of the determination electronic equipment and bluetooth equipment, comprising: determine Whether the bluetooth equipment is the bluetooth equipment preset in bluetooth equipment set;If so, determining the electronic equipment and the indigo plant First distance between tooth equipment.
Wherein, not all bluetooth equipment require obtain and determine first distance, thus use first distance as Judge the standard of Bluetooth communication connection on-off, user can by common bluetooth equipment, or need closely release bluetooth and The bluetooth equipment of connection bluetooth is added in advance in default bluetooth equipment set, is detecting the current bluetooth for carrying out Bluetooth pairing When equipment is the bluetooth equipment in default bluetooth equipment set, further determine between electronic equipment and bluetooth equipment away from From determining whether to need to be implemented Bluetooth communication method provided by the embodiments of the present application.
As it can be seen that can detect whether bluetooth equipment is default bluetooth equipment during carrying out Bluetooth pairing in this example Bluetooth equipment in set determines whether to need to be implemented Bluetooth communication method provided by the embodiments of the present application, meanwhile, may be used also Bluetooth pairing request is accidentally sent to electronic equipment to avoid strange bluetooth equipment, causes frequently to pop up prompting message, user is made The case where at interfering.
It is consistent with embodiment shown in described Fig. 2A, referring to Fig. 3, Fig. 3 is a kind of indigo plant provided by the embodiments of the present application The flow diagram of tooth communication means is applied to electronic equipment.As shown, this Bluetooth communication method includes:
S301, the electronic equipment determine the first distance of the electronic equipment and bluetooth equipment;Wherein, described first away from From the effective distance for being less than holding Bluetooth communication connection between the electronic equipment and the bluetooth equipment.
S302, the electronic equipment is after the electronic equipment and the bluetooth equipment Bluetooth pairing succeed, described in determination Received signal strength indicator RSSI between electronic equipment and the bluetooth equipment.
S303, the electronic equipment determine second of the electronic equipment and the bluetooth equipment currently according to the RSSI Distance.
S304, the electronic equipment control the electronic equipment and described according to the first distance and the second distance Bluetooth communication connects or disconnects between bluetooth equipment.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
In addition, can first determine electronic equipment and indigo plant when determining electronic equipment and the current second distance of bluetooth equipment Current the of electronic equipment and bluetooth equipment is calculated further according to RSSI in received signal strength indicator RSSI between tooth equipment Two distances are conducive to more accurately determine second distance.
It is consistent with described Fig. 2A, embodiment shown in Fig. 3, referring to Fig. 4, Fig. 4 is provided by the embodiments of the present application one The flow diagram of kind Bluetooth communication method, is applied to electronic equipment.As shown, this Bluetooth communication method includes:
S401, the electronic equipment determine whether the bluetooth equipment is the bluetooth equipment preset in bluetooth equipment set.
S402, if so, the electronic equipment determines the first distance between the electronic equipment and the bluetooth equipment, In, the first distance is less than the effective distance that Bluetooth communication connection is kept between the electronic equipment and the bluetooth equipment.
S403, the electronic equipment is after the electronic equipment and the bluetooth equipment Bluetooth pairing succeed, described in determination Received signal strength indicator RSSI between electronic equipment and the bluetooth equipment.
S404, the electronic equipment determine second of the electronic equipment and the bluetooth equipment currently according to the RSSI Distance.
S405, the electronic equipment control the electronic equipment and described according to the first distance and the second distance Bluetooth communication connects or disconnects between bluetooth equipment.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
In addition, can first determine electronic equipment and indigo plant when determining electronic equipment and the current second distance of bluetooth equipment Current the of electronic equipment and bluetooth equipment is calculated further according to RSSI in received signal strength indicator RSSI between tooth equipment Two distances are conducive to more accurately determine second distance.
In addition, can detect whether bluetooth equipment is the indigo plant preset in bluetooth equipment set during carrying out Bluetooth pairing Tooth equipment determines whether to need to be implemented Bluetooth communication method provided by the embodiments of the present application, strange at the same time it can also avoid Bluetooth equipment accidentally sends Bluetooth pairing request to electronic equipment, causes frequently to pop up prompting message, the feelings for interfering user Condition occurs.
It is consistent with described Fig. 2A, Fig. 3, embodiment shown in Fig. 4, referring to Fig. 5, Fig. 5 is that the embodiment of the present application provides A kind of electronic equipment 500 structural schematic diagram, the electronic equipment 500 operation have one or more application program and operation system System, as shown, the electronic equipment 500 includes processor 510, memory 520, communication interface 530 and one or more journeys Sequence 521, wherein one or more of programs 521 are stored in the memory 520, and are configured by the processing Device 510 executes, and one or more of programs 521 include the instruction for executing following steps;
Determine the first distance of the electronic equipment and bluetooth equipment;Wherein, the first distance is less than the electronics and sets The effective distance of Bluetooth communication connection is kept between the standby and described bluetooth equipment;
Obtain the electronic equipment and the current second distance of the bluetooth equipment;
Bluetooth between the electronic equipment and the bluetooth equipment is controlled according to the first distance and the second distance Communication connects or disconnects.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
In a possible example, in terms of the first distance of the determination electronic equipment and bluetooth equipment, institute It states the instruction in program to be specifically used for executing following operation: detecting the indigo plant between the bluetooth equipment and the electronic equipment When tooth pairing request, determine that the use state between the electronic equipment and the bluetooth equipment, the use state include institute Separate state of the electronic equipment far from the bluetooth equipment and the electronic equipment are stated close to the close shape of the bluetooth equipment State;The first distance is determined according to the use state.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment disconnects The minimum range of Bluetooth communication connection;Use state side between the determination electronic equipment and the bluetooth equipment Face, the instruction in described program are specifically used for executing following operation: output is separate for prompting user to carry the electronic equipment The notification message of the bluetooth equipment;When detecting that the distance between the electronic equipment and the bluetooth equipment increases, really The fixed electronic equipment and the bluetooth equipment are in far from state.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment is established The maximum distance of Bluetooth communication connection;Use state side between the determination electronic equipment and the bluetooth equipment Face, the instruction in described program are specifically used for executing following operation: output is close for prompting user to carry the electronic equipment The notification message of the bluetooth equipment;When detecting that the distance between the electronic equipment and the bluetooth equipment reduces, really The fixed electronic equipment and the bluetooth equipment are in close to state.
In a possible example, it is described the first distance is determined according to the use state in terms of, the journey Instruction in sequence is specifically used for executing following operation: detecting the distance between the electronic equipment and the bluetooth equipment not When changing, determines the electronic equipment and the current distance of the bluetooth equipment is the first distance.
In a possible example, in the current second distance of the acquisition electronic equipment and the bluetooth equipment Aspect, the instruction in described program are specifically used for executing following operation: matching in the electronic equipment and the bluetooth equipment bluetooth After success, the received signal strength indicator RSSI between the electronic equipment and the bluetooth equipment is determined;According to described RSSI determines the electronic equipment and the current second distance of the bluetooth equipment.
In a possible example, in terms of the first distance of the determination electronic equipment and bluetooth equipment, institute It states the instruction in program to be specifically used for executing following operation: determining whether the bluetooth equipment is in default bluetooth equipment set Bluetooth equipment;If so, determining the first distance between the electronic equipment and the bluetooth equipment.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is understood that , in order to realize the above functions, it comprises execute the corresponding hardware configuration of each function and/or software mould for electronic equipment Block.Those skilled in the art should be readily appreciated that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with Hardware or computer software drive the mode of hardware to execute, the specific application and design constraint item depending on technical solution Part.Professional technician can specifically realize described function to each using distinct methods, but this reality Now it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to electronic equipment, for example, can With each functional unit of each function division of correspondence, two or more functions can also be integrated in a control unit In.Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.It needs It is noted that be schematical, only a kind of logical function partition to the division of unit in the embodiment of the present application, it is practical real It is current that there may be another division manner.
Fig. 6 is the functional unit composition block diagram of device 600 involved in the embodiment of the present application.The Bluetooth communication device 600 are applied to electronic equipment, and Bluetooth communication device 600 includes processing unit 601 and communication unit 602, in which:
The processing unit 601, for determining the first distance of the electronic equipment and bluetooth equipment;Wherein, described One distance is less than the effective distance that Bluetooth communication connection is kept between the electronic equipment and the bluetooth equipment;And for leading to It crosses the communication unit 602 and obtains the electronic equipment and the current second distance of the bluetooth equipment;And for according to institute It states first distance and the second distance controls the connection of Bluetooth communication or disconnected between the electronic equipment and the bluetooth equipment It opens.
As can be seen that electronic equipment determines the first of the electronic equipment and bluetooth equipment first in the embodiment of the present application Distance;Wherein, the first distance, which is less than between the electronic equipment and the bluetooth equipment, keeps having for Bluetooth communication connection Imitate distance, secondly, obtain the electronic equipment and the current second distance of the bluetooth equipment, finally, according to described first away from From and the second distance control connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.Due to electricity Sub- equipment can when with bluetooth equipment Bluetooth pairing, first determine electronic equipment and bluetooth equipment first distance, use first away from From come replace between electronic equipment and bluetooth equipment keep Bluetooth communication connection effective distance, it is thus possible to according to first away from From and electronic equipment and the current second distance of bluetooth equipment, Bluetooth communication is disconnected between controlling electronic devices and bluetooth equipment It opens and connects, solve under current Bluetooth technology, super remote transmission range bring bluetooth equipment can not properly and timely discharge The problem of, be conducive to the on-off that Bluetooth communication connects between neatly controlling electronic devices and multiple bluetooth equipments.
In a possible example, in terms of the first distance of the determination electronic equipment and bluetooth equipment, institute Processing unit 601 is stated to be specifically used for: when detecting the Bluetooth pairing request between the bluetooth equipment and the electronic equipment, Determine that the use state between the electronic equipment and the bluetooth equipment, the use state include that the electronic equipment is separate The close state of the separate state of the bluetooth equipment and the electronic equipment close to the bluetooth equipment;And it is used for root The first distance is determined according to the use state.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment disconnects The minimum range of Bluetooth communication connection;Use state side between the determination electronic equipment and the bluetooth equipment Face, the processing unit 601 are specifically used for: output is for prompting user to carry the electronic equipment far from the bluetooth equipment Notification message;And for described in when detecting that distance between the electronic equipment and the bluetooth equipment increases, determining Electronic equipment and the bluetooth equipment are in far from state.
In a possible example, the first distance is used to indicate the electronic equipment and the bluetooth equipment is established The maximum distance of Bluetooth communication connection;Use state side between the determination electronic equipment and the bluetooth equipment Face, the processing unit 601 are specifically used for: output is for prompting user to carry the electronic equipment close to the bluetooth equipment Notification message;And for described in when detecting that distance between the electronic equipment and the bluetooth equipment reduces, determining Electronic equipment and the bluetooth equipment are in close to state.
In a possible example, it is described the first distance is determined according to the use state in terms of, the place Reason unit 601 is specifically used for: when detecting that the distance between the electronic equipment and the bluetooth equipment does not change, really The fixed electronic equipment and the current distance of the bluetooth equipment are the first distance.
In a possible example, in the current second distance of the acquisition electronic equipment and the bluetooth equipment Aspect, the processing unit 601 are specifically used for: after the electronic equipment and bluetooth equipment Bluetooth pairing success, determining Received signal strength indicator RSSI between the electronic equipment and the bluetooth equipment;And for being determined according to the RSSI The electronic equipment and the current second distance of the bluetooth equipment.
In a possible example, in terms of the first distance of the determination electronic equipment and bluetooth equipment, institute It states processing unit 601 to be specifically used for: determining whether the bluetooth equipment is the bluetooth equipment preset in bluetooth equipment set;And For if so, determining the first distance between the electronic equipment and the bluetooth equipment.Wherein, the electronic equipment can also wrap Storage unit 603 is included, processing unit 601 and communication unit 602 can be controller or processor, and storage unit 603 can be Memory.
The embodiment of the present application also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity The computer program of subdata exchange, the computer program make computer execute any as recorded in above method embodiment Some or all of method step, above-mentioned computer include electronic equipment.
The embodiment of the present application also provides a kind of computer program product, and above-mentioned computer program product includes storing calculating The non-transient computer readable storage medium of machine program, above-mentioned computer program are operable to that computer is made to execute such as above-mentioned side Some or all of either record method step in method embodiment.The computer program product can be a software installation Packet, above-mentioned computer includes electronic equipment.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of said units, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, can integrate in a control unit in each functional unit in each embodiment of the application It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment above method of the application Step.And memory above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory May include: flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of Bluetooth communication method, which is characterized in that be applied to electronic equipment, which comprises
Determine the first distance of the electronic equipment and bluetooth equipment;Wherein, the first distance be less than the electronic equipment and The effective distance of Bluetooth communication connection is kept between the bluetooth equipment;
Obtain the electronic equipment and the current second distance of the bluetooth equipment;
Bluetooth communication between the electronic equipment and the bluetooth equipment is controlled according to the first distance and the second distance Connect or disconnect.
2. the method according to claim 1, wherein the first of the determination electronic equipment and bluetooth equipment Distance, comprising:
Detect between the bluetooth equipment and the electronic equipment Bluetooth pairing request when, determine the electronic equipment and Use state between the bluetooth equipment, the use state include the electronic equipment far from the separate of the bluetooth equipment The close state of state and the electronic equipment close to the bluetooth equipment;
The first distance is determined according to the use state.
3. method according to claim 1 or 2, which is characterized in that the first distance is used to indicate the electronic equipment The minimum range that Bluetooth communication connects is disconnected with the bluetooth equipment;The determination electronic equipment and the bluetooth equipment it Between use state, comprising:
Output is for prompting user to carry notification message of the electronic equipment far from the bluetooth equipment;
When detecting that distance between the electronic equipment and the bluetooth equipment increases, the electronic equipment and described is determined Bluetooth equipment is in far from state.
4. method according to claim 1 or 2, which is characterized in that the first distance is used to indicate the electronic equipment The maximum distance that Bluetooth communication connects is established with the bluetooth equipment;The determination electronic equipment and the bluetooth equipment it Between use state, comprising:
Output is for prompting user to carry the electronic equipment close to the notification message of the bluetooth equipment;
When detecting that distance between the electronic equipment and the bluetooth equipment reduces, the electronic equipment and described is determined Bluetooth equipment is in close to state.
5. the method according to claim 3 or 4, which is characterized in that described to determine described first according to the use state Distance, comprising:
When detecting that the distance between the electronic equipment and the bluetooth equipment does not change, the electronic equipment is determined It is the first distance with the current distance of the bluetooth equipment.
6. the method according to claim 1, wherein the acquisition electronic equipment and the bluetooth equipment are worked as Preceding second distance, comprising:
After the electronic equipment and bluetooth equipment Bluetooth pairing success, the electronic equipment and the bluetooth equipment are determined Between received signal strength indicator RSSI;
The electronic equipment and the current second distance of the bluetooth equipment are determined according to the RSSI.
7. the method according to claim 1, wherein the first of the determination electronic equipment and bluetooth equipment Distance, comprising:
Determine whether the bluetooth equipment is the bluetooth equipment preset in bluetooth equipment set;
If so, determining the first distance between the electronic equipment and the bluetooth equipment.
8. a kind of Bluetooth communication device, which is characterized in that be applied to electronic equipment, the Bluetooth communication device includes processing unit And communication unit, wherein
The processing unit, for determining the first distance of the electronic equipment and bluetooth equipment;Wherein, the first distance is small The effective distance of Bluetooth communication connection is kept between the electronic equipment and the bluetooth equipment;And for by described logical Letter unit obtains the electronic equipment and the current second distance of the bluetooth equipment;And for according to the first distance and The second distance controls connecting or disconnecting for Bluetooth communication between the electronic equipment and the bluetooth equipment.
9. a kind of electronic equipment, which is characterized in that including processor, memory, communication interface, and one or more programs, One or more of programs are stored in the memory, and are configured to be executed by the processor, described program packet Include the instruction for executing the step in the method according to claim 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that storage is used for the computer program of electronic data interchange, In, the computer program makes computer execute the method according to claim 1 to 7.
CN201910813726.XA 2019-08-30 2019-08-30 Bluetooth communication method and related device Active CN110430562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910813726.XA CN110430562B (en) 2019-08-30 2019-08-30 Bluetooth communication method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910813726.XA CN110430562B (en) 2019-08-30 2019-08-30 Bluetooth communication method and related device

Publications (2)

Publication Number Publication Date
CN110430562A true CN110430562A (en) 2019-11-08
CN110430562B CN110430562B (en) 2022-06-07

Family

ID=68418271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910813726.XA Active CN110430562B (en) 2019-08-30 2019-08-30 Bluetooth communication method and related device

Country Status (1)

Country Link
CN (1) CN110430562B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890905A (en) * 2019-11-22 2020-03-17 三星电子(中国)研发中心 Method for controlling audio output and electronic device using the same
CN112911560A (en) * 2021-01-20 2021-06-04 青岛海信网络科技股份有限公司 Electronic business card transmission method and device
CN112969167A (en) * 2021-02-02 2021-06-15 珠海格力电器股份有限公司 Equipment network distribution method, device and system, electronic equipment and storage medium
WO2021254294A1 (en) * 2020-06-16 2021-12-23 华为技术有限公司 Method for switching audio output channel, apparatus, and electronic device
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN114554006A (en) * 2020-11-25 2022-05-27 中兴通讯股份有限公司 Method, device, equipment and storage medium for switching call answering modes
CN114900786A (en) * 2022-04-15 2022-08-12 广州易而达科技股份有限公司 Bluetooth headset connection control method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080221877A1 (en) * 2007-03-05 2008-09-11 Kazuo Sumita User interactive apparatus and method, and computer program product
KR20140033677A (en) * 2012-09-10 2014-03-19 삼성전자주식회사 Method for executing application and device thereof
CN104468971A (en) * 2014-10-30 2015-03-25 小米科技有限责任公司 Method and device for connecting playing source
CN104735024A (en) * 2013-12-18 2015-06-24 国民技术股份有限公司 Network connection method between electronic devices, electronic devices and electronic device system
CN104978655A (en) * 2014-04-11 2015-10-14 上海智向信息科技有限公司 Near field payment connection and data exchange method and near field payment connection and data exchange system
CN105578397A (en) * 2015-12-29 2016-05-11 惠州Tcl移动通信有限公司 Mobile device realizing warning by state machine of Bluetooth protocol and method thereof
CN106228662A (en) * 2016-09-19 2016-12-14 北京达美盛软件股份有限公司 A kind of Intelligent entrance guard control system and control method
CN106941635A (en) * 2016-12-22 2017-07-11 北京小米移动软件有限公司 Audio amplifier connection method and device
CN108811178A (en) * 2018-05-31 2018-11-13 阿里巴巴集团控股有限公司 A kind of data interactive method, device and equipment
CN109451444A (en) * 2018-12-28 2019-03-08 桂林飞宇科技股份有限公司 A kind of stabilizer communication system and its method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080221877A1 (en) * 2007-03-05 2008-09-11 Kazuo Sumita User interactive apparatus and method, and computer program product
KR20140033677A (en) * 2012-09-10 2014-03-19 삼성전자주식회사 Method for executing application and device thereof
CN104735024A (en) * 2013-12-18 2015-06-24 国民技术股份有限公司 Network connection method between electronic devices, electronic devices and electronic device system
CN104978655A (en) * 2014-04-11 2015-10-14 上海智向信息科技有限公司 Near field payment connection and data exchange method and near field payment connection and data exchange system
CN104468971A (en) * 2014-10-30 2015-03-25 小米科技有限责任公司 Method and device for connecting playing source
CN105578397A (en) * 2015-12-29 2016-05-11 惠州Tcl移动通信有限公司 Mobile device realizing warning by state machine of Bluetooth protocol and method thereof
CN106228662A (en) * 2016-09-19 2016-12-14 北京达美盛软件股份有限公司 A kind of Intelligent entrance guard control system and control method
CN106941635A (en) * 2016-12-22 2017-07-11 北京小米移动软件有限公司 Audio amplifier connection method and device
CN108811178A (en) * 2018-05-31 2018-11-13 阿里巴巴集团控股有限公司 A kind of data interactive method, device and equipment
CN109451444A (en) * 2018-12-28 2019-03-08 桂林飞宇科技股份有限公司 A kind of stabilizer communication system and its method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WANG XIAO-PING 等: "Two approaches for resolving number limitations of the equipments connected in Bluetooth communication", 《2011 INTERNATIONAL CONFERENCE ON ELECTRIC INFORMATION AND CONTROL ENGINEERING》 *
李有文 等: "基于CC2541蓝牙技术的双向防丢器设计", 《机械工程与自动化》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890905A (en) * 2019-11-22 2020-03-17 三星电子(中国)研发中心 Method for controlling audio output and electronic device using the same
WO2021254294A1 (en) * 2020-06-16 2021-12-23 华为技术有限公司 Method for switching audio output channel, apparatus, and electronic device
CN113890929A (en) * 2020-06-16 2022-01-04 华为技术有限公司 Method and device for switching audio output channel and electronic equipment
CN114554006A (en) * 2020-11-25 2022-05-27 中兴通讯股份有限公司 Method, device, equipment and storage medium for switching call answering modes
CN112911560A (en) * 2021-01-20 2021-06-04 青岛海信网络科技股份有限公司 Electronic business card transmission method and device
CN112969167A (en) * 2021-02-02 2021-06-15 珠海格力电器股份有限公司 Equipment network distribution method, device and system, electronic equipment and storage medium
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN113891297B (en) * 2021-05-31 2022-08-02 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN114900786A (en) * 2022-04-15 2022-08-12 广州易而达科技股份有限公司 Bluetooth headset connection control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110430562B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN110430562A (en) Bluetooth communication method and relevant apparatus
CN112311930A (en) Terminal testing method and device, storage medium and mobile terminal
CN108132401A (en) Charge abnormal detection method, device, storage medium and mobile terminal
KR101769798B1 (en) Characteristic Configuration Method For Accessory of Portable Device And Accessory operation System supporting the same
CN102323911A (en) Wireless intercom parameter configuration method
CN106331359B (en) A kind of speech signal collection method, device and terminal
CN109639367A (en) The method of adjustment and Related product of electromagnetic interference
CN108574778A (en) Throw screen brightness adjusting method and Related product
CN108541080A (en) First electronic equipment and the second electronic equipment carry out the method and Related product of Hui Lian
CN105959483B (en) A kind of audio stream processing method and mobile terminal
CN105959482B (en) A kind of control method and electronic equipment of scene audio
CN109120683A (en) data transmission method and related product
CN108429575A (en) antenna switching method, mobile terminal and computer readable storage medium
CN107743178A (en) A kind of message player method and mobile terminal
CN106878915B (en) Control method, device and the playback equipment and mobile terminal of playback equipment
CN109067965A (en) Interpretation method, translating equipment, wearable device and storage medium
CN108965599A (en) Recall method for processing video frequency and Related product
CN109743129A (en) Electromagnetic interference control method and Related product
CN104301824B (en) Line traffic control equipment, controller, method and device
CN109348055A (en) Display control method and Related product
CN105611446B (en) Self-shooting bar recognition methods, device and mobile terminal
CN106506437A (en) A kind of audio data processing method, and equipment
CN109618420A (en) Link aggregation implementation method and Related product
CN108955759A (en) The wearing detection method and Related product of wearable device
CN108955758A (en) The wearing detection method and Related product of wearable device

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
GR01 Patent grant
GR01 Patent grant