CN114390502A - Bluetooth communication method, device and storage medium - Google Patents

Bluetooth communication method, device and storage medium Download PDF

Info

Publication number
CN114390502A
CN114390502A CN202210285038.2A CN202210285038A CN114390502A CN 114390502 A CN114390502 A CN 114390502A CN 202210285038 A CN202210285038 A CN 202210285038A CN 114390502 A CN114390502 A CN 114390502A
Authority
CN
China
Prior art keywords
bluetooth
test
equipment
electronic device
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210285038.2A
Other languages
Chinese (zh)
Other versions
CN114390502B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210285038.2A priority Critical patent/CN114390502B/en
Publication of CN114390502A publication Critical patent/CN114390502A/en
Application granted granted Critical
Publication of CN114390502B publication Critical patent/CN114390502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

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

Abstract

The embodiment of the application provides a Bluetooth communication method, a device and a storage medium, which relate to the field of Bluetooth test; the method comprises the steps that Bluetooth connection is established between the Bluetooth equipment and the test equipment; the test equipment tests a first test function of the Bluetooth equipment based on the Bluetooth connection; the test equipment sends disconnection indication information to the Bluetooth equipment; and the Bluetooth device disconnects a signaling channel between the Bluetooth device and the test device based on the disconnection indication information. Therefore, even if the Bluetooth equipment receives the connection request message sent by the test equipment again in a short time, the Bluetooth equipment can still respond to the connection request of the test equipment, and the test equipment can normally establish Bluetooth connection with the Bluetooth equipment, so that the Bluetooth function test accuracy of the Bluetooth equipment on a Bluetooth test production line is improved.

Description

