CN110177357A - A kind of bluetooth management method, mobile terminal and computer storage medium - Google Patents

A kind of bluetooth management method, mobile terminal and computer storage medium Download PDF

Info

Publication number
CN110177357A
CN110177357A CN201910413498.7A CN201910413498A CN110177357A CN 110177357 A CN110177357 A CN 110177357A CN 201910413498 A CN201910413498 A CN 201910413498A CN 110177357 A CN110177357 A CN 110177357A
Authority
CN
China
Prior art keywords
mobile terminal
bluetooth
agreement
service class
peripheral 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
CN201910413498.7A
Other languages
Chinese (zh)
Other versions
CN110177357B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910413498.7A priority Critical patent/CN110177357B/en
Publication of CN110177357A publication Critical patent/CN110177357A/en
Application granted granted Critical
Publication of CN110177357B publication Critical patent/CN110177357B/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/50Service provisioning or reconfiguring
    • 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
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • 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

Abstract

This application discloses a kind of bluetooth management method, mobile terminal and computer storage medium, which includes: mobile terminal when starting bluetooth, opens the corresponding service class of all application protocols;Determine the target application agreement that targeted peripheral device is supported;Wherein, targeted peripheral device is one or more peripheral equipments that Bluetooth communication is carried out with mobile terminal;Close service class corresponding to the application protocol in addition to target application agreement.By the above-mentioned means, can reduce the power consumption and EMS memory occupation of bluetooth applications program.

Description

