CN110087223B - Communication connection method, communication device, and storage medium - Google Patents

Communication connection method, communication device, and storage medium Download PDF

Info

Publication number
CN110087223B
CN110087223B CN201910364466.2A CN201910364466A CN110087223B CN 110087223 B CN110087223 B CN 110087223B CN 201910364466 A CN201910364466 A CN 201910364466A CN 110087223 B CN110087223 B CN 110087223B
Authority
CN
China
Prior art keywords
role
communication device
communication
bluetooth address
bluetooth
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.)
Active
Application number
CN201910364466.2A
Other languages
Chinese (zh)
Other versions
CN110087223A (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.)
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 CN201910364466.2A priority Critical patent/CN110087223B/en
Publication of CN110087223A publication Critical patent/CN110087223A/en
Application granted granted Critical
Publication of CN110087223B publication Critical patent/CN110087223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04W60/00Affiliation to network, e.g. registration; Terminating affiliation with the network, e.g. de-registration
    • H04W60/005Multiple registrations, e.g. multihoming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

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

Abstract

The application provides a communication connection method, communication equipment and a storage medium, wherein the first communication equipment is registered with any one of an AG role and an HF role through an SDP to obtain first role registration information and is bound with a first Bluetooth address of the first communication equipment; performing Bluetooth search interaction with the second communication equipment to acquire the role supporting situation of the second communication equipment or feeding back the role supporting situation of the second communication equipment to the second communication equipment; before the first communication device and the second communication device are matched, registering the other role of the AG role and the HF role of the first communication device through the SDP to obtain second role registration information and binding the second role registration information and a second Bluetooth address; establishing connection with a role matched between the first communication equipment and the second communication equipment; according to the method and the device, the AG role and the HF role are registered successively when the Bluetooth function of the communication equipment is started, so that the application range of the communication equipment is expanded, and the user experience is improved.

Description