Bluetooth communication method, device and storage medium
Technical Field
The present application relates to the field of bluetooth testing, and in particular, to a bluetooth communication method, apparatus, and storage medium.
Background
When testing Bluetooth devices such as Bluetooth earphones and Bluetooth sound boxes, a tester can establish Bluetooth connection with the Bluetooth devices through the upper computer to test the Bluetooth functions of the Bluetooth devices.
However, for a bluetooth device with a normal bluetooth function, on a bluetooth test production line, when a tester performs bluetooth connection with the bluetooth device through an upper computer for many times, there may be a situation that the ratio of the number of times of connection failure to the number of times of successful connection is greater than a threshold value, so that the tester mistakenly considers that the bluetooth function of the bluetooth device has a problem, and the test accuracy is relatively low.
Disclosure of Invention
The embodiment of the application provides a Bluetooth communication method, a Bluetooth communication device and a Bluetooth communication storage medium, relates to the technical field of terminals, and is beneficial to realizing disconnection of a signaling channel between a Bluetooth device and an upper computer for testing, so that the Bluetooth device can successfully establish Bluetooth connection with the upper computer under the condition that the upper computer initiates a Bluetooth connection request again, and the accuracy of the Bluetooth communication method is improved.
In a first aspect, an embodiment of the present application provides a bluetooth communication method, which is applied to a test system, where the test system includes a bluetooth device and a test device, and the method includes: the Bluetooth device establishes Bluetooth connection with the test device; the test equipment tests a first test function of the Bluetooth equipment based on the Bluetooth connection; the test equipment sends disconnection indication information to the Bluetooth equipment; and the Bluetooth device disconnects a signaling channel between the Bluetooth device and the test device based on the disconnection indication information.
In the embodiment of the application, the Bluetooth equipment is disconnected from the signaling channel of the test equipment under the condition of receiving the disconnection indication information of the test equipment, so that even if the Bluetooth equipment receives the connection request message sent by the test equipment again in a short time, the Bluetooth equipment can still respond to the connection request of the test equipment and normally establishes Bluetooth connection with the test equipment, thereby being beneficial to improving the accuracy of the Bluetooth function test of the Bluetooth equipment on a Bluetooth test production line.
In a possible implementation, the method further includes: the Bluetooth device and the test device reestablish Bluetooth connection; the test device tests a second test function of the bluetooth device based on the re-established bluetooth connection.
In a possible implementation manner, the disconnection indication information includes an identifier of the test device, and the disconnecting of the signaling channel between the bluetooth device and the test device based on the disconnection indication information includes: in the case where the bluetooth device determines that the session with the test device is not included, the bluetooth device disconnects the signaling channel with the test device based on the disconnection indication information. Therefore, under the condition that the Bluetooth equipment receives the disconnection indicating information, the Bluetooth equipment further judges whether a conversation with the test equipment exists or not, and the connection with the signaling channel of the test equipment is disconnected under the condition that the conversation with the test equipment does not exist, so that the opportunity of the connection between the disconnection of the Bluetooth equipment and the signaling channel of the test equipment tends to be more accurate, and the accuracy of the Bluetooth function test of the Bluetooth equipment on a Bluetooth test production line is further improved.
In a possible implementation manner, the disconnecting, by the bluetooth device, a signaling channel between the bluetooth device and the test device based on the disconnection indication information includes: and the Bluetooth equipment disconnects the connection with the signaling channel of the test equipment by calling the disconnection interface of the communication protocol layer. Therefore, the Bluetooth device can directly call the disconnection interface of the communication protocol layer to disconnect the signaling channel of the test device.
In a possible implementation manner, the disconnecting, by the bluetooth device, a signaling channel between the bluetooth device and the test device based on the disconnection indication information includes: the Bluetooth device closes the session with the test device based on the disconnection indication information. Therefore, the Bluetooth device can initiate disconnection with the test device from top to bottom from the application layer to the data link layer, and disconnect the signaling channel with the test device in the process of closing the session with the test device.
In a possible implementation manner, the sending, by the test device, disconnection indication information to the bluetooth device includes: and under the condition that the test equipment receives the trigger operation aiming at the disconnection control, the test equipment responds to the trigger operation and sends disconnection indication information to the Bluetooth equipment.
In a second aspect, an embodiment of the present application provides a bluetooth communication method, which is applied to a first electronic device, and the method includes: the first electronic equipment establishes Bluetooth connection with the test equipment; the first electronic device executes a first test function of the first electronic device based on the Bluetooth connection; the method comprises the steps that first electronic equipment obtains disconnection indication information; and the first electronic equipment disconnects a signaling channel between the first electronic equipment and the testing equipment based on the disconnection indication information.
In the embodiment of the application, the Bluetooth equipment is disconnected from the signaling channel of the test equipment under the condition of receiving the disconnection indication information of the test equipment, so that even if the Bluetooth equipment receives the connection request message sent by the test equipment again in a short time, the Bluetooth equipment can still respond to the connection request of the test equipment and normally establishes Bluetooth connection with the test equipment, thereby being beneficial to improving the accuracy of the Bluetooth function test of the Bluetooth equipment on a Bluetooth test production line.
In a possible implementation, the method further includes: the first electronic device reestablishes Bluetooth connection with the test device; the first electronic device performs a second test function of the first electronic device based on the reestablished bluetooth connection.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: in a case where the first electronic device determines that the session with the test device is not included, the first electronic device disconnects a signaling channel with the test device based on the disconnection indication information.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: and the first electronic equipment disconnects the signaling channel of the test equipment by calling the disconnection interface of the communication protocol layer.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: the first electronic device closes the session with the test device based on the disconnection indication information. In this way, the first electronic device closes the session with the test device from the application layer, and the first electronic device disconnects the signaling channel with the test device from the data link layer during the process of closing the session.
In a third aspect, a bluetooth communication method is provided, the method comprising: the first electronic equipment establishes Bluetooth connection with the test equipment; the method comprises the steps that first electronic equipment obtains disconnection indication information; and the first electronic equipment disconnects a signaling channel between the first electronic equipment and the testing equipment based on the disconnection indication information.
In a possible implementation manner, the first electronic device reestablishes a bluetooth connection with the test device; the first electronic device performs a second test function of the first electronic device based on the reestablished bluetooth connection.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: in a case where the first electronic device determines that the session with the test device is not included, the first electronic device disconnects a signaling channel with the test device based on the disconnection indication information.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: and the first electronic equipment disconnects the signaling channel of the test equipment by calling the disconnection interface of the communication protocol layer.
In a possible implementation manner, the disconnecting, by the first electronic device, the signaling channel between the first electronic device and the test device based on the disconnection indication information includes: the first electronic device closes the session with the test device based on the disconnection indication information. In this way, the first electronic device closes the session with the test device from the application layer, and the first electronic device disconnects the signaling channel with the test device from the data link layer during the process of closing the session.
In the embodiment of the application, the Bluetooth equipment is disconnected from the signaling channel of the test equipment under the condition of receiving the disconnection indication information of the test equipment, so that even if the Bluetooth equipment receives the connection request message sent by the test equipment again in a short time, the Bluetooth equipment can still respond to the connection request of the test equipment and normally establishes Bluetooth connection with the test equipment, thereby being beneficial to improving the accuracy of the Bluetooth function test of the Bluetooth equipment on a Bluetooth test production line.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: the communication module is used for establishing Bluetooth connection with the test equipment; the processing module is used for executing a first test function of the first electronic equipment based on the Bluetooth connection; acquiring disconnection indication information; and disconnecting the signaling channel between the test equipment and the test equipment based on the disconnection indication information.
Optionally, the communication module is further configured to reestablish a bluetooth connection with the test device; the processing module is used for executing a second test function of the first electronic device based on the reestablished Bluetooth connection.
Optionally, the communication module is specifically configured to: and in the case that the first electronic equipment determines that the session with the test equipment is not included, disconnecting the signaling channel with the test equipment based on the disconnection indication information.
Optionally, the communication module is specifically configured to disconnect a signaling channel of the test device by calling a disconnection interface of the communication protocol layer.
Optionally, the processing module is specifically configured to close a session with the test device based on the disconnection indication information.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the processor is configured to call a computer program in the memory to execute steps performed by a bluetooth device in a bluetooth communication method provided in the first aspect or any one of possible implementations of the first aspect, or to execute a bluetooth communication method provided in the second aspect or any one of possible implementations of the second aspect, or to execute a bluetooth communication method provided in any one of possible implementations of the third aspect or the third aspect.
In a sixth aspect, the present application provides a computer-readable storage medium, where a computer program or an instruction is stored, and when the computer program or the instruction runs on a computer, the computer is caused to execute the steps executed by the bluetooth device in the bluetooth communication method provided in the first aspect or any one of the possible implementations of the first aspect, or the computer is caused to execute the bluetooth communication method provided in the second aspect or any one of the possible implementations of the second aspect, or the bluetooth communication method provided in any one of the possible implementations of the third aspect.
In a seventh aspect, an embodiment of the present application provides a computer program product including a computer program, when the computer program runs on a computer, the computer is caused to execute steps performed by a bluetooth device in a bluetooth communication method described in the first aspect or any one of possible implementations of the first aspect, or the computer is caused to execute a bluetooth communication method provided in any one of possible implementations of the second aspect or the second aspect, or the computer is caused to execute a bluetooth communication method provided in any one of possible implementations of the third aspect or the third aspect.
In an eighth aspect, the present application provides a chip or a chip system, where the chip or the chip system includes at least one processor and a communication interface, where the communication interface and the at least one processor are interconnected by a line, and the at least one processor is configured to execute a computer program or instructions to perform steps performed by a bluetooth device in a bluetooth communication method described in any one of the possible implementations of the first aspect or the first aspect, or to perform a bluetooth communication method provided in any one of the possible implementations of the second aspect or the second aspect, or to perform a bluetooth communication method provided in any one of the possible implementations of the third aspect or the third aspect. The communication interface in the chip may be an input/output interface, a pin, a circuit, or the like.
In one possible implementation, the chip or chip system described above in this application further comprises at least one memory having instructions stored therein. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or may be a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
It should be understood that the fourth aspect to the eighth aspect of the present application correspond to the technical solutions of the first aspect to the third aspect of the present application, respectively, and the beneficial effects obtained by the aspects and the corresponding possible implementations are similar and will not be described again.
Drawings
Fig. 1 is a schematic diagram illustrating a first electronic device communicating with a second electronic device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of connection and disconnection between a first electronic device and a second electronic device in a possible implementation manner;
FIG. 3 is a schematic structural diagram of a testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a bluetooth device to which the embodiment of the present application is applied;
fig. 5 is a flowchart illustrating a bluetooth communication method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a Bluetooth connection interface of a testing device according to an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating another bluetooth communication method according to an embodiment of the present application;
fig. 8 is a flowchart illustrating another bluetooth communication method according to an embodiment of the present application;
fig. 9 is a structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a chip according to an embodiment of the present application.
Detailed Description
In the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same or similar items having substantially the same function and action. For example, the first chip and the second chip are only used for distinguishing different chips, and the sequence order thereof is not limited. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c can be single or multiple.
At present, the tester can utilize the host computer to test bluetooth function to bluetooth equipment such as bluetooth headset, bluetooth speaker. However, for a bluetooth device with a normal bluetooth function, in the testing process, there may be a case that the ratio of the number of times that the upper computer cannot successfully connect the bluetooth device to the number of times that the upper computer successfully connects the bluetooth device is greater than the threshold, so that a tester may misunderstand that the bluetooth function of the bluetooth device is abnormal.
For example, as shown in fig. 1, the second electronic device 20 may establish a bluetooth connection with the first electronic device 10 based on a bluetooth communication protocol, where the second electronic device 20 may be any one of terminal devices such as a Personal Computer (PC), a smart phone, a tablet computer, and the like, and in a case where the second electronic device 20 does not include a bluetooth module, the second electronic device 20 may connect a bluetooth adapter to establish a bluetooth connection with the first electronic device 10. The bluetooth adapter may be a bluetooth dongle (dongle). The first electronic device 10 may be any one of bluetooth devices such as a bluetooth headset and a bluetooth speaker. The second electronic device 20 may include an Application (APP) that controls the bluetooth function of the first electronic device 10, thereby enabling testing of the bluetooth function of the first electronic device 10.
In some scenarios, fig. 2 is a flowchart illustrating the second electronic device 20 establishing a bluetooth connection and disconnecting with the first electronic device 10. In fig. 2, after the second electronic device establishes a Serial Port Profile (SPP) connection with the first electronic device, the second electronic device establishes a signaling channel and a data channel with the first electronic device. After the second electronic device establishes a bluetooth connection with the first electronic device, the first electronic device stores information characterizing the bluetooth connection) in a linked list. It should be noted that the information characterizing the bluetooth connection may be referred to as a connection instance or session at the application level. The second electronic device receives the first user operation and sends a disconnection instruction to the first electronic device in response to the first user operation. And the first electronic equipment disconnects the data channel of the second electronic equipment according to the disconnection instruction. Subsequently, the second electronic device transmits again a first connection request for requesting establishment of a bluetooth connection, for example, an SPP connection, with the first electronic device to the first electronic device for a short time. At this time, a signaling channel between the first electronic device and the second electronic device may still exist, so that the first electronic device misunderstands that the first electronic device is still connected to the second electronic device in the communication protocol layer, and thus the first electronic device sends the first connection response message to the second electronic device. The first connection response message is used to characterize a rejection of the first connection request. Resulting in a failure of the second electronic device to connect to the first electronic device.
In other scenarios, if the second electronic device receives the second user operation after a long time, the second electronic device sends the second connection request to the first electronic device again in response to the second user operation, at this time, the first electronic device may disconnect the signaling channel from the second electronic device at the communication protocol level due to not receiving the heartbeat information from the second electronic device for a long time, so that the first electronic device sends the second connection response message to the second electronic device. The second connection response message is used to characterize approval of the second connection request. The second electronic device successfully establishes a bluetooth connection with the first electronic device.
Therefore, in the process that a tester utilizes the upper computer to test the Bluetooth function of the Bluetooth device, the test result is influenced by the time length from the moment when the first electronic device receives the disconnection instruction to the moment when the first electronic device receives the connection request message next time, and the test accuracy is low.
In view of this, an embodiment of the present application provides a method for testing a bluetooth device, in which a first electronic device disconnects a data channel and disconnects a signaling channel when receiving a disconnection instruction of a second electronic device, so that even if the first electronic device receives a connection request message sent by the second electronic device again in a short time, the first electronic device can still respond to the connection request of the second electronic device, and the second electronic device can normally establish a bluetooth connection with the first electronic device, thereby facilitating improvement of accuracy of bluetooth function testing of the bluetooth device on a bluetooth testing production line.
The function of the second electronic device in the bluetooth device testing method provided by the embodiment of the present application may be implemented by the terminal device shown in fig. 3. The terminal device shown in fig. 3 may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. The terminal device may be a mobile phone (mobile phone), a wearable device, a tablet computer (Pad), a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a vehicle-mounted terminal, a desktop computer, or the like. The embodiment of the present application does not limit the specific technology and the specific device form adopted by the terminal device.
In order to better understand the embodiments of the present application, the following describes a structure of a terminal device to which the embodiments of the present application are applied. As shown in fig. 3, which is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure, the terminal device 30 shown in fig. 3 may include a processor 310, a memory 320, a Universal Serial Bus (USB) interface 330, a power source 340, a communication module 350, a display 360, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the terminal device 30. In other embodiments of the present application, terminal device 30 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 310 may include one or more processing units, such as: the processor 310 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a Digital Signal Processor (DSP), a baseband processor), and the like. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 310. If the processor 310 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 310, thereby increasing the efficiency of the system.
The power supply 340 supplies power to the terminal device 30.
The communication module 350 may use any transceiver or other devices to provide wireless communication solutions applied to the terminal device 30, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The communication module 350 may be one or more devices integrating at least one communication processing module. The communication module 350 receives electromagnetic waves via an antenna, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 310. The communication module 350 may also receive a signal to be transmitted from the processor 310, frequency-modulate it, amplify it, and convert it into electromagnetic waves via the antenna to radiate it.
In some embodiments, the antenna of the terminal device 30 is coupled to the communication module 350 so that the terminal device 30 can communicate with the network and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The terminal device 30 implements a display function by the GPU, the display screen 360, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 360 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 360 is used to display images, video, and the like. The display screen 360 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, terminal device 30 may include 1 or N display screens 360, N being a positive integer greater than 1.
Memory 320 may be used to store one or more computer programs, including instructions. Processor 310 may cause terminal device 30 to execute various functional applications, data processing, and the like by executing the above-described instructions stored in memory 320. The memory 320 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system.
The storage data area may store data created during use of the terminal device 30, and the like. Further, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like. In some embodiments, processor 310 may cause terminal device 30 to perform various functional applications and data processing by executing instructions stored in memory 320 and/or instructions stored in a memory disposed in processor 310.
It should be noted that the structure of the terminal device illustrated in the embodiment of the present application does not specifically limit the second electronic device 20; it will be appreciated that the second electronic device 20 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components; where the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Fig. 4 shows a schematic structural diagram of a bluetooth device 40. The bluetooth device 40 may include at least one processor 401, at least one memory 402, a wireless communication module 403, an audio module 404, a power module 405, and an input/output interface 406, among other things. The processor may include one or more interfaces for interfacing with other components of bluetooth device 40.
The memory 402 may be used for storing program codes, such as program codes for virtual connection or physical connection between the bluetooth device 40 and a plurality of electronic devices, switching physical connection with the electronic devices, processing audio services of the electronic devices (e.g., music playing, making/receiving calls, etc.), charging the bluetooth device 40, and wireless pairing connection between the bluetooth device 40 and other electronic devices. The memory 402 may also be used to store other information, such as the priority of the electronic device.
The processor 401 may be configured to execute the application program codes and call the relevant modules to implement the functions of the bluetooth device 40 in the embodiment of the present application. For example, the functions of virtual connection or physical connection between the bluetooth device 40 and a plurality of electronic devices, audio playing, call receiving/making, switching physical connection with different electronic devices according to device priorities, and the like are realized. For another example, when the bluetooth device 40 receives a disconnection command, it is realized that the session with the electronic device that transmitted the disconnection command is closed.
The processor 401 may include one or more processing units, and the different processing units may be separate devices or may be integrated in one or more of the processors 401. The processor 401 may be specifically an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to execute the functions belonging to the processor 401 described in the embodiments of the present application.
The wireless communication module 403 may be used to support data exchange between the bluetooth device 40 and other electronic devices or earphone boxes, including BT, WLAN (e.g., Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technologies.
In some embodiments, the wireless communication module 403 may be a bluetooth chip. The bluetooth device 40 can pair with bluetooth chips of other electronic devices through the bluetooth chip and establish a wireless connection, so as to implement wireless communication and service processing between the bluetooth device 40 and other electronic devices through the wireless connection. The wireless connection may be a physical connection or a virtual connection. In general, a bluetooth chip may support Basic Rate (BR)/enhanced rate (EDR) bluetooth and BLE, for example, paging (page) information may be received/transmitted, BLE broadcast messages may be received/transmitted, and the like.
In addition, the wireless communication module 403 may further include an antenna, and the wireless communication module 403 may receive an electromagnetic wave via the antenna, frequency-modulate and filter an electromagnetic wave signal, and transmit the processed signal to the processor 401. The wireless communication module 403 may also receive a signal to be transmitted from the processor 401, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna to radiate the electromagnetic waves.
Audio module 404 may be used to manage audio data and enable input and output of audio signals by bluetooth device 40. For example, the audio module 404 may obtain an audio signal from the wireless communication module 403 or transmit the audio signal to the wireless communication module 403, so as to achieve the functions of making and receiving calls through a bluetooth headset, playing music, activating/deactivating a voice assistant of an electronic device connected to the headset, receiving/transmitting voice data of a user, and the like. The audio module 404 may include a speaker (or called an earphone or a receiver) component for outputting an audio signal, a microphone (or called a microphone or a microphone), a microphone receiving circuit matched with the microphone, and the like. The speaker may be used to convert the electrical audio signal into an acoustic signal and play it. The microphone may be used to convert sound signals into electrical audio signals.
A power module 405, which may be used to provide a system power for the bluetooth device 40 and supply power to each module of the bluetooth device 40; the supporting bluetooth device 40 receives a charging input, etc. The power module 405 may include a Power Management Unit (PMU) and a battery. The power supply management unit can receive external charging input; the electric signal input by the charging circuit is provided to the battery for charging after being transformed, and the electric signal provided by the battery can also be provided to other modules such as an audio module 404, a wireless communication module 403 and the like after being transformed; and to prevent overcharging, overdischarging, short-circuiting, overcurrent, etc. of the battery. In some embodiments, power module 405 may also include a wireless charging coil for wirelessly charging bluetooth device 40. In addition, the power management unit can also be used for monitoring parameters such as battery capacity, battery cycle number, battery health state (electric leakage and impedance) and the like.
A plurality of input/output interfaces 406 may be used for wired connections for charging or communication. In some embodiments, the input/output interface may be a USB interface.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the bluetooth device 40. It may have more or fewer components than shown in fig. 4, may combine two or more components, or may have a different configuration of components. For example, bluetooth device 40 may further include a button, an indicator (which may indicate the status of power, incoming/outgoing calls, pairing mode, etc.), a display (which may prompt the user for relevant information), a dust screen (which may be used with an earpiece), and the like.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following embodiments may be implemented independently or in combination, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 5 is a schematic flowchart of a bluetooth communication method according to an embodiment of the present application, where the bluetooth communication method includes the following steps:
s501, Bluetooth connection is established between the Bluetooth device and the test device.
In this embodiment of the application, the bluetooth device may be a bluetooth device such as a bluetooth headset or a bluetooth speaker, and the test device may be a terminal device such as a desktop computer, a notebook computer, a mobile phone, or a tablet computer. In the case where the test device does not include a bluetooth module, the test device may connect a bluetooth adapter to establish a bluetooth connection with the bluetooth device. The bluetooth adapter may be a bluetooth dongle. Wherein, the bluetooth connection may be a Serial Port Protocol (SPP) connection.
In a possible implementation manner, the bluetooth device receives a first request message sent by the test device, and the bluetooth device sends a first response message to the test device. The first request message is used for requesting to establish Bluetooth connection with the Bluetooth equipment. The first response message is used to characterize the bluetooth device as agreeing to the first request message. And under the condition that the test equipment receives the first response message sent by the Bluetooth equipment, the Bluetooth equipment establishes Bluetooth connection with the test equipment.
In one example, in the case where the upper computer scans a broadcast message transmitted by the bluetooth headset, the upper computer transmits a first Request message to the bluetooth headset by calling Spp Connect Request (). The first request message is used for requesting to establish Bluetooth connection with the Bluetooth headset. And the Bluetooth headset determines whether to accept the connection request or not under the condition of receiving the first request message, and sends a first response message to the upper computer by calling SppConnectResponse (). Wherein the first response message may be SPP _ CLIENT _ CONNECT _ CFM. And under the condition that the upper computer receives the SPP _ CLIENT _ CONNECT _ CFM, representing that the SPP communication session between the upper computer and the Bluetooth headset is established. The upper computer and the Bluetooth headset successfully establish Bluetooth connection.
As shown in fig. 6, the bluetooth connection interface 610 on the mobile phone is shown in the case that the upper computer is the mobile phone. Bluetooth connection interface 610 includes a display area 611, a display area 612, and a display area 613. The display area 611 is used to display whether the bluetooth of the mobile phone is turned on, and the device name of the mobile phone when the bluetooth is connected. As shown in FIG. 6, the DEVICE name is DEVICE 2.
The display area 612 is used to display the bluetooth devices to which the mobile phone is connected. As shown in FIG. 6, the connected Bluetooth DEVICE of the handset includes DEVICE 1. Wherein DEVICE 1 characterizes a bluetooth headset.
The display area 613 is used to display bluetooth devices that can be detected by the mobile phone and that have bluetooth enabled and can establish a bluetooth connection. The Bluetooth device displayed in the area indicates that the Bluetooth device can establish Bluetooth connection with the mobile phone.
In another example, the upper computer may receive an input operation of the tester, acquire a bluetooth address of the bluetooth headset input by the tester in response to the input operation, and transmit the first request message to the bluetooth headset according to the acquired bluetooth address. And the Bluetooth headset sends a first response message to the upper computer under the condition of receiving the first request message. And the upper computer successfully establishes Bluetooth connection with the Bluetooth headset under the condition of receiving the first response message sent by the Bluetooth headset.
It will be appreciated that after the bluetooth connection is established between the bluetooth device and the test device, connection information is included in the bluetooth device to characterize the bluetooth connection. Illustratively, the bluetooth device establishes a session (session) corresponding to the bluetooth connection at an application level for characterizing the bluetooth connection, and stores the session in a linked list. The session may include a bluetooth address of the bluetooth device and a bluetooth address of the test device. This session may also be referred to as a connection instance. The bluetooth connection may be a Radio Frequency Communication (RFCOMM) connection. After the Bluetooth connection is established, a signaling (signaling) channel and a data channel are included between the Bluetooth device and the test device. The signaling channel is used for transmitting control signaling, and the data channel is used for transmitting data.
S502, the testing device tests a first testing function of the Bluetooth device based on the Bluetooth connection with the Bluetooth device.
In this embodiment of the application, the first test function may be a function corresponding to any functional test case in the functional test. The first test function of the bluetooth device is tested to check whether the function of the bluetooth device meets the user requirements.
In a possible implementation manner, the test device receives a first operation for the test control of the test device, and sends a first indication message to the bluetooth device in response to the first operation, and the bluetooth device executes a first test function according to the first indication message.
Illustratively, the test device receives a trigger operation for a play control of the test device, and sends a first indication message to the bluetooth device in response to the trigger operation, wherein the first indication message is used for indicating the bluetooth device to play a test audio; the first indication message may include a play instruction and test audio; the test device can send test audio to the Bluetooth device based on the data channel, and can send a play instruction based on the signaling channel, and the test device plays the received test audio according to the play instruction.
S503, the test equipment sends disconnection indicating information to the Bluetooth equipment.
In this embodiment, the disconnection indication information may include an identifier of the test device.
In a possible implementation, the test device receives a user operation and sends disconnection indication information to the bluetooth device in response to the user operation.
Illustratively, the upper computer receives a user operation and transmits a disconnect command (DISC) to the bluetooth headset in response to the user operation.
Optionally, S504, the bluetooth device determines whether a session with the test device exists in the bluetooth device, if so, the process is not performed, and if not, S505 is executed.
In the embodiment of the application, the session between the bluetooth device and the test device may be used to characterize the communication connection between the bluetooth device and the application layer of the test device.
In a possible implementation manner, the bluetooth device judges whether the stored session includes the identifier of the test device according to the identifier of the test device in the disconnection indication information.
In one example, sessions between the bluetooth device and other devices may be stored in a linked list, and the bluetooth device disconnects a signaling channel of the test device when the linked list does not include a session corresponding to an identifier of the test device; and under the condition that the linked list comprises the session corresponding to the identifier of the test equipment, the Bluetooth equipment cannot initiate disconnection with the test equipment. The Bluetooth device is facilitated to more accurately control the connection time of the signaling channel with the test device.
And S505, the Bluetooth device disconnects the signaling channel of the test device.
In a possible implementation, the bluetooth device disconnects the signaling channel of the test device by calling an interface of the communication protocol layer.
In one example, the bluetooth device may directly invoke an interface of the communication protocol layer to send a command for disconnection on the signaling channel to disconnect the signaling channel from the test device.
In another example, the bluetooth device performs closing a session with the test device. In the process that the Bluetooth device closes the session with the test device, the Bluetooth device can be disconnected from the application layer, the data link layer and the like from the top to the bottom respectively, and the Bluetooth device can be disconnected from the test device at the data link layer by calling the interface of the communication protocol layer, so that the Bluetooth device is disconnected from the signaling channel of the test device.
And S506, the Bluetooth device and the test device reestablish Bluetooth connection.
For possible implementation, reference is made to the description in S501, and details are not repeated.
S507, the testing device tests a second testing function of the Bluetooth device based on the reestablished Bluetooth connection.
In this embodiment of the present application, the second test function may be the same as the first test function, or the second test function may be a different function from the first test function, which is not limited in this embodiment of the present application.
For possible implementation, refer to the description in S502, and are not described again.
In the embodiment of the application, under the condition that the Bluetooth device receives the disconnection indication information of the test device, if the Bluetooth device does not include the session with the test device, the connection with the signaling channel of the test device is disconnected, so that even if the Bluetooth device receives the connection request message sent by the test device again in a short time, the Bluetooth device can still respond to the connection request of the test device, the test device can normally establish Bluetooth connection with the Bluetooth device, and the Bluetooth function test accuracy of the Bluetooth device on a Bluetooth test production line is improved.
It should be noted that, in the embodiment shown in fig. 5, S504 is an optional step, and the bluetooth device may also disconnect the signaling channel from the test device under the condition that the bluetooth device receives the disconnection indication information from the test device, so as to obtain a new embodiment, in the new embodiment, the bluetooth device receives the connection request message sent by the test device again in a short time, and the bluetooth device may still respond to the connection request of the test device, and the test device may normally establish bluetooth connection with the bluetooth device, so as to help improve the accuracy of the bluetooth function test of the bluetooth device on the bluetooth test production line.
It is understood that the bluetooth communication method may also be applied to the usage process of a bluetooth device, and as an example, as shown in fig. 7, a flowchart of another bluetooth communication method provided in the embodiment of the present application is shown, where the bluetooth communication method includes the following steps:
s701, the first electronic device and the second electronic device establish Bluetooth connection.
In this application embodiment, first electronic equipment can be bluetooth equipment such as bluetooth headset, bluetooth speaker, bluetooth bracelet and bluetooth lamps and lanterns. The second electronic device may be a terminal device such as a desktop computer, a notebook computer, a mobile phone, a palm computer, a tablet computer, and a vehicle-mounted terminal.
The possible implementation manner refers to the description in S501, and is not described in detail.
Optionally, S702, the first electronic device executes the first function of the first electronic device based on the bluetooth connection with the second electronic device.
In this embodiment, the first function may be a device function of the first electronic device. For example, the first function may be a bluetooth connection function.
In a possible implementation manner, the second electronic device receives a second operation for the function control in the second electronic device, and sends a first indication message to the first electronic device in response to the second operation, and the first electronic device executes the first function according to the first indication message.
Illustratively, the first electronic device is a bluetooth headset and the second electronic device is a mobile phone. The method comprises the steps that the mobile phone receives a trigger operation aiming at a music playing control in the mobile phone, and sends a first indication message to the Bluetooth headset in response to the trigger operation, wherein the first indication message is used for indicating the Bluetooth headset to play audio; the first indication message may include a play instruction and audio information; the mobile phone can send the played audio to the Bluetooth headset based on the data channel, and can send a playing instruction based on the signaling channel, and the Bluetooth headset plays the received audio according to the playing instruction.
And S703, the second electronic device sends disconnection indicating information to the first electronic device.
In this embodiment, the disconnection indication information may include an identifier of the second electronic device.
In a possible implementation manner, the second electronic device receives a user operation and sends disconnection indication information to the first electronic device in response to the user operation.
Illustratively, the handset receives a user operation and transmits a disconnect command (DISC) to the bluetooth headset in response to the user operation.
Optionally, S704, the first electronic device determines whether the first electronic device has a session with the second electronic device, if so, the process is not performed, and if not, S705 is executed.
For possible implementation, reference is made to the description in S504, and details are not repeated.
S705, the first electronic device disconnects the signaling channel of the second electronic device.
The possible implementation manner refers to the description in S505, and is not described again.
S706, the first electronic device and the second electronic device reestablish Bluetooth connection.
For possible implementation, reference is made to the description in S501, and details are not repeated.
And S707, the first electronic device executes a second function of the first electronic device based on the Bluetooth connection reestablished with the second electronic device.
In this embodiment of the present application, the second function may be the same as the first function, or the second function may be a function different from the first function, which is not limited in this embodiment of the present application.
For possible implementation, refer to the description in S502, and are not described again.
In this embodiment, S704 is an optional step, and if the first electronic device receives the disconnection indication information without this step, the first electronic device disconnects the signaling channel of the second electronic device, so that even if the first electronic device receives the connection request message sent by the second electronic device again in a short time, the first electronic device can still respond to the connection request of the second electronic device, and the second electronic device can normally establish a bluetooth connection with the first electronic device, thereby facilitating normal use of the bluetooth function of the first electronic device.
Under the condition that the step S704 is included, the first electronic device disconnects the signaling channel of the second electronic device under the condition that the disconnection indication information is received and the conversation with the second electronic device which sends the disconnection indication information is determined not to be included, so that the first electronic device can continuously complete the task under the condition that the first electronic device has the task which is not completed in the conversation with the second electronic device, and the normal use of the Bluetooth function of the first electronic device is further improved.
It should be noted that one or more steps in the above-mentioned embodiment shown in fig. 5 and the embodiment shown in fig. 7 may be omitted to obtain a new embodiment, and for example, omitting S702, S706 and S707 in the above-mentioned embodiment to obtain a new embodiment, as shown in fig. 8: the bluetooth communication method shown in fig. 8 includes the steps of:
s801, the first electronic device and the second electronic device establish Bluetooth connection.
In this embodiment, the first electronic device may be a bluetooth device, and the second electronic device may be a test device or any terminal device.
For possible implementation, reference is made to the description in S501, and details are not repeated.
S802, the second electronic device sends disconnection indicating information to the first electronic device.
For possible implementation manners, reference is made to descriptions in S502 and S702, and details are not repeated.
And S803, the first electronic equipment disconnects the signaling channel of the second electronic equipment based on the disconnection indication information.
In a possible implementation manner, reference is made to the description in S505, and details are not repeated.
In the embodiment of the application, the first electronic device disconnects the signaling channel of the second electronic device when receiving the disconnection indication information, so that even if the first electronic device receives the connection request message sent by the second electronic device again in a short time, the first electronic device can still respond to the connection request of the second electronic device, and the second electronic device can normally establish bluetooth connection with the first electronic device, thereby facilitating the normal use of the bluetooth function of the first electronic device.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the exemplary method steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal device implementing the bluetooth communication method may be divided into functional modules according to the above method examples, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. Illustratively, the functions of the target application, drawing interface, and display engine are integrated in the display control unit. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
An embodiment of the present application provides an electronic device, for example, an electronic device 90 shown in fig. 9 includes a communication module 901 and a processing module 902, where the communication module 901 is configured to establish a bluetooth connection with a test device; a processing module 902 configured to execute a first test function of a first electronic device based on a bluetooth connection; acquiring disconnection indication information; and disconnecting the signaling channel between the test equipment and the test equipment based on the disconnection indication information. For example, in conjunction with fig. 5, the communication module 901 may be configured to execute S501, S503, and S506, the processing module 902 may be configured to execute S502, S504 to S505, and S507, in conjunction with fig. 7, the communication module 901 may be configured to execute S701, S703, and S706, the processing module 902 may be configured to execute S702, S704 to S705, and S707, in conjunction with fig. 8, the communication module 901 may be configured to execute S801 to S802, and the processing module 902 may be configured to execute S803.
Optionally, the communication module 901 is further configured to reestablish a bluetooth connection with the test device; the processing module 902 is configured to perform a second test function of the first electronic device based on the re-established bluetooth connection.
Optionally, the communication module 901 is specifically configured to: and in the case that the first electronic equipment determines that the session with the test equipment is not included, disconnecting the signaling channel with the test equipment based on the disconnection indication information.
Optionally, the communication module 901 is specifically configured to disconnect a signaling channel of the test device by calling a disconnection interface of the communication protocol layer.
Optionally, the processing module 902 is specifically configured to close a session with the test device based on the disconnection indication information.
In one example, in conjunction with fig. 4, the functions of the communication module 901 may be implemented by the wireless communication module 403, and the functions of the processing module 902 may be implemented by the processor 401 invoking a computer program in the memory 402.
Fig. 10 is a schematic structural diagram of a chip according to an embodiment of the present application. Chip 100 includes one or more (including two) processors 1001, communication lines 1002, and a communication interface 1003, and optionally chip 100 also includes a memory 1004.
In some implementations, the memory 1004 stores the following elements: an executable module or a data structure, or a subset thereof, or an expanded set thereof.
The method described in the embodiments of the present application may be applied to the processor 1001, or may be implemented by the processor 1001. The processor 1001 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 1001. The processor 1001 may be a general-purpose processor (e.g., a microprocessor or a conventional processor), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate, transistor logic device or discrete hardware component, and the processor 1001 may implement or execute the methods, steps and logic blocks disclosed in the embodiments of the present application.
The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the field, such as a random access memory, a read only memory, a programmable read only memory, or a charged erasable programmable memory (EEPROM). The storage medium is located in the memory 1004, and the processor 1001 reads the information in the memory 1004 and completes the steps of the method in combination with the hardware thereof.
The processor 1001, the memory 1004, and the communication interface 1003 may communicate with each other via a communication line 1002.
In the above embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product may be written in the memory in advance, or may be downloaded in the form of software and installed in the memory.
Embodiments of the present application also provide a computer program product comprising one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. Computer instructions may be stored in, or transmitted from, a computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optics, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.), the computer-readable storage medium may be any available medium that a computer can store or a data storage device including one or more available media integrated servers, data centers, etc., the available media may include, for example, magnetic media (e.g., floppy disks, hard disks, or magnetic tape), optical media (e.g., digital versatile disks, DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), etc.
An embodiment of the present application provides an electronic device, which includes a memory and a processor, and the processor calls a computer program in the memory to implement a method executed by a first electronic device or a method executed by a bluetooth device in any of the bluetooth communication methods described above.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may include any medium that can communicate a computer program from one place to another. A storage medium may be any target medium that can be accessed by a computer.
As one possible design, the computer-readable medium may include a compact disk read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disk storage; the computer readable medium may include a disk memory or other disk storage device. Also, any connecting line may also be properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Combinations of the above should also be included within the scope of computer-readable media. The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A Bluetooth communication method is applied to a test system, the test system comprises a Bluetooth device and a test device, and the method comprises the following steps:
the Bluetooth device and the test device establish Bluetooth connection;
the test device testing a first test function of the Bluetooth device based on the Bluetooth connection;
the test equipment sends disconnection indication information to the Bluetooth equipment;
and the Bluetooth equipment disconnects a signaling channel between the Bluetooth equipment and the test equipment based on the disconnection indication information.
2. The bluetooth communication method according to claim 1, characterized in that the method further comprises:
the Bluetooth device and the test device reestablish Bluetooth connection;
the test device tests a second test function of the Bluetooth device based on the reestablished Bluetooth connection.
3. The bluetooth communication method according to claim 1 or 2, wherein the disconnection indication information includes an identifier of the test device, and the bluetooth device disconnects a signaling channel with the test device based on the disconnection indication information, including:
in a case where the Bluetooth device determines that a session with the test device is not included, the Bluetooth device disconnects a signaling channel with the test device based on the disconnection indication information.
4. A Bluetooth communication method is applied to a first electronic device, and comprises the following steps:
the first electronic equipment and the test equipment establish Bluetooth connection;
the first electronic device performs a first test function of the first electronic device based on the Bluetooth connection;
the first electronic equipment acquires disconnection indicating information;
and the first electronic equipment disconnects a signaling channel between the first electronic equipment and the test equipment based on the disconnection indication information.
5. The bluetooth communication method according to claim 4, characterized in that the method further comprises:
the first electronic equipment and the test equipment reestablish Bluetooth connection;
the first electronic device performs a second test function of the first electronic device based on the reestablished Bluetooth connection.
6. The bluetooth communication method according to claim 4 or 5, wherein the first electronic device disconnects a signaling channel with the test device based on the disconnection indication information, comprising:
in the case that the first electronic device determines that the session with the test device is not included, the first electronic device disconnects a signaling channel with the test device based on the disconnection indication information.
7. The bluetooth communication method according to claim 4, wherein the first electronic device disconnects a signaling channel with the test device based on the disconnection indication information, comprising:
and the first electronic equipment closes the session with the test equipment based on the disconnection indication information.
8. An electronic device, characterized in that the electronic device comprises a processor and a memory, the processor being configured to invoke a computer program in the memory to perform the steps performed by the bluetooth device in the bluetooth communication method according to any of the claims 1-3 or to perform the bluetooth communication method according to any of the claims 4-7.
9. A computer-readable storage medium, storing computer instructions, which, when executed on a terminal device, cause the terminal device to perform the steps performed by the bluetooth device in the bluetooth communication method according to any one of claims 1 to 3, or to perform the bluetooth communication method according to any one of claims 4 to 7.
10. A chip comprising at least one processor and a communication interface, the communication interface and the at least one processor being interconnected by a line, the at least one processor being configured to execute a computer program or instructions to perform the steps performed by the bluetooth device in the bluetooth communication method according to any one of claims 1 to 3 or to perform the bluetooth communication method according to any one of claims 4 to 7.
CN202210285038.2A 2022-03-23 2022-03-23 Bluetooth communication method, device and storage medium Active CN114390502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210285038.2A CN114390502B (en) 2022-03-23 2022-03-23 Bluetooth communication method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210285038.2A CN114390502B (en) 2022-03-23 2022-03-23 Bluetooth communication method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114390502A true CN114390502A (en) 2022-04-22
CN114390502B CN114390502B (en) 2022-12-20