A kind of bluetooth management method, mobile terminal and computer storage medium
Technical field
This application involves Bluetooth technology fields, more particularly to a kind of bluetooth management method, mobile terminal and computer Storage medium.
Background technique
Bluetooth is a kind of short-range communication technique being widely used.Based on Bluetooth technology, may be implemented a variety of different Function, such as the transmission of hands-free phone, audio stream, file transmission etc., these so-called functions are referred to as bluetooth profile (application Agreement), for example, the corresponding profile of three kinds of functions mentioned above is HFP (handsfree protocol), A2DP (audio transmission association respectively View), OPP (target push protocol).Although all profile be all based on bluetooth L2CAP (logic link control adapting protocol, It is the basic agreement of bluetooth) Lai Shixian, but each profile has respectively entirely different logic.
Summary of the invention
The technical solution that the application uses is: a kind of bluetooth management method is provided, this method comprises: working as mobile terminal When starting bluetooth, the corresponding service class of all application protocols is opened;Determine the target application association that targeted peripheral device is supported View;Wherein, targeted peripheral device is one or more peripheral equipments that Bluetooth communication is carried out with mobile terminal;It closes except target is answered The service class corresponding to the application protocol except agreement.
Another technical solution that the application uses is: a kind of mobile terminal is provided, the mobile terminal include processor with And bluetooth mould group connected to the processor and memory;Wherein, bluetooth mould group, which is used to match with peripheral equipment, carries out Bluetooth communication, Memory realizes following method for executing program data for storing program data, processor: mobile terminal is blue in starting When tooth, the corresponding service class of all application protocols is opened;Determine the target application agreement that targeted peripheral device is supported;Wherein, Targeted peripheral device is one or more peripheral equipments that Bluetooth communication is carried out with mobile terminal;Close except target application agreement it Service class corresponding to outer application protocol.
Another technical solution that the application uses is: providing a kind of computer storage medium, the computer storage medium In be stored with program data, program data is when being executed by processor, to realize following method: mobile terminal is in starting bluetooth When, open the corresponding service class of all application protocols;Determine the target application agreement that targeted peripheral device is supported;Wherein, mesh Marking peripheral equipment is one or more peripheral equipments that Bluetooth communication is carried out with mobile terminal;It closes in addition to target application agreement Application protocol corresponding to service class.
Bluetooth management method provided by the present application includes: mobile terminal when starting bluetooth, opens all application protocols pair The service class answered;Determine the target application agreement that targeted peripheral device is supported;Wherein, targeted peripheral device is and mobile terminal Carry out one or more peripheral equipments of Bluetooth communication;Close service corresponding to the application protocol in addition to target application agreement Class.By the above-mentioned means, according to the application protocol that the peripheral equipment of pairing is supported, in bluetooth applications program with profile Corresponding Service class is dynamically switched, and it is larger and interior to avoid power consumption in the case that all Service classes are switched on It deposits and occupies higher problem, can reduce the power consumption and EMS memory occupation of bluetooth applications program.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.Wherein:
Fig. 1 is the first pass schematic diagram of bluetooth management method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of determining target application agreement provided by the embodiments of the present application;
Fig. 3 is the second procedure schematic diagram of bluetooth management method provided by the embodiments of the present application;
Fig. 4 is that mobile terminal provided by the embodiments of the present application and peripheral equipment match schematic diagram;
Fig. 5 is the third flow diagram of bluetooth management method provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of mobile terminal provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of computer storage medium provided by the embodiments of the present application.
Specific embodiment
Refering to fig. 1, Fig. 1 is the first pass schematic diagram of bluetooth management method provided by the embodiments of the present application, this method packet It includes:
Step 101: when mobile terminal is when starting bluetooth, opening the corresponding service class of all application protocols.
Bluetooth (Bluetooth) is a kind of wireless technology standard, it can be achieved that fixed equipment, mobile device and building people domain Short-range data exchange (using the UHF radio wave of the ISM band of 2.4-2.485GHz) between net.
L2CAP (Logical Link Control and Adaptation Protocol) agreement in bluetooth is also referred to as Logical link control and adaptation protocol is the core protocol in Bluetooth system, the upper-layer protocol being responsible in adaptation base band.
It is enumerated by upper layer application protocol of the following table to bluetooth:
HFP Handsfree protocol Hands Free Protocol
A2DP Audio transmission protocol Advanced Audio Distribution Profile
OPP Target push protocol Object Push Protocol
AVRCP Audio and video remote control protocol Audio Video Remote Control Protocol
GATT General-purpose attribute agreement Generic Attribute
PAN Personal bound local area fidonetFido Personal Area Network
PBAP Phone directory access protocol Phone Book Access Protocol
HID Human input devices agreement Human Input Device
In Android (Android) system, Bluetooth function is integrated in a bluetooth applications program (Bluetooth.apk) In, and the logic of each profile passes through a Service class (service class) Lai Shixian (these in Bluetooth.apk Service class is all to be inherited from android.app.Service class).
It, can be by parsing a configuration file, to obtain current phone in Bluetooth.apk when opening Bluetooth function Currently supported bluetooth profile, and all corresponding Service classes are opened according to the profile supported.Often Bluetooth profile and its corresponding relationship between Service class corresponding in Bluetooth.apk such as following table institute Show:
After the corresponding Service class of these profile is turned on, each profile is at available mode.It is blue when closing When tooth function, above-mentioned Service can be closed.
Step 102: determining the target application agreement that targeted peripheral device is supported;Wherein, targeted peripheral device is and shifting Dynamic terminal carries out one or more peripheral equipments of Bluetooth communication.
In some embodiments, which can be the Bluetooth functions such as bluetooth headset, Baffle Box of Bluetooth, Bluetooth interphone Property equipment, is also possible to other mobile terminals, such as mobile phone, tablet computer, wearable device.
In some embodiments, mobile terminal can be defaulted and supports all application protocols, as long as it is possible to think The application protocol that peripheral equipment is supported, mobile terminal are also supported.So can directly acquire what targeted peripheral device was supported Application protocol is as target application agreement.
It is to be appreciated that if some application protocol mobile terminal that targeted peripheral device is supported is not supported, then, it moves Dynamic terminal and the peripheral equipment just do not establish the meaning of bluetooth connection.
In further embodiments, as shown in Fig. 2, Fig. 2 is determining target application agreement provided by the embodiments of the present application Flow diagram, step 101 can specifically include:
Step 1021: determining the first application protocol that mobile terminal is supported, and determine that targeted peripheral device is supported The second application protocol.
Wherein, the first application protocol that mobile terminal itself is supported can obtain easily, and which is not described herein again, and determines The second application protocol that targeted peripheral device is supported can specifically in the following ways: using service discovery protocol (SDP association View, Service Discovery Protocol) obtain the second application protocol that targeted peripheral device is supported.
The attribute of service and these services that SDP agreement allows the peripheral equipment of mobile terminal discovery pairing to provide.SDP is only The mechanism of discovery service is provided, the method serviced using these is not provided.Each bluetooth equipment requires a SDP agreement.SDP Each of agreement Service indicates (Handle with unique 32bit) with ServiceRecord, each ServiceRecord is made of several ServiceAttribute, ServiceAttribute by Attribute ID and Two parts Attribute Valuel.By these accessible record of SDP request, peripheral equipment is obtained with this Information on services, to obtain the application protocol that peripheral equipment is supported.
Step 1022: determining the intersection of the first application protocol and the second application protocol as target application agreement.
In general, the quantity for the first application protocol that mobile terminal is supported is much larger than that peripheral equipment is supported The quantity of two application protocols.
For example, the first application protocol that mobile terminal is supported includes HFP agreement, A2DP agreement, OPP agreement, AVRCP (Controller) agreement, GATT agreement, PAN agreement, PBAP agreement, HID protocol, it is assumed that the peripheral equipment is bluetooth headset, Its second application protocol supported includes HFP agreement and A2DP agreement, then, the friendship of the first application protocol and the second application protocol The target application agreement of collection then includes HFP agreement and A2DP agreement.
Step 103: closing service class corresponding to the application protocol in addition to target application agreement.
In some embodiments, when targeted peripheral device and mobile terminal cancel Bluetooth pairing, inquiry removes target application The state of the corresponding second service class of application protocol except agreement;If second service class is open state, the second clothes are closed Business class;If second service class is closed state, remain off.
Illustrated with above-mentioned example, the first application protocol includes HFP agreement, A2DP agreement, OPP agreement, AVRCP (Controller) agreement, GATT agreement, PAN agreement, PBAP agreement, HID protocol, it is assumed that the peripheral equipment is bluetooth headset, Its second application protocol supported includes HFP agreement and A2DP agreement, then, the friendship of the first application protocol and the second application protocol The target application agreement of collection then includes HFP agreement and A2DP agreement.So, the server of unlatching is HFP agreement, A2DP agreement pair The server category answered, the service class of closing be then OPP agreement, AVRCP (Controller) agreement, GATT agreement, PAN agreement, The corresponding service class of PBAP agreement, HID protocol.
In addition, can also include: to open service class corresponding to target application agreement after step 103.
It is to be appreciated that under normal circumstances, mobile terminal can default the application for opening all supports after opening bluetooth Server category corresponding to agreement, the but during bluetooth applications based on the present embodiment, can be according to establishing bluetooth connection The case where targeted peripheral device, closes some service classes, so, it, also can be to the clothes of closing under application scenes Business class is opened.
In some embodiments, when having new peripheral equipment and mobile terminal to establish Bluetooth pairing, target is redefined The target application agreement that peripheral equipment is supported;Or the targeted peripheral device of pairing ought be established with mobile terminal, eventually with movement When Bluetooth pairing is cancelled at end, the target application agreement that targeted peripheral device is supported is redefined.
For example, the corresponding service class of HFP application protocol that targeted peripheral device is supported is that HeadsetService services class. When mobile terminal initially opens bluetooth, all service classes (including HeadsetService services class) are turned on, and are then obtained The corresponding HeadsetService of the HFP application protocol that targeted peripheral device is supported services class, closes and removes HeadsetService Service other service classes except class.If the targeted peripheral device cancels the bluetooth connection with mobile terminal, close HeadsetService services class, if the targeted peripheral device is established again and the bluetooth connection of mobile terminal, opens HeadsetService services class.
Bluetooth management method provided in this embodiment includes: mobile terminal when starting bluetooth, opens all application protocols Corresponding service class;Determine the target application agreement that targeted peripheral device is supported;Wherein, targeted peripheral device is whole with movement End carries out the peripheral equipment of Bluetooth communication;Close service class corresponding to the application protocol in addition to target application agreement.Pass through Aforesaid way, according to the application protocol that the peripheral equipment of pairing is supported, to corresponding with profile in Bluetooth.apk Service class is dynamically switched, and avoids that power consumption in the case that all Service classes are switched on is larger and EMS memory occupation Higher problem can reduce the power consumption and EMS memory occupation of Bluetooth.apk.
In some embodiments, in the use process of bluetooth, new peripheral equipment and mobile terminal is had and establishes bluetooth Connection, also has the peripheral equipment for establishing bluetooth connection with mobile terminal and mobile terminal cancels bluetooth connection.Specifically answering With in the process, if detecting mobile terminal every time and target application agreement that targeted peripheral device is supported jointly, comparatively It is cumbersome.It is to be appreciated that in the multiple peripheral equipments for establishing connection with mobile terminal, it is understood that there may be model it is two identical Equipment, the application protocol which is supported are identical.It in the present embodiment, can be by judging whether there is same model Equipment determines whether the target application agreement for redefining mobile terminal and targeted peripheral device is supported jointly.
Specifically, when having the first peripheral equipment and mobile terminal to establish Bluetooth pairing, the type of the first peripheral equipment is obtained Number;If there is the second peripheral equipment in one or more first peripheral equipments, the second peripheral equipment in targeted peripheral device The model of each peripheral equipment is all different, then redefines the target application agreement that targeted peripheral device is supported.
For example, being set after thering is the first peripheral equipment and mobile terminal to establish bluetooth connection if existing in the first peripheral equipment Standby A, is all different with the model of equipment each in targeted peripheral device, then redefines the target that targeted peripheral device is supported Application protocol.If the armamentarium in the first peripheral equipment, in target device there are one to the identical equipment of model, The target application agreement then supported without determining targeted peripheral device again.
Specifically, when the third peripheral equipment for establishing pairing in targeted peripheral device with mobile terminal, eventually with movement When Bluetooth pairing is cancelled at end, the model of third peripheral equipment is obtained;If in one or more third peripheral equipments, there are outside the 4th Peripheral equipment, fourth peripheral equipment and the model for each peripheral equipment that Bluetooth pairing is kept in targeted peripheral device are all different, Then redefine the target application agreement that targeted peripheral device is supported.
For example, when the third peripheral equipment for establishing pairing in targeted peripheral device with mobile terminal, with mobile terminal When cancelling Bluetooth pairing, if there are equipment B in one or more third peripheral equipments, bluetooth is kept to match with targeted peripheral device Pair the model of each peripheral equipment be all different, then redefine the target application agreement that targeted peripheral device is supported.If Armamentarium in third peripheral equipment, in target device there are one to the identical equipment of model, then without again Determine the target application agreement that targeted peripheral device is supported.
It is the second procedure schematic diagram of bluetooth management method provided by the embodiments of the present application, this method packet refering to Fig. 3, Fig. 3 It includes:
Step 301: when mobile terminal is when starting bluetooth, opening the corresponding service class of all application protocols.
Step 302: establishing corresponding counter for each application protocol.
Wherein, the value of counter identifies the number of the peripheral equipment of application protocol corresponding with mobile terminal pairing and support Amount, the initial value of counter are 0.
It is to be appreciated that mobile terminal generally can form Bluetooth pairing with multiple peripheral equipments, as shown in figure 4, Fig. 4 is Mobile terminal provided by the embodiments of the present application and peripheral equipment match schematic diagram, wherein mobile terminal 41 is peripheral with first respectively Equipment 42, the second peripheral equipment 43 and third peripheral equipment 44 form pairing.
With reference to following table, mobile terminal 41 and the first peripheral equipment 42, the second peripheral equipment 43 and are illustrated in following table The value of application protocol and corresponding counter that three peripheral equipments 44 are supported respectively.
Mobile terminal First peripheral equipment Second peripheral equipment Third peripheral equipment Counter
HFP HFP 1
A2DP A2DP A2DP A2DP 3
OPP OPP OPP 2
AVRCP AVRCP 1
GATT 0
PAN 0
PBAP PBAP 1
HID HID 1
Step 303: determining the target application agreement that targeted peripheral device is supported.
Step 304: the corresponding counter of target application agreement is added 1.
It is to be appreciated that the application protocol for obtaining its support can be gone using SDP agreement to the peripheral equipment newly matched, Then the value of counter corresponding in above table is increased, meanwhile, if thering is peripheral equipment and mobile terminal to disconnect bluetooth Pairing, then reduced the value of counter corresponding in above table.
After the step 304, step 305 and step 308 are executed respectively.
Step 305: the state of application protocol corresponding first service class of the inquiry in addition to target application agreement.
Step 306: if first service class is open state, and the value of the corresponding counter of target application agreement is 0, then closes Close first service class.
It is 0 according to the value of the counter shown in above table, simultaneously in target application agreement if not including PAN agreement It detects whether the corresponding Service class of PAN agreement is open state, if open state, then it is corresponding to close PAN agreement Service class.
It is 0 according to the value of the counter shown in above table, simultaneously in target application agreement if not including PAN agreement It detects whether the corresponding Service class of PAN agreement is open state, if closed state, then remains off.
Step 307: if first service class is closed state, remaining off.
Step 308: the state of the corresponding second service class of inquiry target application agreement.
Step 309: if second service class is open state, keeping it turned on.
It is 3 according to the value of the counter shown in above table, 3 in target application agreement if including A2DP agreement On the basis of plus 1, while detecting whether the corresponding Service class of A2DP agreement is open state, if open state, then keep opening Open state.
Step 310: if second service class is closed state, opening second service class.
It is 0 according to the value of the counter shown in above table, 0 in target application agreement if including GATT agreement On the basis of plus 1, while detecting whether the corresponding Service class of GATT agreement is open state, if closed state, then open The corresponding Service class of GATT agreement.
It is the third process signal of the bluetooth management method of mobile terminal provided by the embodiments of the present application refering to Fig. 5, Fig. 5 Figure, this method comprises:
Step 501: when mobile terminal is when starting bluetooth, opening the corresponding service class of all application protocols.
Step 502: establishing corresponding counter for each application protocol.
Wherein, the value of counter identifies the number of the peripheral equipment of application protocol corresponding with mobile terminal pairing and support Amount, the initial value of counter are 0.
Step 503: determining the target application agreement that targeted peripheral device is supported.
Step 504: the corresponding counter of target application agreement is added 1.
Step 505: if releasing the Bluetooth pairing with targeted peripheral device, obtaining targeted peripheral device is supported second and answer Use agreement.
Step 506: the value of the corresponding counter of the second application protocol is subtracted 1.
With continued reference to following table, mobile terminal and the first peripheral equipment, the second peripheral equipment and third are illustrated in following table The value of application protocol and corresponding counter that peripheral equipment is supported respectively.
If mobile terminal releases the Bluetooth pairing with third peripheral equipment, to A2DP agreement and the corresponding meter of HID protocol The value of number device subtracts 1, specific as follows:
Mobile terminal First peripheral equipment Second peripheral equipment Counter
HFP HFP 1
A2DP A2DP A2DP 3-1=2
OPP OPP OPP 2
AVRCP AVRCP 1
GATT 0
PAN 0
PBAP PBAP 1
HID 1-1=0
Step 507: whether the value of the corresponding counter of the second application protocol of detection is 0.
Wherein, detect whether A2DP agreement and the value of the corresponding counter of HID protocol are 0.
Step 508: closing the corresponding service class of the second application protocol.
The value for detecting the corresponding counter of HID protocol is 0, then then closing the corresponding Service class of HID protocol.
In addition, in the above-described embodiment, if mobile terminal closes bluetooth, all service classes are simultaneously closed off, and by institute There is the value of the corresponding counter of service class to reset.
It is the structural schematic diagram of mobile terminal provided by the embodiments of the present application refering to Fig. 6, Fig. 6, which includes Processor 61 and the bluetooth mould group 62 and memory 63 being connect with processor 61.
Wherein, bluetooth mould group 62 be also known as bluetooth module, generally by chip, PCB (Printed Circuit Board) plate, Peripheral components are constituted.
It is to be appreciated that the mobile terminal 60 can be mobile phone, tablet computer, wearable device and smart machine.
Wherein, memory 63 is for storing program data, and processor 61 is for executing program data to realize following side Method:
Mobile terminal opens the corresponding service class of all application protocols when starting bluetooth;Determine targeted peripheral device institute The target application agreement of support;Wherein, targeted peripheral device is that the one or more periphery of Bluetooth communication is carried out with mobile terminal Equipment;Close service class corresponding to the application protocol in addition to target application agreement.
In some embodiments, processor 61 is also used to execute program data to realize following method: using service hair Existing agreement determines the target application agreement that targeted peripheral device is supported.
In some embodiments, processor 61 is also used to execute program data to realize following method: new outer when having When peripheral equipment and mobile terminal establish Bluetooth pairing, the target application agreement that targeted peripheral device is supported is redefined;Or work as The targeted peripheral device for having established pairing with mobile terminal redefines targeted peripheral when cancelling Bluetooth pairing with mobile terminal The target application agreement that equipment is supported.
In some embodiments, processor 61 is also used to execute program data to realize following method: when having outside first When peripheral equipment and mobile terminal establish Bluetooth pairing, the model of the first peripheral equipment is obtained;If one or more first peripheries are set It is standby middle there are the second peripheral equipment, the model of the second peripheral equipment and each peripheral equipment in targeted peripheral device not phase Together, then the target application agreement that targeted peripheral device is supported is redefined
In some embodiments, processor 61 is also used to execute program data to realize following method: working as targeted peripheral The third peripheral equipment for establishing pairing in equipment with mobile terminal when cancelling Bluetooth pairing with mobile terminal, obtains third The model of peripheral equipment;If in one or more third peripheral equipments, there are fourth peripheral equipment, fourth peripheral equipment and targets It keeps the model of each peripheral equipment of Bluetooth pairing to be all different in peripheral equipment, then redefines targeted peripheral device and propped up The target application agreement held.
In some embodiments, processor 61 is also used to execute program data to realize following method: working as targeted peripheral When equipment and mobile terminal cancel Bluetooth pairing, the corresponding first service class of application protocol in addition to target application agreement is inquired State;If first service class is open state, first service class is closed;If first service class is closed state, keep Closed state.
In some embodiments, processor 61 is also used to execute program data to realize following method: new outer when having When peripheral equipment and mobile terminal establish Bluetooth pairing, the state of the corresponding second service class of inquiry target application agreement;If second Servicing class is open state, then keeps it turned on;If second service class is closed state, second service class is opened.
In some embodiments, processor 61 is also used to execute program data to realize following method: in starting bluetooth Set period of time after, if carrying out Bluetooth communication without peripheral equipment and mobile terminal, close corresponding to all application protocols Service class.
It is the structural schematic diagram of computer storage medium provided by the embodiments of the present application refering to Fig. 7, Fig. 7, which deposits Program data 71 is stored in storage media 70, program data 71 is when being executed by processor, to realize following method:
Mobile terminal opens the corresponding service class of all application protocols when starting bluetooth;Determine targeted peripheral device institute The target application agreement of support;Wherein, targeted peripheral device is the peripheral equipment that Bluetooth communication is carried out with mobile terminal;Closing removes Service class corresponding to application protocol except target application agreement.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: using clothes Business discovery agreement determines the target application agreement that targeted peripheral device is supported.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: new when having Peripheral equipment and mobile terminal when establishing Bluetooth pairing, redefine the target application agreement that targeted peripheral device is supported; Or the targeted peripheral device of pairing ought be established with mobile terminal, when with mobile terminal cancellation Bluetooth pairing, redefine target The target application agreement that peripheral equipment is supported.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: when having When one peripheral equipment and mobile terminal establish Bluetooth pairing, the model of the first peripheral equipment is obtained;If outside one or more first There are the second peripheral equipment in peripheral equipment, the model of each peripheral equipment in the second peripheral equipment and targeted peripheral device is not It is identical, then redefine the target application agreement that targeted peripheral device is supported.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: working as target The third peripheral equipment for establishing pairing in peripheral equipment with mobile terminal when cancelling Bluetooth pairing with mobile terminal, obtains The model of third peripheral equipment;If there are fourth peripheral equipment in one or more third peripheral equipments, fourth peripheral equipment with It keeps the model of each peripheral equipment of Bluetooth pairing to be all different in targeted peripheral device, then redefines targeted peripheral device The target application agreement supported.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: working as target When peripheral equipment and mobile terminal cancel Bluetooth pairing, corresponding first clothes of application protocol in addition to target application agreement are inquired The state for class of being engaged in;If first service class is open state, first service class is closed;If first service class is closed state, It remains off.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: new when having Peripheral equipment and mobile terminal when establishing Bluetooth pairing, the state of the corresponding second service class of inquiry target application agreement;If Second service class is open state, then keeps it turned on;If second service class is closed state, second service class is opened.
In some embodiments, program data 71 is when being executed by processor, also to realize following method: starting After the set period of time of bluetooth, if carrying out Bluetooth communication without peripheral equipment and mobile terminal, all application protocol institutes are closed Corresponding service class.
In several embodiments provided herein, it should be understood that disclosed method and equipment, Ke Yitong Other modes are crossed to realize.For example, equipment embodiment described above is only schematical, for example, the module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.
The 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.Some or all of unit therein can be selected to realize present embodiment scheme according to the actual needs Purpose.
In addition, each functional unit in each embodiment of the application can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit in above-mentioned other embodiments is realized in the form of SFU software functional unit and as independence Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the application Technical solution substantially all or part of the part that contributes to existing technology or the technical solution can be in other words It is expressed in the form of software products, which is stored in a storage medium, including some instructions are used So that a computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) all or part of the steps of each embodiment the method for the application is executed.And storage medium packet above-mentioned It includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), the various media that can store program code such as magnetic or disk.
The foregoing is merely presently filed embodiments, are not intended to limit the scope of the patents of the application, all to utilize this Equivalent structure or equivalent flow shift made by application specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field similarly includes in the scope of patent protection of the application.

