CN110740438B - Communication method, device, system and readable storage medium - Google Patents

Communication method, device, system and readable storage medium Download PDF

Info

Publication number
CN110740438B
CN110740438B CN201910364624.4A CN201910364624A CN110740438B CN 110740438 B CN110740438 B CN 110740438B CN 201910364624 A CN201910364624 A CN 201910364624A CN 110740438 B CN110740438 B CN 110740438B
Authority
CN
China
Prior art keywords
communication
communication device
slave
master
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
CN201910364624.4A
Other languages
Chinese (zh)
Other versions
CN110740438A (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 CN201910364624.4A priority Critical patent/CN110740438B/en
Publication of CN110740438A publication Critical patent/CN110740438A/en
Application granted granted Critical
Publication of CN110740438B publication Critical patent/CN110740438B/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
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data

Landscapes

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

Abstract

The application discloses a communication method, equipment, a system and a readable storage medium, wherein a first communication connection can be established between two pieces of communication equipment; when one communication device detects that a Bluetooth communication trigger condition is met, the current master communication device sends a master-slave communication notification to another communication device which is currently used as a slave communication device through a first communication connection, so that the slave communication device completes the registration of an HF role and is set to be in a Bluetooth non-searchable state, and therefore the slave communication device is prevented from being searched to support an HF function before the slave communication device completes the establishment of a second communication connection with the master communication device, and invalid connection or compatibility problems are caused to be initiated; after the slave communication equipment completes HF role registration, a second communication connection can be established with the master communication equipment so as to realize data interaction of the master communication equipment; the invention also discloses a device, a system and a readable storage medium, by implementing the scheme, the communication device can dynamically switch between the AG role and the HF role according to the current requirement.

Description

Communication method, device, system and readable storage medium
Technical Field
The present application relates to the field of communications, and in particular, to a communication method, device, system, and 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, bluetooth 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 functions, and the like.
According to the current protocol, after bluetooth communication is established between two bluetooth communication devices, roles between the two bluetooth communication devices are determined and cannot be changed, so that the flexibility of bluetooth communication control is poor, and application scenarios are greatly limited. For example, for a smart watch supporting a call function, after the smart watch establishes a bluetooth communication connection with a paired mobile phone, the smart watch plays an HF role in the bluetooth communication connection and serves as an HF end; the mobile phone is in the role of AG in the Bluetooth communication connection and serves as an AG end. At this moment, when the smart watch has an incoming call, the smart watch cannot use the mobile phone to answer the incoming call because the smart watch is currently used as an HF end, and the experience of the user who answers the incoming call through the smart watch is not friendly, so that the satisfaction degree of the user experience is poor.
Disclosure of Invention
The technical problem that this application will solve lies in: when the Bluetooth communication is carried out based on the current Bluetooth communication protocol, the flexibility is poor, and the application scene is limited; in order to solve the technical problem, a communication method, equipment, a system and a readable storage medium are provided.
In order to solve the above technical problem, the present application provides a communication method, where the communication method includes:
establishing a first communication connection between two communication devices, wherein the first communication connection is a peer-to-peer communication connection supporting the two communication devices to perform data bidirectional interaction;
when one of the communication devices detects that a Bluetooth communication trigger condition is met, the communication device serving as a master communication device sends a master-slave communication notification to the other communication device serving as a slave communication device through the first communication connection;
the master communication device receiving an HF role registration completion notification sent by the slave communication device over the first communication connection, and the slave communication device being in a bluetooth non-searchable state;
respectively registering an audio gateway AG role and a hands-free HF role through a session description protocol SDP;
initiating Bluetooth search of the slave communication equipment to acquire the condition that the slave communication equipment supports roles; or, receiving Bluetooth search initiated by the slave communication equipment, and feeding back the condition of the role supported by the slave communication equipment;
matching roles between the master communication device and the slave communication device according to the Bluetooth searching result;
establishing a second communication connection with the slave communication equipment in a matched role, wherein the second communication connection is a Bluetooth communication connection;
and the master communication equipment and the slave communication equipment perform data interaction through the second communication connection.
Optionally, the performing, by the master communication device and the slave communication device, data interaction through the second communication connection includes:
the master communication device sending first data to the slave communication device through the second communication connection;
the master communication device receives second data sent by the slave communication device through the second communication connection.
Optionally, after establishing the second communication connection with the slave communication device in the matched role, the method further includes:
and when the master communication device detects that the Bluetooth communication closing condition is met, the second communication connection with the slave communication device is disconnected, and the slave communication device is in a Bluetooth searchable state.
Optionally, the peer-to-peer communication connection is a bluetooth peer-to-peer communication connection.
Optionally, after the master communication device disconnects the second communication connection with the slave communication device, the method further includes:
the master communication device reestablishes the first communication connection with the slave communication device.
Optionally, the slave communication device being in the bluetooth non-searchable state includes:
and the slave communication equipment sets the slave communication equipment to be in a Bluetooth non-searchable state according to the search closing instruction in the master-slave communication notice.
Optionally, the registering the audio gateway AG role and the hands-free HF role respectively by using the session description protocol SDP includes:
and respectively registering a first universal unique identifier UUID and a second UUID in the SDP, wherein the first UUID is used for identifying that the first UUID supports the AG role, and the second UUID is used for identifying that the second UUID supports the HF role.
In order to solve the above problem, an embodiment of the present invention further provides a communication device, including:
a processor, a transmitter, a receiver, a memory, said memory having stored thereon a first computer program, said first computer program, transmitter, receiver, when invoked by said processor, implementing the steps performed by a master communication device in the communication method as described above;
and/or the memory has stored thereon a second computer program, the transmitter, the receiver implementing the steps performed from the communication device in the communication method as described above when being invoked by the processor.
In order to solve the above problem, an embodiment of the present invention further provides a bluetooth communication system, where the bluetooth communication system includes two communication devices that establish a first communication connection, and the first communication connection is a peer-to-peer communication connection that supports the two communication devices to perform data bidirectional interaction;
when one communication device detects that a Bluetooth communication trigger condition is met, the communication device serving as a master communication device is used for sending a master-slave communication notification to another communication device serving as a slave communication device through the first communication connection, receiving an HF role registration completion notification sent by the slave communication device through the first communication connection, and establishing a second communication connection with the slave communication device, wherein the second communication connection is a Bluetooth communication connection and performs data interaction with the slave communication device through the second communication connection; in the second communication connection, the master communication device is an AG end, and the slave communication device is an HF end;
the other communication device is used for completing registration of an HF role as a slave communication device after receiving the master-slave communication notification, and sending an HF role registration completion notification to the master communication device through the first communication connection, and the slave communication device is in a Bluetooth non-searchable state; and the system is used for establishing a second communication connection with the main communication equipment and carrying out data interaction with the main communication equipment through the second communication connection.
In order to solve the above problem, an embodiment of the present invention further provides a computer-readable storage medium storing a first computer program executable on a processor, the first computer program, when executed by the processor, implementing the steps performed by the primary communication device in the communication method as described above;
alternatively, the computer readable storage medium stores a second computer program executable on a processor, the second computer program, when executed by the processor, implementing the steps performed from the communication device in the communication method as described above.
Advantageous effects
The application provides a communication method, equipment, a system and a readable storage medium, wherein a first communication connection can be established between two communication equipment, and the first communication connection is a peer-to-peer communication connection supporting the two communication equipment to carry out data bidirectional interaction; when one communication device detects that the Bluetooth communication trigger condition is met, the communication device can be used as a current master communication device to send a master-slave communication notification to another communication device which is used as a slave communication device currently through a first communication connection, so that the slave communication device completes registration of an HF role and is set to be in a Bluetooth non-searchable state, and therefore the slave communication device is prevented from being searched to support an HF function before the master communication device completes establishment of a second communication connection to cause initiation of invalid connection or compatibility problem; the master communication equipment and the slave communication equipment establish a second communication connection, wherein the second communication connection is a Bluetooth communication connection; therefore, the master communication device and the slave communication device can perform data interaction based on the currently established second communication connection. That is, in the bluetooth communication control provided by the present application, two communication devices may dynamically switch between the AG role and the HF role according to the current requirements, for example, when one of the communication devices is a smart watch and the other communication device is a mobile phone, the smart watch may notify the mobile phone as a slave communication device to establish a second communication connection with the slave communication device when the bluetooth communication trigger condition is satisfied (for example, when there is an incoming call), so that the mobile phone as its HF end realizes a corresponding function (for example, completes incoming call answering) through bluetooth, and vice versa; therefore, the flexibility of Bluetooth communication control can be improved, the application scene of Bluetooth communication can be improved, and the satisfaction degree of user experience is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present 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 needed to be 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 exercise.
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 embodiment of a wearable device provided in an embodiment of the present application when a screen is unfolded;
2-3 are perspective views of a screen of an embodiment of a wearable device according to an embodiment of the present disclosure when bent;
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 method according to a first embodiment of the present application;
fig. 5 is a schematic flowchart of reestablishing the first communication connection according to the first embodiment of the present application;
fig. 6 is a flowchart illustrating a communication method according to a second embodiment of the present application;
fig. 7 is a schematic structural diagram of a communication device according to a third 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 GDA0002217173850000051
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 receiving and transmitting information or signals during a call, and may include a transmitter for transmitting information and a receiver for receiving information. For example, the transmitter of the rf unit 101 may send uplink information to the base station, the receiver is configured to receive downlink information sent by the base station, the downlink information sent by the base station to the rf unit 101 may be generated according to the uplink information sent by the rf unit 101, or may be mainly pushed to the rf unit 101 after detecting that the information of the communication device 100 is updated, for example, after detecting that the geographical location of the communication device 100 is changed, the base station may send a message notification of the change of the geographical location to the radio unit 101 of the communication device 100, and after receiving the message notification, the message notification may be sent 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 realize communication and information interaction.
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 each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture 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. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. 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, and are not limited to these specific examples.
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 the 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 embodiment 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 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 wearable device screen as it is unfolded, and 2-3 show the wearable device screen as it 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 hardware structure of the communication device and the communication network system, various embodiments of the method are provided.
First embodiment
For the problems of poor flexibility and limited application scenario when the current bluetooth communication protocol is used for bluetooth communication, the present embodiment may establish a first communication connection supporting bidirectional communication between two communication devices, and when one of the communication devices detects that a bluetooth communication trigger condition is satisfied, the communication device may serve as a current master communication device, send a master-slave communication notification to another communication device serving as a current slave communication device through the first communication connection, and further serve as an AG end to establish a bluetooth communication connection with a slave communication device serving as an HF end, which is referred to as a second communication connection in the present embodiment; after receiving the master-slave communication notification, the slave communication equipment completes the registration of the HF role and sets the slave communication equipment to be in a Bluetooth non-searchable state, so that the problem of initiating invalid connection or compatibility caused by the fact that the slave communication equipment is searched to support an HF function before the master communication equipment completes the establishment of the second communication connection is avoided; the master communication device and the slave communication device can complete data interaction based on the established second communication connection. That is to say, the two communication devices in this embodiment can dynamically switch between the AG role and the HF role according to the current demand, which can improve the flexibility of bluetooth communication control, and can also improve the application scenario of bluetooth communication, thereby improving the satisfaction of user experience. For ease of understanding, the following description will be made with reference to the communication method shown in fig. 4 as an example.
Referring to fig. 4, the communication method provided in this embodiment includes:
s401: a first communication connection is established between two communication devices.
In this embodiment, the first communication connection is a peer-to-peer communication connection that supports two communication devices to perform information bidirectional interaction, that is, the two communication devices may send information to each other and receive information sent by each other through the first communication connection, and one of the functions of the first communication connection may be used as a negotiation channel for subsequently performing information interaction for establishing the second communication connection. And it should be understood that the type of the first communication connection in this embodiment can be flexibly selected according to specific requirements, as long as the requirement of bidirectional data interaction between two communication devices can be satisfied. For example, in an example, the first communication connection may be a bluetooth peer-to-peer communication connection, and a bluetooth peer-to-peer communication connection is established between the two communication devices, and in the bluetooth peer-to-peer communication connection, there may be no role restriction between the two communication devices, and the two communication devices may also be set to have the same role. For another example, in another example, the first communication connection may be a WiFi peer-to-peer communication connection, where the two communication devices may transmit information to and receive information transmitted by the other over the WiFi peer-to-peer communication connection. As another example, the first Communication connection may be a Peer-to-Peer Communication connection, such as may include, but is not limited to, a Near Field Communication (NFC) connection, where two Communication devices may transmit and receive information to and from each other over the NFC connection, as another example, the first Communication connection may be a Zigbee Peer-to-Peer Communication connection, where two Communication devices may transmit and receive information to and from each other over the Zigbee Peer-to-Peer Communication connection, as yet another example, the first Communication connection may be a P2P (Peer-to-Peer networking) or D2D (Device-to-Device) Peer-to-Peer Communication connection, where two Communication devices may transmit and receive information to and from each other over the P2P or D2D Peer-to-Peer Communication connection .
In an example of the present embodiment, both communication apparatuses may have an audio gateway AG function and a hands-free HF function, or one communication apparatus may have an AG function and an HF function, and the other communication apparatus may support only the AG function or the HF function. And it should be understood that the communication device in this embodiment can be flexibly configured according to a specific application scenario. For example, one of the two communication devices may be a wearable device supporting bluetooth communication, the other may be a mobile phone supporting bluetooth communication, or both may be mobile phones supporting bluetooth communication, or both may be wearable devices supporting bluetooth communication, or one may be a wearable device supporting bluetooth communication, and the other may be a vehicle-mounted terminal supporting bluetooth communication, etc. And it should be understood that the wearable device in this embodiment may also be flexibly configured according to a specific application scenario, for example, but not limited to, a smart watch, a wrist machine, and the like.
S402: one of the communication devices detects that a Bluetooth communication trigger condition is satisfied and serves as a master communication device, and sends a master-slave communication notification to the other communication device serving as a slave communication device through the first communication connection.
It should be understood that the bluetooth communication trigger condition in this embodiment may be flexibly set according to requirements, and optionally, the bluetooth communication trigger condition may be set and/or updated by at least one of an application provider, an operator, a device manufacturer, and a user.
For example, in some examples of the present embodiment, the bluetooth communication trigger condition may include, but is not limited to, at least one of a call start, an audio application start.
For example, in some application scenarios, the bluetooth communication triggering condition may include a call initiation, which may be a Subscriber Identity Module (SIM) based call, a network call, or other types of calls. For example, when one of the two bluetooth communication terminals is a wrist phone, and the wrist phone receives a call or initiates a call, (for example, a call based on an eSIM card, or a network video call, a network voice call, etc.), a master-slave communication notification may be sent to the other communication device. In other application scenarios, the bluetooth communication trigger condition may include the audio application starting, and the audio application in this embodiment may be all audio applications on the communication device, or may be a designated audio application on the communication device, for example, and may include, but is not limited to, various voice assistants, music playing applications, video playing applications with audio channels, or various audio applications in a web page version, and the like. For example, when one of the two bluetooth communication terminals is a wrist phone, and a voice assistant (such as a small-argy robot or a siri voice robot) is started on the wrist phone, a master-slave communication notification may be sent to the other communication device.
In this embodiment, after receiving the master-slave communication notification, the other communication device can know that the bluetooth communication condition is currently triggered on the communication device of the opposite end according to the master-slave communication notification, and at this time, the communication device of the opposite end is currently used as the master communication device and is currently used as the slave communication device, so that the slave communication device can directly establish a subsequent bluetooth communication connection (i.e., a second communication connection in this embodiment) with the master communication device, and does not need to find the master communication device through bluetooth search or be found by the master communication device, so that a bluetooth search step can be directly omitted, thereby improving the bluetooth communication connection efficiency.
In this embodiment, the slave communication device serves as an HF end in the second communication connection, so that the slave communication device can complete registration of an HF role after receiving the master-slave communication notification sent by the master communication device; of course, in some examples, the slave communication device may not repeat the registration of the HF role any more if the registration of the HF role has been completed upon receiving the master-slave communication notification, the slave communication device sending the HF role registration completion notification to the master communication device through the first communication connection; in this embodiment, after receiving the master-slave communication notification sent by the master communication device, the slave communication device may indicate that it needs to establish a subsequent second communication connection with the master communication device, and at this time, after the slave communication device completes the HF role registration and before establishing the second communication connection with the master communication device, the HF function of the slave communication device may be discovered by other third-party communication devices, thereby causing an invalid communication connection to be initiated or causing the slave communication device to establish a bluetooth communication connection with other third-party communication devices, which may cause various compatibility problems. Therefore, in the present embodiment, the slave communication device can set itself to the bluetooth non-searchable state upon receiving the master-slave communication notification sent by the master communication device and completing the HF role registration.
In addition, it should be understood that, in this embodiment, the slave communication device may adopt an active mode to set itself as the bluetooth non-searchable state, and at this time, the slave communication device may directly set itself as the bluetooth non-searchable state after receiving the master-slave communication notification sent by the master communication device, or directly set itself as the bluetooth non-searchable state after determining that the slave communication device completes HF role registration after receiving the master-slave communication notification; in some examples, the slave communication device may also adopt a passive mode to set itself to be in a bluetooth-unavailable local search state, where the slave communication device may perform setting according to an instruction of the master communication device, for example, when the slave communication device obtains a search closing instruction from the master communication device side, the slave communication device sets itself to be in the bluetooth-unavailable local search state; in this embodiment, the search close instruction may be that the master communication device is carried in the master-slave communication notification and sent to the slave communication device when detecting that the bluetooth communication trigger condition is satisfied, or sent to the slave communication device through the first communication connection through another message independent of the master-slave communication notification. In addition, it should be understood that the format of the master-slave communication notification, the content included in the master-slave communication notification, and the like in the present embodiment can be flexibly set as long as the above-described effects are achieved.
In this embodiment, the slave communication device setting that the slave communication device is in the bluetooth non-searchable state means that the slave communication device is in a state that the slave communication device cannot normally acquire the bluetooth communication capability through bluetooth search by other third-party communication devices. The realization mode can be flexible and changeable. For example, in some examples, when the slave communication device sends (e.g., by broadcast) a discovery message including its own capabilities (e.g., HF function and/or AG function) by sending it out, then the slave communication device may stop sending the discovery message out or continue sending the send message out, but include in the send message an indication that it is not currently acceptable to establish a connection or no information about its own capabilities, etc. For another example, in other examples, when the slave communication device is discovered by feeding back an acknowledgement to the other communication device after receiving the discovery message sent by the other communication device, the slave communication device may stop receiving the discovery message, or continue to receive but not feed back, or continue to receive and also continue to feed back, but the feedback may include an indication that the connection establishment is not currently accepted or does not include its own capability information in the reply message.
S403: the master communication device receives an HF role registration completion notification sent by the slave communication device over the first communication connection.
S404: respectively registering an audio gateway AG role and a hands-free HF role through a session description protocol SDP;
s405: initiating Bluetooth search of the slave communication equipment to acquire the condition that the slave communication equipment supports roles; or, receiving Bluetooth search initiated by the slave communication equipment, and feeding back the condition of the role supported by the slave communication equipment;
s406: matching roles between the master communication device and the slave communication device according to the Bluetooth searching result;
s407: establishing a second communication connection with the slave communication equipment in a matched role, wherein the second communication connection is a Bluetooth communication connection; one of the roles of this second communication connection is as a data transmission channel between the two communication devices, which can optionally be established and/or broken dynamically.
S404 to S407 show an implementation of establishing a second communication connection, i.e. a bluetooth communication connection, between the communication devices.
In this embodiment, the registration process for the primary communication device is to register the AG role and the HF role separately, that is, register through respective SDPs; specifically, the respective registration of the audio gateway AG role and the hands-free HF role of the primary communication device, each via the session description protocol SDP, may comprise:
the main communication equipment registers by writing a first UUID in the first SDP, wherein the first UUID is used for identifying the self-supporting AG role;
the master communication device registers by writing a second UUID in the second SDP, where the second UUID is used to identify that the master communication device itself supports the HF role. The first UUID and the second UUID are respectively used for representing that the communication equipment supports an AG role and an HF role; in this embodiment, the primary communication device characterizes the roles supported by itself by two UUIDs, including an AG role and an HF role.
In some embodiments, determining, by the SDP, respective supported AGs and HFs of the master communication device and the slave communication device to establish a connection may include:
the master communication device initiates a bluetooth search causing the master communication device to determine the roles supported by the slave communication device. The bluetooth searching party can be performed by the master communication device or the slave communication device, that is, the master communication device can be used as a search initiator, and the slave communication device can also be used as a search initiator; when the master communication device acts as a search initiator, the slave communication device acts as a search recipient. In this embodiment, the AG and HF supported by the master communication device and the slave 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.
Specifically, the initiating, by the master communication device, a bluetooth search to enable the master communication device to determine the roles supported by the slave communication device may include:
the main communication equipment initiates an SDP search request message;
and receiving an SDP search response message sent by the slave communication equipment, wherein the SDP search response message carries the characteristic value representing the role supported by the slave communication equipment. In the SDP searching response message, the carried feature value characterizing the role supported by the slave communication device, that is, the UUID written by the slave 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 respective supported AGs and HFs of the master communication device and the slave communication device to establish the connection may further include:
a bluetooth search initiated by the slave communication device is received causing the slave communication device to determine the roles supported by the master communication device. This example shows that the searching party becomes the slave communication device, and when the slave communication device performs the search, the master communication device serves as the searched party, and correspondingly feeds back the roles supported by itself to the slave communication device.
In some embodiments, receiving a bluetooth search initiated by the slave communication device, causing the slave communication device to determine the roles supported by the master communication device may comprise:
receiving an SDP search request message initiated from a communication device;
and sending an SDP search response message to the slave communication equipment, wherein the SDP search response message carries the characteristic value representing the role supported by the master communication equipment.
Specifically, in the matching role, establishing the second communication connection with the slave communication device may include:
when the slave communication device only supports the AG role, the master communication device establishes a second communication connection with the slave communication device through the HF role;
when the slave communication device only supports the HF role, the master communication device establishes a second communication connection with the slave communication device through the AG role;
when the slave communication device supports both the AG role and the HF role, a second communication connection is established between the master communication device and the slave communication device through any AG role in combination with the HF role. Specifically, the master communication device establishes a second communication connection with the slave communication device through an AG role and through an HF role; or the primary communication device establishes a second communication connection with the secondary 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.
S408: the master communication device and the slave communication device perform data interaction based on the established second communication connection, including but not limited to:
the master communication device sends the first data to the slave communication device through a second communication connection; and/or the master communication device receives second data transmitted from the communication device via the second communication connection.
For example, when the master communication device is a wrist phone and the wrist phone receives an incoming call, the wrist phone may send the received incoming call voice data as the first data to the current slave communication device through the second communication connection, where the slave communication device may be a mobile phone or other types of devices.
It should be appreciated that in some application scenarios of the present embodiment, the master communication device may only send the first data to the slave communication device unidirectionally over the second communication connection, for example when the master communication device starts a music playing application to play music. In other application scenarios of this embodiment, the communication method further includes: the master communication device receives second data transmitted from the slave communication device over the second communication connection.
For example, when the master communication device receives an incoming call or actively initiates a call to establish the second communication connection with the slave communication device, the master communication device sends the voice data received from the opposite end of the call to the slave communication device through the second communication connection to play, and simultaneously, the master communication device can also receive the voice data of the local end user collected from the slave communication device through the second communication connection, and send the received voice data of the local end user to the opposite end of the call. For another example, when the master communication device starts the voice assistant and establishes the second communication connection with the slave communication device, the master communication device sends the voice data sent by the voice assistant to the slave communication device through the second communication connection for playing, and simultaneously receives the voice data of the local user collected from the communication device through the second communication connection and sends the received voice data of the local user to the voice assistant for recognition. Of course, in some examples, the master communication device may also only receive the second data transmitted by the slave communication device through the second communication connection, and not transmit the first data to the slave communication device, for example, some of various application scenarios that only require unidirectional acquisition of data from the slave communication device.
In some examples of this embodiment, after the current master communication device establishes the second communication connection with the slave communication device, the method may further include:
and when the master communication device detects that the Bluetooth communication closing condition is triggered, the second communication connection between the master communication device and the slave communication device is disconnected. And in one example, the slave communication device at this time can set itself in a bluetooth searchable state to keep it normally discovered for normal communication with other devices.
Accordingly, the bluetooth communication shutdown condition in this embodiment may include, but is not limited to, at least one of a call completion and an audio application shutdown.
In some application examples of the embodiment, when the first communication connection may be a bluetooth peer-to-peer communication connection in which both communication apparatuses are AG terminals, the first communication connection is disconnected because a communication apparatus serving as a slave communication apparatus needs to be switched from an AG role to an HF role when the two communication apparatuses establish the second communication connection. In this application example, after the master communication device disconnects the second communication connection with the slave communication device, the method may further include:
the master communication device and the slave communication device reestablish the first communication connection; the process shown in fig. 5 may include:
s501: the communication device, which is currently a slave communication device, re-registers the AG role and optionally also de-registers the HF role.
S502: the communication device which is currently used as the master communication device establishes Bluetooth peer-to-peer communication connection with the communication device which is currently used as the slave communication device, and after the connection is established, the two communication devices are both AG terminals.
In S502, the current master communication apparatus may actively transmit an AG connection to the current slave communication apparatus, or the current slave communication apparatus may actively transmit an AG connection to the current master communication apparatus.
It can be seen that, in this embodiment, peer-to-peer connection may be performed between two communication devices, when one communication device needs to use an AG role as a master communication device, another bluetooth communication device may dynamically use an HF role as a slave communication device to establish bluetooth communication connection with the master communication device, and the slave communication device may be set to a bluetooth non-searchable state (in some examples, the master communication device may also be set to the bluetooth non-searchable state at this time), so as to avoid that the slave communication device is searched to support an HF function before completing establishment of a second communication connection with the master communication device, which may cause initiation of an invalid connection or a compatibility problem; in this embodiment, the roles of the two communication devices are not fixed in advance, the communication mode is more flexible and variable, and the Bluetooth communication device can be better suitable for the requirements of various Bluetooth communication scenes, so that 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 two communication devices are a wrist phone and a mobile phone supporting bluetooth communication, respectively, and both the wrist phone and the mobile phone support an AG function and an HF function. The wrist machine can be provided with an eSIM card or not. In this embodiment, the first communication connection is exemplified by a bluetooth peer-to-peer communication connection.
In the application scenario of the present embodiment, the bluetooth communication environment can be adopted, but is not limited to the following:
the standard software Interface (HCI) layer is adapted to manage HCI states, control HCI TRAMS, process events/data (event/data) on the HCI TRAMS according to HCI formats and protocols, assemble truncated data, packetize transmit long strings of data, manage caches, and the like.
The voice transmission channel may be transmitted through an asynchronous Connection ordered (SCO) link, an extended asynchronous SCO link, or the like.
A bluetooth device discovery policy (GAP), link management during connection, security level setting, and common format definition of UI layer parameter interaction.
A Logical Link and attachment Layer (L2 CAP) adapted to establish a closed connection/state management/multiplexing/packet segmentation and assembly.
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 this embodiment, the wrist phone and the mobile phone may respectively register an AG role based on the bluetooth communication environment, and complete a bluetooth peer-to-peer communication connection based on the registered AG role, for example, but not limited to, an rfcomm socket mode may be used for communication. When the wrist machine receives an incoming call or initiates a call, a master-slave communication notice can be sent to the mobile phone, the mobile phone performs HF role registration according to the master-slave communication notice, an AG role can be cancelled (the mobile phone can judge whether the incoming call is answered currently before the step is executed), the Bluetooth cannot be searched, then the wrist machine and the mobile phone can establish a second communication connection, the wrist machine is an AG end, the mobile phone is an HF end, and the call on the wrist machine is switched to a channel connected with the second communication to perform data interaction so as to complete the call. After the conversation is finished, the second communication connection between the wrist phone and the mobile phone can be disconnected, the mobile phone finishes the registration of the AG role again and cancels the HF role, the Bluetooth can be set to be in a searched state, the mobile phone and the wrist phone reestablish peer-to-peer communication connection, and the mobile phone returns to the initial peer-to-peer state to wait for the next trigger.
The above process is shown in fig. 6, and includes:
s600: the wrist machine and the mobile phone establish rfcomm socket connection, namely first communication connection.
S601: the wrist phone receives the incoming call (or initiates a call for the wrist phone).
S602: the wrist phone sends a master-slave communication notification through the rfcomm socket connection (i.e., the first communication connection) with the mobile phone.
S603: the mobile phone receives the master-slave communication notification, completes the registration of the HF role, cancels the AG role and sets the Bluetooth to be in a state that the Bluetooth cannot be searched.
S604: and after completing the HF role registration, the mobile phone sends an HF role registration completion notification to the wrist phone.
S605: the wrist machine registers the AG role and the HF role.
S606: the wrist phone sends an HF connection request to the mobile phone.
S607: after the wrist phone and the mobile phone establish the bluetooth communication connection (namely, the second communication connection), the communication module on the wrist phone detects that the bluetooth communication channel is established and switched to the bluetooth communication channel.
S608: and when the call is finished, the wrist phone sends a call finishing instruction to the mobile phone.
S609: the mobile phone and the wrist machine are disconnected with each other to form a second communication connection;
s6010: the handset re-registers the AG role and optionally de-registers the HF role, setting itself to a bluetooth searchable state.
S6011: and the wrist machine and the mobile phone reestablish the first communication connection.
Therefore, in this embodiment, when the wrist phone receives an incoming call or needs to initiate a call, the wrist phone can be flexibly and dynamically controlled to serve as the AG terminal, the mobile phone serves as the HF terminal thereof, and the mobile phone is used to complete incoming call answering or complete voice answering and sending in the call; when the mobile phone is similar to the requirement, the mobile phone can be flexibly and dynamically controlled to serve as an AG end, and the wrist phone serves as an HF end of the mobile phone, so that the flexibility and the convenience of Bluetooth communication control are greatly improved, the requirements of different communication scenes can be better met, and the user experience is improved.
Third embodiment
The present embodiment provides a communication device, and please refer to the foregoing embodiments for the type of the communication device, which is not described herein again. Referring to fig. 7, the communication device includes:
a processor 701, a memory 702, a transmitter 703, a receiver 704, the memory 702 being configured to store a first computer program;
the first computer program, when executed by the processor 701, the transmitter 703, and the receiver 704, implements the steps performed when the communication device in the communication method described above is the master communication device;
and/or, the memory 702 is used for storing a second computer program; the second computer program, when executed by the processor 701, the transmitter 703, the receiver 704, implements the steps performed when the communication device in the communication method as described above is a slave communication device.
The present embodiment also provides a bluetooth communication system, which includes two communication devices establishing a first communication connection, and the two communication devices may be, but are not limited to, the communication devices shown in the figure.
The present embodiment also provides a computer-readable storage medium storing a first computer program executable on a processor, the first computer program implementing the steps performed by the master communication device in the communication method in the above embodiments when executed by the processor, and/or a second computer program executable on the processor, the second computer program implementing the steps performed by the slave communication device in the communication method in the above embodiments when executed by the processor.
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 phrase "comprising an … …" does not exclude the presence of other like elements 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 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 (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present 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 (10)

1. A communication method, characterized in that the communication method comprises:
establishing a first communication connection between two communication devices, wherein the first communication connection is a peer-to-peer communication connection supporting the two communication devices to perform data bidirectional interaction;
when one of the communication devices detects that a Bluetooth communication trigger condition is met, the communication device serving as a master communication device sends a master-slave communication notification to the other communication device serving as a slave communication device through the first communication connection;
the master communication device receives an HF role registration completion notification sent by the slave communication device through the first communication connection, and the slave communication device is in a state that Bluetooth cannot be searched by other devices;
the main communication equipment respectively registers an audio gateway AG role and a hands-free HF role through an SDP;
initiating Bluetooth search of the slave communication equipment to acquire the condition that the slave communication equipment supports roles; or, receiving Bluetooth search initiated by the slave communication equipment, and feeding back the condition of the role supported by the slave communication equipment;
matching roles between the master communication device and the slave communication device according to the Bluetooth searching result;
the master communication equipment establishes a second communication connection with the slave communication equipment through an AG role and an HF role, wherein the second communication connection is a Bluetooth communication connection;
and the master communication equipment and the slave communication equipment perform data interaction through the second communication connection.
2. The communication method of claim 1, wherein the master communication device interacting with the slave communication device in data over the second communication connection comprises:
the master communication device sending first data to the slave communication device through the second communication connection;
the master communication device receives second data sent by the slave communication device through the second communication connection.
3. The communication method of claim 2, wherein after establishing the second communication connection with the slave communication device in the matched role, further comprising:
and when the master communication device detects that the Bluetooth communication closing condition is met, the second communication connection with the slave communication device is disconnected, and the slave communication device is in a Bluetooth searchable state.
4. A communication method according to any of claims 1-3, wherein the peer-to-peer communication connection is a bluetooth peer-to-peer communication connection.
5. The communication method of claim 4, wherein after the master communication device disconnects the second communication connection with the slave communication device, further comprising:
the master communication device reestablishes the first communication connection with the slave communication device.
6. A communication method according to any one of claims 1 to 3, wherein a search close instruction is included in the master-slave communication notification for the slave communication device to set itself to a bluetooth non-searchable state according to the search close instruction.
7. Communication method according to any of claims 1-3, wherein the registration of the audio gateway AG-role and the hands-free HF-role, respectively, by the session description protocol SDP comprises:
and respectively registering a first universal unique identifier UUID and a second UUID in the SDP, wherein the first UUID is used for identifying that the first UUID supports the AG role, and the second UUID is used for identifying that the second UUID supports the HF role.
8. A communication device, characterized in that it comprises:
processor, transmitter, receiver, memory, said memory having stored thereon a first computer program, said first computer program, transmitter, receiver, when invoked by said processor, implementing the steps performed by a master communication device in the communication method according to any of claims 1 to 7;
and/or the memory has stored thereon a second computer program, the transmitter, the receiver implementing the steps performed from the communication device in the communication method according to any of claims 1 to 7 when being invoked by the processor.
9. A Bluetooth communication system is characterized in that the Bluetooth communication system comprises two communication devices which establish a first communication connection, wherein the first communication connection is a peer-to-peer communication connection which supports the two communication devices to perform data bidirectional interaction;
when one communication device detects that a Bluetooth communication trigger condition is met, the communication device serving as a master communication device is used for sending a master-slave communication notification to another communication device serving as a slave communication device through the first communication connection, receiving an HF role registration completion notification sent by the slave communication device through the first communication connection, and establishing a second communication connection with the slave communication device, wherein the second communication connection is a Bluetooth communication connection and performs data interaction with the slave communication device through the second communication connection; in the second communication connection, the master communication device is an AG end, and the slave communication device is an HF end; the main communication equipment respectively registers an audio gateway AG role and a hands-free HF role through an SDP; initiating Bluetooth search of the slave communication equipment to acquire the condition that the slave communication equipment supports roles; or, receiving Bluetooth search initiated by the slave communication equipment, and feeding back the condition of the role supported by the slave communication equipment; matching roles between the master communication device and the slave communication device according to the Bluetooth searching result; the master communication equipment establishes a second communication connection with the slave communication equipment through an AG role and an HF role;
the other communication device is used for completing registration of an HF role as a slave communication device after receiving the master-slave communication notification, and sending an HF role registration completion notification to the master communication device through the first communication connection, wherein the slave communication device is in a state that Bluetooth cannot be searched by other devices; and the system is used for establishing a second communication connection with the main communication equipment and carrying out data interaction with the main communication equipment through the second communication connection.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a first computer program executable on a processor, which when executed by the processor implements the steps performed by a primary communication device in the communication method according to any one of claims 1 to 7;
alternatively, the computer-readable storage medium stores a second computer program executable on a processor, the second computer program, when executed by the processor, implementing the steps performed from the communication device in the communication method according to any one of claims 1 to 7.
CN201910364624.4A 2019-04-30 2019-04-30 Communication method, device, system and readable storage medium Active CN110740438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910364624.4A CN110740438B (en) 2019-04-30 2019-04-30 Communication method, device, system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910364624.4A CN110740438B (en) 2019-04-30 2019-04-30 Communication method, device, system and readable storage medium

Publications (2)

Publication Number Publication Date
CN110740438A CN110740438A (en) 2020-01-31
CN110740438B true CN110740438B (en) 2022-04-29

Family

ID=69236668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910364624.4A Active CN110740438B (en) 2019-04-30 2019-04-30 Communication method, device, system and readable storage medium

Country Status (1)

Country Link
CN (1) CN110740438B (en)

Citations (7)

* 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
CN106101979A (en) * 2015-04-30 2016-11-09 三星电子株式会社 Method and the electronic equipment of use the method for short-distance wireless communication
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
CN107054249A (en) * 2015-12-09 2017-08-18 现代自动车株式会社 Run AVN method, AVN and the vehicle including AVN
CN109565525A (en) * 2016-08-10 2019-04-02 佳能株式会社 Communication equipment and its control method and program and communication system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8396424B2 (en) * 2011-05-26 2013-03-12 Motorola Mobility Llc Method and apparatus for performing role management of short-range wireless connections

Patent Citations (7)

* 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
CN106101979A (en) * 2015-04-30 2016-11-09 三星电子株式会社 Method and the electronic equipment of use the method for short-distance wireless communication
CN107054249A (en) * 2015-12-09 2017-08-18 现代自动车株式会社 Run AVN method, AVN and the vehicle including AVN
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 Core Specification v5.0;Bluetooth SIG;《Bluetooth》;20161206;参见章节4.2.1.7、8.6.5、2.5.1、2.5.4 *
Hands-Free Bluetooth Profile Specification v1.7.2;Bluetooth SIG;《Bluetooth》;20190121;参见章节4.2、4.2.1、4.2.1.1、4.2.1.6、4.11.1、5.3 *
Hands-Free Profile 1.5 Application Guideline;Mobile Computing Promotion Consortium Technical Committee;《2006-2007 Mobile Computing Promotion Consortium (MCPC)》;20070124;参见章节4.3 *
Serial Port Profile;Bluetooth SIG;《Bluetooth》;20010222;参见3.1.1 *

Also Published As

Publication number Publication date
CN110740438A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN109946986B (en) Household appliance control method, wearable device and computer readable storage medium
CN110072295B (en) Dual-channel communication method, device, first terminal and medium
CN110248344A (en) Communication means, equipment, system and readable storage medium storing program for executing
CN110087223B (en) Communication connection method, communication device, and storage medium
CN110267361B (en) Communication control method, device, system and readable storage medium
CN109104722B (en) Terminal access method, device and computer readable storage medium
CN110213749A (en) Communication processing method, communication equipment and storage medium
CN110691347A (en) Communication connection method, communication device, and storage medium
CN110740438B (en) Communication method, device, system and readable storage medium
CN110213751B (en) Communication method, device, system and readable storage medium
CN110225500B (en) Communication method, device, system and readable storage medium
CN110505265B (en) Communication method, device, system and readable storage medium
CN110233871B (en) Communication control method, device, system and readable storage medium
CN112887195B (en) Voice calling method, voice calling device and computer readable storage medium
CN110087222B (en) Role switching control method, communication device, and storage medium
CN110111786B (en) Audio processing method, equipment and computer readable storage medium
CN110287381B (en) Page control node searching method, terminal and computer readable storage medium
CN112566089A (en) Power consumption saving method, intelligent wearable device and computer readable storage medium
CN110213750A (en) Communication control method, equipment, system and readable storage medium storing program for executing
CN110139257A (en) Communication connecting method, communication equipment and storage medium
CN110234099A (en) Communication connecting method, communication equipment and storage medium
CN110248343A (en) Communication means, equipment, system and readable storage medium storing program for executing
CN110087224B (en) Registration control method, communication device, and storage medium
CN110139258A (en) Communication connecting method, communication equipment and storage medium
CN110267243A (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
GR01 Patent grant
GR01 Patent grant