Family

ID=81205908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210285038.2A Active CN114390502B (en) 2022-03-23 2022-03-23 Bluetooth communication method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114390502B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116052607A (en) * 2023-04-03 2023-05-02 荣耀终端有限公司 Electronic equipment control method, device, chip, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205566642U (en) * 2016-04-05 2016-09-07 东莞市猎声电子科技有限公司 Bluetooth headset testing arrangement
EP3544209A1 (en) * 2018-03-20 2019-09-25 Kabushiki Kaisha Toshiba System, electronic device, and test method
WO2019184527A1 (en) * 2018-03-29 2019-10-03 深圳市九洲电器有限公司 Method and apparatus for testing stability of set top box, and electronic device
CN112312434A (en) * 2020-10-26 2021-02-02 上海闻泰信息技术有限公司 Bluetooth function testing method and device, electronic equipment and storage medium
CN112839323A (en) * 2020-12-31 2021-05-25 Tcl通力电子(惠州)有限公司 Bluetooth device testing method and device, terminal and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205566642U (en) * 2016-04-05 2016-09-07 东莞市猎声电子科技有限公司 Bluetooth headset testing arrangement
EP3544209A1 (en) * 2018-03-20 2019-09-25 Kabushiki Kaisha Toshiba System, electronic device, and test method
WO2019184527A1 (en) * 2018-03-29 2019-10-03 深圳市九洲电器有限公司 Method and apparatus for testing stability of set top box, and electronic device
CN112312434A (en) * 2020-10-26 2021-02-02 上海闻泰信息技术有限公司 Bluetooth function testing method and device, electronic equipment and storage medium
CN112839323A (en) * 2020-12-31 2021-05-25 Tcl通力电子(惠州)有限公司 Bluetooth device testing method and device, terminal and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116052607A (en) * 2023-04-03 2023-05-02 荣耀终端有限公司 Electronic equipment control method, device, chip, electronic equipment and medium
CN116052607B (en) * 2023-04-03 2023-09-19 荣耀终端有限公司 Electronic equipment control method, device, chip, electronic equipment and medium