Claims (10)

1. a kind of bluetooth management method characterized by comprising
When mobile terminal starts bluetooth, the corresponding service class of all application protocols is opened;
Determine the target application agreement that targeted peripheral device is supported;Wherein, the targeted peripheral device is whole with the movement End carries out one or more peripheral equipments of Bluetooth communication;
Close service class corresponding to the application protocol in addition to the target application agreement.
2. the method according to claim 1, wherein
The step of target application agreement that the determining targeted peripheral device is supported, comprising:
The target application agreement that the targeted peripheral device is supported is determined using service discovery protocol.
3. the method according to claim 1, wherein
After the target application agreement that the determining targeted peripheral device is supported the step of, further includes:
When thering is new peripheral equipment and the mobile terminal to establish Bluetooth pairing, redefines the targeted peripheral device and propped up The target application agreement held;Or
When the targeted peripheral device for establishing pairing with the mobile terminal, cancel Bluetooth pairing with the mobile terminal When, redefine the target application agreement that the targeted peripheral device is supported.
4. according to the method described in claim 3, it is characterized in that,
It is described when thering is new peripheral equipment and the mobile terminal to establish Bluetooth pairing, redefine the targeted peripheral device The step of target application agreement supported, comprising:
When thering is the first peripheral equipment and the mobile terminal to establish Bluetooth pairing, the model of first peripheral equipment is obtained;
If in one or more first peripheral equipments, there are the second peripheral equipment, second peripheral equipment and the targets The model of each peripheral equipment in peripheral equipment is all different, then redefines the target that the targeted peripheral device is supported Application protocol.
5. according to the method described in claim 3, it is characterized in that,
The targeted peripheral device that pairing ought be established with the mobile terminal, cancels bluetooth with the mobile terminal and matches Clock synchronization, the step of redefining the target application agreement that the targeted peripheral device is supported, comprising:
When the third peripheral equipment for establishing pairing in the targeted peripheral device with the mobile terminal, eventually with the movement When Bluetooth pairing is cancelled at end, the model of the third peripheral equipment is obtained;
If in one or more third peripheral equipments, there are fourth peripheral equipment, the fourth peripheral equipment and the targets It keeps the model of each peripheral equipment of Bluetooth pairing to be all different in peripheral equipment, then redefines the targeted peripheral device The target application agreement supported.
6. the method according to claim 1, wherein
After the step of service class corresponding to application protocol of the closing in addition to the target application agreement, also wrap It includes:
When the targeted peripheral device and the mobile terminal cancel Bluetooth pairing, inquire in addition to the target application agreement The corresponding first service class of application protocol state;
If the first service class is open state, the first service class is closed;
If the first service class is closed state, remain off.
7. the method according to claim 1, wherein
After the step of service class corresponding to application protocol of the closing in addition to the target application agreement, also wrap It includes:
When thering is new peripheral equipment and the mobile terminal to establish Bluetooth pairing, the target application agreement corresponding the is inquired The state of two service classes;
If the second service class is open state, keep it turned on;
If the second service class is closed state, the second service class is opened.
8. the method according to claim 1, wherein
The mobile terminal is when starting bluetooth, after the step of opening all application protocols corresponding service class, further includes:
After the first preset time of starting bluetooth, if carrying out Bluetooth communication without peripheral equipment and the mobile terminal, close Close service class corresponding to all application protocols.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes processor and the indigo plant being connected to the processor Tooth mould group and memory;
Wherein, the bluetooth mould group, which is used to match with peripheral equipment, carries out Bluetooth communication, and the memory is for storing program number According to the processor is for executing described program data to realize the method according to claim 1.
10. a kind of computer storage medium, which is characterized in that program data is stored in the computer storage medium, it is described Program data is when being executed by processor, to realize the method according to claim 1.
CN201910413498.7A 2019-05-17 2019-05-17 Bluetooth management method, mobile terminal and computer storage medium Active CN110177357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910413498.7A CN110177357B (en) 2019-05-17 2019-05-17 Bluetooth management method, mobile terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910413498.7A CN110177357B (en) 2019-05-17 2019-05-17 Bluetooth management method, mobile terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN110177357A true CN110177357A (en) 2019-08-27
CN110177357B CN110177357B (en) 2022-06-07