Communication connection method, communication device, and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a communication connection method, a communication device, and a computer-readable storage medium.
Background
The bluetooth technology is a wireless technology standard, and the bluetooth Hands-Free Profile (HFP) is a protocol in the bluetooth technology, and in the HFP protocol, communication devices can be divided into an AG (Audio Gateway) role and an HF (Hands Free) role, where the AG role is a role specified by the HFP protocol, and Audio supports input and output, and a typical device is a mobile phone; the HF role is another role defined by the HFP protocol, and is suitable for AG role audio input and output, and typical devices are bluetooth headset devices, wearable devices supporting bluetooth function, and the like.
In the application of bluetooth technology, a general bluetooth device only supports an HF (Hands Free) role or an AG (Audio Gate) role, for example, a mobile phone only supports an AG (i.e., a bluetooth call function master), and a bluetooth headset or a vehicle-mounted device only supports an HF (i.e., a bluetooth call function slave), so that a general wearable bluetooth device can only be selected as an HF or an AG, which relatively limits the usage scenario of the device and affects user experience.
Disclosure of Invention
The technical problem that this application will solve lies in: aiming at the problems that the use scene of the current Bluetooth device is limited and the user experience is poor, a communication connection method, a communication device and a storage medium are provided for the problems.
In order to solve the above technical problem, the present application provides a communication connection method, where the communication connection method includes:
registering any role of an audio gateway AG role and a hands-free HF role of a first communication device through a session description protocol SDP to obtain first role registration information, and binding the first role registration information with a first Bluetooth address of the first communication device;
initiating a Bluetooth search of a second communication device to acquire a condition that the second communication device supports a role; or, according to the Bluetooth search initiated by the second communication device, the situation of the role supported by the second communication device is sent to the second communication device;
before the first communication device and the second communication device are matched, registering the other role of the AG role and the HF role of the first communication device through an SDP to obtain second role registration information, and binding the second role registration information with a second Bluetooth address of the first communication device;
and matching the roles between the first communication equipment and the second communication equipment, and establishing connection with the second communication equipment by using the matched roles.
Optionally, the registering, by the SDP, any one of the AG role and the HF role of the first communication device includes:
registering by writing a first Universal Unique Identifier (UUID) into a first SDP, wherein the first UUID is used for identifying the self-supporting AG role;
or, the second UUID is written in the second SDP for registration, and the second UUID is used for identifying that the second UUID supports the HF role.
Optionally, after the registering, by means of SDP, the first communications device in the other of the AG role and the HF role, the method further includes:
at least one link is occupied on the radio frequency communication RFcomm for the AG role and the HF role respectively, and subsequent connection is waited.
Optionally, before binding the second role registration information with the second bluetooth address of the first communication device, the obtaining of the second bluetooth address further includes:
when a Bluetooth module of the first communication device is started, reading the second Bluetooth address from a Bluetooth address storage file; the second Bluetooth address is generated by calling a preset Bluetooth address algorithm and is stored in the Bluetooth address storage file in advance;
optionally, when reading the second bluetooth address from the bluetooth address storage file fails, the method further includes:
and calling a preset Bluetooth address algorithm to generate a second Bluetooth address, and storing the second Bluetooth address in the Bluetooth address storage file.
Optionally, the invoking a preset bluetooth address algorithm to generate the second bluetooth address includes: and acquiring the first Bluetooth address, and randomly converting the value in the low-end area of the address in the first Bluetooth address to obtain a second Bluetooth address.
Optionally, after randomly transforming the value in the low-end area of the address in the first bluetooth address to obtain a second bluetooth address, the method further includes:
and when the updating of the first Bluetooth address is detected, acquiring the updated first Bluetooth address, and randomly converting the value in the low-end area of the address in the updated first Bluetooth address to obtain a new second Bluetooth address.
Optionally, the establishing, in the matched role, a connection with the second communication device includes:
when the second communication device only supports the AG role, the first communication device establishes connection with the second communication device through the HF role;
when the second communication device only supports the HF role, the first communication device establishes connection with the second communication device through the AG role;
when the second communication equipment supports an AG role and an HF role simultaneously, the first communication equipment establishes connection with the second communication equipment through the AG role and the HF role; or, the first communication device establishes connection with the second communication device through an AG role through an HF role.
In order to solve the above problem, an embodiment of the present invention further provides a communication device, where the communication device includes a memory, a transmitter, a receiver, a processor, and a communication bus;
the communication bus is used for realizing connection communication between the memory and the processor;
the processor invokes the transmitter, the receiver, and the computer program stored in the memory to implement the steps performed by the first communication device in the communication connection method as described above.
In order to solve the above problem, an embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which is executable by a processor to implement the steps performed by the first communication device in the communication connection method as described above.
Advantageous effects
The application provides a communication connection method, communication equipment and a storage medium, wherein a first communication device is registered with any role of an AG role and an HF role through a session description protocol SDP to obtain first role registration information, and the first role registration information is bound with a first Bluetooth address of the first communication device; performing Bluetooth search interaction with the second communication equipment to acquire the role supporting situation of the second communication equipment or feeding back the role supporting situation of the second communication equipment to the second communication equipment; before the first communication device and the second communication device are matched, registering the other role of the AG role and the HF role of the first communication device through the SDP to obtain second role registration information, and binding the second role registration information with a second Bluetooth address of the first communication device; matching roles between the first communication device and the second communication device; and establishing connection with the second communication equipment in the matched role. It can be seen that this application can be when communication equipment opens bluetooth function, to same communication equipment, successively carry out AG role and HF role's registration and bind with different bluetooth addresses respectively, thereby make communication equipment externally present two independent communication equipment, and then make this communication equipment can support AG role and HF role simultaneously, and establish AG connection and/or HF connection with other communication equipment according to the demand, communication equipment's application scope has been enlarged, make bluetooth communication application more nimble, adaptability is better, promote user experience's satisfaction.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a schematic hardware structure diagram of an implementation manner of a communication device according to an embodiment of the present application;
fig. 2-1 is a schematic perspective view of a first wearable device according to an embodiment of the present disclosure when a screen is unfolded;
fig. 2-2 is a schematic perspective view of a second wearable device according to an embodiment of the present disclosure when a screen is unfolded;
2-3 are perspective views of a screen of one embodiment of a wearable device according to an embodiment of the present application when flexed;
fig. 3 is a schematic diagram of an implementation manner of a mobile phone provided in an embodiment of the present application;
fig. 4 is a flowchart illustrating a communication connection method according to a first embodiment of the present application;
fig. 5 is a schematic diagram of a second bluetooth address acquisition process according to the first embodiment of the present application;
fig. 6 is a schematic view of another second bluetooth address acquisition process according to the first embodiment of the present application;
fig. 7 is a schematic diagram of a bluetooth protocol stack structure according to a second embodiment of the present application;
fig. 8 is a schematic diagram of a bluetooth address structure according to a second embodiment of the present application;
fig. 9 is a schematic diagram illustrating a bluetooth registration process according to a second embodiment of the present application;
fig. 10 is a schematic diagram of a bluetooth protocol stack and bluetooth firmware connection provided in a second embodiment of the present application;
fig. 11 is a flowchart illustrating a communication connection method according to a third embodiment of the present application;
fig. 12 is a schematic structural diagram of a communication device according to a fourth embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The communication device provided in the embodiment of the present application may be various mobile devices, for example, the mobile devices may include, but are not limited to, a mobile phone, an IPAD, an in-vehicle device, a communication device 100, and the like, where the communication device 100 may include, but is not limited to, a smart band, a smart watch, a smart phone with a wearable feature (which may also be referred to as a wrist phone in the embodiment of the present application), and other mobile terminals. With the continuous development of screen technologies, flexible screens, folding screens and other screen forms, mobile terminals such as smart phones and the like can also be used as the communication device 100. The communication device 100 provided in the embodiment of the present application may include: radio Frequency (RF) unit, bluetooth
Figure BDA0002047768550000051
A module, a WiFi module, an audio output unit, an a/V (audio/video) input unit, a sensor, a display unit, a user input unit, an interface unit, a memory, a processor, and a power supply.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a communication device for implementing various embodiments of the present application, the communication device 100 may include: a radio frequency unit 101, a bluetooth module 112, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the configuration of the communication device 100 shown in fig. 1 is not intended to be limiting of the communication device 100, and that the communication device 100 may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The various components of the communication device 100 are described in detail below with reference to fig. 1:
the rf unit 101 may be used for transceiving information or receiving and transmitting signals during a call, and may include a transmitter for transmitting information and a receiver for receiving information. For example, the transmitter of the radio frequency unit 101 may send uplink information to a base station, and the receiver is configured to receive downlink information sent by the base station, and send the received downlink information to the processor 110 of the communication device 100 for processing, where the downlink information sent by the base station to the radio frequency unit 101 may be generated according to the uplink information sent by the radio frequency unit 101, or may be mainly pushed to the radio frequency unit 101 after detecting that information of the communication device 100 is updated, for example, after detecting that a geographic location of the communication device 100 changes, the base station may send a message notification of the change of the geographic location to the radio frequency unit 101 of the communication device 100, after receiving the message notification, the radio frequency unit 101 may send the message notification to the processor 110 of the communication device 100 for processing, and the processor 110 of the communication device 100 may control the message notification to be displayed on the display panel 1061 of the communication device 100; typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with a network and other devices through wireless communication, which may specifically include: the communication device 100 may download a file resource from a server, such as an application program from the server, through wireless communication, and after the communication device 100 finishes downloading a certain application program, if the file resource corresponding to the application program in the server is updated, the server may push a message notification of resource update to the communication device 100 through wireless communication to remind a user of updating the application program. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
In one embodiment, the communication device 100 may access an existing communication network by inserting a SIM card.
In another embodiment, the communication device 100 may implement access to an existing communication network by setting an esim card (Embedded-SIM), and by using the esim card, the internal space of the communication device 100 may be saved, and the thickness may be reduced.
It is to be understood that although fig. 1 shows the radio frequency unit 101, it is to be understood that the radio frequency unit 101 does not belong to the essential constitution of the communication apparatus 100, and may be omitted entirely as needed within the scope not changing the essence of the invention. The communication device 100 may implement a communication connection with other devices or a communication network through the WiFi module 102 alone, which is not limited in the embodiments of the present application.
The communication device 100 comprises a bluetooth module 112, and the communication device 100 can be connected with other terminal devices supporting bluetooth communication through the bluetooth module 112 to implement communication and information interaction. The bluetooth module 112 may have corresponding transmitters and receivers for implementing transmission and reception, respectively.
WiFi belongs to short-range wireless transmission technology, and the communication device 100 can help the user send and receive e-mails, browse web pages, access streaming media, etc. through the WiFi module 102, which provides the user with wireless broadband internet access. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the communication device 100, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the communication apparatus 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the communication apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
In one embodiment, the communication device 100 includes one or more cameras, and by turning on the cameras, capturing images, taking pictures, recording videos, and the like can be realized, and the positions of the cameras can be set as required.
The communication device 100 also includes at least one sensor 105, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the communication device 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer, tapping), and the like.
In one embodiment, the communication device 100 further comprises a proximity sensor, and by adopting the proximity sensor, the communication device 100 can realize non-contact operation and provide more operation modes.
In one embodiment, the communication device 100 further comprises a heart rate sensor, which, when worn, enables detection of heart rate by proximity to the user.
In one embodiment, the communication device 100 may further include a fingerprint sensor, and by reading a fingerprint, functions such as security verification can be implemented.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
In one embodiment, the display panel 1061 is a flexible display screen, and the communication device 100 using the flexible display screen can be bent when worn, so that the screen is more conformable. Optionally, the flexible display screen may adopt an OLED screen body and a graphene screen body, in other embodiments, the flexible display screen may also be made of other display materials, and this embodiment is not limited thereto.
In one embodiment, the display panel 1061 of the communication device 100 may take a rectangular shape to wrap around when worn. In other embodiments, other approaches may be taken.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the communication apparatus 100. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, without limitation.
In one embodiment, the sides of the communication device 100 may be provided with one or more buttons. The button can realize various modes such as short-time pressing, long-time pressing, rotation and the like, thereby realizing various operation effects. The number of the buttons can be multiple, and different buttons can be combined for use to realize multiple operation functions.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the communication device 100, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the communication device 100, and is not limited herein. For example, when receiving a message notification of an application program through the rf unit 101, the processor 110 may control the message notification to be displayed in a predetermined area of the display panel 1061, where the predetermined area corresponds to a certain area of the touch panel 1071, and perform a touch operation on the certain area of the touch panel 1071 to control the message notification displayed in the corresponding area on the display panel 1061.
The interface unit 108 serves as an interface through which at least one external device is connected to the communication apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the communication apparatus 100 or may be used to transmit data between the communication apparatus 100 and an external device.
In one embodiment, the interface unit 108 of the communication device 100 is configured as a contact, and is connected to another corresponding device through the contact to implement functions such as charging and connection. The contact can also be waterproof.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the communication apparatus 100, connects various parts of the entire communication apparatus 100 with various interfaces and lines, and performs various functions of the communication apparatus 100 and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby monitoring the communication apparatus 100 as a whole. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The communication device 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system.
Please refer to fig. 2-1 to fig. 2-3, which are schematic structural diagrams of an implementation manner of a communication device 100 according to an embodiment of the present disclosure. The communication device 100 in the embodiment of the present application is a wearable device including a flexible screen. When the wearable device is unfolded, the flexible screen is in a long strip shape; when the wearable device is in a wearing state, the flexible screen is bent to be annular. 2-1 and 2-2 show the structure of the wearable device screen when the wearable device screen is unfolded, and 2-3 show the structure of the wearable device screen when the wearable device screen is bent; of course, it should be understood that the display screen of the wearable device in the embodiment of the present application may not be a flexible screen.
Please refer to fig. 3, which is a schematic structural diagram of another implementation of a communication device 100 according to an embodiment of the present disclosure. The communication device 100 in the embodiment of the present application is a mobile phone.
Based on the above-mentioned bluetooth communication terminal hardware structure and communication network system, put forward various embodiments of the method of this application.
First embodiment
For solving the problems of single bluetooth communication connection mode and poor usability and flexibility of the existing communication device, the present embodiment provides a new communication connection method, please refer to fig. 4, where the communication connection method includes:
s401: registering any role of an audio gateway AG and a hands-free HF to a first communication device through a session description protocol SDP to obtain first role registration information, and binding the first role registration information with a first Bluetooth address of the first communication device;
s402: initiating a Bluetooth search of the second communication equipment to acquire the role supporting condition of the second communication equipment; or receiving Bluetooth search initiated by the second communication equipment, and feeding back the condition of the role supported by the second communication equipment to the second communication equipment;
s403: before the first communication device and the second communication device are matched, the first communication device is registered with the other role in the AG and the HF through the SDP to obtain second role registration information, and the second role registration information is bound with a second Bluetooth address of the first communication device.
S404: and matching the roles between the first communication equipment and the second communication equipment, and establishing connection with the second communication equipment in the matched roles.
The first communication device and the second communication device in this embodiment may both belong to mobile terminal type communication devices, such as a mobile phone, a wearable device, a personal computer PC, and the like, or one of them may be a terminal type device, and the other may be a bluetooth peripheral, such as a bluetooth earphone, a bluetooth mouse, a bluetooth keyboard, and the like; the difference between the two is that whether the communication device has the function of communicating with other devices in other manners, for example, the communication function, the data connection function, the wifi function, etc. on the mobile phone are all functions that the bluetooth peripheral does not have, that is, the bluetooth peripheral is used as an auxiliary mobile terminal to communicate. The bluetooth peripheral generally has only the function of the HF role, and the mobile terminal may have the functions of the AG role and the HF role. In addition, in the embodiment, only roles played in the flow between the first communication device and the second communication device are distinguished, the first communication device and the second communication device may have the same hardware structure, and the roles of the first communication device and the second communication device may be interchanged in corresponding scenes, which is not limited in this embodiment.
When the first communication equipment comprises a mobile terminal, the communication function of the mobile terminal can be realized through an operator network, wherein the terminal can realize the communication function through an esim card or an entity sim card; or, the call function can be realized by taking various software with the call function as a carrier through functions of data connection, wifi and the like, such as WeChat voice, qq voice and the like. Under the condition, bluetooth peripherals such as a Bluetooth headset and the like can be used as an audio initiating/receiving end in the communication process to realize auxiliary communication; if the second communication device includes other mobile terminals, the other mobile terminals may also serve as audio initiating/receiving terminals during the call, or the other terminals may also serve as synchronous monitoring devices to implement synchronous call with the first communication device.
The bluetooth communication connection established between the first communication device and the second communication device may be, according to actual circumstances, one of them may be used as a searcher and the other may be used as a receiver, and when the searcher initiates a search for the receiver, the searcher may search for role types supported by the receiver, such as an AG-only role, an HF-only role, and both the AG role and the HF role.
In this embodiment, the registration process for the first communication device is to register the AG role and the HF role separately, that is, register through respective SDPs; specifically, the registering of the first communication device in any role of the audio gateway AG and the hands-free HF by the session description protocol SDP may include:
the first communication equipment registers by writing a first UUID in a first SDP, wherein the first UUID is used for identifying that the first communication equipment supports the AG role, and the acquired first role registration information is AG role registration information; the second role registration information acquired in the subsequent registration of another role is HF role registration information;
or the first communication equipment registers by writing a second UUID in the second SDP, wherein the second UUID is used for identifying that the first communication equipment supports the HF role; the first role registration information acquired at this time is HF role registration information; the second role registration information acquired in the subsequent registration of another role is the AG role registration information. When registering, specifically, whether the AG role or the HF role is registered first may be set in a random control manner, or according to a manner used by the previous connection, or according to a rule such as a fixed order.
In this embodiment, the first UUID and the second UUID are used to represent that the communication device supports an AG role and an HF role, respectively; in this embodiment, the first communication device characterizes the roles supported by itself by two UUIDs, respectively, and includes an AG role and an HF role. In this embodiment, the AG role and the HF role are registered separately, and the first communication device first registers in any role, and then registers in another role after bluetooth search, so that resource occupation during initial registration can be saved, and registration efficiency can be improved.
In some embodiments, determining, by the SDP, the AG and the HF supported by each of the first communication device and the second communication device to establish the connection may include:
the first communication device initiates a bluetooth search to cause the first communication device to determine the roles supported by the second communication device. The bluetooth searching party can be performed by the first communication device or the second communication device, that is, the first communication device can be used as a search initiator, and the second communication device can also be used as a search initiator; when the first communication device is used as a search initiator, the second communication device is used as a search receiver. In this embodiment, the AG and HF supported by the first communication device and the second communication device to establish a connection are determined, and the searcher knows the AG and HF supported by itself, and only needs to know the support of the other party by searching. In this embodiment, that is, by initiating a bluetooth search, the first bluetooth device determines the roles supported by the second bluetooth device.
In one example, initiating a bluetooth search by a first communication device, causing the first communication device to determine a role supported by a second communication device may comprise:
a first communication device initiates an SDP search request message;
and receiving an SDP search response message sent by the second communication device, wherein the SDP search response message carries characteristic values representing roles supported by the second communication device. Wherein, in the SDP searching response message, the carried feature value characterizing the role supported by the second communication device, that is, the UUID written by the second communication device during registration includes, but is not limited to, a UUID, which indicates that the bluetooth device supports one of an AG role or an HF role; or two UUIDs, indicating that the bluetooth device supports both AG and HF roles.
In some embodiments, determining the AG and HF supported by each of the first communication device and the second communication device to establish the connection may further include:
and receiving Bluetooth search initiated by the second communication equipment, so that the second communication equipment determines the role supported by the first communication equipment. This example shows that the searching party becomes the second communication device, and when the second communication device performs the search, the first communication device serves as the searched party, and correspondingly feeds back the role supported by itself to the second communication device.
In some embodiments, receiving a bluetooth search initiated by the second communication device, causing the second communication device to determine the roles supported by the first communication device may comprise:
receiving a SDP searching request message initiated by the second communication equipment;
and sending an SDP search response message to the second communication equipment, wherein the SDP search response message carries characteristic values representing the roles supported by the first communication equipment.
When the first communication device and the second communication device are connected, the connection mode can be automatic connection, connection through user control and the like, wherein the automatic connection means that the first communication device and the second communication device automatically complete Bluetooth connection after searching is completed, and Bluetooth communication can be realized between the first communication device and the second communication device through the connection after connection; the type of automatic connection may be set according to a difference between role types supported by the first communication device and the second communication device, for example, when the first communication device supports both AG and HF roles, if the second communication device supports only one of the roles, the first communication device is connected to the second communication device through the corresponding role; if the second communication device also supports two roles, the first communication device and the second communication device may randomly select a corresponding role for connection, or select a corresponding role for connection according to a preset priority. The connection is controlled by the user, which mainly aims at the situation that the first communication device and the second communication device both support two roles, and in this situation, the user can select how to connect the first communication device and the second communication device. The connection here means that a bluetooth path is established between the first communication device and the second communication device, and does not involve a data transmission process.
In some embodiments, after the registration of the audio gateway AG role and the hands-free HF role respectively for the first communication device by means of different session description protocols SDP, the method further comprises:
at least one link is occupied on RFcomm for both AG and HF roles, waiting for a subsequent connection. And the serial port linear simulation protocol (RFcomm) is suitable for serial port simulation based on the L2 CAP. HFP is implemented based on a serial port linear emulation protocol. Establishing serial port linear simulation protocol serial linear simulation protocol connection, and when sending an SABM packet, needing a service channel (server channel) registered on a service discovery protocol by a Remote end (Remote) as a parameter to distinguish different serial port linear simulation protocol connections.
In one example, establishing, by the first communication device, a connection with the second communication device through one of an AG role and an HF role may include:
when the second communication equipment only supports the AG role, the first communication equipment establishes connection with the second communication equipment through the HF role;
when the second communication equipment only supports the HF role, the first communication equipment establishes connection with the second communication equipment through the AG role;
when the second communication device supports both the AG role and the HF role, the first communication device and the second communication device establish connection through any combination of the AG role and the HF role. In one example, the first communication device establishes a connection with the second communication device via the AG role via the HF role; or the first communication device establishes connection with the second communication device through the AG role through the HF role. In other words, the connection between the two is a combination of AG and HF.
In some embodiments, after the first communication device establishes the connection with the second communication device through one of the AG role and the HF role, the method may further include:
in one example, when the first communication device maintains a connected state with the second communication device in one role, the other role can be optionally logged off; in another example, since the first bluetooth address and the second bluetooth address of the first communication device are bound to the first role registration information and the second role registration information, respectively, they may be externally presented as two communication devices respectively presenting AG role and HF role, and thus while the first communication device maintains a connection state with the second communication device in one role, the other role of the first communication device may also continue to be maintained without logging off.
It can be seen that the communication connection method provided in this embodiment may perform registration of any role of the audio gateway AG and the hands-free HF for the first communication device through the session description protocol SDP; initiating a Bluetooth search of the second communication equipment to acquire the role supporting condition of the second communication equipment; or receiving Bluetooth search initiated by the second communication equipment, and feeding back the condition of the role supported by the second communication equipment to the second communication equipment; before the first communication device and the second communication device are matched, the first communication device is registered with the other role in the AG and the HF through the SDP; matching roles between the first communication device and the second communication device; and establishing connection with the second communication equipment in the matched role. Therefore, when the Bluetooth function of the communication equipment is started, the AG role and the HF role can be successively registered for the same communication equipment, so that the application range of the communication equipment is expanded, and the user experience is improved.
In this embodiment, the process of acquiring the first bluetooth address is included before the first role registration information is bound with the first bluetooth address, and correspondingly, the process of acquiring the second bluetooth address is included before the second role registration information is bound with the second bluetooth address. And it should be understood that, in this embodiment, the first communication device may perform registration of the AG role and the HF role through the protocol stack, and perform acquisition of first role registration information (hereinafter, referred to as the AG role) and second role registration information. The protocol stack can be various Bluetooth protocol stacks, and can be flexibly selected according to requirements.
It should be understood that, in the embodiment, when performing AG role and HF role registration, the AG role registration may be performed first, and after the AG role registration is completed, the HF role registration may be performed again; or the HF role registration is carried out first, and the AG role registration is carried out after the HF role registration is finished.
In this embodiment, the first bluetooth address and the second bluetooth address are different bluetooth addresses. And the specific format of the bluetooth address in this embodiment can also be flexibly set according to the requirement.
In this embodiment, the obtaining manner of the first bluetooth address and the second bluetooth address can be flexibly set. For ease of understanding, the present embodiment will be described below by taking several bluetooth address acquisition manners as examples.
In one example, for the first bluetooth address, a solidified bluetooth address can be written in the first communication device in advance, and the first bluetooth address can be stored in a bluetooth address storage file in the first communication device; for example, one storage method may be writing the data into a predetermined bin file in a binary manner for storage. When the role is registered, the first bluetooth address can be read from the bin file. Of course, it should be understood that the first bluetooth address in this embodiment may also be dynamically generated by a preset rule when needed, and is not limited to the above-described exemplary obtaining manner.
In one example, the second bluetooth address may be obtained by, but not limited to, any one of the following three obtaining manners:
the first method is as follows: fig. 5 shows a process of acquiring the second bluetooth address, which includes:
s501: before receiving second registration information sent by a protocol stack, calling a preset Bluetooth address algorithm to generate a second Bluetooth address, and storing the second Bluetooth address in a preset Bluetooth address storage file; and the second bluetooth address can be stored in a different bluetooth address storage file with the first bluetooth address, and can also be stored in the same bluetooth address storage file. For example, the second bluetooth address may be stored in a bin file stored in the first bluetooth address.
S502: and when the Bluetooth module of the first communication device is started, reading the second Bluetooth address from the Bluetooth address storage file.
The second method comprises the following steps: and when needed, directly calling a preset Bluetooth address algorithm to generate a second Bluetooth address. This way, the second bluetooth address can be dynamically generated in real time when needed.
The third method comprises the following steps: fig. 6 shows a process of acquiring the second bluetooth address, which includes:
s601: and when the Bluetooth module of the first communication device is started, reading the second Bluetooth address from a preset Bluetooth address storage file.
S602: judging whether the second Bluetooth address is successfully read, if so, turning to S603; otherwise, go to S604.
S603: the second bluetooth address acquisition is finished.
S604: and calling a preset Bluetooth address algorithm to generate a second Bluetooth address, and storing the generated second Bluetooth address in a Bluetooth address storage file.
It should be understood that, in this embodiment, the first bluetooth address and the second bluetooth address may be obtained simultaneously, or the first bluetooth address may be obtained first and then the second bluetooth address is obtained, or the second bluetooth address is obtained first and then the first bluetooth address is obtained, which may be flexibly obtained according to a specific application scenario.
Through binding the AG role and the HF role registered by the first communication equipment with two different Bluetooth addresses of the first communication equipment respectively, the first communication equipment is enabled to be externally presented as two independent first communication equipment, and then the first communication equipment can simultaneously support the AG role and the HF role, and can establish AG connection or HF connection with other first communication equipment according to requirements, even establish AG connection and HF connection simultaneously, so that the application of Bluetooth communication is more flexible, the adaptability is better, the Bluetooth communication system can be better suitable for various Bluetooth communication application scenes, and the satisfaction degree of user experience is improved.
In an example in this embodiment, the first bluetooth address is a bluetooth address pre-written in the first communication device and stored in a bluetooth address storage file in the first communication device; in this example, invoking the preset bluetooth address algorithm to generate the second bluetooth address may include:
and acquiring a first Bluetooth address, and randomly converting the value in the low-end area of the address in the first Bluetooth address to obtain a second Bluetooth address. The random switching manner in this embodiment can be flexibly adopted as long as it can be ensured that the obtained second bluetooth address is different from the first bluetooth address. In order to further improve the reliability, after the second bluetooth address is generated, whether the second bluetooth address is the same as the first bluetooth address or not can be judged, if so, the value in the area of the lower end of the address in the first bluetooth address is randomly transformed again to obtain the second bluetooth address, and then the second bluetooth address is compared with the first bluetooth address until the second bluetooth address is different from the first bluetooth address.
In this example, in order to further improve reliability and accuracy, it may further include detecting whether the first bluetooth address is updated, and if so, obtaining the updated first bluetooth address, and randomly transforming a value in a low-end region of an address in the updated first bluetooth address to obtain a new second bluetooth address.
Therefore, the HF role and the AG role registered by the first communication equipment can be respectively bound with a mutually independent Bluetooth address, so that the first communication equipment is externally presented as two independent first communication equipment, the AG role and the HF role can be simultaneously supported by the first communication equipment, and AG connection and/or HF connection can be established with other first communication equipment according to requirements, so that Bluetooth communication application is more flexible, adaptability is better, the method and the device can be better suitable for various Bluetooth communication application scenes, and the satisfaction degree of user experience is improved.
Second embodiment
For convenience of understanding, the present embodiment is described with reference to a specific application scenario as an example on the basis of the foregoing embodiment.
In this embodiment, the communication system includes a first communication device and a second communication device, wherein the registration procedure shown in the above embodiments can be adopted for at least one communication device. For ease of understanding, the following description will be given taking a registration process of the first communication device as an example.
In this embodiment, when the first communication device writes a bluetooth address, in addition to the default configured first bluetooth address, a bluetooth address algorithm may be invoked to generate a new bluetooth address (i.e., a MAC address) as a second bluetooth address, and the new bluetooth address may be written into the bin file; and optionally, the first bluetooth address and the second bluetooth address may be written into the same bin file.
Then, when the bluetooth module of the first communication device is started, the firmware of the bluetooth module of the first communication device may directly read the first bluetooth address and the second bluetooth address from the bin file and write the first bluetooth address and the second bluetooth address into the storage space of the bluetooth module. When the first communication device performs bluetooth role registration through the SDP, the AG role registration may be performed through the bluetooth protocol stack, and then the AG role registration information is transferred to the firmware of the bluetooth module of the first communication device, and the firmware may bind the AG role registration information with the first bluetooth address (or with the second bluetooth address, of course); the first communication device may then register the HF role via the bluetooth protocol stack and then pass the HF role registration information to the firmware of the bluetooth module of the first communication device, which may bind the HF role registration information with the second bluetooth address (and of course also with the first bluetooth address). In this way, the AG function and the HF function of the first communication device are implemented on the first bluetooth address and the second bluetooth address, respectively, which appear to the third-party device as two different first communication devices, so that the first bluetooth address can always be present as a master device and the second bluetooth address can always be present as a slave device, and the first communication device can flexibly establish at least one of an AG connection and an HF connection with the third-party first communication device.
For ease of understanding, the present embodiment is illustrated below with an exemplary bluetooth protocol stack. Referring to fig. 7, the bluetooth protocol stack in this embodiment includes, but is not limited to, the following parts:
a PHY layer (Physical layer) for specifying a radio frequency band, a modulation/demodulation method, and a method used for BLE. The PHY layer may determine the power consumption, sensitivity, and selectivity of the entire BLE chip.
The LL Layer (Link Layer) is a core of the entire BLE protocol stack, and may implement, but is not limited to, selecting which radio frequency channel to communicate, how to identify an air data packet, specifically, at which time point to send out the data packet, how to ensure integrity of data, how to receive ACK, how to retransmit, how to manage and control a Link, and the like. The LL layer is responsible for sending data out or receiving data back, and what kind of analysis is done on the data is handed over to the GAP or ATT above.
HCI (Host controller interface), which is optional, in an example, the HCI may be used in a case where 2 chips implement a BLE protocol stack, and is used to specify a communication protocol and a communication command between the two.
GAP layer (Generic access profile, generic access specification). GAP is one of two ways to parse how LL layer payload (valid packet). GAPs simply make some specifications and definitions of LL payload, which GAPs can use to broadcast, scan, initiate connections, and so on.
L2CAP layer (logical link control and adaptation protocol), L2CAP performs a simple encapsulation on LL, LL only cares about the transmitted data itself, L2CAP shall distinguish whether it is an encrypted channel or a normal channel, and at the same time, it shall manage the connection interval.
SMP (Secure manager protocol), which is a work to be considered by SMP, is used to manage encryption and security of BLE connection, and how to ensure the security of connection without affecting user experience.
ATT (Attribute protocol), the ATT layer is used to define user commands and data of command operations, such as reading certain data or writing certain data.
GATT (Generic attribute profile), which is used to specify the data content in an attribute and apply the concept of group to classify and manage the attribute.
This embodiment also provides an example of the structure of bluetooth address, in this example, the bluetooth device address (BD _ ADDR) is a unique identifier of 48 bits, and is composed of LAP (24-bit address low end part), UAP (8-bit address high end part) and NAP (16-bit meaningless address part), and its format is shown in fig. 8:
NAP and UAP are unique identification codes of manufacturers of Bluetooth devices, and are distributed to the manufacturers by SIG; LAP is self-distributed by the manufacturer. Wherein, bit40 is a multicast address flag bit, and the value thereof is 0: unicast, with a value of 1: multicast; bit41 is an address type flag bit, and its value is 0: a univeral addr having a value of 1: local addr.
On the basis of the above example, the present embodiment will be described below with reference to the registration process shown in fig. 9 as an example. Please refer to fig. 9, which includes:
s901: the bluetooth module of the first communication device is started.
S902: the bluetooth module performs registration of the AG role and the HF role (may register the AG role first and then the HF role, or may register the HF role first and then the AG role).
S903: loading the AG function and the HF function through a Bluetooth protocol stack.
S904: and transmitting the AG role registration information and the HF role registration information to the firmware through a Bluetooth protocol stack.
S905: judging whether the currently received registration information is AG role registration information, if so, turning to S906; otherwise, go to S907.
S906: and binding the AG role registration information with the first Bluetooth address.
S907: and binding the HF role registration information with the second Bluetooth address. Fig. 10 is a logic framework diagram corresponding to the above registration process. After address binding is completed, the rest of the search and connection may use, but is not limited to, the current protocol specifications. Therefore, the HF role and the AG role registered by the first communication device can be respectively bound with a mutually independent Bluetooth address, thereby being externally presented as two independent first communication devices, and further enabling the first communication device to simultaneously support the AG role and the HF role.
Third embodiment
Referring to fig. 11, the present embodiment provides a communication connection method, including:
s1101: the first communication device starts Bluetooth;
s1102: the first communication equipment registers the AG role by writing the first UUID in the SDP, and binds AG role registration information with the first Bluetooth address;
s1103: the second communication equipment initiates Bluetooth search to discover that the first communication equipment supports the AG role;
s1104: the first communication equipment registers the HF role by writing a second UUID in the SDP, and binds HF role registration information with a second Bluetooth address;
s1105: is the second communication device initiate an AG connection? If yes, go to S1106, if no, go to S1107;
s1106: the AG connection is completed.
S1107: the HF connection is completed.
Fourth embodiment
Referring to fig. 12, the communication device includes a memory 1202, a transmitter 1204, a receiver 1205, a processor 1201 and a communication bus 1203;
the communication bus 1203 is used for realizing connection communication between the memory 1202 and the processor 1201;
the processor 1201 invokes the transmitter 1204, the receiver 1205, and the computer programs stored in the memory 1202 to implement the steps of the communication connection method in the above embodiments, which are not described herein again.
The present embodiment also provides a computer readable storage medium, which can be applied in various smart wearable devices, and stores one or more computer programs, which can be executed by one or more processors to implement the steps of the communication connection method as exemplified in the above embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. A communication connection method, characterized by comprising:
registering any role of an audio gateway AG role and a hands-free HF role of first communication equipment through a session description protocol SDP to obtain first role registration information, and binding the first role registration information with a first Bluetooth address of the first communication equipment; the registering of any one of an Audio Gateway (AG) role and a hands-free High Frequency (HF) role of the first communication equipment through a Session Description Protocol (SDP) to obtain first role registration information comprises the following steps: registering by writing a first universal unique identifier UUID in a first SDP, wherein the first UUID is used for identifying the AG role supported by the first UUID; or, a second UUID is written in a second SDP for registration, wherein the second UUID is used for identifying that the second UUID supports the HF role;
initiating a Bluetooth search of a second communication device to acquire a condition that the second communication device supports a role; or, according to the Bluetooth search initiated by the second communication device, the situation of the role supported by the second communication device is sent to the second communication device;
before the first communication device and the second communication device are matched, registering the other role of the AG role and the HF role of the first communication device through an SDP to obtain second role registration information, and binding the second role registration information with a second Bluetooth address of the first communication device; at least one link is occupied for each of the AG role and the HF role on the radio frequency communication RFcomm;
and matching the roles between the first communication equipment and the second communication equipment, and establishing connection with the second communication equipment by using the matched roles.
2. The communication connection method of claim 1, wherein prior to binding the second role registration information with the second bluetooth address of the first communication device, further comprising obtaining the second bluetooth address, wherein obtaining the second bluetooth address comprises:
when a Bluetooth module of the first communication device is started, reading the second Bluetooth address from a Bluetooth address storage file; the second Bluetooth address is generated by calling a preset Bluetooth address algorithm and is stored in the Bluetooth address storage file in advance.
3. The communication connection method according to claim 2, wherein, when reading the second bluetooth address from the bluetooth address storage file fails, the method further comprises:
and calling a preset Bluetooth address algorithm to generate a second Bluetooth address, and storing the second Bluetooth address in the Bluetooth address storage file.
4. The communication connection method of claim 3, wherein the invoking the preset bluetooth address algorithm to generate the second bluetooth address comprises: and acquiring the first Bluetooth address, and randomly converting the value in the low-end area of the address in the first Bluetooth address to obtain a second Bluetooth address.
5. The communication connection method according to claim 4, wherein after randomly converting the value in the lower-end region of the address in the first bluetooth address to obtain the second bluetooth address, the method further comprises:
and when the updating of the first Bluetooth address is detected, acquiring the updated first Bluetooth address, and randomly converting the value in the low-end area of the address in the updated first Bluetooth address to obtain a new second Bluetooth address.
6. The communication connection method of claim 1, wherein establishing a connection with a second communication device in the matched role comprises:
when the second communication device only supports the AG role, the first communication device establishes connection with the second communication device through the HF role;
when the second communication device only supports the HF role, the first communication device establishes connection with the second communication device through the AG role;
when the second communication device supports both an AG role and an HF role, the first communication device establishes connection with the second communication device through the AG role and the HF role; or, the first communication device establishes connection with the second communication device through an AG role through an HF role.
7. A communication device, comprising a memory, a transmitter, a receiver, a processor, and a communication bus;
the communication bus is used for realizing connection communication between the memory and the processor;
the processor invokes the transmitter, the receiver, and the computer program stored in the memory to implement the steps performed by the first communication device in the communication connection method according to any of claims 1 to 6.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executable by a processor to implement the steps performed by the first communication device in the communication connection method according to any one of claims 1-6.
CN201910364466.2A 2019-04-30 2019-04-30 Communication connection method, communication device, and storage medium Active CN110087223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910364466.2A CN110087223B (en) 2019-04-30 2019-04-30 Communication connection method, communication device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910364466.2A CN110087223B (en) 2019-04-30 2019-04-30 Communication connection method, communication device, and storage medium