Also Published As

Publication number Publication date
CN114390502B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN110225563B (en) Network registration method and equipment
CN112839303B (en) Method and related device for device reconnection
EP4228374A1 (en) Service processing method and apparatus in terminal device supporting double cards
CN114244960B (en) Incoming call response method and corresponding terminal and communication system
US20220217776A1 (en) Information indicating method, device and system
CN109451525B (en) Congestion judgment method and device
US11742884B2 (en) Data transmission method and device, and communication system
US20220255617A1 (en) Information transmission method and device
WO2020155013A1 (en) Emergency calling method and user terminal
CN114996168A (en) Multi-device cooperative test method, test device and readable storage medium
CN114390502B (en) Bluetooth communication method, device and storage medium
CN115052066A (en) Communication method and related device
CN114466099B (en) Control method and device of Bluetooth equipment and storage medium
CN112867115A (en) Wireless device and wireless communication method
CN115499818B (en) Data processing method, system, electronic device, bluetooth peripheral device and storage medium
US20220183007A1 (en) Method and device for transmission bandwidth determination
CN112866965A (en) Intelligent glasses
CN112867114A (en) Wireless device
CN112399628B (en) Random access method, electronic equipment and network equipment
CN112866964A (en) Wireless earphone assembly
CN115412387A (en) Audio playing method and system and electronic equipment
CN114696961B (en) Multimedia data transmission method and equipment
CN113810888B (en) Method and device for adjusting power of Bluetooth equipment and storage medium
CN116761222B (en) Method for switching base station, terminal equipment and readable storage medium
WO2023165347A1 (en) Method and apparatus for channel switching

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