Family

ID=67691506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910413498.7A Active CN110177357B (en) 2019-05-17 2019-05-17 Bluetooth management method, mobile terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN110177357B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111954039A (en) * 2020-07-02 2020-11-17 深圳市华曦达科技股份有限公司 Set top box Bluetooth configuration method and device, electronic equipment and storage medium
CN112948007A (en) * 2021-02-02 2021-06-11 歌尔科技有限公司 Bluetooth sound box initialization method and device and Bluetooth sound box
CN113676851A (en) * 2021-08-17 2021-11-19 深圳市芯中芯科技有限公司 Communication method and system for Bluetooth device and wireless interphone

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102378400A (en) * 2010-08-23 2012-03-14 中兴通讯股份有限公司 Management method and device of Bluetooth services
US20150347066A1 (en) * 2013-01-23 2015-12-03 Canon Kabushiki Kaisha Communication apparatus, method of controlling the same, and program
CN105487887A (en) * 2015-11-24 2016-04-13 惠州Tcl移动通信有限公司 Bluetooth starting method and Bluetooth device
CN106028268A (en) * 2016-06-27 2016-10-12 广东欧珀移动通信有限公司 Method and apparatus for lowering device power consumption
CN109089247A (en) * 2018-07-24 2018-12-25 深圳Tcl新技术有限公司 Using starting method, system, terminal device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102378400A (en) * 2010-08-23 2012-03-14 中兴通讯股份有限公司 Management method and device of Bluetooth services
US20150347066A1 (en) * 2013-01-23 2015-12-03 Canon Kabushiki Kaisha Communication apparatus, method of controlling the same, and program
CN105487887A (en) * 2015-11-24 2016-04-13 惠州Tcl移动通信有限公司 Bluetooth starting method and Bluetooth device
CN106028268A (en) * 2016-06-27 2016-10-12 广东欧珀移动通信有限公司 Method and apparatus for lowering device power consumption
CN109089247A (en) * 2018-07-24 2018-12-25 深圳Tcl新技术有限公司 Using starting method, system, terminal device and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111954039A (en) * 2020-07-02 2020-11-17 深圳市华曦达科技股份有限公司 Set top box Bluetooth configuration method and device, electronic equipment and storage medium
CN112948007A (en) * 2021-02-02 2021-06-11 歌尔科技有限公司 Bluetooth sound box initialization method and device and Bluetooth sound box
CN113676851A (en) * 2021-08-17 2021-11-19 深圳市芯中芯科技有限公司 Communication method and system for Bluetooth device and wireless interphone
CN113676851B (en) * 2021-08-17 2022-06-28 深圳市芯中芯科技有限公司 Communication method and system of Bluetooth device and wireless interphone