Publications (2)

Publication Number Publication Date
CN110087223A CN110087223A (en) 2019-08-02
CN110087223B true CN110087223B (en) 2022-11-15

Family

ID=67418330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910364466.2A Active CN110087223B (en) 2019-04-30 2019-04-30 Communication connection method, communication device, and storage medium

Country Status (1)

Country Link
CN (1) CN110087223B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822663B (en) * 2019-10-31 2022-06-14 华为技术有限公司 Bluetooth connection method and related device
CN113923612A (en) * 2020-07-10 2022-01-11 华为技术有限公司 Call method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413130A (en) * 2016-10-14 2017-02-15 广东欧珀移动通信有限公司 Bluetooth connection method and device
CN106507501A (en) * 2016-10-14 2017-03-15 广东欧珀移动通信有限公司 A kind of Bluetooth connecting method and device
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8983384B2 (en) * 2012-10-30 2015-03-17 Qualcomm Incorporated Apparatus and method for extending Bluetooth device range
CN205622822U (en) * 2016-01-25 2016-10-05 深圳宽洋网络发展有限公司 Two bluetooth speaker

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106900079A (en) * 2015-12-18 2017-06-27 展讯通信(上海)有限公司 Bluetooth connecting method and device
CN106658359A (en) * 2016-10-12 2017-05-10 青岛海信移动通信技术股份有限公司 Bluetooth connection method and device and communication system
CN106413130A (en) * 2016-10-14 2017-02-15 广东欧珀移动通信有限公司 Bluetooth connection method and device
CN106507501A (en) * 2016-10-14 2017-03-15 广东欧珀移动通信有限公司 A kind of Bluetooth connecting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蓝牙免提应用协议(HFP)的实现研究;程骋;《北京邮电大学》;20111231;全文 *

