Electronic device and communication method
By using the processor and Bluetooth module in the electronic device to forward and interact the call request and audio data of the mobile terminal, the problem of users missing calls from the mobile terminal when the electronic device is unavailable is solved, and reception and processing through Bluetooth peripherals are realized. Incoming call function.
Patent Information
- Application Number
- CN202010451369.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2040-05-25
AI Technical Summary
When the electronic device is unavailable, the user cannot handle the call service of the mobile terminal, resulting in the possibility of missing calls from the mobile terminal.
An electronic device is provided, equipped with a processor and a Bluetooth module, capable of establishing a Bluetooth protocol connection with a mobile terminal and a Bluetooth peripheral, forwarding a call request from the mobile terminal, and interacting with audio data after receiving an answer instruction from the Bluetooth peripheral.
By forwarding the audio data of the mobile terminal to the Bluetooth peripheral, users can receive and process incoming calls from the mobile terminal through the Bluetooth peripheral, avoiding missed calls and improving user experience.
Smart Images

Figure CN113727289B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an electronic device and a communication method. Background Art
[0002] Currently, electronic devices and mobile terminals can establish a communication connection based on the Bluetooth protocol and implement data exchange. For example, after the electronic device and the mobile terminal establish a communication connection, the mobile terminal can transfer the received call service to the electronic device, that is, the electronic device can process the call service.
[0003] However, when the electronic device is in a state that is inconvenient for the user to use, the electronic device cannot process call services, resulting in the user possibly missing incoming calls from the mobile terminal. Summary of the invention
[0004] The present application provides an electronic device and a calling method, which can solve the problem that users of the related art may miss incoming calls from mobile terminals. The technical solution is as follows:
[0005] In one aspect, an electronic device is provided, the electronic device comprising: a processor and a Bluetooth module;
[0006] The Bluetooth module is used to establish Bluetooth protocol connections with the mobile terminal and the Bluetooth peripheral device respectively;
[0007] The processor is used to:
[0008] forwarding a first call request sent by the mobile terminal to the Bluetooth peripheral device, where the first call request is a call request received by the mobile terminal;
[0009] In response to a first answering instruction sent by the Bluetooth peripheral device, instructing the mobile terminal to connect the first call;
[0010] The audio data of the first call sent by the mobile terminal is forwarded to the Bluetooth peripheral device, and the audio data of the first call sent by the Bluetooth peripheral device is forwarded to the mobile terminal.
[0011] Optionally, the Bluetooth protocol is a hands-free specification protocol; the electronic device supports an audio gateway role and a hands-free component role;
[0012] The electronic device establishes a connection with the mobile terminal in the role of the hands-free component, and the electronic device establishes a connection with the Bluetooth peripheral in the role of the audio gateway.
[0013] Optionally, the electronic device includes: a display screen;
[0014] The display screen is used to display a two-dimensional code, and the two-dimensional code is used for the mobile terminal to scan to download a remote control client;
[0015] The processor is further configured to:
[0016] In response to a connection request sent by the mobile terminal through the remote client, a Bluetooth protocol connection is established with the mobile terminal.
[0017] Optionally, the processor is further configured to:
[0018] During the process of exchanging audio data of the first call between the mobile terminal and the Bluetooth peripheral device, if a second call request is detected, sending the second call request to the Bluetooth peripheral device;
[0019] If the second answering instruction sent by the Bluetooth peripheral is received, the second call is answered, the audio data of the second call is exchanged with the Bluetooth peripheral, and the Bluetooth protocol connection with the mobile terminal is disconnected.
[0020] Optionally, the processor is further configured to:
[0021] If a call hang-up instruction sent by the Bluetooth peripheral is received, the second call is hung up, and a Bluetooth protocol connection is re-established with the mobile terminal.
[0022] Optionally, the electronic device exchanges audio data with the mobile terminal through a first audio channel, and exchanges audio data with the Bluetooth peripheral device through a second audio channel; and the processor is further configured to:
[0023] connecting the first audio path and the second audio path;
[0024] The audio data of the first call sent by the mobile terminal is forwarded to the Bluetooth peripheral through the connected first audio path and the second audio path, and the audio data of the first call sent by the Bluetooth peripheral is forwarded to the mobile terminal through the connected first audio path and the second audio path.
[0025] On the other hand, a calling method is provided, which is applied to an electronic device, and the method includes:
[0026] Forwarding a first call request sent by a mobile terminal to a Bluetooth peripheral device, wherein both the mobile terminal and the Bluetooth peripheral device have established a Bluetooth protocol connection with the electronic device, and the first call request is a call request received by the mobile terminal;
[0027] In response to a first answering instruction sent by the Bluetooth peripheral device, instructing the mobile terminal to connect the first call;
[0028] The audio data of the first call sent by the mobile terminal is forwarded to the Bluetooth peripheral device, and the audio data of the first call sent by the Bluetooth peripheral device is forwarded to the mobile terminal.
[0029] On the other hand, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the communication method as described in the above aspects.
[0030] On the other hand, a computer program product comprising instructions is provided, and when the computer program product is run on the computer, the computer is enabled to execute the communication method described in the above aspects.
[0031] The beneficial effects of the technical solution provided by this application include at least:
[0032] The present application provides an electronic device and a call method, wherein the electronic device can forward a first call request sent by a mobile terminal to a Bluetooth peripheral device, and after receiving a first answering instruction sent by the Bluetooth peripheral device, the audio data of the first call can be exchanged between the mobile terminal and the Bluetooth peripheral device. Since the electronic device can forward the audio data of the mobile terminal to the Bluetooth peripheral device, the user can receive the incoming call of the mobile terminal through the Bluetooth peripheral device and make a call, thereby avoiding missing the incoming call of the mobile terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 It is a structural diagram of a call system provided by an embodiment of the present application;
[0035] Figure 2 is a flow chart of a calling method provided by an embodiment of the present application;
[0036] Figure 3 is a flow chart of another calling method provided by an embodiment of the present application;
[0037] Figure 4 This is a schematic diagram of an interface for an electronic device to control a mobile terminal provided in an embodiment of the present application;
[0038] Figure 5 is a schematic diagram of a protocol stack of the HFP protocol provided in an embodiment of the present application;
[0039] Figure 6 is a schematic diagram of an incoming call interface of an electronic device provided in an embodiment of the present application;
[0040] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0041] Figure 8 It is a software structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0043] Figure 1 is a structural diagram of a call system provided by an embodiment of the present application. Figure 1 The system may include: an electronic device 10, a mobile terminal 20 and a Bluetooth peripheral device 30. The electronic device 10 may establish Bluetooth protocol connections with the mobile terminal 20 and the Bluetooth peripheral device 30 respectively.
[0044] Optionally, the electronic device 10 may be a smart phone, a tablet computer, or a vehicle-mounted terminal, etc., the mobile terminal 20 may be a smart phone or a tablet computer, etc., and the operating system of the mobile terminal may be an Android operating system. The Bluetooth peripheral 30 may be a Bluetooth headset, a Bluetooth speaker, or a wearable device, etc. For example, Figure 1 As shown, the electronic device 10 may be a tablet computer, the mobile terminal 20 may be a smart phone, and the Bluetooth peripheral 30 may be a Bluetooth headset.
[0045] In the embodiment of the present application, after receiving the first call request, the mobile terminal 20 can send the first call request to the electronic device 10, and the electronic device 10 can forward the first call request to the Bluetooth peripheral. In addition, after receiving the first answering instruction sent by the Bluetooth peripheral, the electronic device 10 can forward the audio data of the first call sent by the mobile terminal 20 to the Bluetooth peripheral, and can forward the audio data of the first call sent by the Bluetooth peripheral to the mobile terminal. That is, the electronic device 10 can play a bridging role between the mobile terminal 20 and the Bluetooth peripheral 30, so that the mobile terminal 20 and the Bluetooth peripheral 30 can exchange audio data.
[0046] The present application embodiment provides a calling method, which can be applied to electronic devices, such as Figure 1 The electronic device 10 is shown. Figure 2 , the method may include:
[0047] Step 101: forward a first call request sent by a mobile terminal to a Bluetooth peripheral device.
[0048] The mobile terminal and the Bluetooth peripheral device may both establish a Bluetooth protocol connection with the electronic device, and the first call request is a call request received by the mobile terminal.
[0049] Step 102: In response to the first answering instruction sent by the Bluetooth peripheral device, instruct the mobile terminal to connect the first call.
[0050] After forwarding the first call request of the mobile terminal to the Bluetooth peripheral device, the electronic device may receive a first answering instruction sent by the Bluetooth peripheral device, and in response to the first answering instruction, instruct the mobile terminal to connect the first call.
[0051] Step 103: forward the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device, and forward the audio data of the first call sent by the Bluetooth peripheral device to the mobile terminal.
[0052] After instructing the mobile terminal to connect the first call, the electronic device can forward the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device, and can forward the audio data of the first call sent by the Bluetooth peripheral device to the electronic device.
[0053] In summary, the embodiment of the present application provides a call method, whereby the electronic device can forward the first call request sent by the mobile terminal to the Bluetooth peripheral device, and after receiving the first answering instruction sent by the Bluetooth peripheral device, the audio data of the first call can be exchanged between the mobile terminal and the Bluetooth peripheral device. Since the electronic device can forward the audio data of the mobile terminal to the Bluetooth peripheral device, the user can receive the incoming call of the mobile terminal through the Bluetooth peripheral device and make a call, thereby avoiding missing the incoming call of the mobile terminal.
[0054] The present application embodiment provides a communication method, which can be applied to a communication system, such as Figure 1 Intercom system shown. Figure 3 , the method may include:
[0055] Step 201: The electronic device displays a QR code.
[0056] In an embodiment of the present application, a remote control client may be installed in the electronic device. When the electronic device establishes a Bluetooth connection with a mobile terminal for the first time, if the remote control client is not installed in the mobile terminal, the user can control the remote client installed in the electronic device to display a QR code for the mobile terminal to obtain the remote control client. The mobile terminal can scan the QR code to download the remote control client, and then establish a Bluetooth protocol connection with the electronic device through the remote control client. The remote control client installed on the electronic device may be the same as or different from the remote control client installed on the mobile terminal. The Bluetooth protocol used for the Bluetooth protocol connection is the hands-free profile (HFP) protocol or the advanced audio distribution profile (A2DP) protocol.
[0057] Optionally, after scanning the QR code, the mobile terminal can obtain the download address of the remote client, which is the Internet Protocol (IP) address of the background server of the remote client. After that, the mobile terminal can access the background server based on the download address, and send a request to the background server to obtain the installation package of the remote control client. The background server can respond to the acquisition request and send the installation package to the mobile terminal. Accordingly, the mobile terminal can receive and parse the installation package and install the remote control client.
[0058] It should be noted that the electronic device can first establish a Generic Attribute Profile (GATT) connection with the mobile terminal, that is, a connection established based on the GATT protocol. Afterwards, the mobile terminal can send an HFP protocol connection request or an A2DP protocol connection request to the electronic device through the GATT connection. That is, the electronic device and the mobile terminal can establish an HFP protocol connection or an A2DP protocol connection based on the GATT connection.
[0059] Step 202: The mobile terminal sends a connection request to the electronic device through the remote client.
[0060] After acquiring the remote control client, the mobile terminal may run the remote control client and send a connection request to the electronic device through the remote control client.
[0061] Optionally, the mobile terminal can also send a wireless fidelity connection request to the electronic device through the remote control client and the GATT connection. After receiving the wireless fidelity connection request, the electronic device can respond to the wireless fidelity connection request, establish a wireless fidelity connection with the mobile terminal, and interact with the mobile terminal based on the wireless fidelity connection interface data. For example, the mobile terminal can project its screen to the electronic device through the wireless fidelity connection. Accordingly, the electronic device can display the current interface of the mobile terminal on its display interface and can control the mobile terminal, that is, the electronic device can remotely control the mobile terminal.
[0062] For example, assuming that the current display interface of the mobile terminal 20 is a call interface, and the mobile terminal 20 projects the call interface to an electronic device, then see Figure 4 , the electronic device 10 can display the call interface on its display interface. Figure 4 As shown, the call interface may include: an intercept call control 01 , a make call control 02 , and a fold keyboard control 03 .
[0063] And, from Figure 4 It can be seen that if the electronic device 10 responds to the user's touch operation on the keys "1, 2 and 3" in the keyboard of the call interface and displays the numbers corresponding to the keys (i.e. 1, 2 and 3), the mobile terminal 20 can also respond to the touch operation and display the same numbers.
[0064] It should be noted that, during the process of the electronic device controlling the mobile terminal, the mobile terminal may also respond to the user's operation and send an interrupt control instruction to the electronic device to interrupt the controlled state. In response to the interrupt control instruction, the electronic device may display its own interface instead of the current interface of the mobile terminal, and end the interface control of the mobile terminal.
[0065] Step 203: The electronic device establishes a Bluetooth protocol connection with the mobile terminal.
[0066] After receiving the connection request sent by the mobile terminal, the electronic device can establish a Bluetooth protocol connection with the mobile terminal.
[0067] Optionally, after receiving the connection request sent by the mobile terminal, the electronic device may send a connection establishment response to the mobile terminal, thereby establishing a Bluetooth protocol connection with the mobile terminal.
[0068] For example, assuming that the Bluetooth protocol is the HFP protocol, after receiving a connection request sent by the mobile terminal, the electronic device can call the Bluetooth headset client (BluetoothHeadsetClient) object and load the connection (connect) function and the audio connection (connectAudio) function in the object to establish an HFP protocol connection with the mobile terminal.
[0069] In the embodiment of the present application, the electronic device may also establish a Bluetooth protocol connection with a Bluetooth peripheral device during the process of establishing a Bluetooth protocol connection with a mobile terminal. That is, the electronic device may establish a Bluetooth protocol connection with the mobile terminal and the Bluetooth peripheral device respectively. Optionally, the Bluetooth peripheral device may be a vehicle-mounted device, such as a vehicle-mounted speaker.
[0070] The process of establishing a Bluetooth protocol connection between the electronic device and the Bluetooth peripheral device may include: the electronic device turns on Bluetooth and searches for a pairing device, and when the Bluetooth peripheral device is found, sends a pairing request to the Bluetooth peripheral device. After receiving the pairing request, the Bluetooth peripheral device may respond to the pairing request and establish a Bluetooth protocol connection with the electronic device.
[0071] In the embodiment of the present application, since the electronic device can control the mobile terminal and can be controlled by the Bluetooth peripheral, the electronic device can support the audio gateway (AG) role and the hands free (HF) role, that is, the electronic device can act as both a client and a server. The mobile terminal can support the AG role, and the Bluetooth peripheral can support the HF role. In addition, the electronic device can establish a Bluetooth protocol connection with the mobile terminal in the HF role, and establish a Bluetooth protocol connection with the Bluetooth peripheral in the AG role.
[0072] Optionally, developers can set device attributes by configuring the device's HFP profile according to the role that the device needs to support, so that the device supports the role. The HFP profile may include the profile_supported_hs_hfp attribute and the profile_supported_hfpclient attribute. The device attributes may be configured before the device leaves the factory.
[0073] For example, a mobile terminal needs to support the AG role, so before it leaves the factory, the developer can set the profile_supported_hs_hfp attribute in the hfpprofile of the mobile terminal to the enabled state, and the profile_supported_hfpclient attribute to the disabled state, so that the mobile terminal supports the AG role. An electronic device needs to support both the AG role and the HF role, so before it leaves the factory, the developer can set both the profile_supported_hs_hfp attribute and the profile_supported_hfpclient attribute in the hfp profile of the electronic device to the enabled state, so that the electronic device supports both the AG role and the HF role. A Bluetooth peripheral needs to support the HF role, so before it leaves the factory, the developer can set the profile_supported_hfpclient attribute in the hfp profile of the Bluetooth peripheral to the enabled state, and the profile_supported_hs_hfp attribute to the disabled state, so that the Bluetooth peripheral supports the HF role.
[0074] Step 204: The mobile terminal sends a first call request to the electronic device.
[0075] In the embodiment of the present application, the mobile terminal can make or receive a call. When the mobile terminal receives the first call request, the mobile terminal can send the first call request to the electronic device based on the Bluetooth protocol connection between the mobile terminal and the electronic device.
[0076] The first call request may be sent by the call server to the mobile terminal, and the first call request may carry an incoming call number.
[0077] Figure 5 Schematic diagram of a protocol stack of the HFP protocol provided in an embodiment of the present application. Figure 5As shown, the protocol stack of the HFP protocol is a five-layer architecture, which is composed of the following from top to bottom: application layer 01, hands-free control layer 02, transport layer 03, link layer 04 and baseband layer 04. Among them, the transmission protocol based on the transport layer 03 may include the radio frequency communication (RFCOMM) protocol and the service discovery protocol (SDP). The transmission protocol based on the link layer 04 may include the link management protocol (LMP) and the logical link control and adaptation protocol (L2CAP). In addition, the application layer supporting the AG role can be used for audio serial port emulation, and the application layer supporting the HF role can be used for audio driver.
[0078] The process of the mobile terminal sending the first call request to the electronic device may include: the mobile terminal transmits the first call request to the baseband layer 05 through the application layer 01, the hands-free control layer 02, the transport layer 03, and the link layer 04 in sequence. Then, the first call request may be transmitted from the baseband layer 05 of the mobile terminal to the baseband layer 05 of the electronic device. Thereafter, the first call request may be transmitted from the baseband layer 05 to the application layer 01 through the link layer 04, the transport layer 03, and the hands-free control layer 02 in sequence.
[0079] Step 205: The electronic device forwards the first call request sent by the mobile terminal to the Bluetooth peripheral device.
[0080] After receiving the call request, the electronic device may forward the first call request to the Bluetooth peripheral device based on the Bluetooth protocol connection between the electronic device and the Bluetooth peripheral device.
[0081] Optionally, after receiving the first call request sent by the mobile terminal, that is, an incoming call event, the electronic device can also call the audio simulation function in the Bluetooth protocol to simulate the actual incoming call of the electronic device and display the incoming call interface. Since the electronic device has established a Bluetooth protocol connection with the Bluetooth peripheral in the AG role, the Bluetooth peripheral can play the incoming ringtone of the actual incoming call, thereby realizing that the electronic device forwards the first call request sent by the mobile terminal to the Bluetooth peripheral.
[0082] For example, assuming that the electronic device is connected to the mobile terminal via the HFP protocol, after receiving the incoming call event, the electronic device can call the audio simulation function included in the audio manager setting mode (AudioManager.setMode) object in the HFP protocol, such as the incoming call mode setting (AudioManager.Mode_In_Call) function, to simulate the actual incoming call of the electronic device and display Figure 6 The incoming call interface shown. Figure 6 It can be seen that the incoming call interface may include: incoming call number 12335, call hang-up control 04 and call answering control 05.
[0083] Step 206: The Bluetooth peripheral device sends a first answering instruction to the electronic device.
[0084] After receiving the first call request, the Bluetooth peripheral device may play the incoming call ringtone. Afterwards, the Bluetooth peripheral device may generate a first answering instruction in response to the user's answering control operation, and send the first answering instruction to the electronic device. The answering control operation may be a voice control operation or a touch control operation. The touch control operation may be a touch control operation of the user on the answering control on the Bluetooth peripheral device.
[0085] Optionally, after receiving the first call request, the Bluetooth peripheral device may further identify the incoming call number carried in the first call request, determine an audio signal corresponding to the incoming call number, and play the audio signal.
[0086] Step 207: The electronic device instructs the mobile terminal to connect the first call in response to the first answering instruction sent by the Bluetooth peripheral device.
[0087] After receiving the first answering instruction sent by the Bluetooth peripheral device, the electronic device can respond to the first answering instruction and instruct the mobile terminal to connect the first call.
[0088] Optionally, the electronic device can simulate the event of answering the call in response to the first answering instruction, and connect the first call. Since the Bluetooth role of the mobile terminal is currently the AG role, and the Bluetooth role of the electronic device is the HF role, that is, the electronic device can control the mobile terminal, so the electronic device connects the first call, which can control the mobile terminal to connect the first call.
[0089] Step 208: The electronic device forwards the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device, and forwards the audio data of the first call sent by the Bluetooth peripheral device to the mobile terminal.
[0090] After instructing the mobile terminal to connect the first call, the electronic device can forward the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device, and can forward the audio data of the first call sent by the Bluetooth peripheral device to the electronic device, thereby realizing the call. At this time, for the user, the receiver or speaker of the Bluetooth peripheral device is the output device of the audio data, and the microphone of the Bluetooth peripheral device is the input device of the audio data.
[0091] In an embodiment of the present application, the electronic device may include a first audio channel and a second audio channel. The electronic device may exchange audio data with the mobile terminal through the first audio channel, and may exchange audio data with the Bluetooth peripheral through the second audio channel.
[0092] Before the electronic device forwards the audio data sent by the mobile terminal to the Bluetooth peripheral device, the first audio path and the second audio path can be connected first. Afterwards, the electronic device can send the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device through the connected first audio path and second audio path. In addition, the electronic device can send the audio data of the first call sent by the Bluetooth peripheral device to the mobile terminal through the connected first audio path and second audio path, thereby realizing the interaction of audio data between the mobile terminal and the Bluetooth peripheral device.
[0093] Optionally, the electronic device may further include an audio switching circuit, and the electronic device may send a connection instruction to the audio switching circuit before forwarding the audio data sent by the mobile terminal to the Bluetooth peripheral device. The audio switching circuit may connect the first audio path and the second audio path in response to the connection instruction.
[0094] By executing the above steps 204 to 208, the electronic device can realize the interaction of audio data between the mobile terminal and the Bluetooth peripheral device.
[0095] In the embodiment of the present application, during the interaction of audio data between the mobile terminal and the Bluetooth peripheral device, the electronic device may further perform the following steps:
[0096] Step 209: During the process of exchanging audio data between the mobile terminal and the Bluetooth peripheral device, the electronic device detects whether a second call request is received.
[0097] The second call request may be sent by the call server to the electronic device, and the second call request may carry the incoming call number.
[0098] In the embodiment of the present application, during the process of exchanging audio data between the mobile terminal and the Bluetooth peripheral, the electronic device can detect whether the second call request is received, that is, the electronic device and the mobile terminal both receive the call request sent by the call server. If the electronic device receives the second call request, step 210 is executed. If the electronic device does not receive the second call request, the above step 208 is continued.
[0099] Step 210: The electronic device sends a second call request to the Bluetooth peripheral device.
[0100] After receiving the second call request, the electronic device may send the second call request to the Bluetooth peripheral device based on the Bluetooth protocol connection established between the electronic device and the Bluetooth peripheral device. Correspondingly, the Bluetooth peripheral device may receive the second call request.
[0101] Step 211: The Bluetooth peripheral device sends a second answering instruction to the electronic device.
[0102] After receiving the second call request, the Bluetooth peripheral device may no longer play the audio data collected by the mobile terminal and sent by the electronic device, but first play the incoming call ringtone. Afterwards, if the Bluetooth peripheral device responds to the user's answer control operation, the Bluetooth peripheral device may generate a second answer instruction and send the second answer instruction to the electronic device.
[0103] If the Bluetooth peripheral responds to the user's rejection control operation, the Bluetooth peripheral can generate a rejection instruction and send the rejection instruction to the electronic device. The rejection control operation can be a voice control operation or a touch control operation, and the touch control operation can be a touch control operation of the user on the rejection control on the Bluetooth peripheral.
[0104] Optionally, after receiving the second call request, the Bluetooth peripheral device may further identify the incoming call number carried in the second call request, determine an audio signal corresponding to the incoming call number, and play the audio signal.
[0105] Step 212: The electronic device responds to the second answering instruction, connects the second call, exchanges audio data with the Bluetooth peripheral device, and disconnects from the mobile terminal.
[0106] In an embodiment of the present application, after receiving the second answering instruction sent by the Bluetooth peripheral, the electronic device can respond to the second answering instruction, connect the second call, exchange audio data with the Bluetooth peripheral, and disconnect from the mobile terminal.
[0107] That is, the mobile terminal can answer the second call in response to the second answering instruction, send the audio data of the second call to the Bluetooth peripheral device, so that the Bluetooth peripheral device outputs the audio data, and receive the audio data of the second call sent by the Bluetooth peripheral device, even if the Bluetooth peripheral device inputs the audio data.
[0108] Step 213: If the electronic device receives a call hang-up instruction sent by the Bluetooth peripheral, it hangs up the second call and re-establishes a Bluetooth protocol connection with the mobile terminal.
[0109] In the embodiment of the present application, during the process of exchanging data with the Bluetooth peripheral device, if the electronic device receives a call hang-up instruction sent by the Bluetooth peripheral device, the second call can be hung up, and a Bluetooth protocol connection can be re-established with the mobile terminal. If the call hang-up instruction sent by the Bluetooth peripheral device is not received, the audio data of the second call can continue to be exchanged with the Bluetooth peripheral device.
[0110] The call hang-up instruction may be generated by the Bluetooth peripheral in response to a hang-up control operation of the user.
[0111] Optionally, the process of re-establishing a Bluetooth protocol connection between the electronic device and the mobile terminal may include: the electronic device may send a connection establishment request to the mobile terminal, and after the mobile terminal receives the connection establishment request, it may send a connection establishment response to the electronic device. At this point, the electronic device can re-establish a Bluetooth protocol connection with the mobile terminal.
[0112] Afterwards, if the first call request sent by the electronic device is received again, step 205 and subsequent steps may be executed.
[0113] At present, more and more people have multiple mobile terminals. For example, the multiple mobile terminals may include an electronic device, a mobile terminal and a Bluetooth peripheral. Usually, the mobile terminal can be projected to the electronic device to realize the multi-screen collaboration and call collaboration functions between the mobile terminal and the electronic device. When the electronic device is not around while charging, the method provided in the embodiment of the present application can be used to bridge the mobile terminal and the Bluetooth peripheral. Therefore, when the mobile terminal has an incoming call, the user can also answer the call through the Bluetooth peripheral, avoiding missed calls and improving the user experience.
[0114] It should be noted that the electronic device can only establish a Bluetooth protocol connection with the mobile terminal, that is, the electronic device and the mobile terminal exchange audio data through the first audio path. In this case, the receiver (or speaker, etc.) of the mobile terminal can be used as an output device for audio data, and the microphone of the mobile terminal can be used as an input device for audio data.
[0115] The electronic device can also establish a Bluetooth protocol connection with the Bluetooth peripheral only, that is, the electronic device and the mobile terminal exchange audio data through the second audio path. In this case, the receiver (or speaker, etc.) of the Bluetooth peripheral can be used as an output device for audio data, and the microphone of the Bluetooth peripheral can be used as an input device for audio data.
[0116] For the above-mentioned multiple application scenarios, the electronic device can determine the current application scenario based on the device to which it is connected, and send corresponding instructions to the audio switching circuit to configure the first audio path and the second audio path, thereby ensuring that the electronic device can be suitable for different application scenarios.
[0117] For example, if the electronic device detects that it is connected to the mobile terminal and the Bluetooth peripheral device respectively, it can send a connection instruction to the audio switching circuit. After receiving the connection instruction, the audio switching circuit can complete the bridging configuration of the first audio path and the first audio path. In addition, after receiving the connection instruction, the audio switching circuit can also update its flag bit to the first flag bit to indicate that the current role of the electronic device is the AG role and the HF role. Among them, the flag bit can be used to indicate the current application scenario of the electronic device.
[0118] If the electronic device detects that it is only connected to the mobile terminal, that is, the electronic device is disconnected from the Bluetooth peripheral, a first disconnection instruction can be sent to the audio switching circuit. After receiving the first disconnection instruction, the audio switching circuit determines that there is no need to perform a bridging configuration of the audio path. In addition, after receiving the first disconnection instruction, the audio switching circuit can update the current first flag bit to the second flag bit to indicate that the current role of the electronic device is the HF role.
[0119] If the electronic device detects that it is only connected to the Bluetooth peripheral device, that is, the electronic device is disconnected from the mobile terminal, a second disconnection instruction can be sent to the audio switching circuit. After receiving the second disconnection instruction, the audio switching circuit determines that there is no need to perform a bridging configuration of the audio path. In addition, after receiving the second disconnection instruction, the audio switching circuit can also update the current first flag bit to the third flag bit to indicate that the current role of the electronic device is the AG role.
[0120] It should be noted that the order of the calling method provided in the embodiment of the present application can be adjusted appropriately, and the steps can be increased or decreased accordingly according to the situation. For example, steps 201 to 205 can be deleted according to the situation, that is, the electronic device has established a Bluetooth protocol connection with the mobile terminal, and the mobile terminal is in a controlled state. Any technician familiar with the technical field can easily think of a change within the technical scope disclosed in this application, which should be covered within the scope of protection of this application, so it will not be repeated.
[0121] In summary, the embodiment of the present application provides a call method, whereby the electronic device can forward the first call request sent by the mobile terminal to the Bluetooth peripheral device, and after receiving the first answering instruction sent by the Bluetooth peripheral device, the audio data of the first call can be exchanged between the mobile terminal and the Bluetooth peripheral device. Since the electronic device can forward the audio data of the mobile terminal to the Bluetooth peripheral device, the user can receive the incoming call of the mobile terminal through the Bluetooth peripheral device and make a call, thereby avoiding missing the incoming call of the mobile terminal.
[0122] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 , the electronic device 110 may include a processor 1101 and a Bluetooth module 180 .
[0123] The Bluetooth module 180 can be used to establish Bluetooth protocol connections with the mobile terminal and the Bluetooth peripheral device respectively.
[0124] The processor 1101 may be used to:
[0125] forwarding a first call request sent by the mobile terminal to the Bluetooth peripheral device, where the first call request is a call request received by the mobile terminal;
[0126] In response to a first answering instruction sent by the Bluetooth peripheral device, instructing the mobile terminal to connect the first call;
[0127] The audio data of the first call sent by the mobile terminal is forwarded to the Bluetooth peripheral device, and the audio data of the first call sent by the Bluetooth peripheral device is forwarded to the mobile terminal.
[0128] Optionally, the Bluetooth protocol is a hands-free specification protocol; the electronic device supports an audio gateway role and a hands-free component role; the electronic device establishes a connection with a mobile terminal in the hands-free component role, and the electronic device establishes a connection with a Bluetooth peripheral in the audio gateway role.
[0129] Optional, such as Figure 7 As shown, the electronic device 110 also includes: a display screen 131.
[0130] The display screen 131 can be used to display a two-dimensional code, and the two-dimensional code is used for the mobile terminal to scan to download the remote control client.
[0131] The processor 1101 may be used to:
[0132] In response to a connection request sent by the mobile terminal through the remote client, a Bluetooth protocol connection is established with the mobile terminal.
[0133] Optionally, the processor 1101 may also be used for:
[0134] During the process of exchanging audio data of a first call between the mobile terminal and the Bluetooth peripheral, if a second call request is detected, the second call request is sent to the Bluetooth peripheral; if a second answering instruction sent by the Bluetooth peripheral is received, the second call is connected, the audio data of the second call is exchanged with the Bluetooth peripheral, and the Bluetooth protocol connection with the mobile terminal is disconnected.
[0135] Optionally, the processor 1101 may also be used for:
[0136] If a call hang-up instruction sent by the Bluetooth peripheral is received, the second call is hung up, and a Bluetooth protocol connection is re-established with the mobile terminal.
[0137] Optionally, the electronic device exchanges audio data with the mobile terminal through the first audio channel, and exchanges audio data with the Bluetooth peripheral device through the second audio channel; the processor 1101 may also be used for:
[0138] The first audio path and the second audio path are connected; the audio data of the first call sent by the mobile terminal is forwarded to the Bluetooth peripheral through the connected first audio path and the second audio path, and the audio data of the first call sent by the Bluetooth peripheral is forwarded to the mobile terminal through the connected first audio path and the second audio path.
[0139] In summary, the embodiment of the present application provides an electronic device, which can forward a first call request sent by a mobile terminal to a Bluetooth peripheral device, and can exchange audio data of the first call between the mobile terminal and the Bluetooth peripheral device after receiving a first answering instruction sent by the Bluetooth peripheral device. Since the electronic device can forward the audio data of the mobile terminal to the Bluetooth peripheral device, the user can receive the incoming call of the mobile terminal through the Bluetooth peripheral device and make a call, thereby avoiding missing the incoming call of the mobile terminal.
[0140] like Figure 7 As shown, the electronic device 110 may further include: a display unit 130, a memory 140, a radio frequency (RF) circuit 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a power supply 190, and a camera 121 and other components.
[0141] Among them, the camera 121 can be used to capture static pictures or videos. The object generates an optical picture through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 1101 to convert it into a digital picture signal.
[0142] The processor 1101 is the control center of the electronic device 110. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the electronic device 110 and processes data by running or executing software programs stored in the memory 140 and calling data stored in the memory 140. In some embodiments, the processor 1101 may include one or more processing units; the processor 1101 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1101. In the present application, the processor 1101 can run an operating system and an application program, can control the user interface display, and can implement the call method provided in the embodiment of the present application. In addition, the processor 1101 is coupled to the input unit and the display unit 130.
[0143] The display unit 130 may be used to receive input digital or character information, generate signal input related to user settings and function control of the electronic device 110, and optionally, the display unit 130 may also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the electronic device 110. The display unit 130 may include a display screen 131 disposed on the front of the electronic device 110. The display screen 131 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 130 may be used to display various graphical user interfaces described in the present application.
[0144] The display unit 130 includes: a display screen 131 and a touch screen 132 disposed on the front of the electronic device 110. The display screen 131 can be used to display preview images. The touch screen 132 can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc. Among them, the touch screen 132 can be covered on the display screen 131, and the touch screen 132 can also be integrated with the display screen 131 to realize the input and output functions of the electronic device 110. After integration, it can be simply called a touch display screen.
[0145] The memory 140 can be used to store software programs and data. The processor 1101 executes various functions and data processing of the electronic device 110 by running the software programs or data stored in the memory 140. The memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 140 stores an operating system that enables the electronic device 110 to run. In the present application, the memory 140 can store an operating system and various application programs, and can also store code for executing the call method provided in the embodiment of the present application.
[0146] The RF circuit 150 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 1101 for processing; it can send uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices.
[0147] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the electronic device 110. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output. The electronic device 110 can also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the RF circuit 150 to be sent to, for example, another terminal, or the audio data is output to the memory 140 for further processing. In the present application, the microphone 162 can obtain the user's voice.
[0148] Wi-Fi is a short-range wireless transmission technology. The electronic device 110 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170, which provides users with wireless broadband Internet access.
[0149] The Bluetooth module 180 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the electronic device 110 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 180 to exchange data.
[0150] The electronic device 110 also includes a power supply 190 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 1101 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption. The electronic device 110 can also be configured with a power button for turning on and off the terminal, as well as locking the screen and other functions.
[0151] The electronic device 110 may include at least one sensor 1110, such as a motion sensor 11101, a distance sensor 11102, a fingerprint sensor 11103, and a temperature sensor 11104. The electronic device 110 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
[0152] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic device and each device described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0153] Figure 8 It is a software structure diagram of the electronic device provided in the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
[0154] The application layer can include a series of application packages. Figure 8 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0155] like Figure 8 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0156] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0157] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0158] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0159] The phone manager is used to provide communication functions for the electronic device 110, such as management of call status (including connecting, hanging up, etc.).
[0160] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0161] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt tone is emitted, the communication terminal vibrates, and the indicator light flashes.
[0162] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0163] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0164] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0165] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc.
[0166] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0167] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0168] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
[0169] A 2D graphics engine is a drawing engine for 2D drawings.
[0170] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0171] The present application embodiment provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the call method provided in the above embodiment, for example Figure 2 or Figure 3 The method shown.
[0172] The present application also provides a computer program product including instructions. When the computer program product is run on a computer, the computer executes the call method provided by the above method embodiment, for example: Figure 2 or Figure 3 The method shown.
[0173] The present application also provides a communication system. Figure 1 The system may include: an electronic device 10, a mobile terminal 20 and a Bluetooth peripheral 30.
[0174] The mobile terminal 20 and the Bluetooth peripheral device 30 can both establish a Bluetooth protocol connection with the electronic device 30 .
[0175] Optionally, the system may include: a plurality of electronic devices 10 connected in sequence. Among the plurality of electronic devices 10 connected in sequence, the first electronic device 10 may be connected to the mobile terminal 20 , and the last electronic device 10 may be connected to the Bluetooth peripheral 30 .
[0176] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0177] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An electronic device, characterized in that: The electronic device comprises: a processor and a Bluetooth module; The Bluetooth module is used to establish Bluetooth protocol connections with the mobile terminal and the Bluetooth peripheral device respectively; The processor is used to: forwarding a first call request sent by the mobile terminal to the Bluetooth peripheral device, wherein the first call request is a call request sent by a call server to the mobile terminal; In response to the first call request, simulating an actual incoming call of the electronic device to display an incoming call interface, wherein the incoming call interface displays an incoming call number, a call hang-up control, and a call answering control; In response to a first answering instruction sent by the Bluetooth peripheral device, instructing the mobile terminal to connect the first call; connecting the first audio path and the second audio path; forwarding the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device through the connected first audio path and the second audio path, and forwarding the audio data of the first call sent by the Bluetooth peripheral device to the mobile terminal through the connected first audio path and the second audio path, wherein the electronic device exchanges audio data with the mobile terminal through the first audio path, and exchanges audio data with the Bluetooth peripheral device through the second audio path; During the process of exchanging audio data of the first call between the mobile terminal and the Bluetooth peripheral device, if a second call request is detected, the second call request is sent to the Bluetooth peripheral device, where the second call request is a call request sent by a call server to the electronic device; If a second answering instruction sent by the Bluetooth peripheral is received, the second call is answered, audio data of the second call is exchanged with the Bluetooth peripheral, and the Bluetooth protocol connection with the mobile terminal is disconnected; If a call hang-up instruction sent by the Bluetooth peripheral is received, the second call is hung up, and a Bluetooth protocol connection is re-established with the mobile terminal; Wherein, when the electronic device has established a Bluetooth protocol connection with the mobile terminal but has not established a Bluetooth protocol connection with the Bluetooth peripheral device, the receiver of the mobile terminal serves as an output device for audio data, and the microphone of the mobile terminal serves as an input device for audio data; When the electronic device has established a Bluetooth protocol connection with the Bluetooth peripheral device but has not established a Bluetooth protocol connection with the mobile terminal, the receiver of the Bluetooth peripheral device serves as an output device for audio data, and the microphone of the Bluetooth peripheral device serves as an input device for audio data; The electronic device further includes an audio switching circuit; the processor is further configured to send a connection instruction to the audio switching circuit when detecting that the electronic device is connected to the mobile terminal and the Bluetooth peripheral respectively; the audio switching circuit is configured to complete the bridging configuration of the first audio path and the second audio path after receiving the connection instruction, and update the flag bit to the first flag bit to indicate that the current role of the electronic device is a hands-free component role and an audio gateway role, and the flag bit is used to indicate the current application scenario of the electronic device; The processor is further used to send a first non-connectivity instruction to the audio switching circuit when it is detected that the electronic device has established a Bluetooth protocol connection with the mobile terminal but has not established a Bluetooth protocol connection with the Bluetooth peripheral device, and to send a second non-connectivity instruction to the audio switching circuit when it is detected that the electronic device has established a Bluetooth protocol connection with the Bluetooth peripheral device but has not established a Bluetooth protocol connection with the mobile terminal; the audio switching circuit is also used to determine that there is no need to perform a bridging configuration of the audio path after receiving the first non-connectivity instruction, and update the flag bit to the second flag bit to indicate that the current role of the electronic device is a hands-free component role, and to determine that there is no need to perform a bridging configuration of the audio path after receiving the second non-connectivity instruction, and update the flag bit to the third flag bit to indicate that the current role of the electronic device is an audio gateway role; The electronic device is applied to a call system, which includes one electronic device or a plurality of electronic devices connected in sequence, wherein the first electronic device among the plurality of electronic devices connected in sequence is connected to the mobile terminal, and the last electronic device is connected to the Bluetooth peripheral.
2. The electronic device according to claim 1, characterized in that: The Bluetooth protocol is a hands-free specification protocol; the electronic device supports an audio gateway role and a hands-free component role; The electronic device establishes a connection with the mobile terminal in the role of the hands-free component, and the electronic device establishes a connection with the Bluetooth peripheral in the role of the audio gateway.
3. The electronic device according to claim 1 or 2, characterized in that: The electronic device further comprises: a display screen; The display screen is used to display a two-dimensional code, and the two-dimensional code is used for the mobile terminal to scan to download a remote control client; The processor is further configured to: In response to a connection request sent by the mobile terminal through the remote client, a Bluetooth protocol connection is established with the mobile terminal.
4. A method for making a call, characterized in that: Applied to electronic equipment; the method comprises: Forwarding a first call request sent by a mobile terminal to a Bluetooth peripheral device, wherein both the mobile terminal and the Bluetooth peripheral device have established a Bluetooth protocol connection with the electronic device, and the first call request is a call request sent by a call server to the mobile terminal; In response to the first call request, simulating an actual incoming call of the electronic device to display an incoming call interface, wherein the incoming call interface displays an incoming call number, a call hang-up control, and a call answering control; In response to a first answering instruction sent by the Bluetooth peripheral device, instructing the mobile terminal to connect the first call; connecting the first audio path and the second audio path; forwarding the audio data of the first call sent by the mobile terminal to the Bluetooth peripheral device through the connected first audio path and the second audio path, and forwarding the audio data of the first call sent by the Bluetooth peripheral device to the mobile terminal through the connected first audio path and the second audio path, wherein the electronic device exchanges audio data with the mobile terminal through the first audio path, and exchanges audio data with the Bluetooth peripheral device through the second audio path; During the process of exchanging audio data of the first call between the mobile terminal and the Bluetooth peripheral device, if a second call request is detected, the second call request is sent to the Bluetooth peripheral device, where the second call request is a call request sent by a call server to the electronic device; If a second answering instruction sent by the Bluetooth peripheral is received, the second call is answered, audio data of the second call is exchanged with the Bluetooth peripheral, and the Bluetooth protocol connection with the mobile terminal is disconnected; If a call hang-up instruction sent by the Bluetooth peripheral is received, the second call is hung up, and a Bluetooth protocol connection is re-established with the mobile terminal; Wherein, when the electronic device has established a Bluetooth protocol connection with the mobile terminal but has not established a Bluetooth protocol connection with the Bluetooth peripheral device, the receiver of the mobile terminal serves as an output device for audio data, and the microphone of the mobile terminal serves as an input device for audio data; When the electronic device has established a Bluetooth protocol connection with the Bluetooth peripheral device but has not established a Bluetooth protocol connection with the mobile terminal, the receiver of the Bluetooth peripheral device serves as an output device for audio data, and the microphone of the Bluetooth peripheral device serves as an input device for audio data; The electronic device further includes an audio switching circuit; and the method further includes: When it is detected that the electronic device is connected to the mobile terminal and the Bluetooth peripheral device respectively, a connection instruction is sent to the audio switching circuit; the audio switching circuit is used to complete the bridging configuration of the first audio path and the second audio path after receiving the connection instruction, and update the flag bit to the first flag bit to indicate that the current role of the electronic device is the hands-free component role and the audio gateway role, and the flag bit is used to indicate the current application scenario of the electronic device; When it is detected that the electronic device has established a Bluetooth protocol connection with the mobile terminal but has not established a Bluetooth protocol connection with the Bluetooth peripheral, a first non-connectivity instruction is sent to the audio switching circuit, and when it is detected that the electronic device has established a Bluetooth protocol connection with the Bluetooth peripheral but has not established a Bluetooth protocol connection with the mobile terminal, a second non-connectivity instruction is sent to the audio switching circuit; the audio switching circuit is also used to determine that there is no need to perform a bridging configuration of the audio path after receiving the first non-connectivity instruction, and update the flag bit to a second flag bit to indicate that the current role of the electronic device is a hands-free component role, and after receiving the second non-connectivity instruction, determine that there is no need to perform a bridging configuration of the audio path, and update the flag bit to a third flag bit to indicate that the current role of the electronic device is an audio gateway role; The electronic device is applied to a call system, which includes one electronic device or a plurality of electronic devices connected in sequence, wherein the first electronic device among the plurality of electronic devices connected in sequence is connected to the mobile terminal, and the last electronic device is connected to the Bluetooth peripheral.
5. The method according to claim 4, characterized in that The Bluetooth protocol is a hands-free specification protocol; the electronic device supports an audio gateway role and a hands-free component role; The electronic device establishes a connection with the mobile terminal in the role of the hands-free component, and the electronic device establishes a connection with the Bluetooth peripheral in the role of the audio gateway.
6. The method according to claim 4 or 5, characterized in that: The method further comprises: Displaying a QR code, wherein the QR code is used for scanning by the mobile terminal to download a remote control client; In response to a connection request sent by the mobile terminal through the remote client, a Bluetooth protocol connection is established with the mobile terminal.
Citation Information
Patent Citations
Bluetooth connection method of wearable device, and device
CN106658678A
Method, apparatus and device of answering phone call automatically, and medium
CN109348051A