CN110267243A - Communication control method, communication equipment and storage medium - Google Patents

Communication control method, communication equipment and storage medium Download PDF

Info

Publication number
CN110267243A
CN110267243A CN201910365453.7A CN201910365453A CN110267243A CN 110267243 A CN110267243 A CN 110267243A CN 201910365453 A CN201910365453 A CN 201910365453A CN 110267243 A CN110267243 A CN 110267243A
Authority
CN
China
Prior art keywords
communication equipment
role
bluetooth
communication
bluetooth address
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.)
Withdrawn
Application number
CN201910365453.7A
Other languages
Chinese (zh)
Inventor
王佰祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910365453.7A priority Critical patent/CN110267243A/en
Publication of CN110267243A publication Critical patent/CN110267243A/en
Withdrawn legal-status Critical Current

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/19Connection re-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/02Processing of mobility data, e.g. registration information at HLR [Home Location Register] or VLR [Visitor Location Register]; Transfer of mobility data, e.g. between HLR, VLR or external networks

Landscapes

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

Abstract

The application provides a kind of communication control method, communication equipment and storage medium, establishes Bluetooth communication with the second communication equipment and connect;After restarting bluetooth after closing bluetooth, in a Session Description Protocol SDP registration, at least one UUID is written, to be registered to the role of the first communication equipment, the value of at least one UUID corresponds to the first communication equipment and supports audio frequency net gate way AG role and hands-free HF role simultaneously, and AG role's registration information and HF role's registration information are bound with the first Bluetooth address of first communication equipment, the second Bluetooth address respectively;Role between first communication equipment and the second communication equipment is matched;With matched role, connection is established with the second communication equipment;It can be seen that the application can be closed in communication equipment opens bluetooth again, that is, when broken reconnection, AG role and HF role is registered, to expand the scope of application of communication equipment, improve user experience.

Description