Also Published As

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

Similar Documents

Publication Publication Date Title
US9131332B2 (en) Method of providing call control information from a mobile phone to a peripheral device
CN110177357A (en) A kind of bluetooth management method, mobile terminal and computer storage medium
US20090061775A1 (en) Systems and methods for multiport communication distribution
CN104469662A (en) Automated communication switching method and equipment among multiple mobile communication terminals
CN106030556A (en) Method of operating function and resource of electronic device
EP1671439A2 (en) Call management system and method for servicing multiple wireless communication devices
CN104184499A (en) Bluetooth device control method, device and system
CN105025431A (en) Multi-role Bluetooth device and Bluetooth connection method thereof
US8469267B2 (en) Method for implementing a wireless personal communication protocol for an IC card
CN101179301B (en) Method of implementing automatic enrollment of bluetooth telephone terminal equipment
CN104717378A (en) Call forwarding method and device
CN101651473B (en) Communication apparatuses, methods for manufacturing chips and method for providing wireless communication profile
CN106465072A (en) Call transfer method and terminal
CN101484884A (en) Systems and methods for multiport communication distribution
CN102594971A (en) Stored program control exchange, and radiotelephone call system and method based on stored program control exchange
KR100619092B1 (en) Usb dongle having a bluetooth function with enlarged memory region
CN101257679A (en) Split type mobile terminal calling record synchronies method and system thereof
CN108702774A (en) Dispatching method, base station, terminal and storage medium
CN112787828B (en) Application flow statistical method and device and mobile electronic device
CN104754771B (en) A kind of wireless communication apparatus and forwarding method with signaling transfer point
CN103685679A (en) Mobile communication terminal and call control method thereof
CN103338209B (en) The system and method that IP communication system and method, IP communication and common communications coexist
CN103501381B (en) Separated mobile terminal and the communication means between main frame and handset thereof
CN102685300B (en) Vehicular mobile communication equipment and method for realizing number searching
CN105307104B (en) Apparatus interconnection method and system inside and outside a kind of network based on conventional Bluetooth

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