Also Published As

Publication number Publication date
CN110087223A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
CN113660650B (en) Method and related device for device reconnection
KR102441850B1 (en) Service processing method and mobile communication terminal
CN109379735B (en) eSIM card operation method, mobile terminal and eSIM card device
WO2021104246A1 (en) Network connection method and electronic device
CN110234138A (en) Communicate method for handover control, communication equipment, system and storage medium
CN110087223B (en) Communication connection method, communication device, and storage medium
CN110072295B (en) Dual-channel communication method, device, first terminal and medium
CN109976612B (en) Application function implementation method, wearable device, mobile phone and computer-readable storage medium
CN109788114B (en) Call processing method and terminal
CN108810262B (en) Application configuration method, terminal and computer readable storage medium
CN110087222B (en) Role switching control method, communication device, and storage medium
CN109219039B (en) eSIM card operation method, mobile terminal and eSIM card device
CN109257739B (en) eSIM card operation method, mobile terminal and eSIM card device
CN109089258B (en) eSIM card operation method, mobile terminal and eSIM card device
CN110213749A (en) Communication processing method, communication equipment and storage medium
CN110267361B (en) Communication control method, device, system and readable storage medium
CN110087224B (en) Registration control method, communication device, and storage medium
CN110691347A (en) Communication connection method, communication device, and storage medium
CN110138965B (en) Wearable device, number formatting method and device thereof, and storage medium
CN110505265B (en) Communication method, device, system and readable storage medium
CN108683793B (en) Display method of application icon and mobile terminal
CN110740438B (en) Communication method, device, system and readable storage medium
CN110012146B (en) Communication sharing method and terminal
CN110139257A (en) Communication connecting method, communication equipment and storage medium
CN110233871B (en) Communication control method, device, system and readable 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
GR01 Patent grant
GR01 Patent grant