Communication control method, communication equipment and storage medium
Technical field
This application involves field of terminal technology, and in particular to a kind of communication control method, communication equipment and computer-readable Storage medium.
Background technique
Bluetooth technology is widely used in the equipment such as mobile phone, wireless headset, Intelligent bracelet/wrist-watch, and bluetooth can It realizes the connection between corresponding equipment, and the real-time Transmission of the contents such as audio, video, file can be further realized.Bluetooth skill In the application of art, general bluetooth equipment only supports HF (Hands Free, hands-free) role or AG (Audio Gate, audio Gateway) role, for example, mobile phone is supported only to be used as AG (i.e. bluetooth conversation function main side), bluetooth headset or mobile unit are only propped up Hold as HF (i.e. bluetooth conversation function from end), in this way for general wearable bluetooth equipment can only be selected as HF role or Person AG role compares and limits the usage scenario of the equipment, especially in the case where two equipment establish connection reconnection again, shadow Ring user experience.
Summary of the invention
The application technical problems to be solved are: in the usage scenario of current bluetooth equipment, after breaking reconnection Bluetooth connection it is limited, the problem of poor user experience, for the technical problem, provide a kind of communication control method, communication equipment And computer readable storage medium.
In order to solve the above technical problems, the application provides a kind of communication control method, the communication control method includes:
Bluetooth communication is established with the second communication equipment to connect;
After closing bluetooth and opening again, in a Session Description Protocol SDP registration, at least one general unique identification is written Code UUID, come to the first communication equipment audio frequency net gate way AG role and hands-free HF role register, and will the obtained AG of registration Role's registration information and HF role's registration information respectively with the first Bluetooth address of first communication equipment, the second Bluetooth address Binding, at least one described UUID correspond to first communication equipment and support AG role and HF role simultaneously;
Role between first communication equipment and the second communication equipment is matched;
With matched role, connection is established with the second communication equipment.
Optionally, it is described establish Bluetooth communication with the second communication equipment and connect include:
Bluetooth discovery is initiated, determines the role that the second communication equipment is supported;Or, receiving the indigo plant that the second communication equipment is initiated Tooth search, the role for making the second communication equipment determine that the first communication equipment is supported;
Role between first communication equipment and the second communication equipment is matched;
With matched role, the Bluetooth communication connection between the first communication equipment and the second communication equipment is established.
Optionally, carrying out matching to the role between the first communication equipment and the second communication equipment includes:
According to bluetooth discovery as a result, being matched to the role between the first communication equipment and the second communication equipment;Or, root According to the first communication equipment and the second communication equipment last time connection, between the first communication equipment and the second communication equipment Role matches.
Optionally, after the role to first communication equipment registers, further includes:
Start the port radio communication RFcomm, waits subsequent connection;
It is described to establish connection with the second communication equipment and include:
By the port RFcomm having been turned on, to establish connection with the matched role of the second communication equipment.
Optionally, at least one described UUID corresponds to first communication equipment while AG role and HF role being supported to wrap It includes:
When the UUID is two, the value of one of UUID corresponds to first communication equipment and supports AG role, The value of another UUID corresponds to first communication equipment and supports HF role;
When the UUID is one, the value of the UUID corresponds to first communication equipment and supports audio frequency net gate way simultaneously AG role and hands-free HF role.
Optionally, by AG role's registration information and HF role's registration information respectively with first Bluetooth address, It further include obtaining second Bluetooth address before the binding of two Bluetooth address, acquisition second Bluetooth address includes:
In the bluetooth module starting of first communication equipment, it is blue that described second is read from Bluetooth address storage file Tooth address;Second Bluetooth address is to call preset Bluetooth address algorithm to generate and be pre-stored within the Bluetooth address to deposit It stores up in file.
Optionally, when reading second Bluetooth address failure from the Bluetooth address storage file, the method is also Include:
It calls preset Bluetooth address algorithm to generate the second Bluetooth address, and second Bluetooth address is stored in described In Bluetooth address storage file.
Optionally, the second Bluetooth address of the preset Bluetooth address algorithm generation of the calling includes:
First Bluetooth address is obtained, the value in address low region in first Bluetooth address is become at random It gets in return to the second Bluetooth address.
To solve the above-mentioned problems, the embodiment of the invention also provides a kind of communication equipment, the communication equipment includes depositing Reservoir, transmitter, receiver, processor and communication bus;
The communication bus is for realizing the connection communication between memory and processor;
The processor control transmitter, receiver, and the computer program stored in memory is called, to realize such as Step performed by first communication equipment in the upper communication control method.
To solve the above-mentioned problems, the embodiment of the invention also provides a kind of computer readable storage medium, the calculating Machine readable storage medium storing program for executing is stored with computer program, and the computer program can be executed by processor as described above logical to realize Believe step performed by the first communication equipment in control method.
Beneficial effect
The application provides a kind of communication control method, communication equipment and storage medium, the first communication equipment and communicates with second Equipment is established Bluetooth communication connection and is closed after bluetooth restarts, in a Session Description Protocol SDP registration, write-in at least one A UUID come to the first communication equipment audio frequency net gate way AG role and hands-free HF role register, and will the obtained angle AG of registration Color registration information and HF role's registration information are tied up with the first Bluetooth address of first communication equipment, the second Bluetooth address respectively Fixed, at least one UUID of write-in corresponds to the first communication equipment and supports AG role and HF role simultaneously;Then it is communicated with second Equipment interaction obtains the role supported therebetween, and then can establish connection according to matched role and the second communication equipment; It can be seen that the application can when communication equipment opens Bluetooth function, AG role and HF role register and respectively with the first bluetooth Address, the binding of the second Bluetooth address, for such first communication equipment after completing registration, the HF role and AG role of registration are each From one mutually independent Bluetooth address of binding, set so that the first communication equipment is externally rendered as two independent communications Standby, so that first communication equipment can support AG role and HF role simultaneously, and the first communication equipment is closed in bluetooth AG can be established after restarting with other communication equipments according to demand to connect and/or HF connection, to expand communication equipment The scope of application, so that Bluetooth communication application is more flexible, better adaptability can preferably be suitable for various Bluetooth communication applied fields Scape promotes the satisfaction of user experience.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application Example, and together with specification it is used to explain the principle of the application.
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, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of hardware structural diagram of embodiment of communication equipment provided by the embodiments of the present application;
Stereoscopic schematic diagram when Fig. 2-1 is a kind of screen expansion of embodiment of wearable device provided by the embodiments of the present application One;
Stereoscopic schematic diagram when Fig. 2-2 is a kind of screen expansion of embodiment of wearable device provided by the embodiments of the present application Two;
Solid is illustrated when Fig. 2-3 is a kind of screen-bending of embodiment of wearable device provided by the embodiments of the present application Figure;
Fig. 3 is a kind of schematic diagram of embodiment of mobile phone provided by the embodiments of the present application;
Fig. 4 is the flow diagram for the communication control method that the application first embodiment provides;
Fig. 5 is the frame structure schematic diagram that the application first embodiment provides;
Fig. 6 is that the second Bluetooth address that the application first embodiment provides obtains flow diagram;
Fig. 7 is that another second Bluetooth address that the application first embodiment provides obtains flow diagram;
Fig. 8 is the bluetooth protocol repertory structural schematic diagram that the application second embodiment provides;
Fig. 9 is the Bluetooth address structural schematic diagram that the application second embodiment provides;
Figure 10 provides bluetooth registration process flow schematic diagram for the application second embodiment;
Figure 11 is the bluetooth protocol repertory and bluetooth firmware connection schematic diagram that the application second embodiment provides;
Figure 12 is the communication control method flow diagram that the application second embodiment provides;
Figure 13 is the communication apparatus construction schematic diagram that the application 3rd embodiment provides.
Specific embodiment
It should be appreciated that specific embodiment described herein is only used to explain the application, it is not used to limit the application.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element The explanation for being conducive to the application, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
The communication equipment provided in the embodiment of the present application can be various mobile devices, such as can include but is not limited to hand Machine, IPAD, mobile unit, communication equipment 100 etc., wherein communication equipment 100 may include but be not limited to Intelligent bracelet, intelligent hand The mobile terminals such as table and smart phone (the embodiment of the present application is also referred to as wrist machine) with wearable characteristic.With screen The continuous development of curtain technology, the appearance of the screens form such as flexible screen, Folding screen, the mobile terminals such as smart phone can also be used as logical Believe equipment 100.The communication equipment 100 provided in the embodiment of the present application may include: that radio frequency (Radio Frequency, RF) is single Member, bluetoothModule, WiFi module, audio output unit, A/V (audio/video) input unit, sensing The components such as device, display unit, user input unit, interface unit, memory, processor and power supply.
Referring to Fig. 1, it is the hardware structural diagram for realizing a kind of communication equipment of each embodiment of the application, this is logical Believe that equipment 100 may include: radio frequency unit 101, bluetooth module 112, WiFi module 102, audio output unit 103, A/V (sound Frequently/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, the components such as processor 110 and power supply 111.It will be understood by those skilled in the art that communication equipment 100 shown in Fig. 1 Structure does not constitute the restriction to communication equipment 100, and communication equipment 100 may include components more more or fewer than diagram, or Person combines certain components or different component layouts.
It is specifically introduced below with reference to all parts of the Fig. 1 to communication equipment 100:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in carry out signal and send and receive, may include using In the transmitter for carrying out information transmission and for carrying out the received receiver of information.Such as the transmitter of radio frequency unit 101 can be with Uplink information is sent to base station after the downlink information that receiver is used to receive base station transmission receives and is sent to communication equipment 100 Processor 110 handle, base station to the downlink information that radio frequency unit 101 is sent can be according to radio frequency unit 101 transmission it is upper What row information generated, it is also possible to main to the push of radio frequency unit 101 after the information update for detecting communication equipment 100, example Such as, after detecting that geographical location locating for communication equipment 100 changes, base station can be to the radio frequency list of communication equipment 100 Member 101 sends the message informing of geographical location variation, and radio frequency unit 101, can be by the message after receiving the message informing The processor 110 that notice is sent to communication equipment 100 is handled, and the processor 110 of communication equipment 100 can control the message informing It is shown on the display panel 1061 of communication equipment 100;In general, radio frequency unit 101 includes but is not limited to antenna, at least one puts Big device, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, radio frequency unit 101 can also be by wireless communication Communicated with network and other equipment, specifically may include: by wireless communication with the server communication in network system, example Such as, communication equipment 100 can download file resource from server by wireless communication, for example can download and answer from server With program, after communication equipment 100 completes the downloading of a certain application program, if the corresponding file of the application program in server Resource updates, then the server can push the message informing of resource updates to communication equipment 100 by wireless communication, to remind User is updated the application program.Any communication standard or agreement can be used in above-mentioned wireless communication, including but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet RadioService, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), (Wideband Code Division Multiple Access, wideband code division are more by WCDMA Location), TD-SCDMA (TimeDivision-Synchronous Code Division Multiple Access, time division synchronous CDMA), (FrequencyDivision Duplexing-Long Term Evolution, frequency division duplex are long by FDD-LTE Phase evolution) and TDD-LTE (Time DivisionDuplexing-Long Term Evolution, time division duplex long term evolution) Deng.
In one embodiment, communication equipment 100 can access existing communication network by insertion SIM card.
In another embodiment, communication equipment 100 can be by being arranged esim card (Embedded-SIM), Lai Shixian Existing communication network is accessed, by the way of esim card, the inner space of communication equipment 100 can be saved, reduce thickness.
It is understood that although Fig. 1 shows radio frequency unit 101, but it is understood that, radio frequency unit 101 its And it is not belonging to must be configured into for communication equipment 100, it can according to need within the scope of not changing the essence of the invention and save completely Slightly.Communication equipment 100 can realize the communication connection with other equipment or communication network separately through WiFi module 102, this Application embodiment is not limited thereto.
Communication equipment 100 includes bluetooth module 112, and communication equipment 100, can be with other supports by bluetooth module 112 The terminal device of Bluetooth communication connects, and realizes communication and the interaction of information.Bluetooth module 112 can have correspondence to be respectively used to reality Now transmitting and received transmitter and receiver.
WiFi belongs to short range wireless transmission technology, and communication equipment 100 can help user to receive and dispatch by WiFi module 102 Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 WiFi module 102 is shown, but it is understood that, and it is not belonging to must be configured into for communication equipment 100, it completely can root It is omitted within the scope of not changing the essence of the invention according to needs.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in communication equipment 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 Audio output relevant to the specific function that communication equipment 100 executes can also be provided (for example, call signal receives sound, disappears Breath receives sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
In one embodiment, communication equipment 100 includes one or more cameras, by opening camera, energy Enough captures realized to image, realize the functions such as take pictures, record a video, the position of camera, which can according to need, to be configured.
Communication equipment 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when communication equipment 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc..
In one embodiment, communication equipment 100 further includes proximity sensor, by using proximity sensor, communication Equipment 100 can be realized non-contact manipulation, provide more modes of operation.
In one embodiment, communication equipment 100 further includes heart rate sensor, when wearing, by close to user, It can be realized the detecting of heart rate.
In one embodiment, communication equipment 100 can also include fingerprint sensor, by reading fingerprint, Neng Goushi The functions such as existing safety verification.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (OrganicLight-Emitting Diode, OLED) configure display panel 1061.
In one embodiment, display panel 1061 uses flexible display screen, using the communication equipment of flexible display screen 100 when wearing, and screen is able to carry out bending, to more be bonded.Optionally, the flexible display screen can use OLED screen Body and graphene screen body, in other embodiments, the flexible display screen is also possible to other display materials, the present embodiment It is not limited thereto.
In one embodiment, the display panel 1061 of communication equipment 100 can take rectangle, ring when convenient for wearing Around.In other embodiments, other modes can also be taken.
User input unit 107 can be used for receiving the number or character information of input, and generate and communication equipment 100 User setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch behaviour of user on it or nearby Make (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel Operation near 1071), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touching Two parts of detection device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch behaviour Make bring signal, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.This Outside, touch panel 1071 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touching Panel 1071 is controlled, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 It can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operation One of bar etc. is a variety of, specifically herein without limitation.
In one embodiment, one or more buttons have can be set in the side of communication equipment 100.Button can be real The various ways such as existing short-press, long-pressing, rotation, to realize a variety of operating effects.The quantity of button can be to be multiple, and different presses It can be applied in combination between button, realize a variety of operating functions.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing communication equipment 100 as two independent components, but in certain embodiments, Can be integrated by touch panel 1071 and display panel 1061 and realize the function that outputs and inputs of communication equipment 100, it is specific this Place is without limitation.For example, when receiving the message informing of a certain application program by radio frequency unit 101, processor 110 can be with It controls and shows the message informing in a certain predeterminable area of display panel 1061, the predeterminable area and touch panel 1071 A certain region is corresponding, can be to corresponding on display panel 1061 by carrying out touch control operation to a certain region of touch panel 1071 The message informing shown in region is controlled.
Interface unit 108 be used as at least one external device (ED) connect with communication equipment 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in communication equipment 100 or can be with For transmitting data between communication equipment 100 and external device (ED).
In one embodiment, communication equipment 100 interface unit 108 using contact structure, by contact with it is right The other equipment connection answered, realizes the functions such as charging, connection.Use contact can be with waterproof.
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of communication equipment 100, utilizes various interfaces and the entire communication equipment of connection 100 various pieces, by running or executing the software program and/or module that are stored in memory 109, and calling storage Data in memory 109 execute the various functions and processing data of communication equipment 100, to carry out to communication equipment 100 Integral monitoring.Processor 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and Modem processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation Processor mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110 In.
Communication equipment 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Fig. 2-1 to Fig. 2-3 is please referred to, is under a kind of a kind of embodiment of communication equipment 100 provided by the embodiments of the present application Structural schematic diagram.Communication equipment 100 in the embodiment of the present application is wearable device, including flexible screen.It is set wearable When standby expansion, flexible screen is elongated;When wearable device is in wearing state, flexible screen bending is annular in shape.Fig. 2-1 And Fig. 2-2 shows structural schematic diagram when wearable device screen is unfolded, when Fig. 2-3 shows wearable device screen-bending Structural schematic diagram;The display screen for the wearable device in the embodiment of the present application that should of course be understood that can not also be flexible screen Curtain.
Referring to FIG. 3, showing for the structure under a kind of 100 another embodiment of communication equipment provided by the embodiments of the present application It is intended to.Communication equipment 100 in the embodiment of the present application is mobile phone.
Based on above-mentioned communication terminal hardware configuration and communications network system, each embodiment of the application method is proposed.
First embodiment
Can only support a kind of role for current Bluetooth communication protocol communication equipment, cause Bluetooth communication flexibility and Bad adaptability, application scenarios are by biggish limitation, the problem of satisfaction of users difference, communication control side provided by the embodiment In method, at least one UUID can be written by a SDP come the audio frequency net gate way AG to the first communication equipment in the first communication equipment Role and hands-free HF role register, and will the obtained AG role's registration information of registration and HF role's registration information respectively with the First Bluetooth address of one communication equipment, the binding of the second Bluetooth address, at least one UUID of write-in correspond to the first communication and set It is standby to support AG role and HF role simultaneously;Such first communication equipment is after completing registration, the HF role of registration and the angle AG Color respectively binds a mutually independent Bluetooth address, so that the first communication equipment is externally rendered as two independent communications Equipment so that first communication equipment can support AG role and HF role simultaneously, and communicates with other set according to demand Standby to establish AG connection and/or HF connection, so that Bluetooth communication application is more flexible, better adaptability can preferably be suitable for each Kind Bluetooth communication application scenarios, promote the satisfaction of user experience.
Shown in Figure 4, the communication control method of communication equipment provided in this embodiment includes:
S401: the first communication equipment is established Bluetooth communication with the second communication equipment and is connect.
In some examples of the present embodiment, the first communication equipment and the second communication equipment establish that Bluetooth communication connect can be with Include:
Bluetooth discovery is initiated, determines the role that the second communication equipment is supported;Or, receiving the indigo plant that the second communication equipment is initiated Tooth search, the role for making the second communication equipment determine that the first communication equipment is supported;
Role between first communication equipment and the second communication equipment is matched;
With matched role, the Bluetooth communication connection between the first communication equipment and the second communication equipment is established.First When communication equipment and the second communication equipment establish connection for the first time, the first communication equipment or the second communication equipment need to initiate bluetooth Search finds opposite end, and determines the role that opposite end is supported.
First communication equipment initiates bluetooth discovery, the role for making the first communication equipment determine that the second communication equipment is supported. Bluetooth discovery side can be carried out by the first communication equipment or the second communication equipment, that is to say, that the first communication equipment can be with As search initiator, the second communication equipment can also be used as search initiator;When the first communication equipment is as search initiator When, the second communication equipment is just as search recipient.The first communication equipment and second of connection to be established is determined in the present embodiment The case where AG role and HF role of each self-supporting of communication equipment, and searcher knows the support AG role and HF role of itself Situation, it is only necessary to by search, know the support situation of other side.In the present embodiment, that is, by initiating bluetooth it searches Rope, so that the first bluetooth equipment, determines the role that the second bluetooth equipment is supported.
Specifically, the first communication equipment initiates bluetooth discovery, the first communication equipment is made to determine that the second communication equipment is supported Role may include:
First communication equipment initiates the request message of SDP search;
It receives the SDP search response message of the second communication device feeding back, in SDP search response message, carries characterization second The characteristic value for the role that communication equipment is supported.Wherein, in SDP search response message, the second communication equipment of characterization institute of carrying The characteristic value of the role of support, that is, the UUID that second communication equipment is written in registration.
In some embodiments, the first communication equipment of connection to be established and the AG of each self-supporting of the second communication equipment are determined Role and the case where HF role can also include:
The bluetooth discovery for receiving the initiation of the second communication equipment, makes the second communication equipment determine what the first communication equipment was supported Role.The example shows that searcher has become the second communication equipment, and when scanning for, the first communication is set the second communication equipment Standby then be used as searched side, the role for accordingly being supported itself feeds back to the second communication equipment, process and above-mentioned the One communication equipment is as the similar of searcher, and only the two exchanges role.
In some embodiments, the bluetooth discovery that the second communication equipment is initiated is received, the second communication equipment is made to determine first The role that communication equipment is supported may include:
It receives the second communication equipment and initiates SDP search request message;
SDP search response message is sent to the second communication equipment, in SDP search response message, carries the first communication of characterization The characteristic value for the role that equipment is supported.
S402: the first communication equipment is after restarting bluetooth after closing bluetooth, and the first communication equipment is in a conversation description At least one Universally Unique Identifier UUID is written in agreement SDP, come the audio frequency net gate way AG role to the first communication equipment and exempts from It mentions HF role to register, and the AG role's registration information and HF role's registration information that registration obtains is communicated with first set respectively Standby the first Bluetooth address, the binding of the second Bluetooth address.
After restarting bluetooth after closing bluetooth, indicate building between the first communication equipment and the second communication equipment Bluetooth communication connection is disconnected in the case where having stood Bluetooth communication connection, and is attempted a connection to again;During reconnection, do not need Bluetooth discovery operation is carried out to opposite end again, it is desirable that the first communication equipment after restarting bluetooth, carry out role's note Then volume carries out the role match between two communication equipments.
It in the present embodiment, is by least one UUID, while to AG role to the registration process of the first communication equipment It is registered with HF role;The value of at least one UUID corresponds to the first communication equipment and supports audio frequency net gate way AG role and hands-free HF Role may include:
When UUID is two, the value of one of UUID corresponds to the first communication equipment and supports AG role, another UUID Value correspond to the first communication equipment support HF role;
When UUID is one, the value of UUID corresponds to the first communication equipment and supports audio frequency net gate way AG role and hands-free simultaneously HF role.
In the present embodiment, to the registration process of the first communication equipment, be by least one UUID, while to AG role and HF role registers;Specifically, the AG role of the first communication equipment and HF role's registration may include:
In sdp, the data element Data Element value of default frame structure is written, as default in first communication equipment UUID.In the present embodiment, when being registered by a UUID, a kind of new frame structure value, the frame structure value are provided It corresponds directly to the communication equipment while there are two kinds of roles of AG and HF, only embody a kind of frame knot without once registering Structure, and the problem of lead to not completely to characterize the communication equipment practical role's situation supported.Specifically, in the present embodiment, The default frame structure of communication equipment is made of the type field and Size field that are sequentially arranged, and the type field indicates frame structure Type, Size field indicate the size and content of frame structure.Referring to FIG. 5, Fig. 5 shows the default frame structure in the present embodiment Schematic diagram, it is defined good value that wherein there has been 0-8 in the part Type in the related technology, and 9-31 is retention, therefore can be with Using any one value used in 9=31, as customized Type;In Size field, shown in Size index with How many expressions size, subsequent size afterwards indicate the length of the character string in authentic data domain, to guarantee correctly to be read It takes;Subsequent HF&AG is then real data content, indicates while supporting AG role and HF role.In the present embodiment, together One period only take up the port of a RFcomm wait connection, wait opposite end come initiate the connection or local terminal search connection pair End.When being registered by two UUID, then two UUID are written together in same SDP registration process, between two UUID It is spaced apart with identifier or two UUID is directly connected to.
Communication equipment has audio frequency net gate way AG function and hands-free HF function in the present embodiment.And it should be understood that this reality The registration that can carry out AG role and HF role in example by protocol stack is applied, and carries out AG role's registration information and HF role's note The acquisition of volume information.The protocol stack can be various bluetooth protocol repertories, specifically can flexible choice according to demand.
The first Bluetooth address and the second Bluetooth address are different Bluetooth address in the present embodiment.And bluetooth in the present embodiment The specific format of address can also flexibly be set according to demand.In the present embodiment, AG role's registration information and HF that registration is obtained The mode that role's registration information is bound with the first Bluetooth address of the first communication equipment, the second Bluetooth address respectively can flexibly really It is fixed.For example, the first Bluetooth address and audio frequency net gate way AG role's registration information can be bound, and by the second Bluetooth address with The binding of HF role's registration information;And it should be understood that in the present embodiment when being bound, can also by the second Bluetooth address with Audio frequency net gate way AG role's registration information is bound, and the first Bluetooth address and HF role's registration information are bound.It is specific to use Which kind of binding mode can flexibly be selected according to specific requirements.
By by the AG role of communication equipment registration and HF role respectively from two different Bluetooth address of communication equipment It is bound, so that communication equipment is externally rendered as two independent communication equipments, so that the communication equipment can be with It supports AG role and HF role simultaneously, and AG can be established with other communication equipments according to demand and connect or HF connection, or even can be same Shi Jianli AG connection is connected with HF, so that more flexible, the better adaptability of application of Bluetooth communication, can preferably be suitable for Various Bluetooth communication application scenarios, promote the satisfaction of user experience.
In some examples of the present embodiment, communication equipment is setting the first communication by a Session Description Protocol SDP After the standby registration for carrying out audio frequency net gate way AG role and hands-free HF role, further includes:
Start the port RFcomm, waits subsequent connection.The linear simulation protocol of serial ports (RFcomm), suitable for being based on The serial ports of L2CAP is simulated.The realization of HFP is based on the linear simulation protocol of serial ports.The linear simulation protocol of serial ports is established serially linearly to imitate True agreement connection, needs distal end (Remote) to be registered in the service channel in service discovery protocol when sending SABM packet (server channel) is used as parameter, to distinguish the different linear simulation protocol connections of serial ports.
In the present embodiment, the acquisition modes of the first Bluetooth address and the second Bluetooth address can flexibly be set.For the ease of Understand, is illustrated below the present embodiment using several Bluetooth address acquisition modes as example.
It, can be to be previously written cured Bluetooth address in communication equipment for the first Bluetooth address in a kind of example, and it should First Bluetooth address is can store in a communications device in Bluetooth address storage file;Such as a kind of storage mode can be for two System mode is written in preset bin file and is stored.In role's registration, first can be read out from the bin file Bluetooth address.However, it is to be understood that the first Bluetooth address can also be dynamic when required by preset rules in the present embodiment State generates, however it is not limited to the acquisition modes of above-mentioned example.
It, can be through but not limited to following three kinds of acquisition sides for the acquisition modes of the second Bluetooth address in a kind of example Any one in formula:
The acquisition process of one: the second Bluetooth address of mode is shown in Figure 6, comprising:
S601: before receiving the registration information sent by protocol stack, preset Bluetooth address algorithm is first called to generate Second Bluetooth address, and second Bluetooth address is stored in preset Bluetooth address storage file;And second Bluetooth address It can be stored in from the first Bluetooth address in different Bluetooth address storage files, also can be stored in identical Bluetooth address storage text In part.Such as second Bluetooth address can be stored in the bin file that the first Bluetooth address is stored in a kind of example.
S602: in the bluetooth module starting of the first communication equipment, the second bluetooth is read from Bluetooth address storage file Address.
Mode two: it when needed, calls directly preset Bluetooth address algorithm and generates the second Bluetooth address.This mode can To be dynamically generated the second Bluetooth address in real time when needed.
The acquisition process of three: the second Bluetooth address of mode is shown in Figure 7, comprising:
S701: in the bluetooth module starting of the first communication equipment, the is read from preset Bluetooth address storage file Two Bluetooth address.
S702: judging whether the reading of the second Bluetooth address succeeds, if so, going to S703;Otherwise, S704 is gone to.
The acquisition of S703: the second Bluetooth address terminates.
S704: it calls preset Bluetooth address algorithm to generate the second Bluetooth address, and the second Bluetooth address of generation is deposited It is stored in Bluetooth address storage file.
It should be understood that the acquisition of the first Bluetooth address and the second Bluetooth address can obtain simultaneously in the present embodiment, The first Bluetooth address can also be first obtained, then obtains the second Bluetooth address, or first obtains the second Bluetooth address, then obtain first Bluetooth address specifically can flexibly be obtained according to concrete application scene.
In the present embodiment in a kind of example, the first Bluetooth address be communication equipment in being previously written cured bluetooth Location, and first Bluetooth address is stored in a communications device in Bluetooth address storage file;In this example, it calls preset Bluetooth address algorithm generates the second Bluetooth address can include:
The first Bluetooth address is obtained, stochastic transformation is carried out to the value in address low region in the first Bluetooth address and obtains the Two Bluetooth address.The mode of progress stochastic transformation in the present embodiment can be used flexibly, as long as can guarantee second is blue Tooth address is different from the first Bluetooth address.Can also it sentence after generating the second Bluetooth address in order to further enhance reliability Whether second Bluetooth address that breaks is identical as the first Bluetooth address, when such as identical, then to address low side area in the first Bluetooth address Value in domain re-starts stochastic transformation and obtains the second Bluetooth address, is then compared again with the first Bluetooth address, until two Person is different.
In this example, in order to further enhance reliability and accuracy, whether may also include the first Bluetooth address of detection It is updated, if so, then obtaining updated first Bluetooth address, and to address low side in updated first Bluetooth address Value in region carries out stochastic transformation and obtains the second new Bluetooth address.
The HF role and AG role of communication equipment registration can respectively bind a mutually independent Bluetooth address in this way, thus Two independent communication equipments externally are rendered as, so that the communication equipment can support AG role and HF role simultaneously, and AG can be established with other communication equipments according to demand to connect and/or HF connection, so that Bluetooth communication application is more flexible, adaptability More preferably, it can preferably be suitable for various Bluetooth communication application scenarios, promote the satisfaction of user experience.
S403: the role between the first communication equipment and the second communication equipment is matched.
S403 is the process of the reconnection after bluetooth module is restarted in the present embodiment, do not need in this step again to opposite end into Row bluetooth discovery operation, it is desirable that the first communication equipment after restarting bluetooth, carry out role's registration, then basis Connection (such as may include but be not limited to last connection) before directly carries out between two communication equipments Role match, therefore joint efficiency and resource utilization can be promoted.Certainly, in some instances, bluetooth also can be performed herein Search, and then bluetooth discovery result matches the role between the first communication equipment and the second communication equipment.
S404: with matched role, connection is established with the second communication equipment.
The Bluetooth communication connection established between first communication equipment and the second communication equipment, can allow according to the actual situation Any one of them may search for as recipient, searcher when initiating the search to recipient as searcher, another one The character types that recipient supports, such as only AG role, only HF role and support AG role and HF role simultaneously.
Between first communication equipment and the second communication equipment when being attached, the mode connected can be to be connected automatically Connect, be attached by the control of user etc., wherein automatic connection indicates the two after the search is completed, is automatically performed bluetooth Connection can borrow the connection to realize Bluetooth communication between the two after connection;Automatically the type connected, can be according to the first communication The difference for the character types supported between equipment and the second communication equipment and be arranged, such as, the first communication equipment is supported simultaneously When AG and HF role, if the second communication equipment, only support one of role, then the first communication equipment by corresponding role with Connection;If the second communication equipment also supports two kinds of roles, can be random between the first communication equipment and the second communication equipment It selects corresponding role to connect, or according to preset priority, corresponding role is selected to be attached.Pass through the control of user The case where connecting, then supporting two kinds of roles mainly for the first communication equipment and the second communication equipment is used in this case Family can voluntarily select how to connect between the first communication equipment and the second communication equipment.Here connection refers in the first communication The access of bluetooth is established between equipment and the second communication equipment, is not related to the transmission process of data.
In some embodiments, with matched role, establishing connection with the second communication equipment may include:
By the port RFcomm having been turned on, to establish connection with the matched role of the second communication equipment.
In some embodiments, with matched role, establishing connection with the second communication equipment may include:
When the second communication equipment only supports AG role, the first communication equipment is established by HF role and the second communication equipment Connection;
When the second communication equipment only supports HF role, the first communication equipment is established by AG role and the second communication equipment Connection;
When the second communication equipment supports AG role and HF role simultaneously, between the first communication equipment and the second communication equipment Connection is established by any AG role and HF role combinations.Specific namely the first communication equipment is by AG role, with second Communication equipment establishes connection by HF role;And/or first communication equipment by HF role, pass through AG with the second communication equipment Role establishes connection.In other words, connection between the two is the combination of AG and HF.
Communication control method provided in this embodiment, the first communication equipment is when closing bluetooth restarting, the first communication Equipment by Session Description Protocol SDP, be written a default UUID value carry out simultaneously the first communication equipment AG role and HF role's registration, and AG role and HF role correspond to a Bluetooth address respectively to externally be rendered as two mutually independent indigo plants Tooth communication equipment;Determine connection to be established the first communication equipment and each self-supporting of the second communication equipment AG and HF the case where; First communication equipment establishes connection with the second communication equipment by a role in AG role and HF role;It can be seen that the present embodiment When can open again bluetooth closing in communication equipment, that is, break reconnection, AG role and HF role are registered, thus The scope of application for expanding communication equipment, improves user experience.
Second embodiment
In order to make it easy to understand, the present embodiment is on that basi of the above embodiments, it is example in conjunction with a kind of specific application scenarios It is illustrated.
In the present embodiment, communication system includes the first communication equipment and the second communication equipment, wherein at least one Communication equipment can be using communication control method shown in above-described embodiment.In order to make it easy to understand, below with the first communication equipment Location registration process process be illustrated for example.
It in the present embodiment, can be when Bluetooth address be written in the first communication equipment, in addition to the first of default configuration Outside Bluetooth address, Bluetooth address algorithm can also be called to generate a new Bluetooth address (namely MAC Address) as the second bluetooth Address, and in writable bin file;And it is optional, the first Bluetooth address and the second Bluetooth address can be written into the same bin text Part.
Then when the bluetooth module starting of the first communication equipment, the firmware of the bluetooth module of the first communication equipment can Directly from the memory space for reading out the first Bluetooth address and the second Bluetooth address write-in bluetooth module in bin file.The One communication equipment can first pass through the registration that bluetooth protocol repertory carries out AG role, so when carrying out Bluetooth Role registration by SDP AG role's registration information is passed to the firmware of the bluetooth module of the first communication equipment afterwards, firmware can be by AG role's registration information It is bound with the first Bluetooth address (certainly can also be with the second Bluetooth address);Then first communication equipment can pass through Bluetooth protocol Stack carries out the registration of HF role, then HF role's registration information is passed to the firmware of the bluetooth module of the first communication equipment, Gu Part can bind HF role's registration information and the second Bluetooth address (certainly also with the first Bluetooth address).Such first The AG function and HF function of communication equipment are realized on the first Bluetooth address and the second Bluetooth address respectively, for third party device For first communication equipment be rendered as two the first different communication equipments, therefore the first Bluetooth address can be set as master always Standby to exist, the second Bluetooth address can exist as from equipment always, which can be flexibly logical with third party first Letter equipment is established AG connection and at least one of is connected with HF.
In order to make it easy to understand, being illustrated below the present embodiment with a kind of exemplary bluetooth protocol repertory.Refer to Fig. 8 Shown, the bluetooth protocol repertory in the present embodiment includes but is not limited to following components:
PHY layer (Physical layer, physical layer), PHY layer is used to specify radio band used in BLE, modulation /demodulation Ways and means etc..PHY layer can determine the power consumption of entire BLE chip, the RF indexes such as sensitivity and selectivity.
LL layers (Link Layer, link layer), LL layers are the cores of entire BLE protocol stack, it can be achieved that but being not limited to select Which radio-frequency channel is communicated, and how to identify air-data packet, specifically data packet is sent at which how at time point Guaranteeing the integrality of data, how ACK receives, how to be retransmitted, and how link is managed and is controlled etc..LL Layer, which is responsible for data to send out perhaps to get back, carries out that GAP or ATT above are then given in what kind of parsing to data.
HCI (Host controller interface, Host Controler Interface), HCI be it is optional, in a kind of example, HCI can be used for the occasion that 2 chips realize BLE protocol stack, for standardizing communication protocol and communications command etc. between the two.
GAP layers (Generic access profile, Generic Access Profile).GAP is to LL layers of payload (significant figure According to packet) one of the two ways how to be parsed.GAP simply carries out some specifications and definition to LL payload, GAP can be used to be broadcasted, and scan and initiate the connection.
L2CAP layers of (Logic link control and adaptation protocol, logic link control and adaptation Agreement), L2CAP has carried out a simplified package to LL, and LL is only concerned data of transmission itself, and it is encryption that L2CAP, which will be distinguished, Channel or Common passageway, while also connection interval is managed.
SMP (Secure manager protocol, security manager agreement), SMP are used to manage the encryption of BLE connection With safety, how to guarantee the safety of connection, while not influencing the experience of user, these are all the SMP work to be considered.
ATT (Attribute protocol, attribute agreement), ATT layers are used to define the number of user command and command operation According to, for example read some data or write some data.
GATT (Generic attribute profile, general-purpose attribute configuration file), GATT are used to standardize Data content in attribute, and Classification Management is carried out to attribute with the concept of group (grouping).
The present embodiment additionally provides a kind of topology example of Bluetooth address, bluetooth device address (BD_ADDR) in this example It is the unique identifier of a 48bit, by LAP (24 bit address lower portion), UAP (8 bit address upper) and NAP (16 The meaningless address part in position) it forms, format is as shown in Figure 9:
Wherein, NAP and UAP is the exclusive identification code of bluetooth equipment production firm, distributes to each manufacturer by SIG;LAP is then It is voluntarily distributed by manufacturer.Wherein, bit40 be multicast address flag bit, value be 0:unicast (unicast), value 1: Multicast (multicast);Bit41 is address style flag bit, and value is 0:universal addr, value 1:local addr。
On the basis of above-mentioned example, the present embodiment is illustrated below with reference to registration process shown in Fig. 10 for example.Please It is shown in Figure 10, comprising:
The bluetooth module of S1001: the first communication equipment starts.
S1002: bluetooth module carries out the registration of AG role and HF role by a SDP.
S1003: AG function and HF function are loaded by bluetooth protocol repertory.
S1004: AG role's registration information and HF role's registration information are passed to by firmware by bluetooth protocol repertory.
S1005: judge whether the registration information being currently received is AG role's registration information, if so, going to S1006;It is no Then, S1007 is gone to.
S1006: AG role's registration information and the first Bluetooth address are bound.
S1007: HF role's registration information and the second Bluetooth address are bound.The corresponding logical box of above registration process Frame figure is shown in Figure 11.After completing address binding, then remaining is searched for and can be used but be not limited to current association with connecting View regulation.The HF role and AG role of first communication equipment registration be with can respectively binding a mutually independent bluetooth in this way Location, so that two independent first communication equipments are externally rendered as, so that first communication equipment can support AG simultaneously Role and HF role.
The present embodiment on that basi of the above embodiments, provides a kind of communication control method, is applied to include above-mentioned first The communication system of communication equipment and the second communication equipment, the first communication equipment and the second communication equipment in the present embodiment can be with The communication equipment of mobile terminal class, such as mobile phone, wearable device, PC PC are belonged to, can also be eventually with one of them Class equipment is held, another one is bluetooth peripheral hardware, such as bluetooth headset, bluetooth mouse, bluetooth keyboard;Difference between the two exists In the communication equipment, if having the function of otherwise being communicated with other equipment, such as, the call on mobile phone Function, data connection function, wifi function etc. belong to function not available for bluetooth peripheral hardware, that is to say, that bluetooth peripheral hardware is It is communicated as auxiliary mobile terminal.And bluetooth peripheral hardware, it is however generally that only have the function of HF role, mobile terminal then may be used To have the function of AG role and HF role.In addition, the first communication equipment and the second communication equipment in the present embodiment, only Role is distinguished in process between the two, and the two can have same hardware configuration, and the first communication is set Role can be interchanged in standby and the second communication equipment in corresponding scene, and the present embodiment is simultaneously not limited thereof.
When first communication equipment includes mobile terminal, the call function of the mobile terminal can pass through carrier network reality Existing, wherein terminal can realize the call function by esim card or entity sim card;Alternatively, can also by data connection, The functions such as wifi realize call function, such as wechat voice, qq voice by carrier of the various softwares for having call function. In this case, the bluetooths peripheral hardware such as bluetooth headset can be used as audio initiation/receiving end in communication process, realize auxiliary Call;And if the second communication equipment includes other mobile terminals, other mobile terminals, can also serve as conversing at this time Audio initiation/receiving end or other terminals in journey are also used as synchronous audiomonitor and realize and the first communication equipment Synchronous call.
The Bluetooth communication connection established between first communication equipment and the second communication equipment, can allow according to the actual situation Any one of them may search for as recipient, searcher when initiating the search to recipient as searcher, another one The character types that recipient supports, such as only AG role, only HF role and support AG role and HF role simultaneously.Referring to Figure 12 Shown, which includes:
S1201: the first communication device initiated bluetooth;
S1202: the first communication equipment is registered by the way that a new UUID, completion AG role and HF role are written in sdp, And AG role's registration information and HF role's registration information are bound with its first Bluetooth address and the second Bluetooth address respectively;
S1203: the corresponding ports of one RFcomm of starting;
S1204: the second communication equipment initiates bluetooth discovery, the AG role and the angle HF that the first communication equipment of discovery is supported Color;
S1205: the role of the two is matched, and establishes connection;
S1206: the first communication equipment restarts bluetooth;
S1207: the first communication equipment is registered by the way that a new UUID, completion AG role and HF role are written in sdp, And AG role's registration information and HF role's registration information are bound with its first Bluetooth address and the second Bluetooth address respectively;
S1208: the corresponding ports of one RFcomm of starting;
Does S1209: the second communication equipment initiate AG connection? if so, S1210 is gone to, if it is not, going to S1211;
S1210: starting AG services and binds the completion connection of the port RFcomm.
S1211: starting HF services and binds the completion connection of the port RFcomm.
3rd embodiment
A kind of communication equipment is present embodiments provided, the type of the communication equipment refers to shown in above-described embodiment, herein It repeats no more.Shown in Figure 13, which includes:
It processor 1301, memory 1302, transmitter 1303, receiver 1304 and is stored on memory 1302 and can be The computer program run on processor;
Computer program, transmitter 1303, receiver 1304 realize communication as described above when being called by processor 1301 Each step in control method.
The present embodiment additionally provides a kind of computer readable storage medium, which has can be The computer program run on processor realizes communication control in as above each embodiment when the computer program is executed by processor Step in method.
It should be noted that, in this document, term " includes ", " comprising " or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
Embodiments herein is described above in conjunction with attached drawing, but the application be not limited to it is above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the enlightenment of the application, when not departing from the application objective and scope of the claimed protection, can also it make very much Form, these are belonged within the protection of the application.

Claims (10)

1. a kind of communication control method, which is characterized in that the communication control method includes:
Bluetooth communication is established with the second communication equipment to connect;
After closing bluetooth and opening again, in a Session Description Protocol SDP registration, at least one Universally Unique Identifier is written UUID, come to the first communication equipment audio frequency net gate way AG role and hands-free HF role register, and will the obtained angle AG of registration Color registration information and HF role's registration information are tied up with the first Bluetooth address of first communication equipment, the second Bluetooth address respectively Fixed, at least one described UUID corresponds to first communication equipment and supports AG role and HF role simultaneously;
Role between first communication equipment and the second communication equipment is matched;
With matched role, connection is established with the second communication equipment.
2. communication control method as described in claim 1, which is characterized in that described to establish Bluetooth communication with the second communication equipment Connection includes:
Bluetooth discovery is initiated, determines the role that the second communication equipment is supported;It is searched or, receiving the bluetooth that the second communication equipment is initiated Rope, the role for making the second communication equipment determine that the first communication equipment is supported;
Role between first communication equipment and the second communication equipment is matched;
With matched role, the Bluetooth communication connection between the first communication equipment and the second communication equipment is established.
3. communication control method as claimed in claim 2, which is characterized in that the first communication equipment and the second communication equipment it Between role carry out matching include:
According to bluetooth discovery as a result, being matched to the role between the first communication equipment and the second communication equipment;Or, according to One communication equipment and the second communication equipment last time connection, to the role between the first communication equipment and the second communication equipment It is matched.
4. communication control method as described in any one of claims 1-3, which is characterized in that set described to first communication After standby role registers, further includes:
Start the port radio communication RFcomm, waits subsequent connection;
It is described to establish connection with the second communication equipment and include:
By the port RFcomm having been turned on, to establish connection with the matched role of the second communication equipment.
5. communication control method as described in any one of claims 1-3, which is characterized in that at least one described UUID corresponds to First communication equipment supports AG role simultaneously and HF role includes:
When the UUID is two, the value of one of UUID corresponds to first communication equipment and supports AG role, another The value of UUID corresponds to first communication equipment and supports HF role;
When the UUID is one, the value of the UUID corresponds to first communication equipment and supports the angle audio frequency net gate way AG simultaneously Color and hands-free HF role.
6. the described in any item communication control methods of claim 1-3, which is characterized in that by AG role's registration information and HF Role's registration information further includes obtaining second indigo plant respectively and before first Bluetooth address, the binding of the second Bluetooth address Tooth address, acquisition second Bluetooth address include:
In the bluetooth module starting of first communication equipment, second bluetooth is read from Bluetooth address storage file Location;Second Bluetooth address is to call preset Bluetooth address algorithm to generate and be pre-stored within the Bluetooth address storage text In part.
7. communication control method as claimed in claim 6, which is characterized in that read institute from the Bluetooth address storage file When stating the failure of the second Bluetooth address, the method also includes:
It calls preset Bluetooth address algorithm to generate the second Bluetooth address, and second Bluetooth address is stored in the bluetooth In the storage file of address.
8. communication control method as claimed in claim 6, which is characterized in that described that preset Bluetooth address algorithm is called to generate Second Bluetooth address includes:
First Bluetooth address is obtained, stochastic transformation is carried out to the value in address low region in first Bluetooth address and is obtained To the second Bluetooth address.
9. a kind of communication equipment, which is characterized in that the communication equipment includes memory, transmitter, receiver, processor and leads to Believe bus;
The communication bus is for realizing the connection communication between memory and processor;
The processor control transmitter, receiver, and the computer program stored in memory is called, to realize such as right It is required that step performed by the first communication equipment in communication control method described in any one of 1-8.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program can be executed by processor to realize as in the described in any item communication control methods of claim 1-8 Step performed by first communication equipment.
CN201910365453.7A 2019-04-30 2019-04-30 Communication control method, communication equipment and storage medium Withdrawn CN110267243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910365453.7A CN110267243A (en) 2019-04-30 2019-04-30 Communication control method, communication equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910365453.7A CN110267243A (en) 2019-04-30 2019-04-30 Communication control method, communication equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110267243A true CN110267243A (en) 2019-09-20

Family

ID=67914100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910365453.7A Withdrawn CN110267243A (en) 2019-04-30 2019-04-30 Communication control method, communication equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110267243A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746710A (en) * 2021-08-30 2021-12-03 广东全诚信息科技有限公司 Relay gateway control system and method based on intelligent central control system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120302170A1 (en) * 2011-05-26 2012-11-29 Motorola Mobility, Inc. Method and apparatus for performing role management of short-range wireless connections
CN103607787A (en) * 2009-06-09 2014-02-26 索尼公司 Communication method, information processing apparatus, and recording medium recording computer readable program
CN106452512A (en) * 2016-09-30 2017-02-22 广东欧珀移动通信有限公司 Role transition method and device based on Bluetooth connection
CN106658359A (en) * 2016-10-12 2017-05-10 青岛海信移动通信技术股份有限公司 Bluetooth connection method and device and communication system
CN106900079A (en) * 2015-12-18 2017-06-27 展讯通信(上海)有限公司 Bluetooth connecting method and device
CN109565525A (en) * 2016-08-10 2019-04-02 佳能株式会社 Communication equipment and its control method and program and communication system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607787A (en) * 2009-06-09 2014-02-26 索尼公司 Communication method, information processing apparatus, and recording medium recording computer readable program
US20120302170A1 (en) * 2011-05-26 2012-11-29 Motorola Mobility, Inc. Method and apparatus for performing role management of short-range wireless connections
CN106900079A (en) * 2015-12-18 2017-06-27 展讯通信(上海)有限公司 Bluetooth connecting method and device
CN109565525A (en) * 2016-08-10 2019-04-02 佳能株式会社 Communication equipment and its control method and program and communication system
CN106452512A (en) * 2016-09-30 2017-02-22 广东欧珀移动通信有限公司 Role transition method and device based on Bluetooth connection
CN106658359A (en) * 2016-10-12 2017-05-10 青岛海信移动通信技术股份有限公司 Bluetooth connection method and device and communication system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BLUETOOTH SIG: "Bluetooth Core Specification v5.0", 《BLUETOOTH》 *
BLUETOOTH SIG: "Hands-Free Bluetooth Profile Specification v1.7.2", 《BLUETOOTH》 *
BLUETOOTH SIG: "Serial Port Profile", 《BLUETOOTH》 *
MOBILE COMPUTING PROMOTION CONSORTIUM: "Hands-Free Profile 1.5 Application Guideline", 《2006-2007 MOBILE COMPUTING PROMOTION CONSORTIUM (MCPC)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746710A (en) * 2021-08-30 2021-12-03 广东全诚信息科技有限公司 Relay gateway control system and method based on intelligent central control system
CN113746710B (en) * 2021-08-30 2023-05-26 广东全诚信息科技有限公司 Relay gateway control system and method based on intelligent central control system

Similar Documents

Publication Publication Date Title
CN107770760B (en) A kind of method and mobile terminal of the type identifying bluetooth equipment
CN109946986B (en) Household appliance control method, wearable device and computer readable storage medium
CN110234138A (en) Communicate method for handover control, communication equipment, system and storage medium
CN109379735A (en) ESIM card operating method, mobile terminal and eSIM card apparatus
CN110098845B (en) Message processing method, wearable device, mobile terminal and readable storage medium
CN110248344A (en) Communication means, equipment, system and readable storage medium storing program for executing
CN110213749A (en) Communication processing method, communication equipment and storage medium
CN110087223A (en) Communication connecting method, communication equipment and storage medium
CN110198534A (en) Communicate transparent transmission control method, communication equipment, system and storage medium
CN110267243A (en) Communication control method, communication equipment and storage medium
CN110139257A (en) Communication connecting method, communication equipment and storage medium
CN109257739A (en) ESIM card operating method, mobile terminal and eSIM card apparatus
CN110121163A (en) Registration handling method, communication equipment and storage medium
CN110113736A (en) Communication control method, communication equipment, system and storage medium
CN110087222A (en) Role switching control method, communication equipment and storage medium
CN110234099A (en) Communication connecting method, communication equipment and storage medium
CN110139258A (en) Communication connecting method, communication equipment and storage medium
CN110267361A (en) Communication control method, equipment, system and readable storage medium storing program for executing
CN110213750A (en) Communication control method, equipment, system and readable storage medium storing program for executing
CN110225499A (en) Communication connecting method, communication equipment and storage medium
CN110430560A (en) Method, wearable device and the storage medium of wearable device upload data
CN110234137A (en) Communication control method, equipment, system and readable storage medium storing program for executing
CN110248345A (en) Communication control method, equipment, system and readable storage medium storing program for executing
CN109857319A (en) A kind of apparatus control method, mobile terminal and computer readable storage medium
CN110225498A (en) Communication control method, communication equipment and storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190920